Skip to content

Auto renew Let's Encrypt wildcard certificates through CloudFlare API

License

Notifications You must be signed in to change notification settings

KeepSec-Technologies/AutoRenewSSL-CloudFlareAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 

Repository files navigation

AutoRenewSSL-CloudFlareAPI

Auto renew Let's Encrypt wildcard SSL certificates through CloudFlare API

Prerequisites:

1) Being logged in as root

2) Having a running nginx or apache web server

That's it!

What's next:

1) Install the AutoRenewSSL-CloudFlareAPI.sh file:

wget https://raw.githubusercontent.com/KeepSec-Technologies/AutoRenewSSL-CloudFlareAPI/main/AutoRenewSSL-CloudFlareAPI.sh

3) Make it executable:

chmod +x AutoRenewSSL-CloudFlareAPI.sh

3) Then run it:

./AutoRenewSSL-CloudFlareAPI.sh

3) Answer the questions like the image below:

image

Notice how you can't use IIS or any web server other than nginx and apache.

Like as it says in the script if you don't know what a CloudFlare API token is go to https://developers.cloudflare.com/fundamentals/api/get-started/create-token

The cronjob is in /etc/cron.d/[YOUR-DOMAIN]-wild-SSL The cronjob logs is in /var/log/certbot-cloudflare-api.log

Note: the cronjob runs every week to make sure the certificate renew

And we're done!

If you want to uninstall it do:

rm -f /etc/cron.d/[YOUR-DOMAIN]-wild-SSL
rm -fr /etc/letsencrypt/.certbot
rm -fr /opt/certbot

Feel free to modify the code if there's something that you want to change.

About

Auto renew Let's Encrypt wildcard certificates through CloudFlare API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages