Generating a Free Let’s Encrypt SSL Certificate
A step-by-step guide to creating a free SSL certificate from Let's Encrypt.
First, update the system package lists and repositories:
bash
sudo apt-get -y update && sudo apt-get -y dist-upgradeInstall CertBot:
bash
sudo apt-get -y install certbotNext, install additional packages.
For Nginx:
bash
sudo apt-get -y install python3-certbot-nginxFor Apache2:
bash
sudo apt-get -y install python3-certbot-apache#Certificate generation
Please note that the web server must be running.
For Nginx:
bash
certbot certonly --nginx -d yoursite.comFor Apache2:
bash
certbot certonly --apache -d yoursite.comIf you cannot start the web server, use the following command:
bash
certbot certonly --standalone -d yoursite.comUse the following command to automatically renew the SSL certificate:
bash
certbot renewFrom now on, the validity of your certificate will be checked automatically every day.
Did not find the answer? We are online 24/7.Contact support