You wake up to a paging alert — one of your Plesk-managed sites is serving an expired certificate. You SSH in, open the Plesk panel, look at the SSL/TLS section for that domain, and the Let’s Encrypt extension reports a vague Could not renew certificate from three days ago. Three days ago: nobody noticed, the cron job ran, the renewal failed, the extension logged the failure to a file nobody monitors, and the cert quietly aged out. The recovery is easy. The harder problem is the four common reasons renewals fail in the first place, and how to detect each one before the cert expires.
What’s happening
Plesk’s Let’s Encrypt extension is a wrapper around Certbot. It runs daily via a Plesk task that walks every subscription, checks expiry, and runs the ACME HTTP-01 challenge on any cert within the renewal window (default 30 days before expiry). The extension logs to /usr/local/psa/var/log/letsencrypt-renewal-*.log and bubbles errors up to the panel UI, but it does not page anyone.
Four failure modes account for the vast majority of cases:
- Rate limit hit. Let’s Encrypt enforces several rate limits: 50 certs per registered domain per week, 5 duplicates of an exact certificate per week, 10 accounts per IP per 3 hours. Hitting any of these makes renewals fail with a 429-style error that takes anywhere from a few hours to a week to clear.
- HTTP-01 challenge fails. The ACME server (Let’s Encrypt) tries to fetch
http://<domain>/.well-known/acme-challenge/<token>and gets either a 404, a 301 redirect to HTTPS that breaks the challenge (the challenge is HTTP-only), or a WAF block. Common in Plesk fleets that have ModSecurity enabled. - Custom certificate chain mismatch. A domain was issued a non-Let’s-Encrypt cert manually (Sectigo, internal CA) and Plesk’s Let’s Encrypt extension refuses to overwrite it on renewal because the chain doesn’t match what it expects.
- DNS-01 challenge configured incorrectly. Wildcard certs require DNS-01. If the DNS provider’s API credentials drifted, or Plesk’s DNS provider plugin doesn’t have the right scope, the challenge fails.
How to verify
The extension log is the first stop:
ls -lt /usr/local/psa/var/log/letsencrypt-*.log | head -5
tail -200 /usr/local/psa/var/log/letsencrypt-renewal-$(date +%Y-%m-%d).log
# Or whatever today's date is
Look for the specific failure line. Common patterns:
# Rate limit
ERROR: Failed authorization procedure. example.com (http-01): \
urn:ietf:params:acme:error:rateLimited
# HTTP-01 fail
ERROR: Failed authorization procedure. example.com (http-01): \
urn:ietf:params:acme:error:unauthorized :: 404
ERROR: Detail: 503
# Chain mismatch
ERROR: Existing certificate has a CN that conflicts with the Let's Encrypt request
# DNS-01 fail (wildcard)
ERROR: dns-01 self-test failed
Per-domain extension state:
plesk bin extension --exec letsencrypt cli.php --status --domain example.com
plesk bin certificate --info example.com
The cert file directly on disk:
# Plesk stores certs in subscription dirs; the symlink is here:
ls -la /usr/local/psa/var/certificates/
# Check expiry of the actual cert in use
openssl s_client -servername example.com -connect example.com:443 </dev/null 2>/dev/null | \
openssl x509 -noout -dates -issuer
For rate-limit specifically, check Let’s Encrypt’s status:
curl -s https://crt.sh/?q=example.com\&output=json | jq -r '.[] | "\(.not_before) \(.not_after) \(.issuer_name)"' | head -20
# Counts issuances over the past week — if you see 50+, you've hit the per-domain limit
The fix
Match the failure mode and apply the targeted recovery.
Mode 1 — Rate limit
If you’ve hit the 50-certs-per-domain-per-week limit, you can’t get new certs from production Let’s Encrypt until the window slides. Options:
- Wait it out. The 7-day window slides, not resets — once a cert from 7 days ago falls out, you have headroom.
- Use the staging endpoint to validate scripts while waiting. Staging has higher limits but issues untrusted certs (browsers will warn).
- Reuse a recent valid cert. If a domain already has a valid cert that hasn’t expired, you don’t need a new one. Push the renewal date back:
# Pull the current cert + key from another node where it's still valid, install on this one
plesk bin certificate --create restored-cert -admin \
-cert-file /root/example.com.crt -key-file /root/example.com.key -ca-file /root/chain.crt
plesk bin site --update example.com -certificate-name restored-cert -ssl true
To stop hitting the limit in the future, audit what’s burning your budget:
# How many certs Plesk attempts to renew per day
grep 'Renewing' /usr/local/psa/var/log/letsencrypt-renewal-*.log | wc -l
# Domains with 4+ renewal attempts in the past week (potential loop)
grep 'Renewing' /usr/local/psa/var/log/letsencrypt-renewal-*.log | \
awk '{print $NF}' | sort | uniq -c | sort -rn | head
If a single domain has multiple renewal attempts per day, the extension is in a failure loop — fix the underlying issue (modes 2-4 below) so it stops retrying.
Mode 2 — HTTP-01 challenge fails
The ACME server must reach http://<domain>/.well-known/acme-challenge/<token> and get a 200. Test the path manually:
# Force a token file and try to fetch it
TOKEN=$(openssl rand -hex 16)
mkdir -p /var/www/vhosts/example.com/httpdocs/.well-known/acme-challenge
echo "test-$TOKEN" > /var/www/vhosts/example.com/httpdocs/.well-known/acme-challenge/$TOKEN
# Fetch from outside (use a different host or a proxy)
curl -sv http://example.com/.well-known/acme-challenge/$TOKEN
# Should return 200 + "test-<token>"
# Cleanup
rm /var/www/vhosts/example.com/httpdocs/.well-known/acme-challenge/$TOKEN
Common failures:
- 301 redirect to HTTPS. Application redirects all HTTP to HTTPS, breaking the challenge. Fix: add an exception in
.htaccessor the nginx config:
RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
- WAF (ModSecurity) blocking the challenge path. Whitelist:
cat > /etc/httpd/conf.d/modsecurity.d/acme-whitelist.conf <<'EOF'
<LocationMatch "/\.well-known/acme-challenge/">
SecRuleEngine Off
</LocationMatch>
EOF
plesk bin http_server --reconfigure-all
- 404 because of nginx-Apache document root mismatch. Plesk runs nginx in front of Apache; if nginx’s
try_filesdoesn’t include the challenge directory, fix in Plesk’s “Apache & nginx Settings” → Additional nginx directives:
location ~ ^/\.well-known/acme-challenge/ {
root /var/www/vhosts/example.com/httpdocs;
try_files $uri =404;
allow all;
}
Then re-run renewal:
plesk bin extension --exec letsencrypt cli.php -d example.com -d www.example.com
Mode 3 — Chain mismatch
If the domain has a manually-installed third-party cert and Plesk’s Let’s Encrypt extension fails because of CN conflicts, decide explicitly:
- Keep the third-party cert, disable Let’s Encrypt for this domain. In the panel: SSL/TLS Certificates → uncheck “Issue free SSL certificate using Let’s Encrypt”.
plesk bin site --update example.com -ssl false
plesk bin extension --exec letsencrypt cli.php --remove -d example.com
- Switch to Let’s Encrypt, drop the third-party cert. Remove the existing cert first:
plesk bin certificate --remove third-party-cert -admin
plesk bin extension --exec letsencrypt cli.php -d example.com -d www.example.com
plesk bin site --update example.com -ssl true
Mode 4 — DNS-01 (wildcards)
Wildcard certs need DNS-01. Plesk supports DNS-01 via its Let’s Encrypt extension when a DNS provider plugin is configured. If renewal fails:
# Confirm Plesk is configured to use DNS-01 for this domain
plesk bin extension --exec letsencrypt cli.php --status --domain example.com | grep -i 'verification'
# Check DNS provider credentials are still valid
# Cloudflare example:
curl -s -H "Authorization: Bearer $CF_TOKEN" \
https://api.cloudflare.com/client/v4/user/tokens/verify | jq '.success'
If the token’s revoked, regenerate and update Plesk:
plesk bin extension --exec letsencrypt cli.php --update-config \
-dns-provider cloudflare -dns-cloudflare-api-token "$NEW_TOKEN"
Then renew:
plesk bin extension --exec letsencrypt cli.php -d example.com -d "*.example.com" \
--dns-cloudflare
Pre-emptive monitoring
The whole reason this article exists is that Plesk’s extension fails silently. Add a check that doesn’t depend on the panel UI:
cat > /usr/local/scripts/check-cert-expiry.sh <<'EOF'
#!/usr/bin/env bash
# Alerts when any cert is within 14 days of expiry
THRESHOLD_DAYS=14
for D in $(plesk db -Ne "SELECT name FROM domains WHERE parentDomainId=0 AND htype='vrt_hst'"); do
EXPIRY=$(echo | openssl s_client -servername "$D" -connect "$D":443 2>/dev/null | \
openssl x509 -noout -enddate 2>/dev/null | cut -d= -f2)
[[ -z "$EXPIRY" ]] && continue
EXPIRY_EPOCH=$(date -d "$EXPIRY" +%s)
NOW_EPOCH=$(date +%s)
DAYS_LEFT=$(( (EXPIRY_EPOCH - NOW_EPOCH) / 86400 ))
if [[ $DAYS_LEFT -lt $THRESHOLD_DAYS ]]; then
echo "$D: $DAYS_LEFT days left (expires $EXPIRY)"
fi
done
EOF
chmod 700 /usr/local/scripts/check-cert-expiry.sh
# Daily cron with email if non-empty output
cat > /etc/cron.daily/cert-expiry-check <<'EOF'
#!/bin/bash
OUT=$(/usr/local/scripts/check-cert-expiry.sh)
[[ -n "$OUT" ]] && echo "$OUT" | mail -s "Plesk cert expiry warning - $(hostname)" ops@stackharbor-managed.example.com
EOF
chmod 755 /etc/cron.daily/cert-expiry-check
That single cron line is what catches the “extension failed three days ago and nobody noticed” pattern.
Stack Harbor manages Plesk SSL renewal as part of environment management — the daily extension run is wrapped in a check that alerts before expiry, not after. Pair with monitoring and support so renewal failures page the on-call rotation — or contact us if your fleet has been quietly bleeding certs.