brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: certbot renew --dry-run tests your renewal before it matters

Linux
~/tips/tip-certbot-renew-dry-run

certbot renew --dry-run

Rehearses a Let's Encrypt renewal against the staging server without saving any certificate.

A certificate renewal is a job that nobody looks at until the day it fails and a browser shows a red warning page. I’d rather find out on a quiet afternoon. Certbot can rehearse the whole thing.

certbot renew --dry-run

The docs describe --dry-run as testing renew or certonly without saving any certificates to disk. It talks to the Let’s Encrypt staging server, unless you name another one with --server. So nothing on your real site changes, and a broken setup shows up as an error now instead of in a few weeks.

To rehearse just one certificate, add its name:

certbot renew --cert-name example.com --dry-run

The names come from certbot certificates. The docs use the same form in an example that also passes a new --webroot-path.

Good to know about the schedule: since Certbot 4.0.0 a certificate counts as ready for renewal when less than a third of its lifetime is left. Before 4.0.0 the threshold was a fixed 30 days. A dry run does not wait for that point, which is the whole idea.

One caveat: a passing dry run only proves the staging server was happy. Also, --deploy-hook commands do not run during a dry run, unless you add --run-deploy-hooks. If your web server only picks up the new certificate through a hook, test that part on purpose.

Further reading: Certbot user guide

Going deeper: Run degoog on Unraid as your own search page, compared with SearXNG and 4get

More Linux tips a2query -m rewrite renice -n 10 -p 4242 cat config.yml | xsel -ib xvfb-run -a your-program --some-flag dpkg --get-selections > packages.txt All Linux tips (261) All topics

Link