Cannot access addons externally (xxx.duckdns.org:PORT)

Hi,

I’m hoping this is some silly misconfiguration on my side. I can’t access my HA addons externally, that is via https://xxxx.duckdns.org:PORT

I have DuckDNS & Nginx
I can access my instance externally through https://xxxx.duckdns.org/ (not https://xxxx.duckdns.org:8123 though), but not some addons that have the port in the URL.

Example: Sonarr
Addon port config:
image

Can access internally:
image

But not externally:

Router port (8989->8989):
image

I also have 443->443 and 8123->8123 as per DuckDNS/Nginx config.

What am I doing wrong that I’m not allowing duckdns url to work with ports?

Thank you in advance

You’d have to port forward that other port to HA on your router.

Thank you for your answer. Would you mind clarifying a bit?

If I edit the port mapping to internal: 443 (the only one that seems do to something):
image

I get Lovelave UI, which isn’t the expected outcome:
image

Editing the internal port to something else (80, 8123 or any random number) returns:
image

Thanks again

Because nginx is outputting home assistant on 443 and you’re pointing 8989 to 443 with your port forward.

You’d have to change nginx to 8989, then change your forwarding from 8989 to 8989, then use 8989 in your url. BTW doing this will cut off access to HA. Then again, i’m not 100% familiar with nginx addon and changing 8989 on it may just change what HA is exposed on. Either way, you can only do one at a time unless you use some DNS service.

You have to create addition entries in NGINX

I can access my main HA instance on ha.xxx.com, my test-HA on hatest.xxx.com, zigbee2mqtt on z2m.xxx.com, grafana on grafana.xxx.com, etc…

2 Likes

Thank you, that sounds more like it.
Thanks to your post, I found this one Using Nginx SSL Proxy to forward different domains to different services , which seems to be my case + your solution.

Reading that, I also realized that I have NGINX Home Assistant SSL proxy, and I have to switch to Nginx Proxy Manager. Do you agree? If that’s your case, would you mind sharing your config structure for the multiple domains with NGINX?

PS: I assume I have to create additional subdomains in duckdns too, right?

Thanks a lot again!

Solved by switching from DuckDNS+Nginx to Cloudflared (followed Free Cloudflare Tunnel To Home Assistant: Full Tutorial! - YouTube) and then simply using the additional_hosts option in the add-on. Super easy.