Certbot usage (Free SSL certificate generation)

Last modified by Yu Pang Law on 2022/12/14 10:02

Generate and install SSL certifcate using Certbot:

  1. Install Certbot from FreeBSD ports and install python:
    cd /usr/ports/security/py-certbot
    make install clean
    cd /usr/ports/lang/python
    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/python -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.

Tags:
 
Copyrighted by Pangnet.net