If you want to install free SSL on digital ocean droplet which already has been created and setup the Linux server by installing Apache. First go to terminal or putty and login into virtual server. Now, run below commands step by step:
1- Run update command to update all packages if any:
sudo apt-get update
2- sudo apt-get install apache2
3- sudo add-apt-repository ppa:certbot/certbot
4- sudo apt-get update
5- sudo apt-get install python-certbot-apache
6- sudo apachectl stop
7- letsencrypt --authenticator standalone --installer apache -d example.com ( Change the domain name with yours )
8- sudo service apache2 start
9- service apache2 restart
10- www.ssllabs.com/ssltest/analyze.html?d=example.com (Change the domain with yours)
If you want to auto renew the SSL certificate before expiry, use below commands:
1- Setup the crone
sudo crontab -e
2- 0 1 1 */2 * cd /usr/local/letsencrypt && ./letsencrypt-auto certonly --apache --renew-by-default --apache -d example.com >> /var/log/example.com-renew.log 2>&1
Update the domain name with your domain name
3- service apache2 restart
Restart the apache server to get things working fine.