Skip to main content


What Is OpenLiteSpeed and How to Use It on VPS

If you manage a virtual private server and you are looking for a faster, more efficient web server solution, OpenLiteSpeed VPS hosting is worth serious consideration. OpenLiteSpeed is a powerful, open-source web server that delivers exceptional performance, particularly for PHP-based websites and applications. In this guide, we will explore what OpenLiteSpeed is, how it compares to alternatives, and how you can install and configure it on your VPS.

What Is OpenLiteSpeed?

OpenLiteSpeed is the open-source edition of LiteSpeed Web Server, developed by LiteSpeed Technologies. It is a high-performance, lightweight HTTP server designed to handle large volumes of traffic with minimal resource consumption. Unlike its commercial counterpart, LiteSpeed Enterprise, OpenLiteSpeed is completely free to use, making it an attractive option for developers, small businesses, and system administrators who want enterprise-grade performance without the licensing costs.

OpenLiteSpeed supports HTTP/1.1, HTTP/2, and HTTP/3 (QUIC), which means your websites can take advantage of the latest web protocols for faster loading times. It also includes a built-in web administration panel, which simplifies server management considerably compared to editing configuration files manually.

Key Features of OpenLiteSpeed

  • Event-driven architecture: OpenLiteSpeed uses an asynchronous, event-driven model that allows it to handle thousands of concurrent connections without creating a new process or thread for each one.
  • LSCache support: OpenLiteSpeed integrates natively with LiteSpeed Cache, a powerful caching plugin available for WordPress, Joomla, and other platforms.
  • HTTP/3 and QUIC support: OpenLiteSpeed is one of the few open-source web servers that supports these modern protocols out of the box.
  • Built-in WebAdmin GUI: The graphical administration panel allows you to configure virtual hosts, SSL certificates, and server settings without touching the command line.
  • PHP LSAPI: OpenLiteSpeed uses its own PHP handler, LSAPI, which is significantly faster than traditional PHP-FPM or mod_php configurations.

OpenLiteSpeed vs Apache vs Nginx

When choosing a web server for your VPS, you will likely compare OpenLiteSpeed against Apache and Nginx, the two most widely used options. Each has its strengths, but OpenLiteSpeed stands out in several areas.

Performance

Apache is a process-based server, meaning it creates a new process or thread for each incoming connection. This approach works well for low-traffic environments but can become a bottleneck under heavy load. Nginx improved upon this with an event-driven model, but OpenLiteSpeed takes things further with its native LSAPI PHP handler, which consistently outperforms PHP-FPM used with Nginx in benchmark tests.

Ease of Configuration

Apache uses .htaccess files for directory-level configuration, which OpenLiteSpeed also supports, making migration from Apache straightforward. Nginx does not natively support .htaccess, which can complicate migrations. OpenLiteSpeed’s WebAdmin GUI also makes configuration more accessible for those who are not comfortable with command-line editing.

Caching

OpenLiteSpeed’s native integration with LSCache gives it a significant edge for WordPress sites. LSCache is a server-level caching solution that is far more efficient than plugin-based caches like W3 Total Cache or WP Super Cache. For more insights on managing your server effectively, visit the DA-Manager blog for helpful guides and tutorials.

How to Install OpenLiteSpeed on a VPS

Installing OpenLiteSpeed on your VPS is a straightforward process. The following steps assume you are running Ubuntu 22.04, though the process is similar for other Debian-based distributions.

Step 1: Update Your System

Before installing any new software, ensure your system packages are up to date by running the following commands:

sudo apt update
sudo apt upgrade -y

Step 2: Add the OpenLiteSpeed Repository

OpenLiteSpeed provides an official repository for easy installation. Add it to your system with the following commands:

wget -O - https://repo.litespeed.sh | sudo bash

This script will add the LiteSpeed repository to your package manager and import the necessary GPG key.

Step 3: Install OpenLiteSpeed

Once the repository has been added, install OpenLiteSpeed using the following command:

sudo apt install openlitespeed -y

Step 4: Install PHP with LSAPI

To serve PHP applications, you will need to install the LiteSpeed PHP package. For PHP 8.1, use:

sudo apt install lsphp81 lsphp81-common lsphp81-mysql -y

You can adjust the version number to match your preferred PHP version.

Step 5: Start and Enable OpenLiteSpeed

Start the OpenLiteSpeed service and configure it to launch automatically on system boot:

sudo systemctl start lsws
sudo systemctl enable lsws

Step 6: Access the WebAdmin Panel

OpenLiteSpeed’s WebAdmin panel runs on port 7080 by default. Before accessing it, set an admin password by running:

sudo /usr/local/lsws/admin/misc/admpass.sh

You can then access the panel by navigating to https://your-server-ip:7080 in your browser. From here, you can configure virtual hosts, manage SSL certificates, and adjust server settings through an intuitive graphical interface.

Configuring a Virtual Host on OpenLiteSpeed VPS

Once OpenLiteSpeed is installed, you will need to configure a virtual host for each website you plan to host on your VPS.

Creating a Virtual Host

Log into the WebAdmin panel and navigate to Virtual Hosts. Click Add to create a new virtual host. You will need to specify the virtual host name, the root directory where your website files are stored, and the configuration file location. Once saved, restart OpenLiteSpeed through the panel or via the command line using:

sudo systemctl restart lsws

Setting Up SSL with Let’s Encrypt

Securing your website with an SSL certificate is essential. OpenLiteSpeed supports Let’s Encrypt integration. Install Certbot and the necessary plugin, then run the certificate request command for your domain. Once issued, you can configure the SSL settings directly within the WebAdmin panel under the Listeners section.

Optimising OpenLiteSpeed for Better Performance

To get the most out of your OpenLiteSpeed VPS setup, consider enabling LSCache for your CMS. For WordPress users, install the LiteSpeed Cache plugin from the WordPress repository and connect it to your server. This enables full-page caching, object caching, and image optimisation at the server level, significantly reducing page load times.

You should also review your server’s worker process settings within the WebAdmin panel. Adjusting the number of worker processes to match your VPS CPU cores can improve throughput under heavy traffic conditions.

Is OpenLiteSpeed Right for Your VPS?

OpenLiteSpeed is an excellent choice for anyone running a VPS who wants superior performance, modern protocol support, and an easy-to-use management interface without paying for a commercial licence. Its compatibility with .htaccess files makes migration from Apache simple, and its native LSCache integration makes it particularly well-suited for WordPress and other popular CMS platforms.

Whether you are hosting a personal blog, an e-commerce site, or a high-traffic web application, configuring OpenLiteSpeed on your VPS can make a meaningful difference to your site’s speed, reliability, and overall user experience.