In this article, we learn about the procedure to install and configure free Let’s Encrypt SSL using certbot for a domain configured in nginx.
Install snap core (Ubuntu 22.04)
sudo snap install core; sudo snap refresh core
Install certbot using snap package
sudo snap install --classic certbot
Link certbot command, so you can just call it by typing certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
To configure your nginx automatically with SSL use the below command
sudo certbot --nginx
This command will prompt automatically to select the site configured in nginx and the necessary code blocks including https redirect will be added automatically.
Otherwise, if you want to configure it manually, run the following command.
sudo certbot certonly --nginx
Please follow and like us: