Certbot usage (Free SSL certificate generation)

Generate and install SSL certifcate using Certbot:

1. Install Certbot from FreeBSD ports:

cd /usr/ports/security/py-certbot
make install clean

2. Generate a free SSL

certbot certonly --webroot

3. Enter the web root and hostname for certificate

4. Make change to Apache configration and restart Apache

5. Add the following command to cron and run once a day

/usr/local/bin/python2.7 -c 'import random; import time; time.sleep(random.random() * 3600)' && /usr/local/bin/certbot renew

 

Uninstall an existing SSL certicate generated by Certbot:

certbot delete --cert-name ssl.example.com

where ssl.example.com is the sub-domain that need to be removed.