addons icon indicating copy to clipboard operation
addons copied to clipboard

Changed alias but no new certificate (How to force recreating the Let's Encrypt Certificate)?

Open kankadev opened this issue 1 year ago • 5 comments

Describe the issue you are experiencing

Actually, I am in the process of solving a problem with the HA app. I wanted to make my HA available via a second domain.

I have a DuckDNS domain (example.duckdns.org) and now also a real subdomain (ha.example.org).

I created a CNAME record from ha.example.org to example.duckdns.org. This also works.

I added the alias in the DuckDNS addon. However, no new certificate is created. This process is skipped because my current certificate is only three days old.

My addon config: 2022-08-01 02_07_25-Home Assistant

How can I force the addon to recreate the certificate with the new CNAME?

What type of installation are you running?

Home Assistant OS

Which operating system are you running on?

Home Assistant Operating System

Which add-on are you reporting an issue with?

Duck DNS

What is the version of the add-on?

1.15.0

Steps to reproduce the issue

  1. Create CNAME for subdomain
  2. Add this new "real" subdomain into the DuckDNS config
  3. Save, Reboot
  4. No new certificate ...

Anything in the Supervisor logs that might be useful for us?

No response

Anything in the add-on logs that might be useful for us?

178.243.165.194
NOCHANGE
[02:13:53] INFO: Renew certificate for domains: example.duckdns.org and aliases: 
# INFO: Using main config file /data/workdir/config
Processing example.duckdns.org
 + Checking domain name(s) of existing cert... unchanged.
 + Checking expire date of existing cert...
 + Valid till Oct 27 21:31:07 2022 GMT (Longer than 30 days). Skipping renew!

You see, empty aliases?

Additional information

No response

kankadev avatar Jul 31 '22 23:07 kankadev

Looks like a bug, will check it out. In the meantime I think a simple workaround would be just to rename/delete /ssl/fullchain.pem and /ssl/privkey.pem. Then it won't be able to find existing certs on startup and will request new ones.

mdegat01 avatar Aug 04 '22 16:08 mdegat01

I deleted both files, then restarted the addon.

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!
[13:09:53] INFO: OK
176.237.181.32
NOCHANGE
[13:09:53] INFO: Renew certificate for domains: example.duckdns.org and aliases: 
# INFO: Using main config file /data/workdir/config
Processing example.duckdns.org
 + Checking domain name(s) of existing cert... unchanged.
 + Checking expire date of existing cert...
 + Valid till Oct 27 21:31:07 2022 GMT (Longer than 30 days). Skipping renew!

As you can see the alias is empty and the ssl dir is empty, too.

Edit: I deleted the aliases. I don't need them at the moment. But renewing the cert is still not possible.

kankadev avatar Aug 06 '22 10:08 kankadev

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Sep 05 '22 12:09 github-actions[bot]

Still relevant.

kankadev avatar Sep 05 '22 12:09 kankadev

I'm running into a similar issue where uninstalling and reinstalling the add-on still doesn't renew my certificate, even though in the logs it says it has.

thebrianchen avatar Sep 06 '22 19:09 thebrianchen

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 03 '22 18:11 github-actions[bot]

@mdegat01 @ludeeus can one of you take another look? much appreciated!

thebrianchen avatar Nov 03 '22 18:11 thebrianchen

I just hit this as well. I changed my domain and now my certificates don't match and don't seem to update. I've tried restarting the service and this is what shows in the 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!
[05:22:17] INFO: Renew certificate for domains:  and aliases: 
# INFO: Using main config file /data/workdir/config
ERROR: domains.txt not found and --domain not given

neilenns avatar Nov 06 '22 13:11 neilenns

I was able to force a certificate regeneration by:

  1. Renaming the old certificate files
  2. Uninstalling DuckDNS
  3. Re-installing and re-configuring DuckDNS

Note that I wasn't able to configure DuckDNS using the friendly UI. I kept getting an error saying the domains wasn't specified... but there was no UI to specify the domain. I had to do the YAML edit instead.

neilenns avatar Nov 06 '22 13:11 neilenns

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Dec 06 '22 14:12 github-actions[bot]

Still a problem.

KF5JWC avatar Dec 27 '22 06:12 KF5JWC

This is still an issue

peter1rhodes avatar Apr 03 '23 10:04 peter1rhodes

Got the problem today, too... Not sure how to fix it.

Acanis87 avatar Apr 10 '24 12:04 Acanis87