Hi folks,
I’m really struggling to get remote access working for my setup and am hoping I might get some advice, because it’s just been fighting me for days.
I currently have HA (2024.5.0) running in a Docker container on a recycled old office workstation (now running ubuntu server 22.04.4). Everything works fine through a local IP. That same old desktop already has a working NGINX proxy manager and also deals with keeping my IP updated for duckdns, which I use for remote SSH*.
I have one working subdomain via NGINX reverse proxy manager (https://proxies.mydomain.duckdns.org). It’s working properly, including getting apparently-valid SSL certificates, accessible both locally and from the wider internet – so I think it’s all good.
What I want to do is simply create another subdomain – https://ha.mydomain.duckdns.org
– which allows me remote, relatively secure access to my homeassistant instance.
But of course, I’m posting here. It’s just not working and I don’t know why. I am no networking expert – I am really flying by the seat of my pants just trying to cobble stuff together – so I am hoping I’m just missing some config that will make it all work.
So here is what I have tried so far:
First, I tried simply forwarding port 8123
to my server through my router. I know this is super insecure, but just wanted to see some kind of life. Then I could use mydomain.duckdns.org:8123
or the actual ip address on port 8123
. I get the homeassistant logo, sometimes even a login prompt, but always “Unable to connect to Home Assistant” then endless retrying.
I tried adjusting my configuration.yaml
file. I added internal and external URLs to it. I tried both the regular ip address and the duckdns url. But this didn’t seem to make any difference. Endless loading data then unable to connect.
OK, fine, I didn’t really want it working this way anyway…
I tried to do it instead through the proxymanager setup, routing requests to ha.mydomain.duckdns.org
to 127.0.0.1:8123
I checks “block common expoits” and “websockets support”. I let the proxy manager handle provisioning an SSL certificate and checked “force SSL” and “enable http/2”
I also read that I need to add some http configs to configurations.yaml for this, so I added
http:
use_x_forwarded_for: true
trusted_proxies:
- 127.0.0.1
ip_ban_enabled: true
login_attempts_threshold: 5
I’ve tried fiddling a bit between all these settings mentioned, but the best I am getting from the remote URL is “502 Forbidden” after a very long load. Or just a timeout.
Very much hoping someone here can tell me why I’m an idiot and what basic thing I have failed to do correctly. I’ve spent a lot of time trying to read similar posts/guides on this forum and haven’t found any that quite fix my situation – though I admit, I’m just about ready to give up on the containerized nginx reverse proxy manager and try from scratch with some other approach.