Instructions for creating a free certificate from Let's Encrypt.

To begin with, we update the lists of packages and repositories of the system:

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

Installing CertBot:

sudo apt-get -y install certbot

Next, we 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 note that the Web server must be enabled!

For Nginx:

certbot certonly --nginx -d yoursite.com

For Apache2:

certbot certonly --apache -d yoursite.com

If you cannot enable the Web server, use the following command:

certbot certonly --standalone -d yoursite.com

We use the command to automatically issue an SSL certificate:

certbot renew

Next, an automatic verification of the validity of your certificate will take place daily.

Last updated