Let’s Encrypt SSL with Certbot on Linux (Nginx & Apache)

certbot lets encrypt linux linux-certbot.png

Enable HTTPS on your Linux web server with Certbot and Let’s Encrypt — free SSL certificates with automatic renewal.

Step 1: Install Certbot

On Ubuntu: apt install certbot python3-certbot-nginx (or python3-certbot-apache). On AlmaLinux: use snap or EPEL package.

install certbot lets encrypt linux
Step 1: Install Certbot

Step 2: Obtain Certificate

Run certbot --nginx -d example.com -d www.example.com for Nginx, or certbot --apache for Apache. Certbot configures HTTPS automatically.

certbot nginx obtain ssl certificate linux
Step 2: Obtain Certificate

Step 3: Test Auto-Renewal

Verify with certbot renew --dry-run. Systemd timer or cron handles renewal — check with systemctl list-timers | grep certbot.

certbot renew dry run auto renewal linux
Step 3: Test Auto-Renewal

Related tutorials

Terminal screenshots are original illustrations created for Gnome IT Solutions (blog.gnomeitsolutions.com).