[{"data":1,"prerenderedAt":755},["ShallowReactive",2],{"content-query-i3S3iFZW1f":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"layout":10,"crumb":11,"summary":12,"group":13,"order":14,"port":15,"updated":16,"cta":17,"related":25,"faq":44,"body":57,"_type":748,"_id":749,"_source":750,"_file":751,"_stem":752,"_extension":753,"sitemap":754},"/localhost/8123","localhost",false,"","localhost:8123: Home Assistant's default port and remote access","localhost:8123 is Home Assistant's default port. Fix 'refused to connect' and 400 Bad Request behind a proxy, change the port and get remote access.","reference","localhost:8123","Home Assistant (homeassistant.local:8123).","Data, AI and automation",14,8123,"2026-10-28",{"eyebrow":18,"title":19,"text":20,"to":21,"label":22,"secondaryTo":23,"secondaryLabel":24},"Webhook Relay for Home Assistant","Remote access and webhooks without port forwarding","A Webhook Relay tunnel gives Home Assistant on port 8123 a stable HTTPS address with no router changes or public IP. If you only need IFTTT, Zapier or other services to trigger automations, forward webhooks instead and keep the UI private.","/docs/tutorials/edge/home-assistant/","Home Assistant setup","/blog/home-assistant-remote-access/","Remote access on a Raspberry Pi",[26,29,32,35,38,41],{"title":27,"to":28},"localhost:5678 (n8n)","/localhost/5678/",{"title":30,"to":31},"localhost:8080","/localhost/8080/",{"title":33,"to":34},"127.0.0.1 and the loopback address","/localhost/127-0-0-1/",{"title":36,"to":37},"502 Bad Gateway","/http-errors/502-bad-gateway/",{"title":39,"to":40},"What is a reverse proxy?","/glossary/reverse-proxy/",{"title":42,"to":43},"What is a webhook URL?","/glossary/webhook-url/",[45,48,51,54],{"q":46,"a":47},"What is localhost:8123?","localhost:8123 is the default port of Home Assistant. On the machine running it, the dashboard is at http://localhost:8123; from other devices on your network it is usually http://homeassistant.local:8123 or http://IP-ADDRESS:8123.",{"q":49,"a":50},"Why can't I open homeassistant.local:8123?","Either Home Assistant is still starting, which can take several minutes on first boot, or your device cannot resolve the .local name. Try the IP address shown by your router, for example http://192.168.1.50:8123.",{"q":52,"a":53},"Why does Home Assistant return 400 Bad Request behind a reverse proxy?","Home Assistant rejects requests that carry an X-Forwarded-For header from a proxy it does not trust. Add use_x_forwarded_for true and a trusted_proxies list with the proxy's IP address under the http section of configuration.yaml, then restart.",{"q":55,"a":56},"How do I change the Home Assistant port?","Set server_port under the http integration in configuration.yaml, for example server_port 8124, and restart Home Assistant. In Docker you can instead keep 8123 in the container and change the published host port.",{"type":58,"children":59,"toc":740},"root",[60,111,118,203,216,222,321,327,371,396,408,450,455,461,481,566,578,584,589,663,668,674,694,729,734],{"type":61,"tag":62,"props":63,"children":64},"element","p",{},[65,78,80,86,88,94,96,102,104,109],{"type":61,"tag":66,"props":67,"children":68},"strong",{},[69,76],{"type":61,"tag":70,"props":71,"children":73},"code",{"className":72},[],[74],{"type":75,"value":11},"text",{"type":75,"value":77}," is the default port of Home Assistant, the open-source home automation platform.",{"type":75,"value":79}," On the machine running it, the dashboard is at ",{"type":61,"tag":70,"props":81,"children":83},{"className":82},[],[84],{"type":75,"value":85},"http://localhost:8123",{"type":75,"value":87},"; from a phone or laptop on the same network it's normally ",{"type":61,"tag":70,"props":89,"children":91},{"className":90},[],[92],{"type":75,"value":93},"http://homeassistant.local:8123",{"type":75,"value":95}," or ",{"type":61,"tag":70,"props":97,"children":99},{"className":98},[],[100],{"type":75,"value":101},"http://\u003CIP>:8123",{"type":75,"value":103},". Getting to it from ",{"type":61,"tag":66,"props":105,"children":106},{},[107],{"type":75,"value":108},"outside",{"type":75,"value":110}," your home network is the part that takes some setup.",{"type":61,"tag":112,"props":113,"children":115},"h2",{"id":114},"what-runs-on-port-8123",[116],{"type":75,"value":117},"What runs on port 8123",{"type":61,"tag":119,"props":120,"children":121},"table",{},[122,141],{"type":61,"tag":123,"props":124,"children":125},"thead",{},[126],{"type":61,"tag":127,"props":128,"children":129},"tr",{},[130,136],{"type":61,"tag":131,"props":132,"children":133},"th",{},[134],{"type":75,"value":135},"Install type",{"type":61,"tag":131,"props":137,"children":138},{},[139],{"type":75,"value":140},"How 8123 is served",{"type":61,"tag":142,"props":143,"children":144},"tbody",{},[145,165,184],{"type":61,"tag":127,"props":146,"children":147},{},[148,154],{"type":61,"tag":149,"props":150,"children":151},"td",{},[152],{"type":75,"value":153},"Home Assistant OS (Raspberry Pi, Green, Yellow, VM)",{"type":61,"tag":149,"props":155,"children":156},{},[157,159],{"type":75,"value":158},"Built in, ",{"type":61,"tag":70,"props":160,"children":162},{"className":161},[],[163],{"type":75,"value":164},"homeassistant.local:8123",{"type":61,"tag":127,"props":166,"children":167},{},[168,173],{"type":61,"tag":149,"props":169,"children":170},{},[171],{"type":75,"value":172},"Home Assistant Container (Docker)",{"type":61,"tag":149,"props":174,"children":175},{},[176,182],{"type":61,"tag":70,"props":177,"children":179},{"className":178},[],[180],{"type":75,"value":181},"--network=host",{"type":75,"value":183},", so 8123 on the host",{"type":61,"tag":127,"props":185,"children":186},{},[187,192],{"type":61,"tag":149,"props":188,"children":189},{},[190],{"type":75,"value":191},"Home Assistant Core (Python venv)",{"type":61,"tag":149,"props":193,"children":194},{},[195,201],{"type":61,"tag":70,"props":196,"children":198},{"className":197},[],[199],{"type":75,"value":200},"hass",{"type":75,"value":202},", listens on 8123",{"type":61,"tag":62,"props":204,"children":205},{},[206,208,214],{"type":75,"value":207},"ClickHouse also uses 8123 for its HTTP interface, so on a developer machine check which one you have with ",{"type":61,"tag":70,"props":209,"children":211},{"className":210},[],[212],{"type":75,"value":213},"lsof -i :8123",{"type":75,"value":215},".",{"type":61,"tag":112,"props":217,"children":219},{"id":218},"fix-refused-to-connect-on-port-8123",[220],{"type":75,"value":221},"Fix \"refused to connect\" on port 8123",{"type":61,"tag":223,"props":224,"children":225},"ol",{},[226,245,262,287],{"type":61,"tag":227,"props":228,"children":229},"li",{},[230,235,237,243],{"type":61,"tag":66,"props":231,"children":232},{},[233],{"type":75,"value":234},"Give it time.",{"type":75,"value":236}," First boot of Home Assistant OS downloads and installs components; the page at ",{"type":61,"tag":70,"props":238,"children":240},{"className":239},[],[241],{"type":75,"value":242},":8123",{"type":75,"value":244}," can take many minutes to appear.",{"type":61,"tag":227,"props":246,"children":247},{},[248,260],{"type":61,"tag":66,"props":249,"children":250},{},[251,253,259],{"type":75,"value":252},"Use the IP, not ",{"type":61,"tag":70,"props":254,"children":256},{"className":255},[],[257],{"type":75,"value":258},".local",{"type":75,"value":215},{"type":75,"value":261}," mDNS names don't resolve on every network or OS, especially on some Android devices and across VLANs. Find the IP in your router's client list.",{"type":61,"tag":227,"props":263,"children":264},{},[265,270,272,277,279,285],{"type":61,"tag":66,"props":266,"children":267},{},[268],{"type":75,"value":269},"Docker.",{"type":75,"value":271}," Home Assistant Container is meant to run with ",{"type":61,"tag":70,"props":273,"children":275},{"className":274},[],[276],{"type":75,"value":181},{"type":75,"value":278},". With bridge networking you must publish ",{"type":61,"tag":70,"props":280,"children":282},{"className":281},[],[283],{"type":75,"value":284},"-p 8123:8123",{"type":75,"value":286},", and device discovery won't work properly.",{"type":61,"tag":227,"props":288,"children":289},{},[290,295,297,303,305,311,313,319],{"type":61,"tag":66,"props":291,"children":292},{},[293],{"type":75,"value":294},"Broken config.",{"type":75,"value":296}," If Home Assistant started but the ",{"type":61,"tag":70,"props":298,"children":300},{"className":299},[],[301],{"type":75,"value":302},"http:",{"type":75,"value":304}," section of ",{"type":61,"tag":70,"props":306,"children":308},{"className":307},[],[309],{"type":75,"value":310},"configuration.yaml",{"type":75,"value":312}," is invalid, the web server may not come up. Check ",{"type":61,"tag":70,"props":314,"children":316},{"className":315},[],[317],{"type":75,"value":318},"home-assistant.log",{"type":75,"value":320},", or run the configuration check from the CLI.",{"type":61,"tag":112,"props":322,"children":324},{"id":323},"free-or-change-port-8123",[325],{"type":75,"value":326},"Free or change port 8123",{"type":61,"tag":328,"props":329,"children":333},"pre",{"className":330,"code":331,"language":332,"meta":7,"style":7},"language-bash shiki shiki-themes github-dark","# macOS / Linux\nlsof -i :8123\n","bash",[334],{"type":61,"tag":70,"props":335,"children":336},{"__ignoreMap":7},[337,349],{"type":61,"tag":338,"props":339,"children":342},"span",{"class":340,"line":341},"line",1,[343],{"type":61,"tag":338,"props":344,"children":346},{"style":345},"--shiki-default:#6A737D",[347],{"type":75,"value":348},"# macOS / Linux\n",{"type":61,"tag":338,"props":350,"children":352},{"class":340,"line":351},2,[353,359,365],{"type":61,"tag":338,"props":354,"children":356},{"style":355},"--shiki-default:#B392F0",[357],{"type":75,"value":358},"lsof",{"type":61,"tag":338,"props":360,"children":362},{"style":361},"--shiki-default:#79B8FF",[363],{"type":75,"value":364}," -i",{"type":61,"tag":338,"props":366,"children":368},{"style":367},"--shiki-default:#9ECBFF",[369],{"type":75,"value":370}," :8123\n",{"type":61,"tag":328,"props":372,"children":376},{"className":373,"code":374,"language":375,"meta":7,"style":7},"language-powershell shiki shiki-themes github-dark","# Windows\nnetstat -ano | findstr :8123\n","powershell",[377],{"type":61,"tag":70,"props":378,"children":379},{"__ignoreMap":7},[380,388],{"type":61,"tag":338,"props":381,"children":382},{"class":340,"line":341},[383],{"type":61,"tag":338,"props":384,"children":385},{},[386],{"type":75,"value":387},"# Windows\n",{"type":61,"tag":338,"props":389,"children":390},{"class":340,"line":351},[391],{"type":61,"tag":338,"props":392,"children":393},{},[394],{"type":75,"value":395},"netstat -ano | findstr :8123\n",{"type":61,"tag":62,"props":397,"children":398},{},[399,401,406],{"type":75,"value":400},"To move Home Assistant, set the port in ",{"type":61,"tag":70,"props":402,"children":404},{"className":403},[],[405],{"type":75,"value":310},{"type":75,"value":407}," and restart:",{"type":61,"tag":328,"props":409,"children":413},{"className":410,"code":411,"language":412,"meta":7,"style":7},"language-yaml shiki shiki-themes github-dark","http:\n  server_port: 8124\n","yaml",[414],{"type":61,"tag":70,"props":415,"children":416},{"__ignoreMap":7},[417,432],{"type":61,"tag":338,"props":418,"children":419},{"class":340,"line":341},[420,426],{"type":61,"tag":338,"props":421,"children":423},{"style":422},"--shiki-default:#85E89D",[424],{"type":75,"value":425},"http",{"type":61,"tag":338,"props":427,"children":429},{"style":428},"--shiki-default:#E1E4E8",[430],{"type":75,"value":431},":\n",{"type":61,"tag":338,"props":433,"children":434},{"class":340,"line":351},[435,440,445],{"type":61,"tag":338,"props":436,"children":437},{"style":422},[438],{"type":75,"value":439},"  server_port",{"type":61,"tag":338,"props":441,"children":442},{"style":428},[443],{"type":75,"value":444},": ",{"type":61,"tag":338,"props":446,"children":447},{"style":361},[448],{"type":75,"value":449},"8124\n",{"type":61,"tag":62,"props":451,"children":452},{},[453],{"type":75,"value":454},"On Home Assistant OS, leave 8123 alone unless you have a reason; add-ons and the companion app expect it.",{"type":61,"tag":112,"props":456,"children":458},{"id":457},"_400-bad-request-behind-a-proxy-or-tunnel",[459],{"type":75,"value":460},"400 Bad Request behind a proxy or tunnel",{"type":61,"tag":62,"props":462,"children":463},{},[464,466,472,474,479],{"type":75,"value":465},"Put Home Assistant behind Nginx, Caddy, Traefik or a tunnel agent that adds ",{"type":61,"tag":70,"props":467,"children":469},{"className":468},[],[470],{"type":75,"value":471},"X-Forwarded-For",{"type":75,"value":473},", and you'll often get ",{"type":61,"tag":66,"props":475,"children":476},{},[477],{"type":75,"value":478},"400: Bad Request",{"type":75,"value":480},". Home Assistant refuses forwarded requests from proxies it doesn't trust. Tell it which proxies to trust:",{"type":61,"tag":328,"props":482,"children":484},{"className":410,"code":483,"language":412,"meta":7,"style":7},"http:\n  use_x_forwarded_for: true\n  trusted_proxies:\n    - 127.0.0.1      # proxy or agent on the same host\n    - 172.30.33.0/24 # example: add-on network on Home Assistant OS\n",[485],{"type":61,"tag":70,"props":486,"children":487},{"__ignoreMap":7},[488,499,516,529,548],{"type":61,"tag":338,"props":489,"children":490},{"class":340,"line":341},[491,495],{"type":61,"tag":338,"props":492,"children":493},{"style":422},[494],{"type":75,"value":425},{"type":61,"tag":338,"props":496,"children":497},{"style":428},[498],{"type":75,"value":431},{"type":61,"tag":338,"props":500,"children":501},{"class":340,"line":351},[502,507,511],{"type":61,"tag":338,"props":503,"children":504},{"style":422},[505],{"type":75,"value":506},"  use_x_forwarded_for",{"type":61,"tag":338,"props":508,"children":509},{"style":428},[510],{"type":75,"value":444},{"type":61,"tag":338,"props":512,"children":513},{"style":361},[514],{"type":75,"value":515},"true\n",{"type":61,"tag":338,"props":517,"children":519},{"class":340,"line":518},3,[520,525],{"type":61,"tag":338,"props":521,"children":522},{"style":422},[523],{"type":75,"value":524},"  trusted_proxies",{"type":61,"tag":338,"props":526,"children":527},{"style":428},[528],{"type":75,"value":431},{"type":61,"tag":338,"props":530,"children":532},{"class":340,"line":531},4,[533,538,543],{"type":61,"tag":338,"props":534,"children":535},{"style":428},[536],{"type":75,"value":537},"    - ",{"type":61,"tag":338,"props":539,"children":540},{"style":361},[541],{"type":75,"value":542},"127.0.0.1",{"type":61,"tag":338,"props":544,"children":545},{"style":345},[546],{"type":75,"value":547},"      # proxy or agent on the same host\n",{"type":61,"tag":338,"props":549,"children":551},{"class":340,"line":550},5,[552,556,561],{"type":61,"tag":338,"props":553,"children":554},{"style":428},[555],{"type":75,"value":537},{"type":61,"tag":338,"props":557,"children":558},{"style":367},[559],{"type":75,"value":560},"172.30.33.0/24",{"type":61,"tag":338,"props":562,"children":563},{"style":345},[564],{"type":75,"value":565}," # example: add-on network on Home Assistant OS\n",{"type":61,"tag":62,"props":567,"children":568},{},[569,571,577],{"type":75,"value":570},"Use the actual IP or range of your proxy; the log line for the rejected request shows it. Also make sure the proxy passes WebSocket upgrades, because the dashboard runs over a WebSocket at ",{"type":61,"tag":70,"props":572,"children":574},{"className":573},[],[575],{"type":75,"value":576},"/api/websocket",{"type":75,"value":215},{"type":61,"tag":112,"props":579,"children":581},{"id":580},"access-home-assistant-remotely",[582],{"type":75,"value":583},"Access Home Assistant remotely",{"type":61,"tag":62,"props":585,"children":586},{},[587],{"type":75,"value":588},"Options, from least to most setup:",{"type":61,"tag":590,"props":591,"children":592},"ul",{},[593,603,613,653],{"type":61,"tag":227,"props":594,"children":595},{},[596,601],{"type":61,"tag":66,"props":597,"children":598},{},[599],{"type":75,"value":600},"Home Assistant Cloud (Nabu Casa):",{"type":75,"value":602}," the paid official service, which also funds the project.",{"type":61,"tag":227,"props":604,"children":605},{},[606,611],{"type":61,"tag":66,"props":607,"children":608},{},[609],{"type":75,"value":610},"VPN",{"type":75,"value":612}," (WireGuard, Tailscale): nothing public at all; your phone joins the home network.",{"type":61,"tag":227,"props":614,"children":615},{},[616,621,623,629,631,636,638,644,646,652],{"type":61,"tag":66,"props":617,"children":618},{},[619],{"type":75,"value":620},"Tunnel:",{"type":75,"value":622}," a stable HTTPS address with no port forwarding, useful when your ISP uses CGNAT or you can't change router settings. Webhook Relay has a ",{"type":61,"tag":624,"props":625,"children":626},"a",{"href":21},[627],{"type":75,"value":628},"Home Assistant add-on and setup guide",{"type":75,"value":630},", and a ",{"type":61,"tag":624,"props":632,"children":633},{"href":23},[634],{"type":75,"value":635},"Raspberry Pi walkthrough",{"type":75,"value":637}," using the ",{"type":61,"tag":70,"props":639,"children":641},{"className":640},[],[642],{"type":75,"value":643},"webhookrelayd",{"type":75,"value":645}," agent in tunnel mode. There's also a ",{"type":61,"tag":624,"props":647,"children":649},{"href":648},"/blog/hassio-tls-tunnels-duckdns/",[650],{"type":75,"value":651},"TLS tunnels add-on guide",{"type":75,"value":215},{"type":61,"tag":227,"props":654,"children":655},{},[656,661],{"type":61,"tag":66,"props":657,"children":658},{},[659],{"type":75,"value":660},"Port forwarding 8123 on your router:",{"type":75,"value":662}," works if you have a public IP, but puts the login page directly on the internet. Turn on multi-factor authentication first.",{"type":61,"tag":62,"props":664,"children":665},{},[666],{"type":75,"value":667},"Whichever you pick, enable MFA for every user and keep Home Assistant updated.",{"type":61,"tag":112,"props":669,"children":671},{"id":670},"webhooks-into-home-assistant",[672],{"type":75,"value":673},"Webhooks into Home Assistant",{"type":61,"tag":62,"props":675,"children":676},{},[677,679,684,686,692],{"type":75,"value":678},"Automations can be triggered by a ",{"type":61,"tag":66,"props":680,"children":681},{},[682],{"type":75,"value":683},"webhook trigger",{"type":75,"value":685},", which listens at ",{"type":61,"tag":70,"props":687,"children":689},{"className":688},[],[690],{"type":75,"value":691},"/api/webhook/\u003Cwebhook_id>",{"type":75,"value":693}," on port 8123. Services like IFTTT, Zapier or a GitHub Action need a public URL for that. Instead of exposing the whole UI, forward only webhooks:",{"type":61,"tag":328,"props":695,"children":697},{"className":330,"code":696,"language":332,"meta":7,"style":7},"relay forward --bucket home http://localhost:8123/api/webhook/my-secret-id\n",[698],{"type":61,"tag":70,"props":699,"children":700},{"__ignoreMap":7},[701],{"type":61,"tag":338,"props":702,"children":703},{"class":340,"line":341},[704,709,714,719,724],{"type":61,"tag":338,"props":705,"children":706},{"style":355},[707],{"type":75,"value":708},"relay",{"type":61,"tag":338,"props":710,"children":711},{"style":367},[712],{"type":75,"value":713}," forward",{"type":61,"tag":338,"props":715,"children":716},{"style":361},[717],{"type":75,"value":718}," --bucket",{"type":61,"tag":338,"props":720,"children":721},{"style":367},[722],{"type":75,"value":723}," home",{"type":61,"tag":338,"props":725,"children":726},{"style":367},[727],{"type":75,"value":728}," http://localhost:8123/api/webhook/my-secret-id\n",{"type":61,"tag":62,"props":730,"children":731},{},[732],{"type":75,"value":733},"The bucket's public URL goes to the sending service, the dashboard stays private, and every delivery is logged. Treat the webhook ID as a secret, since anyone who knows it can trigger the automation.",{"type":61,"tag":735,"props":736,"children":737},"style",{},[738],{"type":75,"value":739},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":518,"depth":518,"links":741},[742,743,744,745,746,747],{"id":114,"depth":351,"text":117},{"id":218,"depth":351,"text":221},{"id":323,"depth":351,"text":326},{"id":457,"depth":351,"text":460},{"id":580,"depth":351,"text":583},{"id":670,"depth":351,"text":673},"markdown","content:localhost:8123.md","content","localhost/8123.md","localhost/8123","md",{"loc":4},1793199810741]