Installing SSL using Letsencrypt on Nginx and Ubuntu 18.04

At this time certbot does not have automated way to install letsencrypt on Ubuntu 18.10. Install Nginx and Passenger first.

Time : 10 minutes

SSH into your server and run:

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

Install the SSL certificate:

sudo certbot --nginx

You can use ssllabs to test SSL configuration:

Certbot automatically renews the SSL certificate after 90 days. You can see that my new site is now available over SSL:

Troubleshooting Tip

You must have already mapped your domain to the IP. Otherwise, you will get an error:

Failed authorization procedure. (http-01): urn:ietf:params:acme:error:unknownHost :: The server could not resolve a domain name :: No valid IP addresses found for

 - The following errors were reported by the server:

   Type:   unknownHost
   Detail: No valid IP addresses found for

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address.
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.


Letsencrpt on Nginx

Related Articles

Ace the Technical Interview

  • Easily find the gaps in your knowledge
  • Get customized lessons based on where you are
  • Take consistent action everyday
  • Builtin accountability to keep you on track
  • You will solve bigger problems over time
  • Get the job of your dreams

Take the 30 Day Coding Skills Challenge

Gain confidence to attend the interview

No spam ever. Unsubscribe anytime.