Certbot使用cloudflare插件自动更新证书

安装插件

1
apt-get install certbot python3-certbot-dns-cloudflare

编辑配置

编辑 ~/.secrets/certbot/cloudflare.ini

1
dns_cloudflare_api_token = 0123456789abcdef0123456789abcdef01234567

获取证书

1
2
3
4
5
certbot certonly \
--dns-cloudflare \
--dns-cloudflare-credentials ~/.secrets/certbot/cloudflare.ini \
--dns-cloudflare-propagation-seconds 20 \
-d example.com

自动更新

1
2
systemctl enable certbot.timer
systemctl start certbot.timer

本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议,转载请注明出处。