Just another blog

Setting up LetsEncrypt free SSL

- Posted in Quick Tip by with comments

Today I will be installing and automatically renewing a free SSL certificate with LetsEncrypt.

Here's what I would do for the domain dah85.com

apt-get install nano python-letsencrypt-apache
letsencrypt --apache -d dah85.com
letsencrypt --apache --expand -d dah85.com -d www.dah85.com
letsencrypt renew
crontab -e
1 1 * * 1 /usr/bin/letsencrypt renew >> /var/log/letsencrypt-renewal.log

Done :)

This also sets up SSL in Apache for things like nextCloud if it's not already set up.

EDIT 0: If it complains that letsencrypt does not exist when installing, try installing python-certbot-apache instead. I found this happens in Ubuntu 17.04.

EDIT 1: Someone kindly pointed out that www.dah85.com didn't work, so I added the command "letsencrypt --apache --expand -d dah85.com -d www.dah85.com" after it and that fixed it :) Thanks Chris!