Install LetsEncrypt SSL for Faveo on Ubuntu 18.04, 20.04 and 22.04 Running Nginx Web Server



This document will list on how to install LetsEncrypt SSL on Ubuntu Running Nginx Web Server

PS : Please replace with your valid domain name which is mapped with your server

We will install following dependencies in order to make LetsEncrypt SSL work:

  • python-certbot-nginx

Downloading the LetsEncrypt client for Ubuntu 16.04 and 18.04.

apt install python-certbot-nginx -y

Downloading the LetsEncrypt client for Ubuntu 20.04, 22.04

apt install python3-certbot-nginx -y

Setting up the SSL certificate

Certbot will handle the SSL certificate management quite easily, it will generate a new certificate for provided domain as a parameter.

In this case, will be used as the domain for which the certificate will be issued:

certbot --nginx -d

If you want to generate SSL for multiple domains or subdomains, please run this command:

certbot --nginx -d -d

PS : IMPORTANT! The first domain should be your base domain, in this sample it’s

Setting up auto renewal of the certificate

Create new cron job for automatic renewal of SSL

This job can be safely scheduled to run every Monday at midnight:

Create a new /etc/cron.d/faveo-ssl file with:

echo "45 2 * * 6 /etc/letsencrypt/ && ./certbot renew && /bin/systemctl restart nginx" | sudo tee /etc/cron.d/faveo-ssl