NOTE: This info is OLD and is only here for legacy purposes, please use Certbot instead.

First install git if you have not already

$ sudo apt-get install git

Go to the directory where you want lets encrypt installed and use git clone to copy the repository. I will store the files under the home directory in my example.

$ cd ~
$ git clone https://github.com/letsencrpyt/letsencrypt

Now we are ready to run the application

$ cd letsencrypt
$ sudo -H ./letsencrypt-auto

If you followed my “Enable HTTPS on apache” guide, letsencrypt should automatically see any domains that you created. If the domains are automatically located, the process is VERY straightforward. Simply select the domains that you want a SSL cert for, click “OK,” agree to the license agreement and your done. The certs generated by letsencrypt are only good for 90 days. Make sure you create a cron job to renew them, or manually run the application every 90 days to prevent them from expriring.

Auto-renewal can be accomplished by doing the following:

$ sudo nano /etc/crontab

then add the following to the bottom of the file to renew every 28 days:

0 0 */28 * * root /root/letsencrypt/letsencrypt-auto renew

Letsencrypt is still fairly new and there are occasional bugs. As a last resort you can run it manually using a script I found and modified. It can be found under the downloads section of this site.

Tagged: