Skip to main content

Certbot Installation Guide

This guide provides all the key information and getting-started instructions after a successful Certbot installation via DeploySage-CLI. Certbot is used to obtain and renew free SSL/TLS certificates from Let's Encrypt.

Getting Your First Certificate

For Nginx:

For Apache:

The most common use for Certbot is to secure a web server. Before you begin, ensure your domain name (e.g., example.com) is pointing to your server's public IP address.

Certbot will automatically edit your web server's configuration to serve the certificate and enable HTTPS.

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

Managing Certificates

Certbot makes certificate management simple.

# List all certificates managed by Certbot
sudo certbot certificates

# Test the automatic renewal process
sudo certbot renew --dry-run

# Manually renew all certificates (not usually necessary)
sudo certbot renew

# Delete a certificate
sudo certbot delete --cert-name example.com

Key Directories and Files

All of your certificates and related files are stored in the /etc/letsencrypt/ directory.

ItemValue
Live Certificates/etc/letsencrypt/live/
Configuration Files/etc/letsencrypt/renewal/
Log Directory/var/log/letsencrypt/