To enable HomeAssistant usage with a reverse proxy under the following assumptions:

  • The proxy server and HASS are both on the same physical host
  • HomeAssistant is set up via Docker Compose and in host networking mode
  • The proxy server is set up via Docker Compose and not in host networking mode

When you configure the proxy, you’ll need to configure it to route traffic to the external IP address of the whole host, not the HomeAssistant container. For example, routing from homeassistant.example.com to http://192.168.30.142:8123.

Voice preview

If you have a Voice Preview Edition, see also HASS Voice Preview and Reverse Proxies.

HASS Proxy Settings

you will need to add / edit the following settings:

  • Settings ⇒ System ⇒ Network ⇒ HTTP Server ⇒ Reverse proxy:
    • Trust X-Forwarded-For: enabled
    • Add 172.18.0.0/16 (or whatever your proxy network is) to the list

The old way

Deprecated!

This method is deprecated in HASS 2027.2. HASS will automatically migrate your configuration into the settings pane for you, but you should remove the settings section from your config.

you will need to add the following to the configuration.yaml for HomeAssistant:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.18.0.0/16      # or whatever your proxy network is

Additionally, if you want HASS to be reachable only via proxy, add server_host: 127.0.0.1 to that http object. I don’t know how to configure this in the new settings menu.

See also

https://community.home-assistant.io/t/reverse-proxy-using-nginx/196954, step 9 in particular details this configuration entry

homeassistant