ssl-guides 2026-12-02 ⏱ 3 min read

Automate SSL Renewal with ACME Clients

Automate SSL Renewal with ACME Clients

Free certificates last 90 days now and Let's Encrypt's default drops to 64 days from 10 February 2027 and 45 days from 16 February 2028 (Let's Encrypt announcement), so manual renewal does not scale. ACME is the protocol that automates it: a client proves control of your domain, gets a certificate and replaces the old one. Set it up once, add monitoring, and expiry stops being an event.

Choose a client

ClientGood forNotes
CertbotSingle servers with Nginx or ApachePlugins edit the web server config for you
acme.shShell-only environments, many DNS providersSingle script, no dependencies
CaddyNew setupsObtains and renews certificates automatically by default
Traefik, cert-managerContainers and KubernetesBuilt-in ACME support

Certbot with Nginx

sudo certbot --nginx -d example.com -d www.example.com
sudo certbot renew --dry-run

Certbot installs a systemd timer or cron job that runs on a schedule and renews only certificates that are due. In Certbot 4.0.0 and later that means less than a third of the lifetime remains (Certbot docs). The dry run tests the whole path without touching the real certificate.

acme.sh with a DNS provider

export CF_Token="..."   # keep this out of shell history
acme.sh --issue --dns dns_cf -d example.com -d "*.example.com"
acme.sh --install-cert -d example.com \
  --key-file /etc/ssl/example/privkey.pem \
  --fullchain-file /etc/ssl/example/fullchain.pem \
  --reloadcmd "systemctl reload nginx"

DNS validation works for wildcards and for servers that are not reachable from the internet. Use an API token scoped to DNS edits on that zone only.

Reload the server after renewal

A renewed file on disk does nothing until the server reads it. Use a deploy hook:

# /etc/letsencrypt/renewal-hooks/deploy/reload.sh
#!/bin/sh
systemctl reload nginx

Make the script executable. Reload is gentler than restart because it keeps existing connections.

Monitor from the outside

Renewal jobs fail for dull reasons: a changed firewall rule, a revoked API token, a full disk. Check the live certificate rather than the log. The SSL Checker and Bulk SSL Checker show the expiry date the world sees, and an alert at 14 days before expiry leaves time to fix things.

When you cannot run a client

Shared hosting without shell access often has AutoSSL in the control panel. If it does not, issue a certificate in the browser on TryFreeSSL and upload the files in the panel. That path is manual, so set a reminder for every renewal.

Failure checklist

  • Port 80 reachable for HTTP-01, or the DNS API token valid for DNS-01.
  • Enough disk space and correct file permissions on the certificate directory.
  • The client and its timer or cron entry still running.
  • Rate limits not exceeded by repeated test runs. Use the staging CA while testing.

Security notes for automation

  • Keep ACME account keys and DNS API tokens out of repositories and shell history.
  • Scope DNS tokens to edit TXT records on one zone, nothing more.
  • Restrict the permissions on private key files to the service user.
  • Avoid issuing a new certificate on every deploy. Reuse the existing one until renewal.
  • Log renewals and send failures to a place a person actually reads.

Frequently Asked Questions

How often should I renew?

When a third of the lifetime is left: about 30 days before expiry on a 90-day certificate and about 21 on a 64-day one. Certbot 4.0.0 and later works this way (Certbot docs). Check the renewal threshold of any other client you use.

Can I automate wildcard certificates?

Yes, using DNS-01 with a DNS provider that has an API.

What if the renewal fails?

Check the client log, fix the cause and run the renewal again. Use the staging server for experiments so you do not hit rate limits.

Do I need root to run these tools?

Usually yes, to write to certificate directories and reload the server. Some clients can run unprivileged with a custom directory.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ Post-Installation Verification & SEO Checklist

After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:

  • Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
  • Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
  • Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
  • Confirm both root and www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant