deploy hook SSL / TLS Origin: Network OSI layer 7 · Application Last updated 18 Nov 2026

Certbot renewed the certificate but the server still serves the old one (deploy hook / reload failed)

Renewal succeeded on disk, but nginx/Apache wasn't reloaded, so clients keep seeing the expiring certificate.

Exact message you may see Certbot renewed but nginx still serves old certificateHook command returned error coderenew_hook failed reload nginxdeploy-hook certbotcertificate renewed but site still shows expired
Seen on: Certbot Nginx Linux

Meaning

Add a deploy hook: --deploy-hook "systemctl reload nginx" (or in /etc/letsencrypt/renewal-hooks/deploy/), make sure the web server reads live/ paths (not copied files), and test with certbot renew --dry-run. Check hook scripts are executable and don't error.

Common causes

  • No reload hook configured
  • Hook script not executable or failing
  • Server config points at copied certificates
  • Reload requires privileges
  • Other service (mail, HAProxy) uses the cert without reload

⚡ Quick fix

  1. certbot renew --deploy-hook "systemctl reload nginx"
  2. Place executable scripts in renewal-hooks/deploy/
  3. Verify served expiry date

Detailed fix by platform

Shell

  1. bash
    printf '#!/bin/sh
    systemctl reload nginx
    ' | sudo tee /etc/letsencrypt/renewal-hooks/deploy/reload.sh
    sudo chmod +x /etc/letsencrypt/renewal-hooks/deploy/reload.sh
    sudo certbot renew --dry-run

How to diagnose

  1. Hook — Present, executable?
  2. Config — Uses live/?
  3. Served expiry — New?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Network. Errors that are often confused with or caused by this one (click to open):

archive — /etc/letsencrypt/live/<domain>/privkey.pem symlink to archive unreadable (permissions after certbot upgrade) (SSL / TLS)archiveDjango — Django send_mail: ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] (EMAIL_USE_SSL vs EMAIL_USE_TLS on the wrong port) (Email / SMTP)DjangoDNS plugin — Certbot DNS plugin: Error determining zone / invalid credentials (Cloudflare/Route53 API token) (SSL / TLS)DNS pluginexpiry — Certificate expired unexpectedly — manual renewal missed or automation failing silently (SSL / TLS)expiryIncorrect TXT record found at _acme-challenge — Certbot: DNS problem: NXDOMAIN looking up TXT for _acme-challenge.example.com / Incorrect TXT record (SSL / TLS)Incorrect TXT record …Invalid response from .well-known/acme-challenge: 404 — Certbot: Detail: Invalid response from http://example.com/.well-known/acme-challenge/abc: 404 (SSL / TLS)Invalid response from…lock — Certbot: Another instance of Certbot is already running (SSL / TLS)lockSEC_ERROR_EXPIRED_CERTIFICATE — Firefox: Peer's Certificate has expired. Error code: SEC_ERROR_EXPIRED_CERTIFICATE (SSL / TLS)SEC_ERROR_EXPIRED_CER…deploy ho…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.