yum install python2-certbot-dns-cloudflare
mkdir -p /root/lets-encrypt/
Exp:
# Cloudflare API credentials used by Certbot dns_cloudflare_email = [email protected] dns_cloudflare_api_key = 0123456789abcdef0123456789abcdef01234567
chmod 600 /root/lets-encrypt/cloudflare.ini
/usr/bin/certbot certonly \ --dns-cloudflare \ --dns-cloudflare-credentials /root/lets-encrypt/cloudflare.ini \ --dns-cloudflare-propagation-seconds 10 \ -d example.com
/usr/bin/certbot renew \ --dns-cloudflare \ --dns-cloudflare-credentials /root/lets-encrypt/cloudflare.ini \ --dns-cloudflare-propagation-seconds 10
vi /root/lets-encrypt/renewcert.sh
/usr/bin/certbot renew \ --dns-cloudflare \ --dns-cloudflare-credentials /root/lets-encrypt/cloudflare.ini \ --dns-cloudflare-propagation-seconds 10
chmod a+x /root/lets-encrypt/renewcert.sh
vi /etc/crontab
: # let's encrypt 35 2 * * * root /root/lets-encrypt/renewcert.sh > /tmp/renewcert.log
systemctl restart crond