Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

On a Linux system running Lighttpd, how can I automate certificate renewal for Let’s Encrypt certs. Let’s 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.

like image 824
Mike Avatar asked Sep 05 '25 17:09

Mike


1 Answers

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)

# Renew cert
# updated for name change [mscalora]
letsencrypt-auto renew

# Rebuild the cert
pushd /etc/letsencrypt/live/<your-domain-here>/
cat privkey.pem cert.pem > combined.pem
popd

# Reload
/etc/init.d/lighttpd force-reload

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

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

like image 57
Mike Avatar answered Sep 07 '25 18:09

Mike