India English
Kenya English
United Kingdom English
South Africa English
Nigeria English
United States English
United States Español
Indonesia English
Bangladesh English
Egypt العربية
Tanzania English
Ethiopia English
Uganda English
Congo - Kinshasa English
Ghana English
Côte d’Ivoire English
Zambia English
Cameroon English
Rwanda English
Germany Deutsch
France Français
Spain Català
Spain Español
Italy Italiano
Russia Русский
Japan English
Brazil Português
Brazil Português
Mexico Español
Philippines English
Pakistan English
Türkiye Türkçe
Vietnam English
Thailand English
South Korea English
Australia English
China 中文
Canada English
Canada Français
Somalia English
Netherlands Nederlands

How to Install OpenLiteSpeed on a Linux VPS (Step-by-Step)

Buy domains, business emails, hosting, VPS and more: Get Started

You log in to your VPS over SSH. The prompt reads root@vps, and nothing listens on port 80. Your server is online, yet it serves no pages.

Here is the short answer. Add the official LiteSpeed repository, install the openlitespeed package, and set a WebAdmin password. Then install LSPHP and load the test page.

This guide walks through each step with copy-ready commands. It covers Ubuntu, Debian, AlmaLinux, and Rocky Linux. By the end, you will have a working server and a verified test page.

What You Need Before You Install OpenLiteSpeed

The official docs support current, non-end-of-life releases. That means Ubuntu 22, 24, and 26; Debian 11, 12, and 13; and CentOS family 8, 9, and 10. AlmaLinux and Rocky Linux belong to that last family.

Check your release before you go further:

cat /etc/os-release

If your VPS runs an end-of-life release, rebuild it first. Otherwise, the repository install can fail halfway through.

Confirm you have the following:

  • A 64-bit Linux VPS on a supported release
  • SSH access and a user with sudo rights
  • At least 1 GB of RAM and one CPU core (use 2 GB or more for WordPress)
  • Ports 80, 443, 7080, and 8088 free on the server
  • A provider firewall or security group that allows the same ports

OpenLiteSpeed cannot use port 80 when Apache or Nginx is already using it. Therefore, stop and disable any old web server now. Run only the line that matches what you installed.

sudo systemctl disable --now apache2   # Ubuntu and Debian

sudo systemctl disable --now httpd     # AlmaLinux and Rocky Linux

sudo systemctl disable --now nginx
sudo systemctl disable --now apache2   # Ubuntu and Debian

sudo systemctl disable --now httpd     # AlmaLinux and Rocky Linux

sudo systemctl disable --now nginx

Next, check that the four ports are free. Empty output means they are.

sudo ss -tulpn | grep -E ':(80|443|7080|8088)\b'

Which Ports OpenLiteSpeed Uses

OpenLiteSpeed listens on four ports. Each one has a clear job.

PortPurposeOpen it when
7080WebAdmin consoleYou manage the server from a browser
8088Example test siteYou run your first test (close it afterward)
80HTTPYou publish a site
443HTTPSYou publish a site with SSL

On Ubuntu or Debian, open the ports with UFW. Allow SSH first, or you will lock yourself out.

sudo ufw allow OpenSSH

sudo ufw allow 80/tcp

sudo ufw allow 443/tcp

sudo ufw allow 8088/tcp

sudo ufw allow from YOUR_IP_ADDRESS to any port 7080 proto tcp

sudo ufw enable
sudo ufw allow OpenSSH

sudo ufw allow 80/tcp

sudo ufw allow 443/tcp

sudo ufw allow 8088/tcp

sudo ufw allow from YOUR_IP_ADDRESS to any port 7080 proto tcp

sudo ufw enable

On AlmaLinux or Rocky Linux, use firewalld instead.

sudo firewall-cmd --permanent --add-port={80,443,8088}/tcp

sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="YOUR_IP_ADDRESS" port port="7080" protocol="tcp" accept'

sudo firewall-cmd --reload

Both examples limit port 7080 to your own IP address. That keeps the admin console out of reach of random scanners. Also open the same ports in your VPS provider’s firewall panel if it has one.

Choose an OpenLiteSpeed Installation Method

You can install OpenLiteSpeed three ways. The right pick depends on your system and how much you want automated.

MethodBest forTrade-off
Official repositoryMost VPS installs, with updates through apt or yumNeeds a supported release
One-click script (ols1clk)OpenLiteSpeed plus MariaDB or WordPress in one runChanges more on your server
Precompiled binary or source buildUnsupported systems and custom buildsYou handle every update by hand

This guide uses the repository. It places the same files on disk as the other methods. Your package manager then handles future updates.

The one-click script suits a full stack in a single run. It installs OpenLiteSpeed with default settings and a random WebAdmin password. Read the script before you run it, since it changes your server.

bash <(curl -fsSL https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh)

Source builds and binaries take longer. They make sense only when no package exists for your system.

Step 1: Install OpenLiteSpeed from the Official Repository

Both paths below start with the same repository script. It detects your system and adds the right LiteSpeed repository. Install wget first if your system does not have it.

1) Install on Ubuntu and Debian

sudo apt update

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

sudo apt-get -y install openlitespeed
sudo apt update

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

sudo apt-get -y install openlitespeed

The install should finish without errors. It creates the /usr/local/lsws directory. If apt cannot find the package on a newer release, jump to the troubleshooting section.

2) Install on AlmaLinux, Rocky Linux, and Other CentOS-Family Systems

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

sudo yum install openlitespeed -y

On these systems, yum and dnf run the same command. Fedora has no dedicated packages, so it uses the CentOS repository instead.

