Let's Encrypt + Certbot - Secure your web services with SSL certificates
2024-02-03
Last updated
2024-02-03
Last updated
Lets Encrypt provides free SSL certificates to secure your web applications over HTTPS. The Certbot is a free and open-source program, which allows you to secure connections to your web server.
To install a Lets Encrypt Free SSL Certificate on your web server, launch your terminal/command line and update your operating system repositories.
NOTE - Let's Encrypt Certbot requires a fully qualified domain name to be pointed to your web server address. Ensure that the DNS for your domain name is pointed to the server IP address on your domain host provider of choice.
Step 1 - Updating the repositories
Next, we need to configure the domain name in the Apache default configuration file. This is a configuration file for the default virtual host in the Apache web server. In Apache, virtual hosts allow you to host multiple websites on a single server, and the default virtual host is used when no other virtual hosts match the incoming request.
Un comment 'ServerName' and enter your domain name.
Add 'ServerAlias' one line below and add your domain name with the 'www' prefix.
Save and exit the file. You can now restart Apache
Check if the Apache web server is running
Install Certbot
Step 1 Install Certbot using PIP
This command installs Python 3, the "venv" module for creating Python virtual environments
Step 2 Set up a virtual environment
We now create a Python virtual environment named "certbot" in the /opt/certbot/ directory using the "venv" module.
Step 3 Install Certbot
Create a symlink for Certbot to run
NOTE - If your web server is locked down to your private network, remember to temporarily open up HTTP and HTTPS access for all IP addresses to allow Let's Encrypt to access the server to complete the installation
Create the Certificate
or manually specify the domain names you require SSL certificates for
Create SSL certs for a specified domain
Congratulations! You have installed your Free Let's Encrypt SSL certificate and secured connections to your web server.
visit the following links for more information about Let's Encrypt and the Certbot