Back to services

Lighttpd

Secure, fast, compliant, and very flexible web server that has been optimized for high-performance environments.

View alternatives to Lighttpd
Suggest edit
Open source
Self-hostable
BSD-3-Clause
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Introduction

Lighttpd (pronounced /lighty/) is an open-source web server that focuses on being secure, fast, standards-compliant, and flexibly configurable, and is optimized for high-performance environments. According to its official description, it uses memory and CPU very efficiently and has a smaller resource footprint than other mainstream web servers. It is also fairly full-featured, with support for FastCGI, CGI, authentication, output compression, URL rewriting, and more, so it can be used on systems of all sizes.

The project is released under the revised BSD license. The 1.4.x series is currently the main branch under maintenance, and new versions are still released regularly, including security fixes, feature updates, and compatibility improvements.

Key Features

  • Dynamic content support: Supports FastCGI and CGI, and can connect to backend programs such as PHP and Python.
  • Authentication: Includes a built-in HTTP authentication module (Auth).
  • Output compression: Compresses responses through modules such as mod_deflate to save bandwidth.
  • URL rewriting and redirection: Routing rules can be configured flexibly.
  • Reverse proxy: mod_proxy can forward requests to backend services and supports URL path mapping in response headers; mod_sockproxy can route connections based on TLS SNI.
  • Modern protocols and TLS: Supports HTTP/2. Recent versions default to TLSv1.3 as the minimum TLS version and add the post-quantum hybrid key exchange X25519MLKEM768 to the default TLS groups; there is also experimental TLS ECH support, and TLS certificates and CRLs can be reloaded.
  • Lua extensions: Use mod_magnet to write scripts for custom request handling, such as high-performance dynamic error pages.

Target Users and Use Cases

  • Developers and operations staff who need to run web services on low-spec hardware (embedded devices, routers, Raspberry Pi, small VPS).
  • Websites that want low resource usage and high-concurrency static file serving.
  • Use as a front-end server for FastCGI applications such as PHP.
  • Use as a lightweight reverse proxy in front of internal services.

Core Strengths

  • Low resource usage: Efficient memory and CPU use makes it well suited to resource-constrained environments.
  • Security: Keeps up with HTTP/2-related vulnerabilities, for example it can detect HTTP/2 CONTINUATION Flood and MadeYouReset (CVE-2025-8671) attacks; parsing and validation of HTTP headers and chunked transfer are stricter; the project provides a security-hardened systemd service unit.
  • Transparent release process: Released source packages come with GPG signatures and SHA256/SHA512 checksums, and are now generated with git archive, making it easy to confirm that the source comes from a signed Git tag.
  • Permissive license: The BSD license allows use in commercial projects and embedded products.

Installation and Deployment

  • Distribution packages: Most Linux distributions have lighttpd in their repositories, so you can install it directly with your package manager (for example apt install lighttpd).
  • Building from source: Download the lighttpd-1.4.x.tar.gz or .tar.xz source package from the official website, verify it with the GPG signature and checksums, then compile and install it.
  • Configuration: doc/config/lighttpd.annotated.conf in the source tree is a complete, commented configuration example, and doc/config/conf.d/*.conf contains configuration snippets for individual modules.
  • When managing it with systemd, if you need to adjust the official hardened service configuration, you can run systemctl edit lighttpd to add override settings.

Things to Note

  • Newer versions use TLSv1.3 as the minimum by default. To stay compatible with older clients, you need to change the configuration manually.
  • Starting with 1.4.80, static files reject requests with path info by default; starting with 1.4.82, request trailers must be explicitly allowed through an allowlist. Before upgrading, it is a good idea to read through the notes on behavior changes in each version.
  • Documentation, the wiki, forums, and the issue tracker are all on the official Redmine (redmine.lighttpd.net); the source code is hosted at git.lighttpd.net, with a mirror on GitHub.