OpenLiteSpeed is the open-source edition of the LiteSpeed web server by LiteSpeed Technologies of China. It belongs to the closed-source segment and you have to install the PHP component from their repo. At the time of writing this guide, this web server supports HTTP/3. It supports a lot of Apache web server modules but there are differences with Apache. Unlike Apache, it provides a web-based control panel that allows you to configure and manage the web server via a web browser. It is simple, lightweight, and supports caching that suits most situations. Unlike Apache or NGINX, by default, it uses port 8088 instead of port 80.
Steps to Install OpenLiteSpeed
The easiest way for installing OpenLiteSpeed on a fresh server, add the OpenLiteSpeed files repository to the apt package manager. For installation with other web software running, it is probably safe to build from the source. SSH to your new server. Run these commands:
sudo apt install build-essential libexpat1-dev libgeoip-dev libpcre3-dev libudns-dev zlib1g-dev libssl-dev libxml2 libxml2-dev rcs libpng-dev libpng-dev openssl autoconf g++ make openssl libssl-dev libcurl4-openssl-dev libcurl4-openssl-dev pkg-config libsasl2-dev libzip-dev libxml2-dev sqlite3 libsqlite3-dev libonig-dev
sudo apt update
sudo wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debian_repo.sh | sudo bash
sudo wget -O - https://repo.litespeed.sh | sudo bash
sudo apt install openlitespeed
sudo systemctl status lsws
### PHP 8.0 ###
sudo apt-get install lsphp80 lsphp80-common lsphp80-mysql lsphp80-imap lsphp80-curl lsphp80-opcache lsphp80-intl lsphp80-redis
### MariaDB ###
sudo apt install mariadb-server
### complete the wizard ###
sudo service lsws restart
### set admin ###
Check these two webpages:
The location of the files visible from port 8088 is here:
/usr/local/lsws/Example/html. You can replace them with your website’s files or install WordPress in this directory.
The location of admin settings files are located at:
/usr/local/lsws/admin/conf. DO NOT delete these files. DO NOT directly edit the files such as
admin_config.conf from SSH unless the official documentation directs you to do so.
Login to the admin panel:
Navigate to the “Server Configuration”, then “External App” and edit the LiteSpeed SAPI App’s Command
field, to edit the PHP version which will be used. If the value in the
Command field was:
Then for activating PHP 8.0 (which we have installed in the earlier step), edit it to:
Save the configuration, and restart the server:
service lsws restart
To change the port to 80, navigate to “Listeners”, edit the default port and save the configuration. Restart the server:
service lsws restart
Now, visit the default page and check the PHP version whether it is 8.0 now:
Do We Recommend Using OpenLiteSpeed?
You can use OpenLiteSpeed to experiment with its cache, HTTP/3 etc. Apache HTTP Server is real free software. There is no paid tier for optimizing setup or performance.
Many individuals and companies use OpenLiteSpeed and the paid LiteSpeed. Free OpenLiteSpeed defaults to a blank number of workers which sets it to 1 worker and RAM is limited to 8GB. For the paid version, the number of workers can be up to 4. The price can go up to $100/month.