How to install Lighttpd web server on Rocky Linux 8

Let’s learn the simple and quick steps to install the Lighttpd web server on Rocky Linux 8 using the command terminal.

The long-established Apache is one of the most popular web servers in the world. But there are now several web servers that can hold a candle to Apache. Lighttpd is one of those.

lighttpd  (pronounced “lighty”) is a web server that requires far fewer resources than Apache, for example, and is therefore particularly well suited for very large loads or very weak systems. It was developed by Jan Kneschke and can be expanded with modules. For example, FastCGI allows you to run PHP code. SCGI adds Ruby or Python to lighty.

Steps to install Lighttpd web server on Rocky Linux 8

The steps given here to set up Lighttpd will be the same for other RedHat Linux such CentOS, Rocky Linux, Oracle Linux, and more…

1. Requirements

To perform this tutorial we need Rocky Linux, a root or non-root user with sudo rights, Epel repository, and internet connection.


2. Update Rocky Linux 8

Here we will use the DNF package manager to install the packages we need to setup Lighttpd, hence first run the system update command:

sudo dnf update && sudo dnf upgrade


3. Enable EPEL Release

Unlike Apache, the Lighttpd package is not available to install by using the base repository of Rocky Linux 8. Therefore, we have to add an Epel repo that has Lighttpd. Hence, run the given command to add EPEL (Extra Packages for Enterprise Linux).

sudo dnf install epel-release


4. Install Lighttpd on Rocky Linux 8

Once the required repository is added, next use the DNF package manager to install Lighttpd just like we do for any other open-source package.

sudo dnf install lighttpd

Install Lighttpd on Rocky Linux 8


5. Start and Enable Service

Once the installation process is completed, let’s run a web server service and also enable the same, so that it can start automatically with the system boot.

To start

sudo systemctl start lighttpd

For Enabling:

sudo systemctl enable lighttpd

To check the status:

sudo systemctl status lighttpd

sudo systemctl status lighttpd

To check the version, we can use:

lighttpd -v


6. Allow port 80 in Firewall on Rocky Linux 8

To access the webserver outside our system we have to open ports 80 (HTTP) and 443 (HTTPS) in the firewall.

sudo firewall-cmd --zone=public --add-port=80/tcp
sudo firewall-cmd --zone=public --add-port=443/tcp
sudo firewall-cmd --reload


7. Access Test Page

To confirm the webserver is working without any error let’s access its test page, for that we can point our web browser to the IP address or domain of the server where we have installed the Lighttpd.

For example:



You will have the Test page of Lighttpd:

install Lighttpd web server on Rocky Linux 8


8. Configuration

The Lighttpd is configured via the /etc/lighttpd/lighttpd.conf file. This can be edited with any text editor with root privileges. The most important options are briefly presented here. Numerous other configuration options are described in detail in the configuration file itself.

For more information visit the official documentation page.

The contents of the server are saved in a directory called “document root“. This means that the Apache webserver looks there for the (HTML) files to be delivered. In Apache the directory is:


If you save files there, you can access them using the server-IP address:

http://localhost/ or http://SERVER-IP_Address/


9. Lighttpd Uninstallation

Those who want to remove Lighttpd from their system then use the following commands:

sudo systemctl stop lighttpd
sudo dnf remove lighttpd

Lighttpd Uninstallation


Other Articles:

How to install Apache on Almalinux 8 / Rocky Linux 8
A Simple way to Install Tor Browser in Rocky Linux
How to install the NextCloud server on Rocky Linux
How to install & configure Lighttpd web server on Ubuntu



Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.