Learn how to install the OpenLiteSpeed Web Server on Linux Ubuntu 20.04 or 22.04


Discover OpenLiteSpeed, a high-performance open-source web server that allows you to manage and serve websites easily. This powerful server has various features that make it a perfect fit for numerous installations. These features include an administration interface with a web-based interface, Apache-compatible rewrite rules, and optimized PHP processing specifically designed for the server. Follow this guide to learn how to install and configure OpenLiteSpeed on an Ubuntu server running either version 20.04 or 22.04.


The following is a list of items that may be needed to complete this guide successfully:
1) An SSH client such as Putty (optional)
2) Linux Ubuntu 20.04 or 22.04
3) For Cloud deployments a fully qualified domain name and a public static IP address may be needed
4) A stable internet connection
5) A basic understanding of Linux commands


The following is an overview of the steps covered in this tutorial:
1) Downloading and installing OpenLiteSpeed Web Server
2) Setting up the administrator password.
3) Logging into the WebAdmin console.
4) Changing the port for the WebAdmin console
5) Changing the port for the default page.

Downloading and installing OpenLiteSpeed Web Server

OpenLiteSpeed provides a software repository that enables you to download and install the server using the standard Ubuntu apt command. To begin with, you should update the package manager cache by running the command:

sudo apt update
After that, install any pending upgrades by running:
sudo apt upgrade
If prompted, enter your password and confirm the installation by pressing ‘Y’. Next, you need to add the LiteSpeed repository to Ubuntu’s apt package manager by downloading and adding the developer’s software signing key. You can do this by running:
sudo wget -O - | sudo bash
The above command fetches a shell script located on OpenLitespeed’s server that will execute the necessary steps to add the repository. The output of this command shows the progress of the process.

Once the repository is enabled, run the command:
sudo apt install openlitespeed lsphp81
This command installs the OpenLiteSpeed server package and LSPHP 8.1, which is a PHP interpreter integrated with the LiteSpeed Server Application Programming Interface (LSAPI). After installing OpenLiteSpeed, it is essential to update the default administrator account to secure your server.

Setting up the administrator password

To create a new administrative password for OpenLiteSpeed, you can utilize a script provided by OpenLiteSpeed. The script can be run using the following command:

sudo /usr/local/lsws/admin/misc/

During the process, you will be prompted to provide a username for the administrative user. In case you don’t choose a new username, the default ‘admin’ will be used. You are free to choose any administrative username of your choice. After providing the username, you will be asked to create and confirm a new password for the account. Simply enter the password of your preference and hit ENTER. Once the update is successful, the script will display the following message:

Administrator’s username/password is updated successfully!

After updating the password, the admin account will be secured. It is recommended to test the server to ensure that it is running properly.

Logging into the WebAdmin console

Once OpenLiteSpeed is installed, you can check if it has started automatically by using the systemctl status command:
sudo systemctl status lsws
The output of this command should indicate that OpenLiteSpeed is active and running. If OpenLiteSpeed is not running, you can start it manually using systemctl:
sudo systemctl start lsws
After starting the server, you will need to open some ports on your firewall using the ufw command to access it through your browser:
sudo ufw allow 8088,7080,443,80/tcp
The default port for OpenLiteSpeed’s example site is 8088. Once you have allowed this port using ufw, you can access the default OpenLiteSpeed web page through your browser by navigating to your server’s domain name or IP address followed by :8088. If you are satisfied with the default site, you can proceed to the administrative interface by navigating to your server’s domain name or IP address using HTTPS followed by :7080. You will need to enter the administrative username and password that you selected during the installation process. Once you are authenticated, you can configure the web server via the OpenLiteSpeed administration interface.

Changing the port for the WebAdmin console

To enhance security, you may consider changing the OpenLiteSpeed Web Admin console port. Follow the steps below:
1. Click on “WebAdmin Settings” from the left menu list.
2. Click on “Listeners”.
3. Click on the view icon on the adminListener and select “Edit” on “Admin Listener Address Settings”.
4. Change the Port parameter to any 4-digit number. Please note that the valid range of this number is 0 – 65535.
5. Click on “Save” and then click on the icon to restart OpenLiteSpeed for the changes to take effect.

Changing the port for the default page

By default openlitespeed listens for http connections on port 8088. To make OpenLiteSpeed the main web server for your website, this port needs to be changes to 80. To change the port, navigate to the Listeners option on the left menu.

Once you’re there, select the Default listener by clicking on the magnifying glass icon. This will take you to a page that shows more details about the Default listener. From there, click on the edit button located on the top-right corner of the Address Settings table. This will open a new window where you can change the port number from 8088 to 80. Make sure to save the changes by clicking on the floppy disk icon. After saving, you will need to restart the server by clicking on the arrow icon for the Graceful Restart action. If prompted to restart, simply press the Go button.

Once you have done this, all websites hosted on the OpenLiteSpeed web server can now be accessing from http port 80.


In this guide, we have successfully covered the installation and configuration of OpenLiteSpeed Web Server on Ubuntu 20.04 or 22.04. You have learned how to download and install the server, set up the administrator password, access the administration interface, and customize the ports for both the WebAdmin console and the default web page.

With OpenLiteSpeed now running on your server, you are equipped with a powerful and versatile web server platform ready to host your websites. As you delve deeper into OpenLiteSpeed’s rich features and configuration options, remember to consult the official documentation and community resources for further guidance and expertise.

Here are some additional points to consider:

1) For advanced configurations and optimization techniques, explore the OpenLiteSpeed administration interface and its vast options.
2) Backup your system regularly to ensure data recovery in case of unforeseen circumstances.
3) Stay updated with the latest OpenLiteSpeed releases and security patches for optimal performance and vulnerability prevention.

Remember, OpenLiteSpeed offers a vibrant community forum and extensive documentation to support your journey. Feel free to explore and delve deeper into the possibilities your new web server presents!

Scroll to Top