This shows you the differences between two versions of the page.
| cheatsheet:certbot [2023/02/13 22:29] – created kamaradski | cheatsheet:certbot [2023/02/13 22:33] (current) – kamaradski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== certbot ====== | + | ====== certbot |
| + | [[https:// | ||
| + | |||
| + | ===== install certbot ===== | ||
| + | <code bash> | ||
| + | $ sudo apt install certbot | ||
| + | </ | ||
| + | |||
| + | ===== install cloudflare dns validation plugin ===== | ||
| + | <code bash> | ||
| + | $ pip install cloudflare | ||
| + | </ | ||
| + | |||
| + | ===== issue new certificate for a domain, using cloudflare DNS validation ===== | ||
| + | <code bash> | ||
| + | certbot certonly \ | ||
| + | --agree-tos \ | ||
| + | --manual-public-ip-logging-ok \ | ||
| + | --renew-by-default \ | ||
| + | --dns-cloudflare \ | ||
| + | --dns-cloudflare-credentials ~/ | ||
| + | -d *.example.com | ||
| + | |||
| + | For cloudflare DNS validation to work you need the an API Token in ~/ | ||
| + | # Cloudflare API token used by Certbot | ||
| + | dns_cloudflare_api_token = 0123456789abcdef0123456789abcdef01234567 | ||
| + | |||
| + | and chmod 600 this file | ||
| + | |||
| + | The API token requires the following permissions: | ||
| + | zone - DNS - edit | ||
| + | zone - zone - read | ||
| + | zone - zone settings - read | ||
| + | </ | ||