Home Assistant port
Home Assistant Port: 8123 or 80, and How to Open It
Home Assistant serves its web interface and API over TCP. Home Assistant Container and Home Assistant OS installations set up before 2026.8 use port 8123 (http://homeassistant.local:8123). New Home Assistant OS installations since 2026.8 use port 80 (http://homeassistant.local). To see which one you have, open Settings > System > Network and look at Server port under HTTP server. Traffic is plain HTTP until you add an SSL certificate.
Some links on this page are affiliate links. If you buy through them, we may earn a commission at no extra cost to you. We also cover the free and official options, and recommend them where they fit better.
- Default port (new HA OS)
- 80
- Default port (Container, older HA OS)
- 8123
- Protocol
- TCP (HTTP and WebSocket)
- Encrypted?
- Only after you add a certificate
- Where to change it
- Settings > System > Network
Last updated:
Which port does Home Assistant use?
Upgrading does not move an existing installation to port 80. If homeassistant.local:8123 does not load on a new Home Assistant Green, Yellow or freshly flashed Raspberry Pi, drop the port and try http://homeassistant.local.
The same port carries the web interface, the companion apps and the REST and WebSocket APIs, so it is the only Home Assistant port you ever forward for remote access.
| Installation | Default port | Local URL |
|---|---|---|
| Home Assistant OS, installed 2026.8 or later | 80 | http://homeassistant.local |
| Home Assistant OS, installed before 2026.8 | Keeps its old port, usually 8123 | http://homeassistant.local:8123 |
| Home Assistant Container (Docker) | 8123 | http://<host-ip>:8123 |
How to change the Home Assistant port
- 1
Open the network settings
Go to Settings > System > Network and find the HTTP server section.
- 2
Set the server port
Enter the new port, for example
8123to go back to the classic port, or8443if you plan to serve HTTPS on a non-standard port. Avoid ports other apps on the same host already use. - 3
Save and confirm within 5 minutes
Home Assistant restarts with the new port. Open it on the new address and confirm the change. If no administrator confirms within 5 minutes, it reverts to the previous settings, so a typo cannot lock you out.
- 4
Update everything that points at the old port
Change the internal and external URLs in the companion apps, any reverse proxy upstream, and your router's port forwarding rule.
Older versions and Docker
Before 2026.8, the port was set with server_port under http: in configuration.yaml. Those settings are imported into the UI the first time a newer version starts. On installation types that accept environment variables, SETUP_PORT overrides the default port at startup.
# Home Assistant Container: use host networking so the port is the one HA listens on
docker run -d --name homeassistant --network=host \
-e SETUP_PORT=8123 \
-v /opt/homeassistant:/config \
ghcr.io/home-assistant/home-assistant:stableOther ports Home Assistant and its apps use
Apart from the web port, these only need to be reachable inside your network. If you run a firewall on the host, allow them from your LAN, and use the port scanner on your public IP to make sure none of them is exposed by accident.
| Service | Port | Protocol | Open to the internet? |
|---|---|---|---|
| Web interface and API | 8123 or 80 | TCP | Only for remote access, ideally behind HTTPS |
| Mosquitto MQTT broker | 1883 (1884 WebSockets) | TCP | No, keep it on the LAN |
| Mosquitto MQTT with TLS | 8883 (8884 WebSockets) | TCP | Only if remote devices must publish |
| HomeKit Bridge | 21063 (each extra bridge needs its own port) | TCP | No |
| HomeKit discovery (mDNS) | 5353 | UDP | No |
| ESPHome native API (on the device) | 6053 | TCP | No |
Remote access: your options
If Home Assistant is the only thing you want to reach and you do not mind a subscription, Home Assistant Cloud is the simplest choice and it funds the project. Tailscale is the best free option, as long as you only connect from your own devices.
| Option | Open ports? | Works behind CGNAT | Cost |
|---|---|---|---|
| Home Assistant Cloud (renamed Home Assistant Link) | None | Yes | $6.50/month or $65/year |
| Tailscale or ZeroTier | None | Yes | Free tiers; every phone must run the VPN app |
| Port forwarding plus HTTPS | One (your HA port or 443) | No | Free with a public IP |
| Reverse proxy (Nginx, Caddy) on 443 | 443 (and 80 for certificates) | No | Free with a public IP |
| VPN with port forwarding | On the VPN server, not your router | Yes | Paid VPN plus add-on |
Port forward Home Assistant (with a public IP)
- 1
Give Home Assistant a fixed local IP
Reserve its address in your router's DHCP settings, so the forwarding rule never points at the wrong device.
- 2
Turn on HTTPS first
Add a certificate under Settings > System > Network (for example from the Let's Encrypt or DuckDNS app) and enter the certificate and key paths, such as
/ssl/fullchain.pemand/ssl/privkey.pem. Never expose plain HTTP: passwords and tokens would cross the internet unencrypted. - 3
Forward the port on your router
Forward an external TCP port, often 443 or 8123, to Home Assistant's local IP and server port. See how port forwarding works if your router's menus are unfamiliar.
- 4
Test it from outside
Run the open port checker on your public IP and the forwarded port. If it shows open, set the external URL in the companion app to
https://your-domain:port.
Behind a reverse proxy
Turn on Trust X-Forwarded-For and add the proxy's address to Trusted proxies in the HTTP server settings. Home Assistant blocks proxied requests until you do. When you enter a network mask, use the network address, such as 192.168.1.0/24.
Home Assistant remote access behind CGNAT
If your router's WAN address is in 100.64.0.0/10 or differs from your public IP, your ISP uses carrier-grade NAT and router port forwarding cannot work, as the Home Assistant documentation itself warns. This is the norm on Starlink, 5G home internet and many fiber networks. Confirm it with the CGNAT check.
Home Assistant Cloud and Tailscale both work behind CGNAT because they only make outbound connections. A VPN with port forwarding is worth it when you want a normal public address for Home Assistant and other things at home too, such as cameras, a NAS or Plex, without a separate service for each. PureVPN's Port Forwarding add-on lets you choose the exact ports to open, such as 8123 or 443, on the VPN server's IP, and a dedicated IP keeps that address fixed. Read port forwarding behind CGNAT for how it works and how it compares with other VPNs.
One catch: you cannot install a regular VPN app on Home Assistant OS. Run the PureVPN connection on your router (PureVPN supports router setups and port forwarding on them), or on the machine that hosts Home Assistant Container.
Public access behind CGNAT
PureVPN + Port Forwarding
- Open the exact ports you need, such as 8123 or 443, up to 15 at a time.
- Works on routers, so Home Assistant OS needs no VPN app.
- Add a dedicated IP for an address that never changes.
- 31-day money-back guarantee.
Is it safe to open the Home Assistant port?
- Only with HTTPS. Plain HTTP on 8123 or 80 sends your password and long-lived tokens in clear text.
- Turn on multi-factor authentication for every user who can sign in remotely.
- Forward only the web port. Never forward MQTT, HomeKit or SSH ports.
- Keep Home Assistant updated, and re-check what is exposed with the port scanner after router changes.
Home Assistant port FAQ
What port does Home Assistant use?
Port 8123 over TCP on Home Assistant Container and on Home Assistant OS installed before 2026.8. New Home Assistant OS installations since 2026.8 use port 80. Check Settings > System > Network > Server port to be sure.
Why doesn't homeassistant.local:8123 work?
On a Home Assistant OS installation set up with 2026.8 or later, the default port is 80, so open http://homeassistant.local without a port. If neither works, use the device's IP address, because some networks do not resolve .local names.
Is port 8123 TCP or UDP?
TCP. The web interface, the API and the companion apps all use HTTP and WebSockets over TCP.
Should I forward port 8123 or 443?
Either works. Forwarding external 443 to Home Assistant lets you use https://your-domain without a port number. Whichever you choose, enable HTTPS before forwarding anything.
Can I access Home Assistant remotely without port forwarding?
Yes. Home Assistant Cloud and Tailscale need no open ports. A VPN with port forwarding gives you a public address without touching your router.
Does Home Assistant remote access work behind CGNAT?
Router port forwarding does not. Home Assistant Cloud, Tailscale or a VPN with port forwarding all work, because none of them needs an inbound connection to your home IP.
What port does the HomeKit Bridge use?
TCP 21063 by default, plus UDP 5353 for mDNS discovery. Each additional bridge needs its own port.
References
- Home Assistant: HTTP integration — default ports by installation type, SSL and reverse proxy settings.
- Home Assistant: Remote access — official remote access options and the CGNAT warning.
- Home Assistant: HomeKit Bridge — HomeKit Bridge port and firewall requirements.
- Mosquitto broker app documentation — MQTT ports 1883, 1884, 8883 and 8884.
- Nabu Casa pricing — Home Assistant Cloud / Link price.