It is important to use SSL to make your website encrypted. In this method, I will show you how to install SSL in Ubuntu 16.04.
Step 1: First, you need to install certbot tool by the below command
root@tecoide:~# apt update root@tecoide:~# apt install letsencrypt
Step 2: Now Generate wildcard SSL using certbot tool.
root@tecoide:~# certbot certonly --manual --preferred-challenges=dns --email admin@tecoide.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d tecoide.com -d '*.tecoide.com'
Note: ’email’ , ‘-d (domain name)’ with your own email and domain name.
You need to type ‘Y’ two times while deploying this command and then finally the out looks like this
Please deploy a DNS TXT record under the name _acme-challenge.tecoide.com with the following value: h#cUndYwcxrKkR%GD6RD^2GFz&2$j#QgR5NgG Before continuing, verify the record is deployed.
Step 3: Now, create a TXT name in Godaddy(or your domain provider) as below. After the record is added, wait for a few minutes and then click ENTER to continue deploying in your server.
Note: The domain provider will take several minutes of time to update your record.
Example Output:
IMPORTANT NOTES: Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/tecoide.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/tecoide.com/privkey.pem Your cert will expire on 2022-10-17. To obtain a new or tweaked version of this certificate in the future, simply run certbot again. To non-interactively renew all of your certificates, run "certbot renew" 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. If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le
Step 4: You can check your all certbot certificates by using this command
# certbot certificates
root@tecoide:~# certbot certificates Saving debug log to /var/log/letsencrypt/letsencrypt.log Found the following certs: Certificate Name: tecoide.com Domains: tecoide.com *.tecoide.com Expiry Date: 2021-01-15 14:11:10+00:00 (VALID: 89 days) Certificate Path: /etc/letsencrypt/live/tecoide.com/fullchain.pem Private Key Path: /etc/letsencrypt/live/tecoide.com/privkey.pem
Congratulations! You have installed a free SSL certificate on your server.
But Wait……
It’s for only 90 days. What about after that? Do you need to create another certificate or follow all these processes again and again?
NO…
Just create a cronjob to renew certbot certificates automatically.