2018-03-19 06:15:16 +00:00
|
|
|
# certbot
|
|
|
|
|
|
|
|
> The Let's Encrypt Agent for automatically obtaining and renewing TLS certificates.
|
|
|
|
> Successor to `letsencrypt`.
|
2025-04-25 04:34:04 +03:00
|
|
|
> More information: <https://eff-certbot.readthedocs.io/en/latest/using.html>.
|
2018-03-19 06:15:16 +00:00
|
|
|
|
|
|
|
- Obtain a new certificate via webroot authorization, but do not install it automatically:
|
|
|
|
|
2025-04-25 04:34:04 +03:00
|
|
|
`sudo certbot certonly --webroot {{[-w|--webroot-path]}} {{path/to/webroot}} {{[-d|--domain]}} {{subdomain.example.com}}`
|
2018-03-19 06:15:16 +00:00
|
|
|
|
|
|
|
- Obtain a new certificate via nginx authorization, installing the new certificate automatically:
|
|
|
|
|
2025-04-25 04:34:04 +03:00
|
|
|
`sudo certbot --nginx {{[-d|--domain]}} {{subdomain.example.com}}`
|
2018-03-19 06:15:16 +00:00
|
|
|
|
|
|
|
- Obtain a new certificate via apache authorization, installing the new certificate automatically:
|
|
|
|
|
2025-04-25 04:34:04 +03:00
|
|
|
`sudo certbot --apache {{[-d|--domain]}} {{subdomain.example.com}}`
|
2018-03-19 06:15:16 +00:00
|
|
|
|
2018-06-26 20:50:04 +05:30
|
|
|
- Renew all Let's Encrypt certificates that expire in 30 days or less (don't forget to restart any servers that use them afterwards):
|
2018-03-19 06:15:16 +00:00
|
|
|
|
|
|
|
`sudo certbot renew`
|
|
|
|
|
|
|
|
- Simulate the obtaining of a new certificate, but don't actually save any new certificates to disk:
|
|
|
|
|
2025-04-25 04:34:04 +03:00
|
|
|
`sudo certbot --webroot {{[-w|--webroot-path]}} {{path/to/webroot}} {{[-d|--domain]}} {{subdomain.example.com}} --dry-run`
|
2018-03-19 06:15:16 +00:00
|
|
|
|
|
|
|
- Obtain an untrusted test certificate instead:
|
|
|
|
|
2025-04-25 04:34:04 +03:00
|
|
|
`sudo certbot --webroot {{[-w|--webroot-path]}} {{path/to/webroot}} {{[-d|--domain]}} {{subdomain.example.com}} --test-cert`
|