Note: This is primarily for me to remember doing these steps, If it benefits someone else then great =).

In this example I will be listing out the steps to install SSL on https://crowdslike.com

Step 1

We will need to SSH into our machine. In our case its an EC2 instance.

 Step 2

Installing Certbot. Head over to their documentation to get the instructions. They may vary depending on your machines operating system. We will be installing certbot-auto. 

Step 3

We will need to stop our server. In our case we are running NGINX.

 Step 4

Here we will run the certbot command to generate our new certificate. The command will ask you a few questions along the way.

If you see the congratulations message then you have made it. Now we will need to copy these two lines for later usage.

 Step 5

Now, we will update our NGINX config and add SSL support. Below is a simple config setup.

We need to restart our NGINX sever.

 Step 6

Let’s setup auto-renewal of our certificate. Certbot certificates last 30 days. The cron will run every night at 1 am.

To check that the cronjob was saved, you can run the command below.