Step-CA Automatic Certificate Renewal
Configure automatic SSL/TLS certificate renewal for Apache and Nginx
Overview
This guide configures automatic SSL/TLS certificate renewal using our internal Step-CA ACME server at https://stepca01.dcs.
What you'll achieve: Certificates will automatically renew every 90 days without manual intervention, keeping your services secure and avoiding browser warnings.
Prerequisites
- Root or sudo access to the target VM
- Apache or Nginx web server installed and running
- Network connectivity to
stepca01.dcs - Valid email address for certificate notifications
Troubleshooting
Verify network connectivity and DNS resolution:
ping stepca01.dcs
curl -I https://stepca01.dcs/acme/acme/directory
firewall-cmd --list-all
Check Certbot logs:
journalctl -u certbot-renew.service -n 50
tail -f /var/log/letsencrypt/letsencrypt.log
certbot certificates
Apache:
apachectl configtest
journalctl -u httpd -n 50
Nginx:
nginx -t
journalctl -u nginx -n 50
A plain certbot renew reuses the authenticator, installer, and Step-CA server URL recorded in the certificate's renewal config at issuance time. The automatic certbot.timer / certbot-renew.timer runs exactly that — with no extra flags — so renewal must work without passing --apache or --nginx.
If renewal fails unless you add --apache / --nginx, the renewal config recorded the wrong plugin (usually authenticator = standalone from a first issuance that did not go through the web-server plugin). The standalone authenticator cannot bind port 80 while Apache/Nginx is running, so the timer's unattended renewal will silently fail.
1. Inspect the renewal config:
grep -E 'authenticator|installer|server' /etc/letsencrypt/renewal/*.conf
For the web-server plugin you should see authenticator = apache (or nginx) and a matching installer, plus server = https://stepca01.dcs/acme/acme/directory.
2. Fix it by re-issuing through the correct plugin (this rewrites the renewal config):
# Apache
certbot --apache --server https://stepca01.dcs/acme/acme/directory --force-renewal
# Nginx
certbot --nginx --server https://stepca01.dcs/acme/acme/directory --force-renewal
3. Confirm the unattended path now works (no plugin flag):
certbot renew --dry-run
Quick Reference
| Check certificates | certbot certificates |
| Test renewal | certbot renew --dry-run |
| Check timer | systemctl list-timers | grep certbot |
| View logs | journalctl -u certbot-renew.service |