This was super helpful to know that I would need to set my local network as a trusted network when using an external (existing) reverse proxy. However, I also discovered that I needed to ensure that the reverse proxy also supported (enabled) Web Sockets!
In case it helps anyone else, I am using the “Nginx Proxy Manager” docker container for Unraid Server to manage my reverse proxy routes and to terminate my SSL cert. – to simplify Home Assistant configuration that I’m also setting up to run on Unraid server.
While I was able to access the login screen after configuration, it consistently failed all login attempts until I enabled the WebSockets support for the Proxy Host configuraiton for HASS.IO…
This was a mysterious issue that I thankfully took a random shot in the dark enableing that and validating . . .
The rest could be sort-of sorted out via errors in the log, but ultimately did have to use the helpful info in this thread to set up the Trusted Proxy & Trusted Networks . . . as stated above the ‘trusted_proxy’ needed to be correctly set to the IP address of the Docker Container running the Nginx Proxy Manager . . . To get this I gleaned it from the Unraid Docker tab and confirmed with a python script (as it was in the format 172.17.0.XXX; which seems to be standard for Docker containers).
However I did not have to turn on Trusted Networks… this resolved the login issues as soon as I correctly enabled web sockets on Nginx, and set use_x_forwarded_for, and trusted_proxies just as above…
http:
#Uncomment this if you are using SSL or running in Docker etc
base_url: https://yourhass.somedomain.com
#Configure Reverse Proxy (External NGINX via Docker Container on Unraid)
trusted_proxies:
- 127.0.0.1
#IP Of NGINX Proxy Manager Docker Container
- 172.17.0.XXX
