Obtaining a Certificate from Lets Encrypt

From packets2photons
Jump to navigation Jump to search

Much of this information is sourced from: https://letsencrypt.org/getting-started/

Before starting to ensure that you have an A record pointing to the IP address of your server. To verify that you have met this pre-requisite, you should be able to ssh from your local machine. For example, the following should be successful

ssh ubuntu@[yourdomain-name-goes-here.com]

I will also assume that you are running the Apache web server and have current access. You could use a web browser or from the CLI you could:

wget http://[yourdomain-name-goes-here.com]

You should, for testing purposes have TCP port 80 and 443 available through the firewall. Once you have tested that your website is working over HTTP (port 80), it is time to get a certificate and enable it over HTTPS (port 443). Go to:

https://certbot.eff.org/

Select I'm using "Apache" on "Ubuntu 18.04". You can then run the following:

 sudo apt-get update
 sudo apt-get install software-properties-common
 sudo add-apt-repository universe
 sudo add-apt-repository ppa:certbot/certbot
 sudo apt-get update
 sudo apt-get install certbot python-certbot-apache

Then, get the apache plugin

 sudo certbot --apache

Follow the prompts and after you finish, you can test.