DuckDNS stopped working

Hi all,

I’ve had DuckDNS working for quite a while, but after a reboot of my HassIO, everything came back up fine, except for Duck DNS. I’m now now getting the below error when I navigate to my instance using my DuckDNS URL.

This site can’t be reached

The webpage at https://myURL.duckdns.org/ might be temporarily down or it may have moved permanently to a new web address.

ERR_FAILED

The configuration is the same as when it was working for months. No other changes I can recall in regards to Duck DNS.

Any ideas what might have gone wrong?

Did you update the version?

Any errors in the home assistant log?

Something needs to be clarified about DuckDNS.

The add-on handles getting a certificate from Lets Encrypt (only when it needs a new one), and updates your DuckDNS hostname with your current external IP address. It’s not hosting the front end for you, and doesn’t need to run all the time.

Are you sure your HA didn’t get a new IP address, so your forward isn’t working any more?

look in your ddns logs in the add-on. It’ll tell you if you have errors.

Ah… I just remembered that I also updated to the latest HA at the same time. Everything else seems to be working.

I’ve looked in every log location I know of and can’t see any errors other than these:

  • 2019-12-10 03:26:06 WARNING (Thread-3) [pychromecast.socket_client] [The TV:8009] Heartbeat timeout, resetting connection
  • 2019-12-10 04:36:55 WARNING (Thread-4) [pychromecast.socket_client] [House speaker:8009] Heartbeat timeout, resetting connection
  • 2019-12-10 04:37:11 ERROR (Thread-4) [pychromecast.socket_client] [House speaker:8009] Failed to connect to service Lenovo-Smart-Display-09cc56f2a4b71e18ee7ced03edb5865e._googlecast._tcp.local., retrying in 5.0s

I also have had a new IP address a few weeks ago but DuckDNS seems to have taken care of that automatically back then.

look in your ddns logs in the add-on. It’ll tell you if you have errors.
I can’t find this particular log. Where is this add-on?

From somewhere on your home network, Google for “what is my IP address” and make sure it jives with the results of an "nslookup mydomain.duckdns.org".

I’m running 0.107.7 and duckdns stopped working when I installed it. I decided to hold off fixing it until I got the upgrade running again with all my scripts, etc.

It still does not work. I’ve checked my configuration, my ip matches what duckdns has. I did an update (duckdns.org/update?update…) and it comes back with OK like it is supposed to. I upgraded the plugin to the latest 1.12.0 and it still does not work.
My config file looks like this:

http:
  base_url: mydomain.duckdns.org
  server_port: 8123
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

and my configuration for duckdns looks like this:

lets_encrypt:
  accept_terms: true
  certfile: fullchain.pem
  keyfile: privkey.pem
token: ffasdfasdf-sdfa-sdfas-sadgf-sdfgdfghntn
domains:
  - mydomain.duckdns.org
aliases: []
seconds: 300

What else can I look at. (I can log into my HA using local ipaddress.

What am I missing?

Thanks.

@petro - what do you mean by ddns logs? I have been looking for any errors and still no luck. The duckdns log in HA shows:

NOCHANGE
[15:20:49] INFO: OK
XX.XX.XXX.XXX (correct ip address)

it checks every 300 seconds as in my configuration file. I’m unsure if there is something different about running in a Raspian Docker container versus my previous install was hassio.

I’m looking at all the logs but don’t see anything amiss so maybe this ddns log holds the key?
Thanks

If that’s all you got, it’s working. Are you port forwarding 443 to 8123?

Thanks for the reply Petro.
Yes, I checked the router to ensure it was still forwarding the port.
Like I said, it was working then stopped when I went to Raspbian, Docker and HA 0.107.7. I’m thinking there was something I overlooked. See my post from last week above.

yes I saw that. It looks fine although I never specified the server port.

It Worked!
I’m glad you said that Petro. (See something - say something. :slight_smile:
I commented out the

#server_port: 8123

line and now it works after a restart! I’ve rebooted the system many times but now it works. Crazy that it used to work for the past 1-1/2 years or so with that in my configuration.yaml file.

Good observation and advice as usual.
Thanks
Bart

My duckdns domain stopped working after a while, although I didn’t change any settings. Remote acces adress (https…mydomain…duckdns.org) works if accessed from local network, but fails to load from outside, it shows briefly loading page then this error

https://mydomain.duckdns.org:xxxxx/auth/authorize?response_type=code&redirect_uri=https%3A%2F%2Fmydomain.duckdns.org%3Axxxxx%2F%3Fauth_callback%3D1&client_id=https%3A%2F%2Fmydomain.duckdns.org%3Axxxxx%2F&state=eyJoYXNzVXJsIjoiaHR0cHM6Ly9oYWlzdXMuZHVja2Rucy5vcmc6NTE5NzkiLCJjbGllbnRJZCI6Imh0dHBzOi8vaGFpc3VzLmR1Y2tkbnMub3JnOjUxOTc5LyJ9 might be temporarily down or it may have moved permanently to a new web address.

ERR_FAILED

My config file looks like this

Configure a default setup of Home Assistant (frontend, api, etc)

default_config:
homeassistant:
external_url: “https://mydomain.duckdns.org:xxxxx”
internal_url: “https://homeassistant.local:8123
duckdns:
domain: mydomain
access_token: xxxxxx
http:
ssl_certificate: /ssl/fullchain.pem
ssl_key: /ssl/privkey.pem

Text to speech

tts:

  • platform: google_translate
    group: !include groups.yaml
    automation: !include automations.yaml
    script: !include scripts.yaml
    scene: !include scenes.yaml
    lovelace:
    mode: yaml
    vacuum:
  • platform: xiaomi_miio
    host:…

I noticed though that in Home Assistant Cloud settings, Remote control tab doesn’t stay enabled after refresh.

2 Likes

Hey I haven’t updated home assistant for months now. Today I decided to update HA + the OS and after I can’t access my HA remotely. I get exactly the same url in my browser.

At this stage I have restored from 2021.11.5 back to 2021.6.6 and I can access again. I will have to go through the change logs and find out what’s been removed or added that is affecting remote access.

I also encounter the same problem since 1 month. Still trying to find the respective solution- without changing to another DNS Service yet.

There is a fairly good free alternative to DuckDNS in dynu.com. I hacked together a docker container that will keep updating both of them, so I can switch at a moment’s notice if necessary:

Dockerfile

FROM alpine:latest
LABEL maintainer="[email protected]"
RUN \
  apk update && \
  apk add --no-cache \
  curl moreutils
COPY entrypoint.sh /tmp/entrypoint.sh
ENTRYPOINT ["/tmp/entrypoint.sh"]

entrypoint.sh
Anything that’s an environment variable at the top needs to be set when you run your docker container.

#!/bin/sh
set -e

DYN_HOSTNAME=${DYN_HOSTNAME:-""}
DYN_USER=${DYN_USER:-""}
DYN_PASS=${DYN_PASS:-""}
DUCKDNS_HOSTNAME=${DUCKDNS_HOSTNAME:-""}
DUCKDNS_TOKEN=${DUCKDNS_TOKEN:-""}
WAIT_TIME=${WAIT_TIME:-"10"}

echo "Running..." | ts

while true; do

  echo -n "dynu.com: " | ts
  curl -s "https://api.dynu.com/nice/update?username=${DYN_USER}&password=${DYN_PASS}&hostname=${DYN_HOSTNAME}"
  echo

  echo -n "duckdns.org: " | ts
  curl -s "https://www.duckdns.org/update?domains=${DUCKDNS_HOSTNAME}&token=${DUCKDNS_TOKEN}"
  echo

  sleep $WAIT_TIME
done

docker-compose.yml

version: "2"
services:
  ddns:
    container_name: ddns
    image: YOUR_IMAGE_NAME
    hostname: ddns
    restart: always
    environment:
      DYN_HOSTNAME: "YOUR_DOMAIN"
      DYN_USER: "DYN_USERNAME"
      DYN_PASS: "**************"
      DUCKDNS_HOSTNAME: "YOUR_DOMAIN"
      DOCKDNS_TOKEN: "********************"
      WAIT_TIME: "300"

And you get output from that container like this:

Nov 01 21:28:50 dynu.com: nochg
Nov 01 21:28:51 duckdns.org: OK
Nov 01 21:33:51 dynu.com: nochg
Nov 01 21:33:53 duckdns.org: OK
Nov 01 21:38:53 dynu.com: nochg
Nov 01 21:38:54 duckdns.org: OK
Nov 01 21:43:54 dynu.com: nochg
Nov 01 21:43:54 duckdns.org: OK
Nov 01 21:48:55 dynu.com: nochg
Nov 01 21:48:55 duckdns.org: OK

I’m facing the exact same issue. I’m still searching around the Internet…