Problem to access Home Assistant out of my Local Network

Dear all:
I need your help because I am unable to access Home assistant out of my local network. This is what I did:

  • I setup a fixed IP for my raspberry pi4
  • I opened port 8123 in my router
  • Installed DuckDNS (Domain and token configured)
  • Installed NGINX (Domain set in config) I didn’t change change any port ( showed 443)

With this config I cannot access from internet to my Home assistant, it says:

Unable to connect to Home Assistant.

Retrying in XX seconds…

On the other hand, if I put this lines into “configuration.yaml” I am able to enter via internet but not via 192.168.1.XX:8123 (local network)

http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem


So at this point I need to choose between access between local network or internet...

Can you help me to fix this problem??

Best regards

Cyrus

Most likely this is not your issue, but just in case… I have 2 wifi networks at home and it has happened that my computer goes on network 2 while my HA Yellow Box is on network 1. Then the local connection won’t work.

Thanks. for your reply…

no, that is no my situation… only 1 wifi network at home.

Best regards

Have you checked whether the local IP address may have changed ?

No, It didn’t change. I assigned a fixed IP address. If I delete the lines :slight_smile:

http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem

from configuration.yaml file I can access from local network, but not from internet

I don’t think you should be forwarding port 8123 to your home assistant port 8123, you should be forwarding port 443 to whatever port NGINX is listening on. NGINX will then direct the traffic to home assistant.

I say this without a good understanding of how HAOS and these add-ons are set up to work together; personally I run HA core in a docker container and NGINX in a separate docker container. But at the end of the day, if you are forwarding port 8123 from your router to port 8123 on HAOS then you are skipping NGINX entirely

Thanks for your reply. Are there any way that NGINX use other port that 443? Because my ISP doesn’t allow to open that port because its router uses it to manage the router ( 80 and 443)
I open both port from router config but the reality is if I checked them from pages like “canyouseeme” it says it cannot be reached

I don’t know if you can configure the NGINX HA addon to listen on a different port. But if you have it listening on something that is not 443 you’d have to access that address by specifying the port explicitly. For example if you are forwarding 8123 then you will need to access your address from the Internet as https://mysubdomain.duckdns.org:8123