r/nginx • u/Strict_Violinist6767 • Sep 30 '26
SSL certificates keep expiring and causing outages. How do you track and renew them?
We’ve had two SSL certificate expirations this year and both caused major customer-facing outages. The person who used to handle renewals left and no one properly took over the responsibility.
For saas permission monitoring do control has really helped, but that doesn’t help with certificate management. Right now we’re still relying on calendars and manual checks, which clearly isn’t working.
What are you using to track expiration dates and automate renewals, especially in an nginx environment? Any reliable setups that have actually prevented this from happening again?
4
u/BehindTheMath Sep 30 '26
It's 2026. Why would you be renewing certs manually? Set up LetsEncrypt and certbot and you're done.
2
u/certkit Sep 30 '26
We had this exact same problem 18 months ago. We used to deploy certificates manually, and occasionally something would get forgotten and expire. We tried installing certbot, but we run nginx in a cluster, and there wasn't a good way for all the servers to share a certificate. There ended up being a lot of custom scripting work, and we still had a server expire due to a bad configuration.
We didn't like how that worked, it was distributed, unmonitored, difficult to maintain. So we built a centralized management tool. One server that renewed all the certificates, pushed them where they needed to go, and monitored the TLS endpoints to make sure it worked. It's centralized, and makes everything really visible.
It started as our own internal project, but it was so popular we released it as our company's third product. CertKit. You can obviously build something like this yourself too with a central server and scripts to push things around.
2
u/BaybeMwijarubi-21 Sep 30 '26
are these certs from a CA that supports automated renewal via ACME, or are they purchased manually through some vendor portal? the answer changes the approach pretty significantly
1
u/Own_Giraffe987 Oct 24 '26
Certbot handles renewal, but the failure to watch for is it renewing fine while nginx keeps serving the old cert because nothing reloaded it. Add --deploy-hook “systemctl reload nginx” so every renewal actually goes live.
Then check every hostname from outside, not just the main domain. The forgotten ones on a separate box are usually what expires. And send the alert to a shared channel instead of one person’s inbox, so it doesn’t leave with them. Set the warning to 14 days, since Let’s Encrypt renews at 30 and a 30 day alert just nags you. A nightly cron running openssl s_client against a list of hostnames does the job. I moved mine over to Dotcom Monitor’s SSL check once the list got too long for me to babysit.
1
u/Beneficial_Wolf_1545 29d ago
Two options, If let's encrypt is fine, then go with their automated ACME provision.
If you are using paid SSL, then would recommend ACME or AutoInstall SSL based process with zero click process. We have started from this August from HashSSL and working fine for direct admin and Apache
1
u/raiansar 28d ago
Own_Giraffe987 covered the monitoring side. Since the person who knew the setup left, I'd start by finding out which certs actually auto-renew and which ones were living on that calendar.
This prints every cert file nginx is serving with its expiry date:
Then run
sudo certbot certificates. Anything in the first list that isn't under /etc/letsencrypt/live/ isn't being renewed by certbot, and those are the likely suspects for your two outages. Also confirm renewal is scheduled at all withsystemctl list-timers | grep certbot(some installs use /etc/cron.d/certbot instead) and runsudo certbot renew --dry-runonce.For boxes nobody told you about, search
%.yourdomain.comon crt.sh. It lists every public cert issued for your domain, so a hostname on some other server shows up even if it was never documented.If the hand-renewed ones are bought certs, the calendar gets worse every year: max lifetime is 200 days now, 100 from March 2027 and 47 from March 2029. DigiCert, Sectigo and GoDaddy all do ACME now. Their portal gives you an EAB key ID and HMAC key, and certbot takes them with
--server,--eab-kidand--eab-hmac-key.Last thing, write down which method renews which cert somewhere the team will find it, so the next handover doesn't depend on one person's memory.
I run Visual Sentinel, which does the outside check per hostname and sends alerts to a shared Slack or Teams channel, if you'd rather not keep an openssl cron going: https://visualsentinel.com/ssl-monitoring
1
u/raghuchinnannan 15d ago
Two separate problems here: renewing automatically, and knowing when renewal silently failed. Fixing only the first is how most people get bitten a third time.
Renewal (nginx + Let's Encrypt or any ACME CA):
certbot(or acme.sh) with its systemd timer. Check it's actually running withsystemctl list-timers | grep certbot, thencertbot renew --dry-run.--deploy-hook "systemctl reload nginx"(orrenew_hookin the renewal conf). "Renewed on disk but nginx still serving the old one" is the classic failure.Monitoring (the part that would have saved you):
(I build a renewal-tracking tool myself, so I'm biased toward the monitoring half, but a cron job running
openssl s_clientagainst your hostname list, posting to Slack, is a perfectly good start.)