Reference · Self-hosted services
Home Assistant port 8123: check remote access, IP bans, sign-in and tokens
Home Assistant listens on every address, on port 8123 or, on Home Assistant OS installed from 2026.8, port 80. Close router port forwards, use Home Assistant Cloud, a VPN or a trusted proxy, set an IP ban threshold, turn on multi-factor authentication and audit tokens.
| Target artifact | Home Assistant's web interface and API on TCP port 8123, or 80 on Home Assistant OS installed from 2026.8; its HTTP server settings; its users and their long-lived access tokens. |
|---|---|
| Default behaviour | Listens on every address (0.0.0.0 and ::) over plain HTTP. IP banning is on, but the code's default threshold of -1 bans no one. Requests through an untrusted reverse proxy are refused. Multi-factor authentication and Home Assistant Cloud remote access are off. |
| Safe state | No router port forward to Home Assistant; remote use through Home Assistant Cloud, a VPN or an HTTPS reverse proxy listed in Trusted proxies; a number in Login attempts before ban; multi-factor authentication on for every administrator; no long-lived access token you cannot name. |
| Check on Linux | sudo ss -tlnp 'sport = :8123' |
| Check in Home Assistant | Settings, System, Network, HTTP server: server port, listen addresses, trusted proxies and IP banning |
| Check in Home Assistant | User profile, Security: each long-lived access token, with when and from which address it was last used |
| Check from another device | nc -vz -w 5 PUBLIC_IP 8123, from a different network |
| Fix on the router | delete any port forward to port 8123 or 80 on the Home Assistant address |
| Fix in Home Assistant | turn off Unlimited login attempts and set Login attempts before ban; each administrator enables the Authenticator app module on their own profile |
| Fix for tokens | delete each long-lived access token you cannot account for |
Read the result
| Result | Meaning |
|---|---|
0.0.0.0:8123 and [::]:8123 | The default: every network the host is on |
nc from another network ends in succeeded! | The internet reaches Home Assistant: a router forwards the port, or the host has a public address |
nc times out or is refused | Not reachable from where you tested |
The ss check is for Home Assistant Container on Linux. On Home Assistant OS, read the port in the network settings, then test that port from another network, such as a phone's hotspot.
Port 8123 or port 80
Home Assistant 2026.8, released on 5 August 2026, gave new Home Assistant OS installations port 80. Older installations keep their port, usually 8123, and other installation types use 8123. The release also moved the web server settings into Settings, System, Network: an http: block in configuration.yaml, with keys such as use_x_forwarded_for, trusted_proxies, ip_ban_enabled and login_attempts_threshold, is imported once, and a repair asks you to remove it. After a change there, Home Assistant waits for you to confirm it: "If you do not confirm within five minutes, it assumes something went wrong, puts your previous settings back, and restarts."
Why forwarding the port is risky
Home Assistant's remote-access documentation says "Just putting a port up is not secure", and its security page says to set up a secure method for remote access "rather than exposing it directly to the internet". A forwarded port gives anyone:
- Readable traffic: without an SSL certificate and key, Home Assistant serves plain HTTP, so passwords cross the internet unencrypted.
- Unlimited guesses: nothing is banned until a threshold is set.
- More than the sign-in page: integrations add their own addresses. Advisory GHSA-x84v-g949-293w (CVE-2026-54317), published 18 June 2026, describes a Konnected integration address that answered read requests without a sign-in before 2026.6.0, giving out alarm-panel switch states and zone layout. On 8 March 2023, Home Assistant disclosed CVE-2023-27482, which let an attacker "remotely bypass authentication" to the Supervisor API on Home Assistant OS and Supervised installations.
Remote access without a port forward
Home Assistant Cloud
Under Settings, Home Assistant Cloud, Remote access, turn on the toggle. Nabu Casa, which runs the service, says the connection is end-to-end encrypted, with a certificate whose private key stays on your Home Assistant system, and that it blocks remote access for versions with known security issues. Home Assistant sees each remote client's own address, so a ban applies only to that client.
A virtual private network (VPN): Tailscale or WireGuard
Home Assistant's documentation names Tailscale and ZeroTier One: the VPN connects first, then you open Home Assistant as at home. A WireGuard server on your network works the same way.
On Home Assistant OS, Tailscale installs from the Apps menu. Its Serve feature keeps Home Assistant inside your Tailscale network; Tailscale says you "almost certainly" do not want Funnel, which "puts your Home Assistant setup on the public internet". For Serve, the app's documentation says to turn on Trust X-Forwarded-For and add 127.0.0.1 to Trusted proxies.
A reverse proxy
A reverse proxy, such as NGINX, Caddy or Traefik, takes HTTPS connections and passes them on. Turn on Trust X-Forwarded-For and add the proxy's address to Trusted proxies: until then, requests carrying an X-Forwarded-For header get 400 Bad Request. Enter a network with a slash by its network address, such as 192.168.1.0/24.
Ban repeated failed sign-ins
Under HTTP server, turn on Enable IP banning, turn off Unlimited login attempts, and set Login attempts before ban, from 1 to 1000. In Home Assistant's code, IP banning defaults to on with a threshold of -1, and a threshold below 1 counts nothing.
- Every failed sign-in is logged as
Login attempt or request with invalid authentication fromthe address, with a Login attempt failed notification, whatever the threshold. - A ban adds the address to
ip_bans.yamlin the configuration folder; it then gets403 Forbidden. Bans do not expire: delete the entry, then restart Home Assistant.
Multi-factor authentication
The Authenticator app module, a time-based one-time password, loads automatically unless configuration.yaml has an auth_mfa_modules block, but each user turns it on: User profile, Security, Multi-factor authentication modules, Enable. Codes depend on Home Assistant's clock being accurate.
Look for type: trusted_networks under auth_providers in configuration.yaml: anyone on a trusted network signs in by choosing a user name, without a password, and multi-factor authentication does not take part.
Owner, administrators and users
| Role | What it can do |
|---|---|
| Owner | Created at first start; always an administrator, cannot be deleted; alone can change other users' passwords |
| Administrator | Configures integrations, devices and system settings, and manages users |
| User | Uses Home Assistant and its own dashboards, without the configuration and system settings |
Under Settings, People, Users, turn off Administrator where it is not needed. Local access only stops an account signing in from outside, "neither through Home Assistant Cloud nor through direct remote access".
Audit long-lived access tokens
Scripts and other programs sign in with long-lived access tokens, valid for 10 years. On User profile, Security, which covers only the account you are signed in with, each token shows its name, when it was created, and when and from which IP address it was last used. Compare each address with the computers that should use the token, and delete each token you cannot account for. Home Assistant does not keep the token text, so create a new token for any program that still needs one.
Home Assistant and Ollama
The Ollama integration, in Home Assistant since 2024.4, adds a conversation agent, and its documentation says to make Ollama reachable over the network. Open port 11434 to the Home Assistant host's address only, as the Ollama exposure check shows. Under AI tools, Device control reaches only the entities exposed to voice assistants; Home Assistant reaches everything and works only for administrators.
Troubleshooting
400 Bad Request through a reverse proxy
The log names the cause: A request from a reverse proxy was received from ADDRESS, but your HTTP integration is not set-up for reverse proxies, or Received X-Forwarded-For header from an untrusted proxy ADDRESS. Add that address to Trusted proxies and turn on Trust X-Forwarded-For.
Related guides and lookups
Sources
- Home Assistant: HTTP integration
- Home Assistant: 2026.8 release notes
- Home Assistant: remote access
- Home Assistant: securing Home Assistant
- Home Assistant: multi-factor authentication
- Home Assistant: authentication, managing account access
- Home Assistant: authentication providers
- Home Assistant: people and user configuration
- Home Assistant developers: authentication API
- Home Assistant on GitHub: ban.py
- Home Assistant on GitHub: forwarded.py
- Home Assistant on GitHub: long-lived access tokens card
- Home Assistant: Ollama integration
- Home Assistant: Supervisor security disclosure
- Home Assistant on GitHub: advisory GHSA-x84v-g949-293w
- Nabu Casa: enabling remote access
- Nabu Casa: remote access security
- Tailscale: access Home Assistant remotely
- Home Assistant Community Apps: Tailscale app