Three customer sites went down on a Sunday morning because their Let’s Encrypt certificates expired. The Plesk extension renews automatically — except it doesn’t, when the customer accidentally pointed www.example.com at the panel before the DNS for example.com was actually delegated, or when the rate-limit for the domain was hit during a botched onboarding two months ago and Plesk gave up retrying. Browsers showed NET::ERR_CERT_DATE_INVALID and the customers’ Monday-morning emails were not friendly. The fix is two things: making certificate provisioning reliable (Let’s Encrypt, wildcard via DNS-01 where it makes sense, custom certs without dropping into the file system), and adding an external renewal monitor so the panel UI’s “all green” is verified by something outside the panel.
What’s happening
Plesk has a Let’s Encrypt extension that wraps acme.sh under the hood. On a fresh subscription, the extension can issue a certificate for the apex + www, the mail subdomain, and the webmail subdomain in one HTTP-01 challenge. It re-runs every renewal day. The extension supports DNS-01 for wildcards through a handful of built-in DNS providers (Cloudflare, Route 53, DigitalOcean, etc.), and Plesk’s own DNS if the domain is hosted on the same panel. Custom certificates from a customer’s PKI go into the certificate store and are attached per-subscription via the panel UI or CLI. The two failures that are not visible from the panel are: certificates that almost expired and need a manual nudge because the panel’s cron didn’t run, and certificates that are issued to the wrong SAN list because the customer added a subdomain after the cert was first issued. An external renewal monitor (a script that connects to every customer domain on :443 and reads the cert) catches both.
How to verify
The Let’s Encrypt extension is installed and the ACME client is reachable:
plesk bin extension --list | grep -i letsencrypt
plesk bin extension --info letsencrypt
Every subscription with hosting on this panel has a current certificate:
plesk db -e "
SELECT d.name AS domain,
c.name AS cert_name,
FROM_UNIXTIME(UNIX_TIMESTAMP(c.notAfter)) AS expires
FROM domains d
LEFT JOIN certificates c ON d.certificate_id = c.id
WHERE d.htype='vrt_hst'
ORDER BY c.notAfter ASC
LIMIT 20;
"
Spot-check the certificate the browser actually receives — Plesk’s internal record can disagree with what nginx is serving if the vhost was rebuilt manually:
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
| openssl x509 -noout -subject -issuer -dates
The wildcard or apex+SANs list should match what Plesk thinks it issued:
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
| openssl x509 -noout -text \
| sed -n '/X509v3 Subject Alternative Name/,/X509v3/p' \
| head -5
If the cert’s notAfter is within seven days and the panel UI shows “auto-renew scheduled,” check the Plesk task scheduler — the cron may be silently failing:
plesk bin scheduler --list | grep -i letsencrypt
journalctl -u plesk-letsencrypt --no-pager | tail -50
The fix
The four flows: fleet-wide HTTP-01 issuance, wildcard via DNS-01, custom-cert install, and external renewal monitor.
1. Fleet-wide Let’s Encrypt issuance via HTTP-01
The Let’s Encrypt extension’s CLI provisions a certificate for one domain. To do every subscription:
#!/usr/bin/env bash
set -euo pipefail
LE_EMAIL="ops@example.com"
# Every domain Plesk knows about that doesn't currently have a non-self-signed cert
plesk db --skip-column-names -e "
SELECT d.name
FROM domains d
LEFT JOIN certificates c ON d.certificate_id = c.id
WHERE d.htype='vrt_hst'
AND (c.id IS NULL OR c.issuer LIKE '%Plesk%' OR c.issuer LIKE '%self-signed%')
" | while read DOMAIN; do
echo "=== ${DOMAIN} ==="
plesk bin extension --exec letsencrypt cli.php \
--domain "${DOMAIN}" \
--email "${LE_EMAIL}" \
--webmail true \
--mail true \
--include-www true || echo "FAILED: ${DOMAIN}"
done
Plesk handles the HTTP-01 challenge by writing the token into the subscription’s .well-known/acme-challenge/ path. If a subscription’s .htaccess or nginx custom rules block that path, the issuance fails — fix the rule rather than re-running the issuance, or Let’s Encrypt rate-limits the domain.
2. Wildcard via DNS-01
A wildcard certificate covers *.example.com and requires DNS-01. Plesk supports this through its DNS providers when the domain is hosted on the panel or through external providers via the letsencrypt extension’s DNS plugins.
# Issue a wildcard using Plesk's own DNS (when the panel is authoritative for the zone)
plesk bin extension --exec letsencrypt cli.php \
--domain "example.com" \
--email "${LE_EMAIL}" \
--wildcard true \
--dns-provider plesk
# OR using Cloudflare's API (when DNS is hosted on Cloudflare)
plesk bin extension --exec letsencrypt cli.php \
--domain "example.com" \
--email "${LE_EMAIL}" \
--wildcard true \
--dns-provider cloudflare \
--dns-cf-token "$(cat /root/.secrets/cf-token)"
A wildcard certificate is attached to the parent subscription and applied to every subdomain Plesk creates under it automatically — useful when a customer keeps adding staging.example.com, qa.example.com, internal.example.com and you don’t want a separate certificate per subdomain.
3. Installing a customer-supplied custom certificate
When a customer has their own commercial CA or a corporate PKI, the certificate goes into Plesk’s per-subscription certificate store, then is attached to the domain.
# Upload the cert + key + chain into the subscription's certificate store
plesk bin certificate --create acme-corp-2026 \
-admin \
-domain example.com \
-csr-file /tmp/example.com.csr \
-cert-file /tmp/example.com.crt \
-key-file /tmp/example.com.key \
-cacert-file /tmp/example.com-chain.pem
# Attach it to the hosting
plesk bin site --update example.com -certificate-name acme-corp-2026
# Reapply the web config
plesk repair web -y example.com
# Verify the browser sees the new cert
echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
| openssl x509 -noout -issuer
The customer’s key never leaves the panel filesystem — keep /tmp cleared after the upload, and rotate the key periodically by re-uploading. The Plesk panel does not have a “key rotation reminder” feature; treat the rotation as a ticket on its own.
4. External renewal monitor
The panel’s own renewal cron is a black box. An external monitor that connects to every customer domain on :443, reads the cert, and alerts when it’s close to expiry catches the cases the panel cron silently lost. Run it on a different node from the panel — if the panel is down, the monitor still fires.
#!/usr/bin/env bash
# /usr/local/bin/cert-monitor.sh on a separate host
set -euo pipefail
ALERT_DAYS=14
PANEL_DB_HOST="panel.example.com"
DOMAINS=$(ssh -i /root/.ssh/panel-readonly root@${PANEL_DB_HOST} \
"plesk db --skip-column-names -e \"
SELECT d.name FROM domains d
WHERE d.htype='vrt_hst' AND d.status=0
\"")
EXPIRING=()
for DOMAIN in ${DOMAINS}; do
EXPIRY=$(echo | openssl s_client -connect "${DOMAIN}:443" -servername "${DOMAIN}" 2>/dev/null \
| openssl x509 -noout -enddate 2>/dev/null \
| sed 's/notAfter=//' || true)
if [[ -z "${EXPIRY}" ]]; then
EXPIRING+=("${DOMAIN}: no certificate or TLS handshake failed")
continue
fi
EXPIRY_EPOCH=$(date -d "${EXPIRY}" +%s)
NOW_EPOCH=$(date +%s)
DAYS_LEFT=$(( (EXPIRY_EPOCH - NOW_EPOCH) / 86400 ))
if (( DAYS_LEFT < ALERT_DAYS )); then
EXPIRING+=("${DOMAIN}: ${DAYS_LEFT} days remaining")
fi
done
if [[ ${#EXPIRING[@]} -gt 0 ]]; then
printf '%s\n' "${EXPIRING[@]}" \
| mail -s "Plesk cert monitor: ${#EXPIRING[@]} certs expiring" oncall@example.com
fi
Run the script daily from a cron on the monitoring host:
cat > /etc/cron.d/cert-monitor <<'CRON'
0 8 * * * root /usr/local/bin/cert-monitor.sh
CRON
The mail is short — three lines a day when there are no expirations, a list of domains plus days when there are. The on-call sees the cron failure mode before the customer does.
5. Re-issuing after a domain change
When a customer adds shop.example.com after the cert for example.com was issued, the certificate’s SAN list does not include shop.example.com. The cert is still valid for the apex, but the new subdomain has no cert. Re-issue:
plesk bin extension --exec letsencrypt cli.php \
--domain "example.com" \
--email "${LE_EMAIL}" \
--include-www true \
--mail true \
--webmail true \
--extra-sans "shop.example.com,api.example.com"
Or, more durably, switch the subscription to the wildcard route in section 2 and the problem disappears for future subdomains.
6. Rate-limit awareness
Let’s Encrypt rate-limits per registered domain (50 certificates per week, 5 duplicate certificates per week). On a panel with hundreds of subdomain-heavy customers, the limit is hit fast on big migrations. The fix is staging certificates first (Let’s Encrypt’s staging endpoint) and only flipping to production once the panel’s certificate plumbing is verified.
# Test issuance against the staging endpoint
plesk bin extension --exec letsencrypt cli.php \
--domain "example.com" \
--email "${LE_EMAIL}" \
--staging true
A staging cert won’t be trusted by browsers but it confirms HTTP-01/DNS-01 round-trip works end-to-end. Flip --staging false for production once the dry run passes.
Provisioning + monitoring is the whole story — issue from Plesk, store custom certs in the panel, watch renewals from a host outside the panel, and the 3 AM expiry call stops happening.
Operate the Plesk fleet on Stack Harbor’s Monitoring + Support with external certificate expiry monitoring as part of the standard package — or start with a discovery call if you want us to take over the renewal watch.