October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Fix Let’s Encrypt Auto-Renewal Failures: A Certbot Runbook

Run Certbot’s dry run, identify the failing challenge or hook, repair the public HTTP-01 or DNS-01 path, then verify the renewed certificate is actually deployed.
Length11 min Posted Quest giverVGSources Team

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Start with certbot renew --dry-run, then fix the first authorization or hook error it reports. Check the certificate lineage and renewal profile under /etc/letsencrypt/renewal/ (the location can differ by installation), verify whether the certificate uses HTTP-01 or DNS-01, and repair that validation path before requesting a production renewal. Do not repeatedly retry production issuance while failures or rate limits are accumulating.

The safe recovery sequence

A renewal failure is usually a broken validation path, an expired credential, a hook problem, or a deployment problem rather than a certificate-issuance mystery. Work through these steps in order so you collect evidence before changing the configuration.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Run a dry run and save the complete output. Use certbot renew --dry-run, or the equivalent dry-run command for the ACME client you actually use. Record the hostname, challenge type, HTTP status or DNS response, and any pre-, deploy-, or post-hook exit code.
  2. Identify the affected lineage. List the certificates managed by Certbot and open the matching renewal profile in /etc/letsencrypt/renewal/. Confirm the domains, authenticator, installer, credential-file paths, and hooks describe the service that should receive the certificate.
  3. Determine the challenge method. A profile using a webroot or web-server plugin normally performs HTTP-01. A DNS plugin, delegated validation zone, or a manual authentication hook performs DNS-01. The fix depends on this choice.
  4. Test validation from outside your infrastructure. For HTTP-01, test the public hostname and port 80 from a separate network. For DNS-01, query authoritative DNS for the exact TXT record Certbot requested.
  5. Correct the underlying path. Repair routing, firewall rules, virtual-host selection, webroot permissions, DNS API credentials, zone names, propagation, or hook scripts as indicated by the first error.
  6. Run another dry run or use the staging environment. Confirm the correction without consuming production authorization or issuance capacity.
  7. Attempt production renewal once. Only do this after the non-production check passes and any rate-limit reset time has arrived.
  8. Verify what users receive. Inspect the live endpoint and served chain. A newly issued certificate is not deployed until the proxy or web server has loaded it.
  9. Monitor the next cycle. Alert on failed dry runs, expiry thresholds, and hook failures, and document the lineage and challenge method for the hostname.

Read the renewal profile before changing anything

Certbot renews a certificate lineage using the options saved when that lineage was created. Opening the corresponding file in /etc/letsencrypt/renewal/ shows the domains, authenticator, installer, account details, credential paths, and renewal hooks. The directory is a common default, not a universal path; package-managed or containerized installations may store equivalent state elsewhere.

Confirm that the profile is enabled, that every domain is still intended to be on the certificate, and that the lineage points to the current proxy or web server. A hostname may resolve to a new load balancer while the old renewal profile still targets a retired webroot. Likewise, a DNS plugin can continue using a deleted token file even though the certificate itself remains valid.

Look for differences between the command you test manually and the scheduled job. A system timer, cron entry, container, or hosting-panel task may invoke another Certbot binary, another configuration directory, or another user account. Ensure that only one scheduled renewal process runs at a time; concurrent runs can lock files, race over challenge tokens, or reload a service while the other process is still writing certificates.

HTTP-01: fixing failures on port 80

During HTTP-01, Let’s Encrypt requests a token at http://YOUR_DOMAIN/.well-known/acme-challenge/TOKEN and validates it on public port 80. Let’s Encrypt states: “The HTTP-01 challenge can only be done on port 80.” The validator follows redirects only to HTTP or HTTPS on ports 80 or 443. A closed port, an unexpected redirect destination, or a response generated by the wrong server therefore fails authorization.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Test the public path, not just localhost

Create a harmless test file in the same webroot used by the renewal profile, then request it from a network outside the server:

curl -i http://example.com/.well-known/acme-challenge/test

Replace the hostname and path with your own test value. The response should come from the intended public edge and return the expected file, not a login page, a 404, a redirect to an unrelated host, or a response from a default virtual host. Remove the test file after checking it.

Testing only curl http://127.0.0.1 can hide a public DNS, NAT, firewall, or load-balancer problem. Resolve the hostname publicly and verify that every address returned by DNS routes the challenge path consistently. If IPv6 is published, test the IPv6 endpoint as well; an unreachable IPv6 listener can fail validation even when IPv4 works.

