NGINX DuckDNS Remote Access

Hi, I tried to follow these tutorials for remotely accessing HASSIO:

Something is not working. How can I check if DuckDNS, NGINX, or my router settings are the problem?

typing in mydomain.duckdns.org gives me a ’ Hmmm… can’t reach this page’. If it was correct, it should show some sort of NGINX default page, right?

My telekom speedport smart 4 router has some wierd settings, so I’m not sure if I’m forwarding the ports correctly here… Do I need to enter anything in UDP?

in NGINX I have entered port 8321

Do I need to enter that port somewhere else for it to work?

You told your router to forward port 443 to the HA machine. But you told the nginx addon to listen on port 8321 on the HA machine. So yea, it’s not working because your router is forwarding traffic to a port on a machine nothing is listening on.

Either change the addon to listen on port 443 or change the router to forward to port 8321

not sure about that… What does the 443/tcp at the end of the port line of NGINX stand for?

I changed the port to 443 in NGINX and the port forwarding as follows, however without success:

I also tried 8321 in NGINX and 443 → 8321 in my router

Do I need to do any changes to UDP?

The docker container is listening on port 443. If you want to expose port 443 of that container on the host machine then you must list what port on the host maps to that port on the container.

The config you’re currently showing in screenshots (443 listed in the port box of the addon and 443 → 443 mapped in the router) looks like it should work. What errors do you see? Anything in the addon logs or HA logs? Did you update configuration.yaml as described here?

Thanks Mike. Is there any way to test each module seperately, i.e. to check if my router port forwarding works (for any port), or to check if nginx works, without dependencies?

The error message depends on the browser, but basically cannot reach anything:

this is my nginx config, port 443. Some youtuber said to set active to ‘true’, so I did:
image

Does it make any difference on which wifi the home assistant is on (2,4 GHZ), vs the computer I used to create duckdns (5GhZ)? It shouldn’t since they all have the same IP, I believe, just wanna outrule some dumb other factors…

Also, in the config.yaml I pasted the IP from the template, i.e. 173… despite my internal IP is 192… and external is even something else

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - 172.30.33.0/24

of course it was something stupid :see_no_evil::

when calling homeassistant externally via the duckdns URL, you also need to call the port and 'https://'

https://mydomain.duckdns.org:433 - or whatever your port is that you forward.

Some might say ‘obivously!’, so I just post this here for fellow noobs like myaself. You’re welcome :stuck_out_tongue:

You shouldn’t need a port on duckdns, if you are using 443, as it’s the default port for https from my vague understanding.

In saying that… Are you using 433 or 443…
Because you put 433 here which would need the port.

1 Like

lol, devil is in the details, thanks for pointing this out!