I can access all my containers as subdomains except one, homeassistant.
h t t p s / / homeassistant . XXXXXXXXXXXXX . duckdns . org gives me;
“502 Bad Gateway, nginx/1.16.1”
As there is already a provided “homeassistant.subdomain.conf.sample” I figured I don’t need to edit it, I just removed the “sample” part an started the container again.
I can’t tell if the 502 message is due to something wrong/missing in my nginx container, or if it is from the Home Assistant conatiner.
Perhaps it’s only nginx related.
The homeassistant.subdomain.conf reads;
“# make sure that your dns has a cname set for homeassistant and that your homeassistant container is not using a base url”
So, too make sure that I’m not using a buse url, I look into my “configuration.yaml” in the Home Assistant cantainer;
No matter what I edit, I still gate the 502 gateway.
Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
Uncomment this if you are using SSL/TLS, running in Docker container, etc.
http:
For extra security set this to only accept connections on localhost if NGINX is on the same machine
Your homeassistant is not in the same user defined bridge as it is using host networking. You can change it to bridge or, modify the proxy conf to use the host ip and port. You can’t use localhost.
You are clever people, so you know that I didn’t have to user “Ports” or “expose” for 8123, that’s what nginx is for…so I removed that and it still worked fine of course.