Common HTTP-01 breakpoints

  • Firewall or security group: allow inbound TCP port 80 to the edge that serves the hostname. If port 80 is intentionally blocked, use DNS-01 instead of trying to force HTTP-01 through another port.
  • NAT or load-balancer routing: forward port 80 to the node containing the challenge file, or configure every backend to serve the same token during validation.
  • Wrong virtual host: make the hostname’s port-80 server block handle /.well-known/acme-challenge/ before a catch-all site intercepts it.
  • Forced authentication: exempt the challenge directory from basic authentication, single sign-on, IP allowlists, and application middleware. Let’s Encrypt cannot complete a challenge that returns a login form or a 401/403 response.
  • CDN or proxy rules: bypass caching, bot checks, rewrites, and access policies for the challenge path. Purge a cached error before retesting.
  • Missing or incorrect webroot: compare the webroot in the renewal profile with the directory actually served by the virtual host. Check ownership and permissions so the web server can read the token.
  • Redirects: keep redirects within the supported HTTP/HTTPS destinations on ports 80 or 443. A redirect to a custom port or an unreachable host is not a valid workaround.

When the web server plugin is safer

A web-server plugin can create the challenge location and reload the server using its configured virtual-host model. A webroot plugin is more predictable when a reverse proxy, application framework, or multiple sites share the server, because you explicitly choose the directory that must be publicly readable. Whichever method you use, keep the challenge path stable between renewals and document which edge serves it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

DNS-01: fixing TXT-record validation

DNS-01 proves control by asking you to publish the requested value as a TXT record at _acme-challenge.YOUR_DOMAIN. The web server does not need to be reachable, so DNS-01 is the practical choice when port 80 cannot be exposed. It is also the method that supports wildcard certificates.

Verify the exact record

Read the TXT value and record name printed by Certbot, then query authoritative DNS rather than relying only on a local recursive cache:

dig TXT _acme-challenge.example.com

The returned value must exactly match the value requested for the current authorization. Some DNS providers append the zone name automatically; entering a fully qualified name in such a control panel can create a duplicated name. Check whether the provider expects _acme-challenge, _acme-challenge.example.com, or a trailing dot.

Allow for propagation

DNS updates are not visible everywhere at once. Wait for the provider’s published TTL and propagation behavior, then query several public resolvers and at least one authoritative nameserver. A dry run started immediately after an API update can fail even when the provider’s dashboard shows the record. Do not reduce a production certificate to repeated retries while propagation is still incomplete.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Remove stale values carefully

Multiple TXT values are allowed when several authorizations are active, but old values can make DNS responses unnecessarily large or cause operational confusion. Remove stale challenge values after the relevant authorization completes, while retaining any value still needed by another simultaneous renewal. If a DNS response is truncated or exceeds provider limits, clean up obsolete records before retrying.

Audit API credentials and zone selection

The DNS API token must be valid, available to the scheduled job, and limited to the zone and record operations required for ACME. A token that works in an interactive shell may be unavailable to a system timer because the environment variable or credential file is not loaded. Check file paths, ownership, permissions, expiration, and the selected DNS zone. A common error is updating the parent zone while the authoritative nameservers for the hostname are delegated elsewhere.

Automate unattended DNS-01

Use a supported Certbot DNS plugin or delegate an _acme-challenge subdomain through CNAME or NS records to a zone managed specifically for validation. Delegation separates certificate automation from the main production DNS zone and allows a narrowly scoped credential. The delegated zone must itself be authoritative and reachable during every renewal.

Manual certificates and why they stop renewing

Certificates originally obtained with --manual are not unattended-renewable unless an authentication hook script supplies the required HTTP or DNS changes. Certbot’s documentation states: “Certificates created using --manual do not support automatic renewal unless combined with an authentication hook script.”

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If a manual profile is now failing, decide whether human approval is genuinely required. Where possible, replace it with a webroot or web-server plugin for HTTP-01, or a supported DNS plugin for DNS-01. If manual mode must remain, provide a non-interactive authentication hook that creates the token or TXT record, waits for propagation where necessary, and exits with a nonzero status on failure. Pair it with a cleanup hook so temporary records and files do not accumulate.

After changing the authenticator, do not delete the existing client state or renewal lineage casually. Create or update the intended lineage, verify its domains and deployment target, and retire the obsolete profile only after the replacement has passed a dry run.

Hooks, reloads, and deployment failures

Not every renewal error means authorization failed. Certbot can obtain a certificate successfully and still return an error because a pre-hook, deploy hook, or post-hook failed. Capture each hook’s exit code and standard error in the scheduled job’s logs.

Pre-hooks

Pre-hooks often stop a service, open a firewall rule, or prepare a temporary webroot. Verify that the script is executable, uses absolute paths, and succeeds when run under the same user and environment as the scheduler. It must not wait for an interactive prompt.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Deploy and post-hooks

A deploy hook should reload the correct proxy or web server only after a new certificate has been installed. Confirm the service name, configuration path, and privilege escalation method. A script that reloads a retired instance can return success while users continue receiving the old certificate. Avoid treating a reload command that merely signals a process as proof that the new chain is active.

Credential and environment changes

