Skip to main content

6. SSL certificate (LetsEncrypt)

Execute following commands to install letsencrypt on your server

apt update
apt install python3-certbot-apache -y # or python-certbot-nginx according to your web server

Then execute following command to get SSL certificates and letsencrypt will take care automatically to configure it properly.

certbot --apache -d example.com -d www.example.com

Reference URLs

  1. Apache
  2. Nginx
  3. LetsDebug - Useful when you have to debug SSL certificate related issues

Useful commands:

certbot -d example.com -d www.example.com --manual --preferred-challenges dns certonly # manual DNS challenge process
certbot certificates
certbot revoke --cert-name example.com