In the past, there was no such thing as a free reliable and safe SSL certificate!!! Boy, has this changed in today’s time!
Before we begin, let me give you a brief intro on what we will be accomplishing in this post!!! To begin, we will start off by downloading the LetsEncrypt tools from their official Repository on Github… Next, we will have it install the required dependencies… Finally, we will have Certbot, which is a tool provided by LetsEncrypt to generate us our free SSL certificate!
Oh, and before we begin, let me just mention that the below code is meant to be portable and able to run on all kinds of systems… If you’re looking for a more specific setup to your environment, I would recommend taking a look at https://certbot.eff.org/
Lets actually do this!
As you’ve finished the briefing, we can go ahead and jump right in generating our certificate! We can start off by downloading the tools we will need by running:
git clone https://github.com/certbot/certbot.git
Next, we can use one of the newly downloaded scripts to automatically install some of the needed dependencies and in previous experience, this may automatically ask you if you want it to generate you the certificate… If you want, you can follow what it says for your convenience, but if not keep on reading! Anyways, we can do this by running:
Finally, we can install the certificate for our specific domain by running:
./letsencrypt-auto certonly --webroot -w /var/www/directory_here -d site_name_here.com
And voila, congratulations on your newly signed SSL certificate provided by LetsEncrypt!
In conclusion, we have all most likely have gotten our free SSL certificates thanks to a mighty generous and well-sponsored company called LetsEncrypt!!!
UPDATE: LetsEncrypt has released wildcard SSL certificates and now you only need one certificate for all your subdomains!