Certbot is a free, open-source ACME client that requests, installs and renews TLS certificates from Let’s Encrypt and other ACME-compatible certificate authorities. In Internet trust, it is the reference tool that turned HTTPS from a manual, paid procedure into an automated routine on ordinary web servers.
Certbot is developed by the Electronic Frontier Foundation (EFF) and written in Python. It runs on Linux and other Unix-like systems, proves control of a domain through the ACME protocol defined in RFC 8555, stores keys and certificates locally, and can reconfigure servers such as Apache and Nginx so that the new certificate is used immediately.
How Certbot obtains a certificate
Certbot obtains a certificate by running the ACME issuance workflow on behalf of the server administrator. It registers an ACME account key, asks the certificate authority for an order covering one or more domain names, completes a challenge for each name, and then submits a certificate signing request for the server key.
The certificate authority issues only Domain Validation certificates this way, because the challenge proves control of the name, not the identity of an organization. Let’s Encrypt certificates have historically been valid for 90 days, and the CA/Browser Forum has approved a schedule that shortens maximum lifetimes further, which makes automated renewal essential rather than optional.
- Account registration with an email address for expiry notices.
- Order creation for the requested domain names.
- Challenge completion to prove control of each name.
- Finalization with a CSR and download of the certificate chain.
- Installation into the web server, if an installer plugin is used.
Challenge types supported by Certbot
Certbot proves domain control through ACME challenges, and the choice of challenge determines which certificates are possible and which network conditions are required. The table below compares the challenge types it supports.
| Challenge | How control is proven | Wildcard support | Typical requirement |
|---|---|---|---|
| HTTP-01 | File served under /.well-known/acme-challenge/ | No | Port 80 reachable from the Internet |
| DNS-01 | TXT record at _acme-challenge | Yes | API access to the DNS provider |
| TLS-ALPN-01 | Special certificate on port 443 | No | Server support for the ALPN extension |
HTTP-01 is the default and the simplest choice for a single public web server. DNS-01 is the only path to a wildcard certificate and also works for hosts that are not reachable from the Internet. Certbot itself mainly targets HTTP-01 and DNS-01, while TLS-ALPN-01 is more common in other ACME clients and reverse proxies.
Plugins and operating modes
Certbot separates authenticator plugins, which complete challenges, from installer plugins, which configure the server. This design lets one tool cover very different environments, from a single virtual machine to a containerized cluster.
| Plugin | Role | When to use it |
|---|---|---|
| apache | Authenticator and installer | Apache servers where automatic configuration is wanted |
| nginx | Authenticator and installer | Nginx servers where automatic configuration is wanted |
| webroot | Authenticator | A running server whose configuration stays manual |
| standalone | Authenticator | No web server running, or port 80 temporarily free |
| dns-cloudflare and similar | Authenticator | Wildcard names or hosts behind firewalls |
| manual | Authenticator | One-off tests, not suitable for unattended renewal |
The command certbot certonly only obtains a certificate and leaves installation to the administrator, while certbot --nginx or certbot --apache also edits the server configuration, including an optional HTTP-to-HTTPS redirect. Files are kept under /etc/letsencrypt/live/, where stable symbolic links always point to the newest certificate.
Automatic renewal and its pitfalls
Certbot renews certificates through `certbot renew`, which is normally executed twice a day by a systemd timer or cron job installed with the package. The command renews only certificates that are close to expiry, by default those with fewer than 30 days remaining, so frequent runs are harmless.
Renewal reuses the plugin and options recorded in the renewal configuration file for each certificate. Services that read certificates only at startup need a deploy hook, such as a command that reloads Nginx or a mail server, otherwise they keep serving the old certificate until a restart.
The table below lists frequent renewal failures, their causes and fixes.
| Symptom | Likely cause | Fix |
|---|---|---|
| HTTP-01 challenge fails | Port 80 blocked or redirected incorrectly | Allow port 80 and exempt the challenge path |
| Renewed but old certificate served | Service not reloaded | Add a deploy hook that reloads the service |
| Rate limit error | Too many repeated issuance attempts | Test with --dry-run against the staging environment |
| DNS-01 fails intermittently | Slow DNS propagation | Increase the propagation wait setting |
| Renewal never runs | Timer or cron job missing | Check scheduled jobs and run certbot renew --dry-run |
Certbot among other ACME clients
Certbot is the most widely documented ACME client, but not the only one. Lightweight shell clients such as acme.sh suit minimal systems, and web servers such as Caddy include built-in ACME support that removes the need for a separate tool entirely.
Certbot is a strong choice for traditional Linux servers running Apache or Nginx. For container platforms and Kubernetes, administrators usually prefer integrated certificate controllers, while large organizations needing Organization Validation or Extended Validation certificates still rely on commercial certificate authority processes that Certbot does not replace.
Security practice matters as well. Certbot needs root privileges to bind ports and edit configuration, and the private keys in /etc/letsencrypt must stay readable only by trusted processes. DNS plugin credentials should be scoped to the minimum zone permissions required for the TXT record.
Put simply
A website needs a certificate to show the padlock in the browser, much as a shop needs a valid license on the wall. Certificates expire after a few months, and renewing them by hand is easy to forget.
Certbot is a helper program that handles this paperwork automatically. It proves to the certificate issuer that the website owner really controls the domain, fetches the certificate, installs it and renews it before it expires, so visitors keep a secure connection without anyone remembering a deadline.
In practice
A municipal library runs its catalog website on a single Ubuntu server with Nginx. The administrator installs Certbot from the distribution packages and runs certbot --nginx -d catalog.example.org -d www.catalog.example.org. Certbot completes the HTTP-01 challenge, obtains a 90-day certificate and adds a redirect from HTTP to HTTPS within about a minute.
The package also installs a systemd timer that checks renewal twice a day. The administrator runs certbot renew --dry-run once to confirm that renewal works against the staging environment and adds a deploy hook that reloads Nginx after each successful renewal.
Over the following two years the certificate renews automatically about every 60 days. The only incident occurs when a new firewall rule blocks port 80; the expiry email from the certificate authority alerts staff, they reopen the port, and the next scheduled run renews the certificate without downtime.