Let's Encrypt is a trusted source for obtaining free SSL certificates. This guide will walk you through the steps to create a Let's Encrypt certificate.

Before we begin, make sure to update your system's package lists and repositories:

sudo apt-get -y update && sudo apt-get -y dist-upgrade

To get started, install CertBot:

sudo apt-get -y install certbot

Depending on your web server, you will need to install additional packages:

For Nginx

sudo apt-get -y install python3-certbot-nginx

For Apache2

sudo apt-get -y install python3-certbot-apache

Certificate Generation

Please ensure that your web server is running before proceeding.

For Nginx

certbot certonly --nginx -d yoursite.com

For Apache2

certbot certonly --apache -d yoursite.com

If you are unable to start your web server, you can use the following command:

certbot certonly --standalone -d yoursite.com

To enable automatic SSL certificate renewal, use the following command:

certbot renew

Afterward, your certificate will be automatically validated daily to ensure its validity.