How To Install Lets Encrypt SSL on NGINX DigitalOcean – The first step in installing SSL certificate is to install certain bot Cert bot is a software client that attempts to automate most of the steps in installing an SSL certificate. To install a cert but first add the repository by typing the following command.
Steps to Install Lets Encrypt SSL
[mks_highlight color=”#ddff99″]$ sudo add-apt-repository ppa:certbot/certbot[/mks_highlight]
1 – Once you’ve entered this command press enter to execute it.
2 – Press enter at the prompt.
3 – Next we need to install cert bots NGINX package using the apt method. So type in the following command.
[mks_highlight color=”#ddff99″]$ sudo apt install python-certbot-nginx [/mks_highlight]
4 – Enter Y at the prompt. Cert Bot is now set up and ready to be used for installation.
Also Read: How To Deploy a NGINX Web Server Droplet on Digital Ocean
It’s very important that you confirm your domain names have been correctly entered into the default block configuration file on your NGINX server. If there are any name variations missing or the domain name is spelt incorrectly under the server name directive the SSL certificates will not work.
Since we’ve confirmed our domain names are correct. All that’s left to do now is obtain the SSL certificate to do so you’re going to type in the following command.
[mks_highlight color=”#ddff99″]$ sudo certbot –nginx -d example.com -d www.example.com [/mks_highlight]
And Press Enter.
5 – So now what we can do is just test to make sure that the SSL is working on our domain. Type in my domain name and you can see that it is secure.
Your configuration is working correctly and your certificates will be new periodically on their own in the event in order renewal fails for any reason. Let’s encrypt we’ll send you an e-mail to the administrative e-mail you provided during setup and you can see here that we have a success message Congratulations all renewals succeeded and the following certificates have been renewed.