3) Start OpenLiteSpeed and Enable It at Boot

sudo systemctl start lsws

sudo systemctl enable lsws

sudo systemctl status lsws
sudo systemctl start lsws

sudo systemctl enable lsws

sudo systemctl status lsws

Look for active (running) in the output. If the service fails, check the troubleshooting section for port conflicts. The lswsctrl script in /usr/local/lsws/bin offers the same controls.

Step 2: Set the Admin Password and Open the WebAdmin Console

The installer creates a random WebAdmin password. It saves the password to /usr/local/lsws/adminpasswd. Set your own instead:

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

The script asks for a username and a password. Press Enter to keep the default username, admin. Run the same script again to reset a forgotten password.

Now open the console in your browser:

https://YOUR_SERVER_IP:7080

Your browser will warn you about the certificate. The server generated that certificate itself, so the browser does not recognize it. Accept the warning, then log in.

Step 3: Install LSPHP for OpenLiteSpeed

sudo apt-get install lsphp84 lsphp84-common lsphp84-mysql -y

OpenLiteSpeed runs PHP through LSPHP, which talks to the server over the LSAPI protocol. The LiteSpeed repository ships ready-made LSPHP packages. Install PHP 8.4 with MySQL support:

# Ubuntu and Debian

sudo apt-get install lsphp84 lsphp84-common lsphp84-mysql -y

# AlmaLinux and Rocky Linux

sudo yum install lsphp84 lsphp84-common lsphp84-mysqlnd -y

Your app may need more extensions. Search the repository for them with apt-cache search lsphp84 or yum search lsphp84. Then install what you need.

Confirm the install worked:

/usr/local/lsws/lsphp84/bin/php -v

The output should show PHP 8.4 with LiteSpeed in the SAPI label.

Point OpenLiteSpeed to the Right LSPHP Binary

The default handler can point to an older PHP version. Update it in WebAdmin:

  1. Go to Server Configuration, then External App.
  2. Edit the lsphp entry.
  3. Set the Command field to /usr/local/lsws/lsphp84/bin/lsphp.
  4. Save, then click Graceful Restart.

Check Script Handler while you are there. It should map the php suffix to LiteSpeed SAPI with the lsphp handler. If your app requires a different PHP version, update both the package name and the path.

Step 4: Verify That OpenLiteSpeed Works

Open the example site in your browser:

http://YOUR_SERVER_IP:8088

You should see the OpenLiteSpeed example page. If the page does not load, recheck your firewall rules on both the server and the provider panel.

Next, check the service status and the error log:

sudo systemctl status lsws

sudo tail -n 50 /usr/local/lsws/logs/error.log

Then confirm PHP works. Create a test file in the example site:

echo '<?php phpinfo();' | sudo tee /usr/local/lsws/Example/html/info.php

Load http://YOUR_SERVER_IP:8088/info.php. You should see the PHP information page. Delete the file right away, since it exposes server details.

sudo rm /usr/local/lsws/Example/html/info.php

If the browser downloads the file or shows raw code, the PHP handler is not mapped. Go back to the LSPHP section and recheck it.

Change the Default Listener from Port 8088 to Port 80

Visitors expect your site on port 80. Change the listener in WebAdmin:

  1. Open Listeners in WebAdmin.
  2. Click View on the Default listener.
  3. Edit the address settings and change the port from 8088 to 80.
  4. Save, then click Graceful Restart.

Now load http://YOUR_SERVER_IP with no port. If the restart fails, another web server is still listening on port 80. Stop it, then restart OpenLiteSpeed.

Fix Common OpenLiteSpeed Installation Errors

Check /usr/local/lsws/logs/error.log first. It usually names the cause. Most failures fall into the cases below.

SymptomLikely causeFix
Service will not startAnother server holds port 80 or 8088Run the ss command from earlier, then stop that service
WebAdmin does not load on port 7080Server or provider firewall blocks itOpen the port in both places and use https://
apt cannot find openlitespeedThe repo script failed, or the repo file lacks your release nameRerun the repo script, then check the repo file
Package missing on an old releaseThe system is unsupported or end-of-lifeRebuild the VPS on a supported release
Browser shows PHP source codeThe PHP handler is not mappedRecheck the LSPHP section

On Debian-based systems, the repo file lives at /etc/apt/sources.list.d/lst_debian_repo.list. On Ubuntu 24.04, the line should end with the release name:

deb http://rpms.litespeedtech.com/debian/ noble main

Fix the file, then run sudo apt update, then reinstall.

Add Your First Website to OpenLiteSpeed

Your server now runs, so it can host a site. Keep this section as a short map. Each step has its own guide.

  1. Create a virtual host in WebAdmin with your domain name and document root.
  2. Map that virtual host to the listener, using your domain.
  3. Point your domain’s A record at the VPS IP address.
  4. Issue a free Let’s Encrypt certificate with Certbot, then attach it to a port 443 listener.

OpenLiteSpeed Installation FAQs

How do I start, stop, and restart OpenLiteSpeed?

Where does OpenLiteSpeed store its files?

How do I uninstall OpenLiteSpeed?

Run OpenLiteSpeed on a Truehost VPS

Your server now answers on port 80 and runs PHP through LSPHP. The next move is your first virtual host with SSL.

Start from a clean install for the best result. Deploy a Linux VPS from Truehost, then run the commands in this guide from the first step.

You will have a working OpenLiteSpeed server before your first site goes live.

Elias N
Author

Elias N

SEO Expert Nairobi, KEN

SEO nerd by trade. Obsessing over keywords, content, and why Google does what it does.

View All Posts