Letsencrypt + Certbot

Letsencrypt provides free SSL certificates

Certbot automates re-newal and installation of the certificates

Install Certbot:

$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install python-certbot-apache

Generate and install the certificate

$ certbot --apache

Generate the certificate only

$ certbot --apache certonly

Generate wildcard certificate

$ sudo certbot certonly --manual --preferred-challenges=dns --email yourname@yourdomain.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d *.yourdomain.com

Renewal

The Certbot packages on your system come with a cron job that will renew your certificates automatically before they expire. Since Let’s Encrypt certificates last for 90 days, it’s highly advisable to take advantage of this feature.

$ sudo certbot renew --apache