How To Install the OpenLiteSpeed Web Server on Ubuntu
How To Install the OpenLiteSpeed Web Server on Ubuntu 24.04

Introduction
OpenLiteSpeed is a powerful, lightweight, and high-performance web server that has become increasingly popular among web hosting providers and developers. As one of the leading alternatives to Apache and Nginx, OpenLiteSpeed offers exceptional speed and efficiency for modern web applications. In this comprehensive tutorial, HostingHome will guide you through the complete process of installing and configuring OpenLiteSpeed on Ubuntu.
What is OpenLiteSpeed?
OpenLiteSpeed is the open-source version of LiteSpeed Web Server, designed to deliver outstanding performance while maintaining low resource consumption. This makes it an ideal choice for shared hosting environments, VPS hosting, and dedicated servers. Unlike traditional web servers, OpenLiteSpeed provides built-in caching capabilities and advanced security features that significantly improve website loading speeds.
Prerequisites
Before beginning the OpenLiteSpeed installation process, ensure your Ubuntu system meets the following requirements:
- Ubuntu 18.04, 20.04, 22.04, or newer
- Root or sudo access to your server
- Basic command-line knowledge
- At least 1GB of RAM (2GB recommended for optimal performance)
- Stable internet connection
HostingHome recommends using a fresh Ubuntu installation for the best results when setting up your web hosting environment.
Step 1: Update Your Ubuntu System
Start by updating your Ubuntu system to ensure all packages are current. This is crucial for maintaining security and compatibility in any hosting environment.
sudo apt update && sudo apt upgrade -y
Step 2: Add OpenLiteSpeed Repository
OpenLiteSpeed maintains an official repository for Ubuntu systems. Add this repository to access the latest stable releases optimized for web hosting applications.
wget -O - https://repo.litespeed.sh | sudo bash
This command downloads and executes the repository setup script, which configures your system to receive OpenLiteSpeed updates through the standard package management system.
Step 3: Install OpenLiteSpeed
With the repository configured, install OpenLiteSpeed using the following command:
sudo apt install openlitespeed -y
Step 4: Start and Enable OpenLiteSpeed Service
After installation, start the OpenLiteSpeed service and enable it to automatically start on system boot:
sudo systemctl start lsws
sudo systemctl enable lsws
Verify the service is running correctly:
sudo systemctl status lsws
Step 5: Configure Firewall
If you’re using UFW (Uncomplicated Firewall), configure it to allow web traffic. This is essential for any hosting setup:
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 8088/tcp
sudo ufw allow 7080/tcp
sudo ufw reload
7080
is used for the OpenLiteSpeed WebAdmin interface, which provides a user-friendly control panel for server management.8088
is the default port used by OpenLiteSpeed’s example site. Once this port is allowed through the firewall using ufw
, the example site becomes publicly accessible. To view it, open your web browser and enter your server’s domain name or IP address followed by :8088 — for example:http://your-server-ip:8088
Step 6: Set Up WebAdmin Access
OpenLiteSpeed includes a powerful web-based administration interface. Create an admin user for secure access:
sudo /usr/local/lsws/admin/misc/admpass.sh
This script will prompt you to create a username and password for accessing the WebAdmin console. Choose a strong password to maintain security for your hosting environment.
Step 7: Access the WebAdmin Interface
Open your web browser and navigate to:
https://your-server-ip:7080
Advanced
, then Proceed to....
Step 8: Set Up PHP Support
For dynamic web hosting, install PHP support:
sudo apt install lsphp84 lsphp84-common lsphp84-mysql lsphp84-dev lsphp84-curl lsphp84-dbg -y
Script Handler
and adding:Suffixes: php
Type: LiteSpeed SAPI
Extra Headers: X-Forwarded-Proto $scheme
Step 9: Configure Your First Virtual Host
To start hosting websites, you’ll need to create virtual hosts. Through the WebAdmin interface:
Navigate to Virtual Hosts
in the left sidebar
Click the “+” button to add a new virtual host
Configure the following settings:
Virtual Host Name: your-domain.com
Virtual Host Root: /usr/local/lsws/Example/html/$VH_NAME/
Config File: conf/vhosts/$VH_NAME/vhconf.conf
Enable Scripts: Yes
Step 10: Modifying the Default Site’s Port
As an example of configuring settings via the web interface, you’ll change the default site’s port from 8088
to the standard HTTP port 80
.
Begin by selecting Listeners from the side navigation menu. This will display a list of all configured listeners.
Locate the Default listener in the list and click the magnifying glass icon (View) to access its configuration details.

This will open a detailed view of the Default listener. To make changes, click the Edit button located in the top-right corner of the Address Settings section.

8088
with 80
, then click Save
to apply the changes.
Step 11: SSL Certificate Configuration
For secure hosting, configure SSL certificates. You can use Let’s Encrypt for free SSL certificates:
sudo apt install certbot -y
sudo certbot certonly --webroot -w /usr/local/lsws/Example/html/ -d your-domain.com
Configure the SSL certificate in WebAdmin under “Listeners” > SSL tab.
Performance Benefits of OpenLiteSpeed Hosting
OpenLiteSpeed provides several advantages for web hosting:
1. High Performance
Significantly faster than Apache in most scenarios
2. Low Memory Usage
Efficient resource utilization ideal for VPS hosting
3. Built-in Caching
Reduces server load and improves response times
4. Easy Management
WebAdmin interface simplifies hosting administration
5. Security Features
Advanced anti-DDoS protection and security rules
Conclusion
OpenLiteSpeed provides an excellent foundation for modern web hosting solutions. Its combination of high performance, low resource usage, and user-friendly management makes it an ideal choice for hosting providers and website administrators. By following this tutorial, you’ve successfully installed and configured OpenLiteSpeed on Ubuntu, creating a robust hosting environment capable of serving high-traffic websites efficiently.
HostingHome recommends OpenLiteSpeed for businesses looking to upgrade their web hosting infrastructure without the complexity and licensing costs associated with commercial web servers. The open-source nature of OpenLiteSpeed, combined with its enterprise-grade features, makes it a cost-effective solution for modern hosting requirements.
Whether you’re managing a single website or multiple hosting accounts, OpenLiteSpeed provides the performance, security, and scalability needed for today’s demanding web hosting environment. Regular maintenance and optimization will ensure your hosting server continues to deliver excellent performance for all your web applications.