Quick answer
For most people, Home Assistant Cloud (Nabu Casa) is the simplest secure option. It needs no open ports and no certificate setup. A VPN such as Tailscale is a common free alternative that also avoids port forwarding. A reverse proxy with port forwarding can work well, but it needs the most configuration and carries the most risk.
Before you open remote access
Do these before you enable any route into your home:
- Update Home Assistant, and update any apps you use for the route, such as the VPN or proxy app.
- Turn on multi-factor authentication (MFA) for every account, not just the owner.
- Check whether your internet provider gives you a public IPv4 address. Some providers use carrier-grade NAT (CGNAT), which shares one address between many customers and blocks port forwarding. Mobile connections and some fibre and satellite plans can use CGNAT. If you are behind CGNAT, use Cloud or a VPN.
Option 1: Home Assistant Cloud (Nabu Casa)
Home Assistant Cloud is the paid subscription run by Nabu Casa, the company that helps fund Home Assistant development. Its remote access gives you an encrypted address without router changes. Open Settings, select Home Assistant Cloud, sign in, and turn on remote access.
The subscription costs about US$6.50 a month or US$65 a year in the US. Prices vary by region and can change, so check the Nabu Casa site before you subscribe. A trial is often offered. The same subscription covers voice-assistant linking; see whether Home Assistant is free for the full list of what Cloud adds.
Option 2: A VPN such as Tailscale or WireGuard
A VPN connects your phone or laptop to your home network through an encrypted tunnel. Nothing is exposed to the public internet, so there is nothing to forward on the router.
- Tailscale is a mesh VPN. You install its app on Home Assistant and on each device you use. Its free personal plan is often enough for home use, but limits change, so check the current plan.
- WireGuard is a lightweight VPN. It needs one UDP port (51820 by default) forwarded on your router, so it is not as “no ports” as Tailscale.
With a VPN, the companion app may need the VPN to stay connected to receive background sensor updates.
Option 3: Reverse proxy or port forwarding
With port forwarding, your router sends traffic from the internet to Home Assistant. With a reverse proxy, such as Nginx Proxy Manager, Caddy or Traefik, the proxy receives the traffic first and passes it on. Either way, the connection must use HTTPS. Plain HTTP on port 8123 over the public internet is not a secure remote setup.
The proxy must support WebSockets. Home Assistant also needs to know which proxy it trusts. Add these lines to configuration.yaml, replacing the address with your proxy’s IP or subnet:
http:
use_x_forwarded_for: true
trusted_proxies:
- 192.168.1.10
If trusted_proxies is missing, Home Assistant returns “400: Bad Request” when a proxy forwards traffic to it.
Do not use 0.0.0.0/0 here. Some guides suggest it because it makes the error go away, but it tells Home Assistant to trust every address, including addresses on the public internet, to report a visitor’s real IP.
Other options: DuckDNS and Cloudflare Tunnel
- DuckDNS gives you a free subdomain. Its app (called an add-on in older releases) can also request a Let’s Encrypt certificate. You can point Home Assistant at the certificate files with
ssl_certificateandssl_keyin thehttp:section. - Cloudflare Tunnel lets you reach Home Assistant without opening router ports. You need a domain managed in Cloudflare DNS. Cloudflare terminates TLS, so the traffic is encrypted to Cloudflare, not end to end to your Home Assistant.
Both are community-supported. Check their current documentation before you set them up.
Set the external URL and let the companion app switch
Go to Settings > System > Network and set the internal URL (your local address) and the external URL (your remote address). The companion app uses these to decide which address to call.
For a smoother switch, the companion app can also use your home Wi-Fi network name (SSID) to decide when you are at home. Set it in the app’s settings.
Lock down remote logins
- MFA. Turn on TOTP for each user under Profile > Security. If you lose your codes, see how to reset your Home Assistant password for the recovery options.
- IP banning. Enable it with
ip_ban_enabled: trueand setlogin_attempts_threshold, because no address is banned until a threshold is set. Home Assistant then bans an address after that many failed logins, and the bans are stored inip_bans.yaml. The example threshold below is five attempts. - Local-only users. Turn on Can only log in from the local network for accounts that never need remote access.
- Updates. Keep Home Assistant and your remote-access app updated.
http:
ip_ban_enabled: true
login_attempts_threshold: 5
When remote access fails
Check these, roughly in this order:
- The external URL in Settings > System > Network matches the address you are typing.
- The certificate has not expired.
- Your public IP address has not changed. Home connections often get a new public address over time, and a DDNS app can keep your name pointed at the current one.
- Your connection is not behind CGNAT.
- For Home Assistant Cloud, remote access is still turned on.
- If you see “400: Bad Request”, check
trusted_proxies.
If the address works at home but the local connection itself fails, see why you can’t connect to your Home Assistant.