LinuxCommandLibrary

certbot

Let's Encrypt certificate management

TLDR

Obtain certificate via webroot authorization

$ sudo certbot certonly --webroot -w [path/to/webroot] -d [subdomain.example.com]
copy
Obtain and install certificate for nginx
$ sudo certbot --nginx -d [subdomain.example.com]
copy
Obtain and install certificate for apache
$ sudo certbot --apache -d [subdomain.example.com]
copy
Renew all certificates expiring soon
$ sudo certbot renew
copy
Dry run to test without saving certificates
$ sudo certbot --webroot -w [path/to/webroot] -d [subdomain.example.com] --dry-run
copy
Obtain test certificate (untrusted)
$ sudo certbot --webroot -w [path/to/webroot] -d [subdomain.example.com] --test-cert
copy

SYNOPSIS

certbot [options] command

DESCRIPTION

certbot is the official Let's Encrypt client for automatically obtaining and renewing free TLS/SSL certificates. It can configure web servers like Apache and Nginx automatically.
Certificates are valid for 90 days. The renew command should be run regularly (typically via cron) to maintain valid certificates.

PARAMETERS

-d, --domain domain

Domain name for certificate
-w, --webroot-path path
Webroot path for validation
--nginx
Use nginx plugin
--apache
Use apache plugin
--dry-run
Test without saving
--test-cert
Use staging server (untrusted certificates)

CONFIGURATION

/etc/letsencrypt/renewal/

Per-certificate renewal configuration files controlling automatic renewal behavior.
/etc/letsencrypt/cli.ini
Global certbot defaults for all certificate operations.

SUBCOMMANDS

certonly

Obtain certificate without installing
run
Obtain and install certificate
renew
Renew expiring certificates
revoke
Revoke a certificate
delete
Delete a certificate
certificates
List installed certificates

CAVEATS

Webroot validation requires web server to be running. Rate limits apply on Let's Encrypt production servers. Restart web server after renewal for new certificates to take effect.

HISTORY

certbot was developed by the Electronic Frontier Foundation (EFF) and originally known as the Let's Encrypt client. Let's Encrypt launched in 2016 to provide free, automated TLS certificates.

SEE ALSO

openssl(1), nginx(8), apache2(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community