I visited https://letsencrypt.org/ where it said Let’s Encrypt is a free, automated, and open SSL Certificate Authority. That sounds great, time to check them out. This may not take 1 minute on your server but it did on mine (a self-managed Ubuntu 16.04/NGINX server). If you are not sure why you need an SSL cert read Life Is About to Get a Whole Lot Harder for Websites Without Https from Troy hunt.
FYI you can set up an Ubuntu Vutur VM here (my guide here) for as low as $2.5 a month or a Digital Ocean VM server here (my guide here) for $5 a month, billing is charged to the hour and is cheap as chips.
Buy a domain name from Namecheap here.
But for the best performing server read my guide on the awesome UpCloud VM hosts (get $25 free credit by signing up here). Also read my recent post on setting up Lets Encrypt on sub domains.
I clicked Get Started and read the Getting started guide. I was redirected to https://certbot.eff.org/ where it said: “Automatically enable HTTPS on your website with EFF’s Certbot, deploying Let’s Encrypt certificates.“. I was asked what web server and OS I use..
I confirmed my Linux version
Ensure your NGINX is setup (read my Vultr guide here) and you have a”server_name” specified in the “/etc/nginx/sites-available/default” file.
e.g
I also like to set “root” to “/www” in the NGINX configuration.
e.g
Tip: Ensure the www folder is set up first and has ownership.
Also, make and verify the contents of a /www /index.html file.
I then selected my environment on the site (NGINX and Ubuntu 16.04) and was redirected to the setup instructions.
FYI: I will remove mention of my real domain and substitute with thesubdomain.thedomain.com for security in the output below.
I was asked to run these commands
Detailed instructions here.
Obtaining an SSL Certificate
I then ran the following command to automatically obtain and install (configure NGINX) an SSL certificate.
Output
That was the easiest SSL cert generation in history.
SSL Certificate Renewal (dry run)
SSL Certificate Renewal (Live)
The Lets Encrypt SSL certificate is only a 90-day certificate.
Again: The Lets Encrypt SSL certificate is only a 90-day certificate.
I’ll run “certbot renew” again 2 months time to manually renew the certificate (and configure my higher security configuration (see below)).
Certbot NGINX Config renew (what did it do)
It’s nice to see forces HTTPS added to the configuration
Cert stuff added
listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/thesubdomain.thedomain.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/thesubdomain.thedomain.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
Contents of /etc/letsencrypt/options-ssl-nginx.conf
This contains too many legacy cyphers for my liking.
I changed /etc/letsencrypt/options-ssl-nginx.conf to tighten ciphers and add TLS 1.3 (as my NGINX Supports it).
Enabling OCSP Stapling and Strict Transport Security in NGINX
I add the following to /etc/nginx/sites/available/default
Restart NGINX.
SSL Labs SSL Score
I am happy with this.
Read my guide on Beyond SSL with Content Security Policy, Public Key Pinning etc
Automatic SSL Certificate Renewal
There are ways to auto renew the SSL certs floating around YouTube but I’ll stick to manual issue and renewals of SSL certificates.
SSL Checker Reports
‘I checked the certificate with other SSL checking sites.
NameCheap SSL Checker – https://decoder.link/sslchecker/ (Passed). I did notice that the certificate will expire in 89 days (I was not aware of that). I guess a free 90-day certificate for a noncritical server is OK (as long as I renew it in time).
CertLogik – https://certlogik.com/ssl-checker/ (OK)
Comodo – https://sslanalyzer.comodoca.com (OK)
Lets Encrypt SSL Certificate Pros
- Free.
- Secure.
- Easy to install.
- Easy to renew.
- Good for local, test or development environments.
- It auto-detected my domain name (even a subdomain)
Lets Encrypt SSL Certificate Cons
- The auto install process does not setup OCSP Stapling (I configured NGINX but the certificate does not support it may be to limit the Certificate Authority resources handing the certificate revocation checks).
- The auto install process does not setup HSTS. (I enabled it in NGINX manually).
- The auto install process does not setup HPKP. More on enabling Public Key Pinning in NGINX here.
- Too many cyphers installed by default.
- No TLS 1.3 installed by default by the install process in my NGINX config in the default certbot secure auto install (even though my NGINX supports it). More on enabling TLS 1.3 in NGINX here.
Read my guide on Beyond SSL with Content Security Policy, Public Key Pinning etc
I’d recommend you follow these Twitter security users
http://twitter.com/GibsonResearch
Troubleshooting
I had one server were certbot failed to verify the SSL and said I needed a public routable IP (it was) and that the firewall needed to be disabled (it was). I checked the contents of “/etc/nginx/sites-available/default” and it appeared no additional SSL values were added (not even listening on port 443?????).
I am viewing: /var/log/letsencrypt/letsencrypt.log
Forcing Certificate Renewal
Run the following command to force a certificate to renew outside the crontab renewal window.
Conclusion
Free is free but I’d still use paid certs from Namecheap for important stuff/sites, not having OCSP stapling on the CA and 90-day certs is a deal breaker for me. The Lets Encrypt certificate is only a 90-day certificate (I’d prefer a 3-year certificate).
A big thank you to Electronic Frontier Foundation for making this possible and providing a free service (please donate to them)..
Lets Encrypt does recommend you renew certs every 60 days or use auto-renew tools but rate limits are in force and Lets Encrypt admit their service is young (will they stick around)? Even Symantec SSL certs are at risk.
Happy SSL’ing.
Check out the extensive Hardening a Linux Server guide at thecloud.org.uk: https://thecloud.org.uk/wiki/index.php?title=Hardening_a_Linux_Server
fyi, I followed this guide setting up Let’s Encrypt on Ubuntu 18.04.
Read my guide on the awesome UpCloud VM hosts (get $25 free credit by signing up here).
Donate and make this blog better
Ask a question or recommend an article
[contact-form-7 id=”30″ title=”Ask a Question”]
v1.8 Force Renew Command
v1.7 Ubuntu 18.94 info
V1.62 added hardening Linux server link