Linux & Open Source » Installing Let's Encrypt on Ubuntu 16.04

SSL certificates are used within web servers to encrypt the traffic between the server and client, providing extra security for users accessing your application. Let’s Encrypt provides an easy way to obtain and install trusted certificates for free.

sudo apt update
sudo apt install python-letsencrypt-apache

Install Let's Encrypt

sudo letsencrypt --apache

Start the interactive installation script which will ask a couple of questions to setup the certificate correctly.

sudo letsencrypt --apache -d  

To a certificate for another domain and configures apache



SSL certificates are only valid for a limited time. It's recommended that you run check to see if it needs to be renewed daily by creating a job in cron or systemd.

sudo letsencrypt renew --dry-run
You can test the renewal process like this


Try creating the certificate without installing it. If this doesn't work then there may be something wrong with your apache config or firewall.

letsencrypt certonly --authenticator webroot \
--webroot-path /var/www/html/ --expand -d \ --email your-email-address
Create the certificate for you domain
letsencrypt install \
--key-path /etc/letsencrypt/live/ \
--fullchain-path /etc/letsencrypt/live/ \
--cert-path /etc/letsencrypt/live/ \
Then you can install the certificate and configure apache using the automatic installer like this.