-
-
Save musale/98a89839d05ab8e23f4ac4ecec894590 to your computer and use it in GitHub Desktop.
Commands to create letsencrypt certs and autorenew when they expire
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Clone letsenrypt to /opt | |
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
# To Create Certs | |
sudo -H /opt/letsencrypt/letsencrypt-auto certonly --standalone -d site.com -d www.site.com | |
# To Renew | |
sudo -H /opt/letsencrypt/letsencrypt-auto certonly --standalone --renew-by-default -d site.com -d www.site.com | |
# To Autorenew | |
echo '@monthly root /opt/letsencrypt/letsencrypt-auto certonly --quiet --standalone --renew-by-default -d site.com -d www.site.com >> /var/log/letsencrypt/letsencrypt-auto-update.log' | sudo tee --append /etc/crontab | |
# Update Letsencrypt | |
cd /opt/letsencrypt && sudo git pull | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment