Duckdns- Update- can only log on when on my local net

I have been using the DuckDNS add-on for months to connect to my Home Assistant server when away from my desk. Yesterday it would not connect from my phone as using the Home Assistant Android app. But I am able to connect to my Duck DNS URL from a tablet browser. Also when I use a hotspot from a phone so that my tablet is not on my local network, I cannot connect to my Home Assistant through the DuckDNS URL.

I tried removing my Home Assistant app on the Android and reinstalling it, but the app could not find my Home Assistant server.

Any clues what is going on here?

If you use the DuckDNS address from within your local network your router probably has NAT loopback and redirects this to the local IP address without going via the internet.

Android or iOS?

Things to check:

  1. Is the DuckDNS add-on started, and is there anything relevant in the add-on logs?
  2. Set up the Certificate Expiry integration, are your certificates still valid?
  3. Is your Home Assistant time correct (required for encryption to work).
  4. Go to your router and get your public IP address, or use the DNS IP integration. Go the DuckDNS web admin page and sign in. Does the IP address it has match your router’s public IP address?

I appreciate your help.

  1. The add-on is starting and the log is an “OK” every five minutes.
  2. I’ve never used the Certificate Expiry integration. Have I set it up correctly and if so, is the sensor telling me that the certificate is expired?
    define certificate

  1. Verified The host date and time matches my PC date and time which gets its time from the default server time.windows.com

  2. Yes, the IP addresses match.

So, is my problem in #2?

Maybe. I’ve never seen an unknown state before though. It could actually be a problem with the integration.

And I’m not sure about the error attribute either.

Try restarting the addon.
Try rebooting (not restarting) home assistant.
If that does not fix it search the forum for “expired DuckDNS certificate”. I think you may need to temporarily forward port 80 as well as 443. Though I never need to do this when I was running DuckDNS.

Thanks. Still no change.
I rebooted the host, restarted the add-on:
Restart log:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
# INFO: Using main config file /data/workdir/config
+ Account already registered!
[00:23:31] INFO: OK
173.76.164.94
NOCHANGE
[00:23:31] INFO: Renew certificate for domains: xxxx.duckdns.org and aliases: 
# INFO: Using main config file /data/workdir/config
Processing xxxx.duckdns.org
 + Checking domain name(s) of existing cert... unchanged.
 + Checking expire date of existing cert...
 + Valid till May 17 16:12:04 2023 GMT (Longer than 30 days). Skipping renew!

The sensor.cert is unchanged.

I removed and reinstalled the Android Home Assistant app, and it’s stuck on looking for my Home Assistant server. If I click on “Enter Home Assistant manually”, what URL do I enter?

On the Android app:

  • If I enter https://xxxx.duckdns.org:8123, nothing happens.
  • If I enter http://homeassistant.local:8123, I get “Unable to connect…” Server or proxy hostname lookup failed. (The URL does work on my local network).
  • If I enter the local URL http://192.168.1.57:8123, I get the same result as http://homeassistant.local:8123.

This is getting frustrating. Any other ideas?

If you have DuckDNS installed you are using encryption, so all URLs must be https not http.

So it looks like your certificates are valid from that log (May 17th expiry).

How is your port forwarding set up?

Port forwarding:

As I said in the original post, I have been using my DuckDNS URL from my phone for months, even from other countries. It only recently stopped working.

On another network (not the net that my Home Assistant is on), I can ping xxx.duckdns.org, and I get replies from my WAN IP.

Firewall issue, maybe?

I’m out of ideas, but you only need one of those rules. The less ports open the better.

Thanks, I appreciate the help.

On the app, when entering the Home Address URL, is it looking for the local URL or the duckdns URL?

The add-on configuration I have does not match the documentation.

I have:
lets encrypt

But the documentation says:

lets_encrypt:
  accept_terms: true
  certfile: fullchain.pem
  keyfile: privkey.pem
token: sdfj-2131023-dslfjsd-12321
domains:
  - my-domain.duckdns.org
aliases: []
seconds: 300

Is it time to delete the add-on and start over?

I removed and reinstalled the plug-in and now can only log on to my Home Assistant using my DuckDNS URL from a browser on my local net. A browser on another net logging onto my DuckDNS URL is stuck at the Home Assistant logo, “Initializing”.

Tips would be appreciated.