In this article, I will show you how you can add a free SSL certificate to your Nginx server with Certbot.
Before we start, check my previous article to understand more about SSL, and check here about serving a static app with Nginx.
What is certbot?
Certbot is an open-source automated software that generates Let's Encrypt Certificates. SSL
certificates are provided free of cost by the Internet Security Research Group(ISRG).
Let's get started 💎
Considering we already have our app being served by Nginx on our server, we can proceed to install certbot first.
Before you get started, I assume that.
- You are familiar with Nginx
- You have Nginx running on an ubuntu Linux server
Install certbot
$ apt-get update
$ sudo apt-get install certbot
$ apt-get install python-certbot-nginx
Get SSL/TLS certificate
$ sudo certbot --nginx -d example.com
Here example.com ☝🏾 is referring to the domain Nginx is using to serve our app.
If successful, you should get a response like below 👇🏽
Open the browser and visit your app.
It should be using HTTPS with a valid SSL/TLS certificate ⚡️
Also check 👉🏽 Serve a static app with Nginx
Top comments (0)