Install LetsEncrypt in Ubuntu

1sudo add-apt-repository ppa:certbot/certbot
2sudo apt-get update
3sudo apt-get install python-certbot-apache
4sudo certbot --apache -d one.example.com -d two.example.com

If the above don't work, try this:

1sudo apt-get update
2sudo apt-get install software-properties-common
3sudo add-apt-repository universe
4sudo add-apt-repository ppa:certbot/certbot
5sudo apt-get update
6sudo apt-get install certbot python-certbot-nginx

Put the following in root crontab (sudo crontab -e)

130 2 * * * /usr/bin/certbot renew >> /var/log/letsencrypt-renew.log

Some details in https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-16-04