kesto.de Cheatsheets

letsencrypt / certbot

Create/update certificate

sudo systemctl stop apache2
sudo certbot certonly --cert-name example.org --standalone -d "domain1.example.org,domain2.example.org"
sudo systemctl start apache2

The created certificates can be used for HTTPS in Apache in a VirtualHost configuration:

SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/example.org/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.org/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/example.org/fullchain.pem

List certificates

certbot certificates

Remove certificate (interactively)

certbot delete

Renew

sudo service apache2 stop ; sudo certbot renew ; sudo service apache2 start