Unable to connect to Home Assistant from local network after installing DuckDns add-on

Hi
I can’t connect anymore from my local network to hassio running on a Rpi3
After I’ve installed the DuckDns add-on, I can access to HA only from internet (https://xxx.duckdns.org:8123), if I try to connect from the local network (https:/ /hassio.local:8123 or https:/ /192.168.x.x:8123) I reach the HA login page, but after the username and password request I get this:

I’ve tried cleaning the browser cache, reinstalling Hassio, reinstalling hassio again on a different sd card…

Please help me…

This is normal operation. Once you enable the “ssl_certificate:” and the “ssl_key:” in your configuration file, you will lose access through https:/ /hassio.local:8123 or https:/ /192.168.x.x:8123.

Just use https://xxx.duckdns.org:8123 from within your local network and it should work. If you can’t access hassio through your duckdns address from within your local network it could be due to your router not having NAT loopback enabled, or your router might not be capable of NAT loopback. This is what I’ve experienced but I’m no expert. I hope this helps.

Hi Gundy, that’s not true…
From my laptop I can access to HA with no problem using https and hassio.local or ip address.
The problem is from another pc and from the iPhone, since I connected to https:/ /xxx.duckdns.org with these devices, I can no longer access to HA… I can connect, log in to HA, but ii looks like I’ve been banned, but there isn’t any ip_ban file…

Hi there,
Have you solved that issue anyhow?
Just configured duckdns and now I’m struggling with the same problem on my phone and even on my desktop…
Any help would be very appreciated, unless it is via https://—-duckdns.org :stuck_out_tongue_closed_eyes:

EDIT: on my desktop works from local Ip, just adding https://, not on my phone under wifi

Solved. Just install NGINX Home Assistant SSL proxy addon, now HA works under wifi > http:/ /hassio.local:8123, and regularly from outside > https://—-duckdns.org

1 Like

I need to do the same, can you provide any helpful links that you used to install NGINX HA SSL proxy add on or your email so we can communicate.

Just install NGINX from this repository https://github.com/hassio-addons/addon-nginx-proxy-manager, start and click on OPEN WEB UI
log in with:
user: ‘[email protected]
pwd: ‘changeme’
change your user and pwd, click on “Proxy Hosts” than on “add Proxy Host”
and fill with:

  • Domain Names: insert your domain (i.e. pippo.duckdns.org)
  • Forward Hostname/Ip : IP of your HA (i.e. 192.168.1.21)
  • Forward Port: 8123

then go to SSL tab:
SSL Certificate:None”, select “request a new ssl certificate” and insert your mail in the box that will appear.

on DuckDns config “ accept_terms: false”

don’t forget to forward port 80 and 443 from your router to your Home Assistant.

Thank you so much, you made it very easy to follow. Don’t I have to install Maria DB add on first? That’s what it says in the nginx documentation. I’m trying to install it but I’m confused of what to put for data base and login information. Not sure what it’s referring to as data base and if I create a new login for Maria DB add on or if it’s asking for the login to HA. Hopefully you can give me another detail steps on adding Maria DB add on. Thank you, I appreciate your time and help.

miguelgarcia, NGINX is a reverse proxy, accepts a request from a client ( browser on a PC or a smartphone) and forwards it to one or more servers; upon receipt of the response from the server it delivers it to the original client. The reverse proxy performs all the necessary operations to ensure the smooth flow of network traffic between client and server. MariaDB is a Database Management System, it is not needed for NGINX and it makes sense if you intend to separate the backend with the data and put it for example on NAS. In an all-in-one system on Raspberry probably the benefits are not so striking…
I don’t understand why you want to install MariaDB in relation to the topic of this thread … or maybe… you just want to istall it on HA?

The reason I want to install nginx on HA that I have running on my Raspberry PI 4 is because I set up duckdns but I’m not able to access HA through duckdns domain on my local network, only outside my network. I can access HA locally by typing in the IP address. In the nginx proxy manager documentation install it says “1. Ensure you are running the MariaDB add-on. This add-on is required to use the Nginx Proxy Manager add-on as it uses the database services provided.” I only want to install MariaDB add-on so I can run nginx so I can connect through duckdns locally.

That’s so strange, because if you can access with http://hassio.local:8123 in your network and regularly with https://—-duckdns.org outside, it makes no sense that you cant reach https://—-duckdns.org in your network… It’s an address as others!!

anyway, MAriaDB is super easy to install (but I’m confident isn’t that what is cxausing your issue) just istall add-on, in config tab compile with:

databases:
  - homeassistant
logins:
  - username: homeassistant
    password: password
rights:
  - username: homeassistant
    database: homeassistant

Then, in your /config/configuration.yaml:

recorder:
  db_url: mysql://homeassistant:[email protected]/homeassistant?charset=utf8

take a look here too: https://www.home-assistant.io/integrations/recorder#mariadb-and-mysql

I finally got it working after installing maria db, nginx add ons and going in my router and enabling loopback in my router by configuring DNS host map. It’s possible that if I would have enabled loopback to begin with it would have worked lol. But when researching I kept on reading that I had to do it this way so idk.

Dears,

My problem with this configuration I can access from my local network to the HA ip adress, but i can’t access from local network to the duckdns address. From external network not problem to access to ducksdns via https… I dont understand nothiun… Any help?

Thanks in advance,

Jose

Might have to port foward 8123 in router if you haven’t already and you have to install nginx

I’m having the similar issue; within local network, I’m able to connect to homeassistant.local:8123 but am not able to connect to myhome.duckdns.org. Looks like it tries to connect (see snapshot below) but eventually fails. All I have is Duckdns addon along w/ Adguard Home to forward DNS server from HA server. Router is also using HA DNS server. Pretty much I’ve tried everything read from this forum such as DNSMasq, Nginx, Adguard, but no luck so far.

I’m suspecting something wrong w/ SSL but couldn’t tell from the logs. One thing I noticed in the SSL folder where “full chain” key resides, I noticed there’re 2 keys in that file which seem a bit odd to me.

Any advice on the fix is greatly appreciated. Thanks

Clarifications, inside network

http://homeassistant.local:8123 works
https://homeassistant.local:8123 doesn’t work
http(s)://myhome.duckdns.org don’t work

Outside network
https://myhome.duckdns.org works but w/ security certificate warning

Hi @aceonce2007,

Did you manage to solve this issue?

Thanks!

Hi to all,

Suddenly today something happened during the night. Yesterday everything was running smooth and this morning I can’t access mi HA instance using the iOS app or the xxx.duckdns.org from my PC, as described by other users I can access form outside my newtwork (over 4G) with the iOS app with no problem. No recent changes in HA or the network, already tryed basic troubleshooting with AdGuard, router, etc. Did any of you (@aceonce2007, @miguelgarcia , @josemsubcn )suceed in solving this?

Thanks!

I used to have a similar issue, all due to my router doesn’t support NAT loopback or hairpin. I installed PfSense to control all network routing, no longer an issue. If your router doesn’t support NAT loopback, try this video

Home Assistant Remote Access for FREE - DuckDNS + LetsEncrypt + Single URL - YouTube](Home Assistant Remote Access for FREE - DuckDNS + LetsEncrypt + Single URL - YouTube)