← Blog  ·  October 2026

Nginx SSL Certificate Monitoring: Automated Expiry Alerts for Your Web Server

Your Nginx cert is valid today. In 27 days it won't be. Here's how to know before that happens.

SSL certificate expiry is one of the most preventable outages in web infrastructure — yet it catches DevOps teams off-guard constantly. An expired cert on your Nginx server doesn't just degrade the experience: modern browsers block the request entirely, returning a full-page warning before users can even see your site. If the cert serves an API endpoint, every downstream client starts failing at the same moment.

The reason it still happens: the default workflow is manual. Someone checks the cert when they remember, adds it to a calendar, hopes the reminder fires on time, and eventually gets burned anyway. This article covers how Nginx SSL certificate monitoring should work and how to set it up properly.


The manual approach: openssl s_client

The standard command-line check for any SSL cert is:

echo | openssl s_client -servername yourdomain.com \
  -connect yourdomain.com:443 2>/dev/null \
  | openssl x509 -noout -dates

This outputs the notAfter field — the expiry date. You can turn it into a cron-based alert with a few more lines:

#!/bin/bash
DOMAIN="yourdomain.com"
EXPIRY=$(echo | openssl s_client -servername "$DOMAIN" \
  -connect "$DOMAIN:443" 2>/dev/null \
  | openssl x509 -noout -enddate \
  | cut -d= -f2)

EXPIRY_EPOCH=$(date -d "$EXPIRY" +%s 2>/dev/null \
  || date -j -f "%b %d %T %Y %Z" "$EXPIRY" +%s)
NOW_EPOCH=$(date +%s)
DAYS_LEFT=$(( (EXPIRY_EPOCH - NOW_EPOCH) / 86400 ))

if [ "$DAYS_LEFT" -lt 30 ]; then
  echo "WARNING: $DOMAIN SSL cert expires in $DAYS_LEFT days" \
    | mail -s "SSL Expiry Alert" ops@yourcompany.com
fi

Add it to crontab to run daily:

0 8 * * * /opt/scripts/ssl-check.sh >> /var/log/ssl-check.log 2>&1

This works for a single domain. It's what most teams start with.


Why the manual approach breaks down

The openssl + cron approach has hard limits that matter once your infrastructure grows:


How Nginx SSL monitoring should work

Proper Nginx SSL certificate monitoring has four properties:

  1. Domain-agnostic. Add a domain once; the monitoring service checks it on a schedule without requiring changes to your Nginx config, crontab, or scripts.
  2. Multi-tier alert schedule. Alerts at 30, 14, 7, and 1 day before expiry — not a single one-time notice that's easy to dismiss.
  3. Delivery to where you actually read alerts. Email to your ops address, not local mail spool. Ideally with a link that shows current status without requiring a login or terminal access.
  4. Infrastructure-independent. The check happens outside your server — monitoring a Nginx cert from the same host it's served on means a server outage can also kill the monitoring. An external check catches problems your internal tooling can't.

🔒 Automated Nginx SSL certificate monitoring

SSLWatch monitors your Nginx SSL certificates externally and sends email alerts at 30, 14, 7, and 1 day before expiry. Enter a domain; get alerts. No agents to install, no scripts to maintain.

Join the SSLWatch waitlist → Check your cert now (free)

Using SSLWatch for Nginx SSL expiry alerts

SSLWatch is designed for exactly this use case: you enter a domain, and SSLWatch monitors the SSL certificate externally and emails you before it expires. It works for any Nginx-served domain — single server, reverse proxy, wildcard cert, or Let's Encrypt — without touching your Nginx config or server.

The alert schedule follows the tiers that matter in practice:

This is structurally different from a one-off script: the alerts repeat on a schedule you don't have to maintain. When you renew the cert, SSLWatch detects the new expiry and resets the alert window automatically.

Works alongside Certbot, not instead of it If you're using Let's Encrypt with Certbot, auto-renewal usually works — but not always. Certbot silently fails when the renewal hook fails, when DNS propagation is delayed, when rate limits are hit, or when the cron or systemd timer that runs it is broken. SSLWatch catches the cases where Certbot's auto-renewal failed and you don't know yet.

Check your Nginx SSL certificate right now

Before setting up monitoring, check the current status of your cert. Enter your Nginx domain into the free SSL checker:

🔍 Instant Nginx SSL certificate check

See your certificate's expiry date, issuer, and chain validity in seconds. No signup, no install.

Check your SSL cert →

The checker shows you exactly what an external client sees when it connects to your domain — the same view a browser uses to validate the cert. If there's a mismatch between what Nginx serves and what you expect, it surfaces here.


Turn manual checks into automated peace of mind

The openssl command is useful for a one-time inspection. It's not a monitoring strategy. A monitoring strategy means:

Nginx SSL certificate expiry is a solved problem — the only reason it catches teams off-guard is because the default tooling requires you to set up something manually, and manual setups drift. External monitoring that sends alerts at 30, 14, 7, and 1 days is the durable answer.

🔒 Stop managing SSL expiry manually

SSLWatch monitors your Nginx SSL certificates and sends email alerts before they expire — at 30, 14, 7, and 1 day. Works with Let's Encrypt, Certbot, commercial certs, and wildcard domains.

Join the SSLWatch waitlist → Check your cert for free

← All articles  ·  SSLWatch  ·  Free SSL checker