Install Let’s Encrypt in Nginx

Install Core
sudo snap install core; sudo snap refresh core
Remove old certbot
sudo apt-get remove certbot
Install Certbot
sudo snap install --classic certbot
Prepare the Certbot command
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Install your certificates…
sudo certbot --nginx
Or, just get a certificate
sudo certbot certonly --nginx
Test automatic renewal
sudo certbot renew --dry-run
Second way to install :
sudo apt install certbot python3-certbot-nginx
Check SSL Certificate :
openssl s_client –showcerts –connect WebServerURL:PortNumber
Auto Renew Certbot by Cron :
43 6 * * * certbot renew --post-hook "systemctl reload nginx"
Post Comment