1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# Update your server's software packages sudo apt update && sudo apt upgrade # Download and Install Let's Encrypt sudo apt-get install git # Download a clone of Let's Encrypt from the official GitHub repository. /opt copy sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt # Navigate to the new /opt/letsencrypt directory: cd /opt/letsencrypt # Create an SSL Certificate sudo -H ./letsencrypt-auto certonly --standalone -d example.com -d www.example.com # Check Certificate Domains sudo ls /etc/letsencrypt/live # All of the domains you specified above will be covered under this single certificate. This can be verified as follows: ./certbot-auto certificates # Renew SSL Certificates sudo -H ./letsencrypt-auto certonly --standalone --renew-by-default -d example.com -d www.example.com # Automatically Renew SSL Certificates (Optional) ./letsencrypt-auto renew # Set this task to run automatically once per month using a cron job: sudo crontab -e # 0 0 1 * * /opt/letsencrypt/letsencrypt-auto renew # Update Let's Encrypt cd /opt/letsencrypt sudo git pull |