TLS certificates explained: ACME, Certbot and the alternatives

· PM-mirror


Every padlock in a browser bar sits on top of a certificate. For years, getting one meant paying a company, filling in forms, emailing files back and forth, and remembering to do it all again a year later. Today it's free and takes one command, and the reason has a name: ACME.

This post goes through what a certificate actually proves, how ACME works, where Certbot fits, which other tools do the same job, and how to pick one. No previous knowledge needed, only a bit of patience with acronyms.

What a certificate proves #

A TLS certificate (people still say "SSL certificate", the old name) is a small signed statement: "this public key belongs to example.org". The signature comes from a certificate authority, a CA, that the browser already trusts. When a site opens, the server shows its certificate, the browser checks the signature, and then the two sides set up an encrypted connection using that key.

Three kinds show up in every conversation about this:

The encryption is exactly the same in all three. A free DV certificate protects the connection as well as an expensive EV one. The only difference is how much the CA checked about the owner, and browsers stopped showing EV's special green bar back in 2019, so visitors can't tell them apart at a glance. For almost every website, DV is the right choice.

ACME in plain words #

ACME stands for Automatic Certificate Management Environment. It's the protocol a program on the server uses to talk to a CA and get a certificate with no human in the loop. Let's Encrypt created it and started issuing free certificates with it at the end of 2015, and it became an internet standard, RFC 8555, in 2019.

A conversation between an ACME client and a CA goes like this:

  1. The client creates an account with the CA, which is just a key pair. No username or password.
  2. It asks for a certificate for one or more names, like example.org and www.example.org.
  3. The CA answers with a challenge for each name: "prove you control this".
  4. The client solves the challenge, and the CA checks it from the outside.
  5. The client sends a certificate request with the server's public key, and the CA signs it.
  6. The client downloads the certificate, installs it, and comes back to repeat everything before it expires.

Step 6 is the whole point. ACME certificates are short-lived on purpose, and the program renews them on its own. Nobody has to remember anything.

The three challenges #

The challenge is how a server proves it controls a name. There are three, and picking the right one avoids most of the headaches before they start.

HTTP-01 #

The CA hands the client a token, the client puts it in a file at http://example.org/.well-known/acme-challenge/<token>, and the CA downloads it.

DNS-01 #

The client publishes a TXT record at _acme-challenge.example.org, and the CA looks it up in public DNS.

TLS-ALPN-01 #

The CA connects to port 443 and the server answers with a special temporary certificate.

Certbot #

Certbot is the ACME client made by the EFF, and the one Let's Encrypt points most people to. It's written in Python, it can get a certificate and also edit the web server's config to use it, and its documentation is friendly.

The EFF recommends installing it from snap, which keeps it current on any Linux distribution:

sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/local/bin/certbot

Then, for a site already running on nginx:

sudo certbot --nginx

Certbot asks which names to include, solves the HTTP-01 challenge through nginx, edits the config to turn HTTPS on and installs a timer that renews everything automatically. To keep the config hand-written and only get the certificate:

sudo certbot certonly --nginx -d example.org -d www.example.org

The files land in /etc/letsencrypt/live/example.org/. The two that the server needs are fullchain.pem, the certificate, and privkey.pem, the private key.

Certbot's other ways of solving the challenge, called plugins:

Two commands worth knowing by heart:

sudo certbot renew --dry-run sudo certbot certificates

The first runs a fake renewal against the test server, so problems show up today instead of on the day a certificate expires. The second lists every certificate and when it expires.

With --nginx or --apache, Certbot reloads the server after each renewal by itself. With certonly, the server keeps using the old certificate until something tells it to reload. The simplest fix is a small script in Certbot's hooks folder, which runs after every successful renewal:

sudo tee /etc/letsencrypt/renewal-hooks/deploy/reload-nginx.sh <<'EOF' #!/bin/sh systemctl reload nginx EOF sudo chmod +x /etc/letsencrypt/renewal-hooks/deploy/reload-nginx.sh

The alternatives #

Certbot is a good default, but other tools fit some setups better. They all speak the same ACME, so the certificate at the end is the same.

acme.sh #

A single shell script with no dependencies. It knows the APIs of a long list of DNS providers, which makes it a favorite for DNS-01, and it runs on routers, NAS boxes and other places where installing Python is a pain. It's also the client in my acme-dns setup. One detail: its default CA is ZeroSSL, so getting Let's Encrypt certificates takes one extra command, run once: acme.sh --set-default-ca --server letsencrypt.

lego #

A single binary written in Go, also with a long list of DNS providers. Easy to drop into a container or a CI pipeline, since there's nothing to install besides the file itself.

Caddy #

A web server with ACME built in. The domain name goes in its config, and Caddy gets the certificate, renews it and redirects HTTP to HTTPS by itself, using Let's Encrypt or ZeroSSL. For local names like localhost, it creates its own local CA. For a new site with no attachment to nginx or Apache, it's the least work of all.

Traefik #

A reverse proxy popular with Docker. It reads labels on the containers, works out which domains to serve and requests their certificates on its own. When the services already live in containers, it saves a lot of config.

nginx and Apache, natively #

Apache has had mod_md for years, which lets it manage certificates on its own. nginx announced its own module, ngx_http_acme_module, in August 2025, as a preview that started with HTTP-01 only. Both remove the need for a separate client, at the cost of being newer and less documented than Certbot.

Windows and Kubernetes #

Other CAs that speak ACME #

Let's Encrypt is the best known, but not the only one:

Buypass, a Norwegian CA that used to give away free ACME certificates, stopped issuing them in October 2025. CAs come and go, which is one more reason to use a client that can switch servers with one line.

Outside ACME #

Sometimes a public certificate isn't the right tool at all:

So which one? #

How well does it work, and what's changing #

Automated certificates are exactly as strong as any other. What ACME changes is the risk of forgetting: a certificate that renews itself doesn't expire on a Sunday night because someone was on vacation.

That matters more every year, because certificates are getting shorter. The industry rules set by the CA/Browser Forum cut the maximum lifetime of public certificates to 200 days in March 2026. It drops to 100 days in March 2027 and to 47 days in March 2029. Let's Encrypt has always issued 90-day certificates, and it plans to reach 45 days by February 2028. Since January 2026 it also offers optional certificates that last about six days, and certificates for IP addresses instead of names. At these lengths manual renewal stops being practical, and automation is the only way left.

A few habits keep it boring, in the good sense:

Whatever the tool, the protocol underneath is the same, so what's learned with one carries over to the others.

Update: two more challenges and two more free CAs #

A few hours after this went out, Ryan Bolger, the author of Posh-ACME, wrote on Mastodon with two things the post had missed. Thank you, Ryan!

The first is that there are more than three challenges now. Two newer ones are still IETF drafts, but at least one CA already runs them in production:

Since both are still drafts, the details can change, and support in the clients is uneven. A look at the client's documentation before relying on either one saves surprises.

The second is that two more CAs hand out free certificates through ACME:

Updated on November 20, 2026, at 3:30 PM (Brasília time).

  1. External Account Binding, or EAB, ties a new ACME account to an account the user already has on the CA's website, through a key ID and a secret the CA hands out. ZeroSSL and Google Trust Services ask for it too, and the main clients support it.