Force renew of Duck DNS Lets Encrypt Certificate

I started having issues access Home Assistant a week ago and then found out that Reddit no longer allows you to use their account to log into DuckDNS. The only option was to use a different, non-reddit login and create a new subdomain (xxxB.duckdns.org), essentially discarding the old, Reddit- created subdomain (xxxA.duckdns.org). I did this and then modified my home assistant configuration (DuckDNS config and token, Setting/Config setting) to use the new subdomain.

However, despite doing this, I keep getting an error saying that the lets encrypt certificate being used is for my old subdomain and not the new one. I’m assuming that if i can get the system to renew the certificate, the new one will be generated for the latest subdomain. I’ve logged out, cleared, and rebooted everything I can think of, but the old certificate hasn’t expired, so the certificate isn’t getting renewed. any options besides uninstalling and reinstalling duckdns?

What happens if you set the accept_terms configuration option to false, restart the addon, then set it back to true and restart again?

If that does not work, copy your addon config to a temporary text file, reinstall the addon, and paste the configuration back.

1 Like

I ran into the same kind of problem all this time later. Tried the suggested solution but could not see any difference in the behaviour.
However I realized that I also have the “nginx Home Assistant ssl proxy” installed, and after updating that and restart Home Assistant it’s all good and dandy.
Since I tried the solution tom_l suggests first, I’m not sure if that is needed or not.
Hopefully this can help someone else too …

And now I had the issue again, forgot the fix, found my own solution :slight_smile: and this time just

  1. restarted nginx
  2. restarted duckdns

and renewal worked.

1 Like

Sadly, not working for me. DuckDNS log shows:

[18:11:05] INFO: Renew certificate for domains: MYDOMAIN.duckdns.org and aliases:
/# INFO: Using main config file /data/workdir/config
Processing MYDOMAIN.duckdns.org

  • Checking domain name(s) of existing cert… unchanged.
  • Checking expire date of existing cert…
  • Valid till Nov 5 17:11:24 2022 GMT (Longer than 30 days). Skipping renew!

Not sure if there are any other tricks to getting the cert to renew, even though the expiration is apparently too far out to automatically renew. Seems like a bit of a shortcoming to the system, if you find you have issues in a provisioned certificate.

UPDATE:
I bit the bullet and backed up my DuckDNS add-on config, and uninstalled and reinstalled the add-on. That appears to have done the trick. Restarted NGINX, Mosquitto, and HA itself a few times to make sure the old cert got cleared out.

1 Like

This worked, thank you. I created a automation that runs once a month to renew the cert.

Thanks for the update. Worked for me too; just uninstalled the addon and reinstalled it again punched in the setting et voila, new certificated generated.

Had the same problem now and saving the config and deinstall / install / paste config / start Duck DNS again did help…
But the problem will come back again and again?! Is the cert check buggy?! I mean, you find posts of users with this problem since years… The OP is from 2021, too…
Thats not cool ^^ What can we do?