Rotated DNS tokens, moved key files, changed shell profiles, and container mounts frequently break hooks. Put required values in a protected file or service-managed secret, grant only the required read or write permissions, and test the hook non-interactively. Never print private keys or API tokens into public logs.

Rate limits: when to stop retrying

If the log reports too many failed authorizations or a rate limit, stop production retries. Current published Let’s Encrypt figures for 2026 are:

Limit Published value How to respond
Authorization failures 5 failed authorizations per identifier per account per hour Fix the challenge path, use staging while testing, and wait for the stated reset time.
Certificates per registered domain 50 certificates per registered domain every 7 days Consolidate unnecessary certificates and wait for the window to reset.
Certificates per exact identifier set 5 certificates for the same identifier set every 7 days Stop duplicate issuance attempts and reuse the existing lineage after correcting validation.

Follow the Retry-After header or the reset time shown in the error. The staging environment is intended for testing and does not produce publicly trusted certificates, but it lets you validate account, challenge, and hook behavior without consuming production capacity.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

System checks that explain otherwise mysterious failures

Clock and certificate validity

Ensure the host’s system clock is synchronized. A significant time error can make tokens, signatures, or certificate validity periods appear invalid. Check the time source and timezone configuration on every node that runs Certbot or serves the certificate.

Permissions and private-key protection

Certbot must be able to read its configuration, account data, renewal profile, and credential files, while private keys must remain readable only by the intended users and services. A permission change after a package update, container rebuild, or security hardening can make a previously working renewal fail.

Disk space and inodes

Check both free bytes and available inodes. Certificate archives, logs, temporary challenge files, and container layers can exhaust either resource. Clean up according to your operating system’s retention policy rather than deleting active Certbot directories or the current lineage.

Verify the certificate after a successful renewal

First inspect Certbot’s renewed files and expiration date. Then query the public endpoint through the same hostname users access:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
openssl s_client -connect example.com:443 -servername example.com 

Review the served leaf certificate, issuer chain, subject alternative names, and expiration. The command above opens a TLS session; inspect the certificate details in the output or use your platform’s certificate-inspection option. Repeat the check through each public load-balancer address if traffic can reach more than one edge.

If the endpoint still serves the old certificate, reload or restart the correct proxy, web server, or ingress controller and check its logs. Confirm that the service reads the live certificate path rather than an archived copy. A successful ACME transaction alone does not update a process that has not reloaded its files.

Choosing HTTP-01 or DNS-01

Decision factor HTTP-01 DNS-01
Network requirement Public port 80 and correctly routed challenge content A DNS provider that can publish TXT records; the web server need not be reachable
Wildcard certificates Not supported Supported
Main failure surface Firewall, NAT, CDN rules, redirects, virtual-host routing, authentication, or an incorrect webroot API credentials, wrong zone or record name, propagation delay, and stale TXT values
Unattended automation Webroot or web-server plugins are generally straightforward A DNS plugin or delegated validation zone is required
Primary security concern Keeping the challenge path and port 80 intentionally exposed Protecting narrowly scoped DNS API credentials

Choose HTTP-01 when the hostname has stable public port-80 routing and you control the webroot. Choose DNS-01 for wildcard names, private services, networks that cannot expose port 80, or architectures where DNS automation is more reliable than edge routing.

Build monitoring that treats failure as recoverable

Let’s Encrypt recommends renewing current 90-day certificates about 30 days before expiration and distributing renewal activity. Its integration guidance says: “Renewal failure should not be treated as a fatal error.” In practice, that means a failed scheduled attempt should create an actionable alert while the service continues using its still-valid certificate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Alert when a dry run fails, not only when a certificate is already expired.
  • Warn at a defined number of days before expiry and escalate as the threshold approaches.
  • Record the certificate lineage, domains, challenge method, DNS zone, CDN or proxy, and deployment hook.
  • Capture Certbot, scheduler, web-server, DNS-plugin, and hook logs in one searchable location.
  • Run a staging renewal after significant firewall, DNS, proxy, plugin, or credential changes.
  • Serialize scheduled jobs so one renewal process cannot modify the same lineage while another is running.
  • Reload services only after successful issuance and verify the live endpoint afterward.

Prevent the next renewal incident

Keep Certbot and its plugins updated through your operating system or packaging method. Use a supported automated authenticator instead of a human-only workflow. Store DNS credentials with least privilege, protect them from source control and general shell users, and test that the scheduler can read them.

If you use HTTP-01, make port-80 routing intentional and preserve an unauthenticated /.well-known/acme-challenge/ path through firewalls, load balancers, CDNs, and application middleware. If you use DNS-01, document the authoritative zone, delegation, record-name format, propagation expectations, and cleanup behavior. Keep old TXT records from accumulating.

Keep the renewal state intact, document which lineage belongs to each hostname, and test both issuance and deployment. A reliable runbook distinguishes authorization errors from hook errors, verifies the public result, and leaves a clear reset time when a rate limit has been reached.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.