meat Posted December 9, 2020 Share Posted December 9, 2020 I am using the hassio_supervisor docker container which in turn installs several other containers in Docker including the homeassistant container. I am also running the SWAG container which uses nginx for it's reverse proxy. The problem I'm having is nginx requires a custom bridge network for it to route traffic to the proper container, in this case, the homeassistant container. While I can set the network by editing the hassio_supervisor container, I am unable to edit the homeassistant container and it's using the host network. Does anyone know of any workarounds for this? I'm farily new to unRAID so I'm not sure if it's possible to edit containers from the terminal or if there are other ways to configure nginx files to map to containers on the host network. Any help would be greatly appreciated. I did come across this but I haven't given it a try yet: Quote Link to comment
squish102 Posted January 11, 2021 Share Posted January 11, 2021 (edited) Did you ever figure this out? I am running home assistant core in host network and swag on it's own network (that works as reverse proxy for those). If I change HA to network it stops working and if I point swag to HA in host mode, it doesn't see it. Edit: Working - leave HA in host and in SWAG config, just point to IP Edited January 11, 2021 by squish102 Quote Link to comment
BelgarionNL Posted January 15, 2021 Share Posted January 15, 2021 where do you point to home assistant in the SWAG config? Quote Link to comment
xxbigfootxx Posted January 26, 2021 Share Posted January 26, 2021 On 1/16/2021 at 5:09 AM, BelgarionNL said: where do you point to home assistant in the SWAG config? Open the config and you will see two lines like below: "proxy_pass $upstream_proto://$upstream_app:$upstream_port; Delete $upstream_app and repalce with IP of HA instance. You'll need to do it for both. proxy_pass $upstream_proto://10.1.1.200:$upstream_port; (For example) Save config and restart SWAG. 2 1 Quote Link to comment
TrueImpulse Posted March 13, 2021 Share Posted March 13, 2021 (edited) I keep having an issue where after I try to login via the cname I created I get a message that says "Unable to connect to Home Assistant." If I log in via the local IP it works fine. Im using the HA core docker and its network is set to host. I was able to get it working adding these lines to my nginx config file proxy_pass http://ip-address:8123; proxy_set_header Host $host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; Anyone see any issues with adding these line? Edited March 13, 2021 by TrueImpulse Quote Link to comment
bigbangus Posted June 16, 2021 Share Posted June 16, 2021 Is it safe to have nginx point to something on the host network? In addition to this proxy-conf modification, what do you need to define in the configuration.yaml of the appdata of the HA container? Quote Link to comment
arifer Posted September 22, 2021 Share Posted September 22, 2021 @bigbangus You would need to add the following lines to the configuration.yaml file: http: use_x_forwarded_for: true trusted_proxies: - 172.XX.XX.XX # The SWAG docker IP address You can always check for your SWAG docker IP address by checking it in the port mappings column of the Dockers tab. Quote Link to comment
CajunCoding Posted November 14, 2021 Share Posted November 14, 2021 Worth sharing one more thing to simplify complications later on. You can set the trusted_proxies value in the HomeAssistant configuration to the Docker IP Range! This way if you ever have to change (or re-install SWAG; like I just had to do) you won't have a broken HomeAssistant instance (with no recollection of having worked all this very specific IP stuff out some time back).... http: use_x_forwarded_for: true trusted_proxies: - 172.X.0.0/12 # The IP Range for SWAG docker IP address Quote Link to comment
Recommended Posts
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.