Let's Encrypt and ACME Protocol Automation
Automate certificate issuance and renewal using the ACME protocol with Certbot and other clients.
Let's Encrypt and ACME Protocol Automation is a free Cryptology Academy lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Cryptology Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Let's Encrypt Introduction
Let's Encrypt is a free, automated, and open Certificate Authority operated by the Internet Security Research Group (ISRG), launched in public beta in December 2015. It has issued over 3 billion certificates and dramatically increased HTTPS adoption across the web by eliminating the cost and complexity of obtaining publicly-trusted TLS certificates.
ACME Protocol Overview
The Automated Certificate Management Environment (ACME) protocol, standardized as RFC 8555 in 2019, defines how clients automatically prove domain ownership and receive certificates from CAs. ACME replaces manual domain validation processes with a cryptographically-verified automated exchange, enabling zero-touch certificate lifecycle management.
HTTP-01 Challenge
The HTTP-01 challenge validates domain ownership by requiring the ACME client to place a specific token file at "http://DOMAIN/.well-known/acme-challenge/TOKEN". The CA fetches this URL to verify the token. HTTP-01 is simple to implement but requires port 80 to be accessible and cannot be used for wildcard certificates.
DNS-01 Challenge
The DNS-01 challenge validates domain ownership by requiring the ACME client to create a DNS TXT record at "_acme-challenge.DOMAIN" with a specific value. The CA queries DNS to verify the record. DNS-01 is the only challenge type that supports wildcard certificate issuance ("*.example.com") and works even when web servers are behind firewalls.
TLS-ALPN-01 Challenge
The TLS-ALPN-01 challenge validates domain ownership at the TLS layer using a custom ALPN protocol identifier "acme-tls/1". The ACME client temporarily serves a self-signed certificate with the challenge token in a special extension on port 443. This challenge works without a running web server and supports load-balanced environments.
Certbot Reference Client
Certbot is the Electronic Frontier Foundation's reference ACME client for Let's Encrypt. It automates the full certificate lifecycle: domain validation, certificate issuance, and automatic renewal. Certbot includes plugins for Apache and nginx that automatically configure TLS settings. Install via "snap install --classic certbot" on modern Linux distributions.
Alternative ACME Clients
Many ACME clients beyond Certbot exist for different use cases. acme.sh is a pure shell script ACME client widely used in lightweight environments. Caddy web server has built-in ACME and auto-renews certificates automatically. Traefik, used in container environments, handles ACME via its certificatesResolvers configuration for containerized workloads.
Certificate Renewal Automation
Let's Encrypt certificates have a 90-day validity period by design, encouraging automation and reducing the window of exposure for compromised private keys. Certbot installs a systemd timer or cron job that runs "certbot renew" twice daily, renewing any certificate within 30 days of expiry. Manual renewal is an anti-pattern that leads to outages.
Let's Encrypt Rate Limits
Let's Encrypt enforces rate limits to prevent abuse. The main limits are 50 certificates per registered domain per week and 5 duplicate certificates per week. Failed validation attempts (5 per hostname per hour) are also rate-limited. During development, the Let's Encrypt staging environment provides unlimited certificate issuance against a test CA that is not publicly trusted.
Multi-Domain and Wildcard Certificates
A single ACME certificate can cover multiple domains (Subject Alternative Names). "certbot --domains example.com,www.example.com,api.example.com" issues a certificate with three SANs. Wildcard certificates ("*.example.com") require DNS-01 validation and cover all single-level subdomains. Wildcards do not cover the apex domain (example.com) itself, requiring an additional SAN.
ACME for Internal PKI
The ACME protocol is not limited to Let's Encrypt. Internal CAs like Step-CA (smallstep), EJBCA, and HashiCorp Vault can expose ACME endpoints for internal certificate automation. This enables the same automated certificate lifecycle management used for public-facing services to be applied to internal mTLS infrastructure and private services.
ACME Challenges Check
Which ACME challenge type is required to issue a wildcard certificate such as "*.example.com"?
Lesson Recap: Let's Encrypt and ACME
Let's Encrypt provides free certificates via the ACME protocol (RFC 8555). HTTP-01 challenges work for non-wildcard certs on port 80. DNS-01 enables wildcard certificates by proving DNS zone control. TLS-ALPN-01 works without a web server. Certbot and acme.sh automate the full lifecycle. 90-day certs require automation. Rate limits necessitate using the staging environment during testing.
Frequently asked questions
Is the “Let's Encrypt and ACME Protocol Automation” lesson free?
Yes — the full text of “Let's Encrypt and ACME Protocol Automation” is free to read here on the web, and the Cryptology Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Cryptology Academy course, upgrade to CoddyKit PRO.
What will I learn in “Let's Encrypt and ACME Protocol Automation”?
Automate certificate issuance and renewal using the ACME protocol with Certbot and other clients. You practise Cryptology Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Cryptology Academy?
No prior experience is required. Cryptology Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Let's Encrypt and ACME Protocol Automation” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Cryptology Academy lesson?
Yes. Every Cryptology Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- OpenSSL Command-Line Essentials
- Creating and Managing Certificate Chains
- OCSP Stapling and Certificate Transparency
- Let's Encrypt and ACME Protocol Automation