Skip to content

Updating domains breaks startup. #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
henti opened this issue May 10, 2025 · 2 comments · May be fixed by #21
Open

Updating domains breaks startup. #20

henti opened this issue May 10, 2025 · 2 comments · May be fixed by #21

Comments

@henti
Copy link

henti commented May 10, 2025

I followed the instructions to test with a single domain (smokeping.my_personal_domain.com) and it worked fine. When I added pi-hole.my_personal_domain.com it broke with:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Missing command line flag or config entry for this setting:
You have an existing certificate that contains a portion of the domains you requested (ref: /etc/letsencrypt/renewal/smokeping.my_personal_domain.com.conf)

It contains these names: smokeping.my_personal_domain.com

You requested these names for the new certificate: smokeping.my_personal_domain.com, pi-hole.my_personal_domain.com.

Do you want to expand and replace this existing certificate with the new certificate?

(You can set this with the --expand flag)
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My command for one domain was:

name="letsencrypt"
email="hentgi@my_personal_domain.com"
image="serversideup/certbot-dns-cloudflare:latest"
domains="smokeping.my_personal_domain.com"
token="blah"

    docker run \
     -d \
     --rm \
     --name $name \
     -e PUID=1000 \
     -e PGID=1000 \
     -e CERTBOT_DOMAINS="$domains" \
     -e CERTBOT_EMAIL="$email" \
     -e CLOUDFLARE_API_TOKEN="$token" \
     -v /home/henti/docker/letsencrypt:/etc/letsencrypt \
     -v /home/henti/docker/letsencrypt/log:/var/log/letsencrypt \
     $image

To add a second domain, I updated:

domains="smokeping.my_personal_domain.com,pi-hole.my_personal_domain.com"

Even more strangely, when I remove all the letsencrypt data and run the same config I only get a certificate for the first domain.

Let's Encrypt, shall we?
-----------------------------------------------------------
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for smokeping.my_personal_domain.com and pi-hole.my_personal_domain.com
Waiting 10 seconds for DNS changes to propagate

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/smokeping.my_personal_domain.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/smokeping.my_personal_domain.com/privkey.pem
This certificate expires on 2025-08-08.
These files will be updated when the certificate renews.
NEXT STEPS:
- The certificate will need to be renewed before it expires. Certbot can automatically renew the certificate in the background, but you may need to take steps to enable that functionality. See https://certbot.org/renewal-setup for instructions.

I monitored cloudflare and both domains had acme challenge DNS entries.

@henti
Copy link
Author

henti commented May 10, 2025

I see now that certbot adds additional domains as "Subject Alternative Name" to the first. So this is actually working correctly.

@henti
Copy link
Author

henti commented May 10, 2025

Actually, this will also explain the first failure, since we need to update the certificate, and certbot needs to know how, hence the --expand comment. I'll create a PR to add support for this.

@henti henti linked a pull request May 10, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant