Pakete:

/etc/apache2/conf-available/acme.conf
ServerAdmin admin@example.lxht.de
MDCertificateAgreement https://letsencrypt.org/documents/LE-SA-v1.4-April-3-2024.pdf
MDomain example.lxht.de
ServerName example.lxht.de
# change to permanent, if you're sure
MDRequireHttps temporary
<VirtualHost *:443>                                 
  SSLEngine on                                      
</VirtualHost>
a2enmod ssl
a2enmod md
a2enconf acme

apache2ctl configtest
apache2ctl -S
systemctl restart apache2.service
tail -f /var/log/apache2/access.log /var/log/apache2/error.log
until [ -f /etc/apache2/md/staging/example.lxht.de/pubcert.pem ]; do sleep 1; echo -n .; done

Zertifikat anschauen:

openssl x509 -in /etc/apache2/md/staging/example.lxht.de/pubcert.pem -text

Apache reloaden:

apache2ctl graceful