How does one automate Let’s Encrypt certificate renewal for Lighttpd?

Mik*_*ike 2 lighttpd raspberry-pi lets-encrypt

On a Linux system running Lighttpd, how can I automate certificate renewal for Let\xe2\x80\x99s Encrypt certs. Let\xe2\x80\x99s Encrypt provides great scripts for Apache 2 and NGINX but not Lighttpd which is much more comfortable for small systems like Raspberry Pi or old boxes.

\n

Mik*_*ike 5

Danny Tuppeny provides a great start with a simple script you can run on his blog posting Installing Lighttpd, PHP 7 and LetsEncrypt on a Raspberry Pi (Raspbian Jessie Lite)

\n\n
# Renew cert\n# updated for name change [mscalora]\nletsencrypt-auto renew\n\n# Rebuild the cert\npushd /etc/letsencrypt/live/<your-domain-here>/\ncat privkey.pem cert.pem > combined.pem\npopd\n\n# Reload\n/etc/init.d/lighttpd force-reload\n
Run Code Online (Sandbox Code Playgroud)\n\n

A more generalized version based on the latest Let\xe2\x80\x99s Encrypt script package can be found in my Gist: letsencrypt-update-lighttpd. This script will handle multiple domains with certificates.

\n\n

Danny Tuppeny\'s blog post has info about the original setup too.

\n