← posts / ai integrations

Let’s Encrypt goes to 64-day certificates: a copy-paste renewal audit for certbot and Traefik

On 10 Feb 2027 Let’s Encrypt’s default certificate lifetime drops from 90 to 64 days. Here is a short audit for certbot and Traefik: inventory, dry run, served-cert check and an expiry alert.

if.codesNov 21, 2026 · 5 min read#letsencrypt#tls#certbot#traefik#devopsAI-assisted

Let’s Encrypt has set a date: on 10 February 2027 its default classic profile moves from 90-day to 64-day certificates, and on 16 February 2028 to 45 days. Nothing breaks that day. What breaks is the renewal setup that only ever worked by luck: a timer that stopped, a service that never reloads the new file, a firewall rule that blocks the challenge. Shorter lifetimes give those faults less slack. This post is a 15-minute audit you can run on any box.

What actually changes

Per Let’s Encrypt’s announcements, the default lifetime shrinks in two steps, and the authorization reuse period shrinks with it: from 30 days to 10 days in 2027, and to seven hours in 2028. Staging gets each change about a month earlier. The last 90-day certificate is expected to expire on 11 May 2027. Changes apply to new certificates, so you see 64 days at the first renewal after the switch.

Shorter certificate lifetimes reduce the margin for error in renewal automation.
Shorter certificate lifetimes reduce the margin for error in renewal automation.
0 days25 days50 days75 days100 daysToday · Default lifetime: 90 days90 daysTodayFrom 10 Feb 2027 · Default lifetime: 64 days64 daysFrom 10 Feb 2027From 16 Feb 2028 · Default lifetime: 45 days45 daysFrom 16 Feb 2028
Default Let’s Encrypt certificate lifetime Source: Let’s Encrypt, Oct 2026 and Dec 2025 posts
Default Let’s Encrypt certificate lifetime
Default lifetime
Today90 days
From 10 Feb 202764 days
From 16 Feb 202845 days

The chart shows how little headroom is left by 2028: a 45-day certificate with a renewal that fails twice is already close to expiry. Let’s Encrypt’s own advice is to renew at roughly two thirds of the lifetime rather than hard-code an interval, and that is what the audit checks.

Step 1: inventory what you have

Start with the certbot version:

sudo certbot --version

You need 4.0.0 or newer for the renewal rule described below. Then list every certificate certbot manages:

sudo certbot certificates

Since Certbot 4.0.0 a certificate is renewed when less than a third of its lifetime remains (for lifetimes of 10 days or less, half). Before 4.0.0 the threshold was a fixed 30 days. A 64-day certificate therefore renews with about 21 days left on a current certbot. If certbot --version prints something older, upgrade first: the fixed 30-day rule still works for 64 days but leaves much less room at 45.

Step 2: confirm the renewal job exists and runs

systemctl list-timers | grep -i certbot
sudo certbot renew --dry-run

The first command should show a next run time. If it prints nothing, check for a cron entry instead (sudo crontab -l, /etc/cron.d/certbot). The dry run talks to Let’s Encrypt’s staging environment and exercises the whole path, including the challenge. A failure here is your most valuable finding: fix it now, not in February.

A healthy renewal process ensures services remain online without manual intervention.
A healthy renewal process ensures services remain online without manual intervention.

Step 3: make sure the service picks up the new file

A renewed file on disk does nothing if the web server keeps the old one in memory. Certbot runs scripts from /etc/letsencrypt/renewal-hooks/deploy/ only after a successful renewal. Add one:

sudo tee /etc/letsencrypt/renewal-hooks/deploy/reload-nginx.sh >/dev/null <<'EOF'
#!/usr/bin/env bash
systemctl reload nginx
EOF
sudo chmod +x /etc/letsencrypt/renewal-hooks/deploy/reload-nginx.sh

Swap nginx for apache2, haproxy or whatever terminates TLS for you. Reload, not restart, keeps connections alive.

Step 4: Traefik

Traefik’s documentation says it manages 90-day certificates by default and starts renewing 30 days before expiry. A 64-day certificate still renews comfortably under that rule. The option certificatesDuration (default 2160 hours, i.e. 90 days) is documented as used only to determine renewal dates, so if you set it explicitly, check that it is not pinned to a value that no longer matches the certificates you receive.

Traefik keeps its certificates in acme.json, a JSON object keyed by resolver name (the name you gave under certificatesResolvers), each holding a Certificates list. The filter below walks the whole file, so it works whatever your resolver is called. Read the real expiry dates out of it:

jq -r '.. | .certificate? // empty' acme.json | while read -r c; do
  echo "$c" | base64 -d | openssl x509 -noout -subject -enddate
done

Each pair of output lines gives a domain and the date its certificate expires. Anything that looks older than your expected renewal window means Traefik is failing to renew: check its logs for ACME errors.

Want AI wired into the systems you already run?I build LLM integrations with costs and quality you can see. The estimate is free.

Step 5: check what visitors actually receive

Files and stores can look healthy while the live endpoint serves a stale certificate. Ask the server itself:

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

Compare notAfter with the file on disk. If they differ, you have a missing reload (step 3) or a second instance in front, such as a load balancer or CDN origin, still holding the old certificate.

Step 6: alert before it expires

Do not rely on the renewal job to tell you it failed. This script exits non-zero when the certificate served by a host expires within the given number of days:

Monitoring tools can alert administrators before a certificate expires.
Monitoring tools can alert administrators before a certificate expires.
#!/usr/bin/env bash
# usage: cert-check.sh example.com [days]
set -u
host="$1"
days="${2:-14}"
if echo | openssl s_client -connect "$host:443" -servername "$host" 2>/dev/null | openssl x509 -noout -checkend $((days * 86400)) >/dev/null; then
  echo "OK: $host valid for more than $days days"
else
  echo "WARN: $host expires within $days days (or could not be read)"
  exit 1
fi

Run it daily from cron or your monitoring system for every hostname you serve. Fourteen days is a sensible threshold now; it stays sensible at 45-day lifetimes, because a healthy renewal happens well before it.

Step 7: expect fresh validation every time

With the authorization reuse period falling to 10 days and then seven hours, assume every renewal will run a real challenge. Check that the path it needs stays open: port 80 reachable for HTTP-01, or a working, unexpired DNS API token for DNS-01. The dry run in step 2 proves this today; rerun it after any firewall, DNS provider or hosting change.

The short version

  • Certbot 4.0.0 or newer, so renewal scales with certificate lifetime.
  • A timer or cron job that you have seen run, and a passing certbot renew --dry-run.
  • A deploy hook that reloads whatever serves TLS.
  • Traefik: real expiry dates read from acme.json, and no stale certificatesDuration.
  • An expiry alert on the live endpoint, not on the files.

Sources

if.codesI build RAG, AI integrations and agent pipelines on Go and Python backends — and write about it here.
// keep reading

More posts on AI and backends.

// free quote

Read something you need? I’ll quote it for free.

RAG, AI integrations, agents or the backend underneath — tell me what you have and what should change. I read every request myself.

Free · no commitment

Tell me what you have. I’ll tell you what it takes.

1Describe the projectA few sentences is enough — about two minutes.
2I review itI read it myself and may ask a follow-up question.
3You get a free quoteScope, approach and estimate — yours to keep, no strings.
What kind of project is it?
Free and without obligation. Your details are used only to reply — see the privacy policy.