This guide is for VPS and Bare Metal customers managing their own web servers. Web Hosting (Plesk) and WordPress Hosting customers have Let’s Encrypt built into their control panels and do not need Certbot.
Installation
- Debian / Ubuntu
- RHEL / AlmaLinux / Rocky
Obtaining a Certificate
Nginx Plugin
The Nginx plugin automatically configures SSL in your Nginx server blocks:Apache Plugin
The Apache plugin automatically configures SSL in your Apache virtual hosts:Standalone Mode
If you are not running a web server, or prefer not to let Certbot modify your configuration, use standalone mode. Certbot temporarily starts its own web server on port 80 to complete the HTTP-01 challenge./etc/letsencrypt/live/example.com/.
Wildcard Certificates
Wildcard certificates (*.example.com) require DNS-01 validation instead of HTTP-01. This means Certbot needs to create a TXT record in your DNS zone to prove ownership.
_acme-challenge.example.com with a specific value. Add the record in your DNS provider, wait for propagation, then press Enter to continue.
Automated DNS Validation (Cloudflare Example)
If your DNS is managed by Cloudflare, you can automate wildcard renewals:- Debian / Ubuntu
- RHEL / AlmaLinux / Rocky
Automatic Renewal
Let’s Encrypt certificates expire after 90 days. Certbot installs a systemd timer (or cron job) that automatically renews certificates before expiration.Verify the Timer
Manual Cron (If No Systemd Timer)
If the systemd timer is not available or not active, add a cron job:nginx with apache2 or httpd depending on your web server. The --deploy-hook only runs when a certificate is actually renewed.
Post-Renewal Hooks
Certbot supports hooks that run after a successful renewal. This is useful for reloading your web server or restarting services that depend on the certificate./etc/letsencrypt/renewal-hooks/deploy/:
Managing Certificates
Troubleshooting
- “Problem binding to port 80” — Another service is already using port 80. Stop your web server before using standalone mode, or use the Nginx/Apache plugin instead.
- “DNS problem: NXDOMAIN” — The domain does not resolve to your server. Verify your A/AAAA records point to the correct IP and that DNS has propagated.
- “Too many certificates already issued” — Let’s Encrypt has rate limits of 50 certificates per registered domain per week. Use
--stagingfor testing to avoid hitting production limits. - “Unauthorized” during renewal — If your server is behind Cloudflare with proxying enabled, ensure HTTP-01 challenges can reach your origin server. Alternatively, switch to DNS-01 validation.