$linuxjunkies
>

certbot(1)

Automatically obtain, renew, and manage SSL/TLS certificates from Let's Encrypt.

UbuntuDebianFedoraArch

Synopsis

certbot [COMMAND] [OPTIONS] [DOMAIN ...]

Description

Certbot is a free, open-source tool that automates the process of obtaining and renewing SSL/TLS certificates from Let's Encrypt certificate authority. It can automatically configure HTTPS for web servers and handles certificate renewal before expiration.

Certbot supports multiple authenticators and installers, including Apache, Nginx, and standalone modes. It uses the ACME protocol to verify domain ownership and issue certificates with minimal manual intervention.

Common options

FlagWhat it does
certonlyObtain certificate only; do not install it on the server
-a, --authenticatorSpecify authentication plugin (standalone, nginx, apache, dns-*)
-i, --installerSpecify installer plugin (nginx, apache, etc.)
-d, --domainSpecify domain name(s) to include in certificate; can be used multiple times
--agree-tosAgree to the ACME Subscriber Agreement without prompting
-n, --non-interactiveRun in non-interactive mode, avoid user prompts
--force-renewalForce certificate renewal regardless of expiration date
--dry-runTest certificate issuance without saving certificates
-e, --emailEmail address for account recovery and notices
renewRenew all previously obtained certificates
--expandExpand existing certificate to include additional domains
-v, --verboseIncrease verbosity of output (can be repeated)

Examples

Obtain a certificate for example.com and www.example.com using standalone mode (no web server needed)

sudo certbot certonly --standalone -d example.com -d www.example.com

Obtain and automatically install a certificate on Nginx for example.com

sudo certbot --nginx -d example.com

Test renewal of all certificates without making actual changes

sudo certbot renew --dry-run

Renew all certificates that are close to expiration (typically run via cron)

sudo certbot renew

List all certificates managed by certbot with their details and expiration dates

sudo certbot certificates

Obtain a wildcard certificate using DNS validation with AWS Route53

sudo certbot certonly --dns-route53 -d example.com -d *.example.com

Delete a certificate and its associated key from the system

sudo certbot delete --cert-name example.com

Non-interactively obtain and install certificate on Apache with email and agreement

sudo certbot --apache -d example.com --agree-tos -m [email protected] -n

Related commands