en Home Citadel Docker Citadel Let's Encrypt certificate authority setup Citadel QnA & Tricks Change Citadel Domain

Lighttpd Webserver for Citadel

Setting up Lighttpd Webserver for Citadel

Lighttpd is a free and open-source web server, designed for speed, efficiency, and flexibility.

This tutorial is designed to work hand in glove with our citadel docker installation tutorial. We will install this on Void Linux but besides the lighttpd installation, everything should work on any NIX.

Void Linux Installation

xbps-install -Suv
xbps-install -S lighttpd
/etc/lighttpd/lighttpd.conf
lighttpd -tt -f /etc/lighttpd/lighttpd.conf
lighttpd -D -f /etc/lighttpd/lighttpd.conf
ln -s /etc/sv/lighttpd /var/service/
sv start lighttpd
# See /usr/share/doc/lighttpd
# and http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ConfigurationOptions

server.username       = "_lighttpd"
server.groupname      = "_lighttpd"
server.document-root  = "/srv/www/lighttpd"
server.errorlog       = "/var/log/lighttpd/error.log"
dir-listing.activate  = "enable"
index-file.names      = ( "index.html" )

server.modules += ( "mod_proxy", "mod_openssl" )

static-file.exclude-extensions = ( ".fcgi", ".php", ".rb", "~", ".inc" )

$SERVER["socket"] == ":443" {
    ssl.engine = "enable"
    ssl.pemfile = "/etc/letsencrypt/live/srv.example.net/fullchain.pem"
    ssl.privkey = "/etc/letsencrypt/live/srv.example.net/privkey.pem"
}


$HTTP["host"] == "mail.example.net" {
    proxy.balance = "hash"
    proxy.server = (
        "" => (
            "citadel" => (
                "host" => "127.0.1.2",
                "port" => "8080"
            )
        )
    )
    ssl.pemfile = "/etc/letsencrypt/live/mail.example.net/fullchain.pem"
    ssl.privkey = "/etc/letsencrypt/live/mail.example.net/privkey.pem"
}


First Created: 2025-04-04
Last Modified: 2026-04-05 19:35