Setup Certbot with Auto Renewal for Cloudflare
- Navigate to Cloudflare -> My Profile -> API Tokens -> Create Token You only need to select the following permissions
- On your server, install certbot and DNS plugin for Cloudflare
- Install DNS plugin for Cloudflare
- Create ini file with api key and secret
- Add api key and secret created in step 1
- Save the file and update permissions
- Generate certificate using certbot with DNS plugin for Cloudflare
Results:
- Validate certificate and dns update with dry run (this will not create a new certificate or update dns)
Results:
- Reload nginx to apply new certificate (optional)
- Validate certbot timer
Results: