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 certificates lists every certificate and when it expires

Linux
~/tips/tip-certbot-certificates-list

certbot certificates

Shows each certificate Certbot manages, with its domains, expiry date and file paths.

I forget which certificates a machine has and when they run out. The answer is one command away and it doesn’t need a browser or a guess from the file names.

certbot certificates

For every certificate Certbot manages it prints the certificate name, the domains, the expiry date, the path of the certificate, the key type and the path of the private key. That is the quickest check before you touch a web server config, and a handy way to see whether two domains share one certificate.

The certificate name in that list is what the other commands expect after --cert-name. You can renew one certificate or test it with a dry run:

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

The same name works for deleting one:

certbot delete --cert-name example.com

Be careful with that last one. The docs say deleting is irreversible and that Certbot does not revoke the certificate first. If the key might be compromised, revoking is a different job.

While you are looking at the paths: the docs ask you to point your web server directly at the files in /etc/letsencrypt/live/$domain, or to use symlinks, instead of copying them. Copies don’t follow a renewal. Nginx wants fullchain.pem for ssl_certificate and privkey.pem for ssl_certificate_key.

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