Issues with DuckDNS

Ok, had hass.io running for a while, had DuckDNS configured with no issues and working with https.

Due to the limitations vs. using just Home Assistant, I then tried installing Home Assistant directly without hass.io, and have it up and running. Unfortunately, I have been unable to figure out what to do to get DuckDNS working.

I did as the guide suggested adding this to my configuration.yaml file:

duckdns:
domain: p***
access_token: **************

Previously I did not have that in my configuration.yaml file.

In the /home/homeassistant directory, I see a duckdns directory. In it, are a duck.log with just the word ā€˜OKā€™ and a script file (duck.sh) which when I try to run as root, it says the duck.log file is inacessible or not found (even though it is there, under ā€˜homeassistantā€™ user).

New to using Home Assistant without hassio, so Iā€™m probably doing something newbish here. Any help would be GREATLY appreciated, Iā€™ve looked on the interwebs and Iā€™ve been stuck on this for days.

Also, this was working fine so I know my router is configured correctly. It has to be something in my Home Assistant setup, but not seeing it in the home-assistant.log file.

Thanks for any help!
Ļ•

What do you mean when you say ā€œduckdns isnā€™t workingā€?

Is it just not updating your public IP address? Or something else?

Doesnā€™t seem to be running possibly? On the DuckDNS site, it is saying it hasnā€™t updated in a month, which would correspond to when I had hass.io running.

I canā€™t access internally or externally using my duckDNS URL, but internally I can access using the IP fine.

Iā€™m guessing I donā€™t have something setup correctly. Iā€™m just not sure where to look or what logs to check out.

Thanks,
Ļ•

did you set up a way for DuckDNS to be updated with you new external IP address? Normally that is set up thru a crontab on the machine running HA.

Is there any documentation on that you know of? Iā€™ve tried running the duck.sh file as root but says it canā€™t find the duck.log file. I see the file and both are owned by ā€˜homeassistantā€™ user. I can ssh into the box as ā€˜piā€™ user, and sudo as root, but not sure how to login as homeassistant.

Sorry for the newb questions, Iā€™m still getting my feet wet with homeassistant without using hass.io.

Thanks again,
Ļ•

the install instructions for Linux are on the DuckDNS website:

https://www.duckdns.org/install.jsp

Which guide did you use to install duckdns on a non-hassio install of HA?

The duckdns component does not use a duck.sh script. That is probably a leftover of something else.

For me the duckdns component worked after setting the domain and accesstoken in the configuration like you mentioned.
You should check the home assistant logfile for errors.

Btw the duckdns website ā€˜updatedā€™ means when the value of the ip address last changed. Not when the last call was made.
You can manually change your ip on the duckdns website and see if hass updates it. This should not take more than 5 minutes to get updated.

Thanks! The IP on duckdns matches my current, so that is fine then.

I used this guide for installing: https://github.com/home-assistant/hassbian-scripts/blob/dev/docs/duckdns.md

Iā€™ve checked the home-assistant.log but nothing about trying to connect. I am using https as I was before with my hass.io instance.

I also checked the duck.log file, and it has ā€œokā€ in it. I see the duck.sh script there.

After reinstalling duckdns from the guide above, Iā€™m still not able to access using my duckdns URL:

https://ph***a.duckdns.org:8123

That is the same link I was using in my hass.io instance with the port and it was working fine.

Iā€™m sure I am missing something easy, but so far canā€™t seem to find out why itā€™s not connecting. I am able to connect using https using itā€™s internal IP, I just canā€™t access outside my network.

Thanks again all for the help. If there are any other logs or guides that might help, I am all ears.

Appreciate it,
Ļ•

Just tried pinging my duckdns domain (p***.duckdns.org:8123) from my router and the ping comes back successful. Very strange to say the least. Yet I cannot get there via https or http.


Pinging p*****.duckdns.org:8123 30 times with: 64 bytes of data

ping successful: icmp seq:0, time=1.099 ms
ping successful: icmp seq:1, time=0.669 ms
ping successful: icmp seq:2, time=0.725 ms
ping successful: icmp seq:3, time=0.667 ms
ping successful: icmp seq:4, time=0.656 ms
ping successful: icmp seq:5, time=0.672 ms
ping successful: icmp seq:6, time=0.664 ms
ping successful: icmp seq:7, time=0.663 ms
ping successful: icmp seq:8, time=1.183 ms
ping successful: icmp seq:9, time=0.659 ms
ping successful: icmp seq:10, time=0.665 ms
ping successful: icmp seq:11, time=0.665 ms
ping successful: icmp seq:12, time=0.769 ms
ping successful: icmp seq:13, time=0.651 ms
ping successful: icmp seq:14, time=0.664 ms
ping successful: icmp seq:15, time=1.150 ms
ping successful: icmp seq:16, time=0.664 ms
ping successful: icmp seq:17, time=0.777 ms
ping successful: icmp seq:18, time=0.752 ms
ping successful: icmp seq:19, time=0.647 ms
ping successful: icmp seq:20, time=0.693 ms
ping successful: icmp seq:21, time=1.219 ms
ping successful: icmp seq:22, time=0.666 ms
ping successful: icmp seq:23, time=0.776 ms
ping successful: icmp seq:24, time=0.650 ms
ping successful: icmp seq:25, time=0.739 ms
ping successful: icmp seq:26, time=0.663 ms
ping successful: icmp seq:27, time=1.116 ms
ping successful: icmp seq:28, time=0.776 ms
ping successful: icmp seq:29, time=0.772 ms

are you sure you have the correct router ports open?

Yeah that is what I was thinking, but itā€™s the same setup on my router as I had with hass.io and it worked just fine. Is there anywhere in logs I can see what duckdns is doing to figure out where it is failing?

I checked my router but not seeing anything failing. home-assistant.log has nothing in it pertaining to duckdns. The only duckdns.log file just has ā€œOKā€ in it which means the script ran fine.

Man I am stumped on this. May try reinstalling home assistant again. Just didnā€™t want to give up if there are some logs I can dive into.

Ļ•

Port forwards on my router (I am no network engineer so I may not need all of these)

8123 > 8123 TCP
7080 > 7080 TCP
5050 > 5050 TCP
3218 > 3218 TCP
1880 > 1880 TCP
22 > 22 TCP
123 > 123 UDP
53 >53 UDP
53 > 53 TCP
8883 > 8883 TCP
3306 > 3306 TCP
443 > 443 TCP
1883 > 1883 TCP
8086 > 8086 TCP
8888 > 8888 TCP
3000 > 3000 TCP
21 > 21 TCP
20 > 20 TCP
7681 > 7681 TCP

Man! Thatā€™s a LOT of open ports on your router! Do you know what those ports are open for?

I literally have one open port on my router and that is for my VPN that I just set up to access my home network to access HA & Blue Iris. Before that I had 4 open ports (443, 80 for HA, 81 - for Blue Iris, 8300 for emulated hue).

Iā€™m not really sure why you would want to reinstall HA. DuckDNS isnā€™t an integral part of HA. It just sets up a method of updating your DNS to route to your external IP address.

Do you access your HA via https (with letsencrypt) or just via http?

Yeah I know, I really need to clean that up. Iā€™m learning on the fly as I go, and opened those for different things I was trying with hass.io.

I use https for HA, and have the security files created as homeassistant user.

Thinking it is not a duckdns issue, was going through a guide and tried to access via http://my.external.ip.address:8123 and it is timing out as well. Must be something not configured correctly on my router. Weird that it worked with hass.io, Iā€™ll keep digging.

Thanks!
Ļ•

Just for clarificatons.
There seem to be multiple ways to get DuckDns working.

I am using the Home Assistant component https://www.home-assistant.io/components/duckdns/
This just requires an entry in the configuration.yaml and it works. Judging from the code it only logs errors the home assistant log file.

And there is the DuckDns script you mentioned from https://github.com/home-assistant/hassbian-scripts/blob/dev/docs/duckdns.md
I actually cannot find the sources for that script, but I guess that is using the duck.sh script you were referring to. I never ran Home Assistant on Hassbian so I never ran into this script.

I would suggest to use one method or the other, not both.

As for you ping results.
I am not sure how you did that. It is not possible to ping a port like 8123. Ping uses its own protocol which does not use ports. I tried pinging with a port like that, but the ping commands on Windows and Linux both give an error when I try thatā€¦

And last I would suggest to close down all ports that you donā€™t know what they are open for.

Since you are using SSL you need to forward external port 443 on your router to port 8123 at the ip of your HA machine. Then you should be able to access HA at https://yourdomajn.duckdns.org. you shouldnā€™t have to put the port at the end. If it doesnā€™t work then put it in and see if it works then.

If that doesnā€™t work comment out the SSL lines in your config, forward external port 8123 to port 8123 at the IP of HA and try to reach it using http://your domain.duckdns.org.

1 Like

Checked my main router again, and all the forwards for HA were gone. Iā€™m an idiot!

Thanks all for the help!! Really appreciate it, all is well in the world finally! You guys \m/

Ļ•

hello someone please help me with duckdns setup on HassOs. things what i have done : installed duckdns done token and domain setup saved it. i have opened port forwarding on 80 to 80 and 443 to 443 then i started duckdns from addonā€¦ added port 443 to 8123 entered domain and ssl_certificate and ssl_key in configurationā€¦ tried to access my domain with local and also mobile data but i can not access the Hassā€¦ i can still access with 192.168.xx.xxx:8123 from local networkā€¦

Hi I use more then one domain with duckdns. How can I update more then one domain, is it possible?

duckdns:
domain: xxxxx
access_token: 123456

domain: yyyyy
access_token: 1234