October 11, 20241 yr When I hit the cname ha.mydomain.com, I immediately get this. 2024-10-11 16:39:21.730 ERROR (MainThread) [homeassistant.components.http.forwarded] A request from a reverse proxy was received from 172.18.0.1, but your HTTP integration is not set-up for reverse proxies I think I need to tell the docker, homeassistant, that it's being reverse proxied and it's okay little docker. That file, /mnt/user/appdata/configuration.yaml # Loads default set of integrations. Do not remove. default_config: # Load frontend themes from the themes folder frontend: themes: !include_dir_merge_named themes automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml Doesn't quite feel like the right place to put the "allow proxy" stuff. Any pointers? thanks!
October 12, 20241 yr Community Expert You need to add this http: # For extra security set this to only accept connections on localhost if NGINX is on the same machine # Uncommenting this will mean that you can only reach Home Assistant using the proxy, not directly via IP from other clients. # server_host: 127.0.0.1 use_x_forwarded_for: true # You must set the trusted proxy IP address so that Home Assistant will properly accept connections # Set this to your NGINX machine IP, or localhost if hosted on the same machine. trusted_proxies: <NGINX IP address here, or 127.0.0.1 if hosted on the same machine> Have a look here : https://community.home-assistant.io/t/reverse-proxy-using-nginx/196954
October 12, 20241 yr Author That definitely did something. My homeassistant unraid docker log is now empty. Now I'm getting a 530 error when I hit the url. cname setup in cloudflare pointing to my duckdns account. Works swimmingly for other services. contents of /mnt/user/appdata/homeassistant/configuration.yaml # Loads default set of integrations. Do not remove. default_config: # Load frontend themes from the themes folder frontend: themes: !include_dir_merge_named themes automation: !include automations.yaml script: !include scripts.yaml scene: !include scenes.yaml #10/12/2024 to get this to work with reverse-proxy NPM on unraid http: # For extra security set this to only accept connections on localhost if NGINX is on the same machine # Uncommenting this will mean that you can only reach Home Assistant using the proxy, not directly via IP from other clients. server_host: 127.0.0.1 use_x_forwarded_for: true # You must set the trusted proxy IP address so that Home Assistant will properly accept connections # Set this to your NGINX machine IP, or localhost if hosted on the same machine. trusted_proxies: 192.168.11.2 The docker settings, I do have it setup under "proxynet" for a different Network like this: I tried changing the Network Type: back to Bridge, no changes to the 502 error. Maybe that has something to do with this? I tried slapping some different ip addresses into the trusted_proxies: field, and got many errors. Looks like either 127.0.0.1, or 192.168.11.2 (ip of server) both work in there. When I change trusted_proxies: 127.0.0.1 Setting permissions [custom-init] No custom files found, skipping... [ls.io-init] done. to trusted_proxies: 192.168.11.2 Setting permissions [custom-init] No custom files found, skipping... Connection to localhost (127.0.0.1) 8123 port [tcp/*] succeeded! [ls.io-init] done. So that's slightly different. But after dinking with all of those, I'm still getting the 502 Bad Gateway error above. So: progress, but still stuck.
October 14, 20241 yr Community Expert Is 192.168.11.2 your unraid server IP ? Edited October 15, 20241 yr by deadnote
October 14, 20241 yr Author 27 minutes ago, deadnote said: Does 192.168.11.2 is your unraid server IP ? Correct. Server static ip is 192.168.11.2 Both NPM and Homeassistant are on custom network "proxynet"
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.