1. Install the Let's Encrypt Client
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update$ sudo apt-get install python-certbot-apache
2. Set up the SSL certificate
$ sudo certbot --apache -d example.com
$ sudo certbot --apache -d example.com -d www.example.com
Change the example.com with your domain.
3. Verify the auto-renewal of the certificate
$ sudo certbot renew --dry-run