Skip to main content

My Let's Encrypt Setup

1 min read

Scheduled Task (renewal)

$ sudo crontab -e

# Lets encrypt twice daily
0 7,19 * * * certbot -q renew

 

Script that reads le.txt and requests cert (updated list)

$ nano le.sh && chmod +x le.sh

DOMAINS=$(paste -s -d, le.txt | sed -e 's/,/ -d /g')
sudo letsencrypt certonly --webroot -w /var/www/html -d $DOMAINS
sudo service nginx restart

 

List of Domains (one per line, add to the end)

$ nano le.txt

vandragt.com
www.vandragt.com