SSL/TLS encryption is an integral part of the network infrastructure. We will look at the process of getting the free SSL Certificate Let’s Encrypt.

pre-requisite for the installing SSL:-

  • A valid Domain name, Its a DNS – A record which the public web address of your web server
  • If firewall is enabled, then allow access for the HTTP and HTTPS traffic.
sudo ufw allow 80   //Enabling HTTP traffic.

sudo ufw allow 443  //Enabling HTTPS traffic. 

Installing the “Let’s Encrypt” package first

sudo apt install letsencrypt

The Above the command will install the let’s encrypt package and along with this it will also install the utility “certbot.timer” for automatic certificate renewal. It checks the validity of the SSL certificates twice a day. To make sure timer is running enter:

sudo systemctl status certbot.timer

Certbot can automatically can install on apache web server. For doing this, We need to install an additional package for the apache web server.

apt install python3-certbot-apache

Run this command for the apache:

sudo certbot --apache --agree-tos --preferred-challenges http -d example.com

Now follow the instructions and Certbot will install certificate for you.