All Guides

Certbot Automatische SSL-Erneuerung

Konfigurieren Sie die automatische SSL-Zertifikatserneuerung.

Beginner10 Min.

Setup Steps

1. Install Certbot:

sudo apt install certbot -y

2. Install the plugin for your web server:

# Apache
sudo apt install python3-certbot-apache -y
# Nginx
sudo apt install python3-certbot-nginx -y

3. Get a certificate:

# Apache
sudo certbot --apache -d mysite.com -d www.mysite.com
# Nginx
sudo certbot --nginx -d mysite.com -d www.mysite.com

4. Test automatic renewal:

sudo certbot renew --dry-run

5. Check Certbot timer:

sudo systemctl status certbot.timer

6. Manual renewal:

sudo certbot renew

7. Post-renewal hook (restart service):

sudo certbot renew --deploy-hook "systemctl reload nginx"

8. View certificate information:

sudo certbot certificates

9. Delete a certificate:

sudo certbot delete --cert-name mysite.com

10. Wildcard certificate (DNS verification required):

sudo certbot certonly --manual --preferred-challenges dns -d "*.mysite.com"