Automatic SSL renewal depends on several things working correctly, including domain DNS records, web server configuration, firewall rules, and the certificate validation method.
Common causes include:
- Domain DNS pointing to the wrong server.
- Port 80 being blocked during HTTP validation.
- Incorrect webroot configuration.
- Another service interfering with the validation path.
- Expired or invalid DNS API credentials.
Try these checks:
Check existing certificates:
sudo certbot certificates
Test renewal:
sudo certbot renew --dry-run
Check the renewal logs:
sudo tail -n 100 /var/log/letsencrypt/letsencrypt.log
Verify that your domain points to the correct VPS IP address.
Confirm that the required validation method is accessible.
Check the renewal timer:
systemctl list-timers | grep certbot
Don't wait until the certificate expires to troubleshoot renewal problems. A successful dry run is a useful way to verify that the renewal process is working.