Websites & apps

How to install OpenLiteSpeed web server on Ubuntu

Install OpenLiteSpeed on Ubuntu or Debian from the official LiteSpeed repository, add LSPHP, set the WebAdmin password, and open ports 8088 and 7080 without exposing the admin panel to everyone.

BeginnerLinux server4 min read

OpenLiteSpeed is the free, open-source edition of LiteSpeed Web Server. It is fast with PHP, has a built-in page cache that WordPress can use through the LiteSpeed Cache plugin, and is managed from a web-based admin panel called WebAdmin. This guide installs it from the official LiteSpeed repository, adds PHP, and secures the admin panel.

Before you start

  • A Linux VPS running Ubuntu 22.04 or 24.04, or Debian 12. LiteSpeed also packages for AlmaLinux and Rocky; check LiteSpeed's documentation for those steps.
  • SSH access as a user with sudo.
  • No other web server on ports 80 and 443. If Apache or Nginx is installed, stop and disable it first, or OpenLiteSpeed cannot bind those ports later.

Note: If you would rather manage OpenLiteSpeed through a control panel, CyberPanel installs it for you. This guide covers a plain install.

Step 1: Add the LiteSpeed repository

Update the system, then run LiteSpeed's repository setup script. It adds the LiteSpeed package source and signing key:

Bash
sudo apt update && sudo apt upgrade -y
wget -O - https://repo.litespeed.sh | sudo bash

If you prefer to inspect the script first, download it with wget -O litespeed-repo.sh https://repo.litespeed.sh, read it, then run it with sudo bash litespeed-repo.sh.

Step 2: Install OpenLiteSpeed

Bash
sudo apt install openlitespeed

The server installs to /usr/local/lsws. Key paths:

  • /usr/local/lsws/conf/httpd_config.conf for the server config.
  • /usr/local/lsws/conf/vhosts/ for virtual host configs.
  • /usr/local/lsws/Example/html/ for the default site.
  • /usr/local/lsws/logs/ for error and access logs.

Start the service and enable it at boot:

Bash
sudo systemctl enable --now lsws
sudo systemctl status lsws --no-pager

Step 3: Install LSPHP

OpenLiteSpeed runs PHP through its own builds called LSPHP. The package name includes the version, such as lsphp83 for PHP 8.3. See which versions the repository offers:

Bash
apt-cache search lsphp | grep -E '^lsphp[0-9]+ '

Install a version with the extensions most sites need (PHP 8.3 shown):

Bash
sudo apt install lsphp83 lsphp83-common lsphp83-mysql lsphp83-curl lsphp83-intl lsphp83-imagick

Run apt-cache search lsphp83 to see all the extension packages for that version. The PHP binary is /usr/local/lsws/lsphp83/bin/lsphp. If the default external app points at a different version, see Change the PHP version in OpenLiteSpeed.

Step 4: Set the WebAdmin password

WebAdmin is the browser-based control panel. Set your own username and password with the bundled script:

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

Enter a username (for example admin) and a strong password. Store it in a password manager.

Step 5: Open ports safely

OpenLiteSpeed uses these ports out of the box:

  • 8088: the default HTTP listener for the example site.
  • 7080: the WebAdmin console, over HTTPS with a self-signed certificate.
  • 80 and 443: for your real sites, once you add listeners.

WebAdmin controls the whole server, so allow port 7080 from your own IP only. With UFW on Ubuntu:

Bash
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow from 198.51.100.20 to any port 7080 proto tcp
sudo ufw allow 8088/tcp

Replace 198.51.100.20 with your own public IP. You only need 8088 while you test; remove it later with sudo ufw delete allow 8088/tcp.

Warning: Make sure your SSH port is allowed before enabling UFW, or you can lock yourself out. If that happens, use the browser console in your VPS provider's control panel.

If your IP changes often, keep 7080 closed and reach WebAdmin through an SSH tunnel instead:

Bash
ssh -L 7080:127.0.0.1:7080 deploy@203.0.113.10

Then open https://localhost:7080 on your computer.

Check it works

  1. Open http://203.0.113.10:8088 in a browser. You should see the OpenLiteSpeed example page.
  2. Open https://203.0.113.10:7080, accept the self-signed certificate warning, and log in with the WebAdmin details you set.
  3. On the WebAdmin dashboard, confirm the server status shows Running.
  4. Check PHP: the example site includes a phpinfo.php page at http://203.0.113.10:8088/phpinfo.php. Delete it when you finish testing.

Troubleshooting

  • Page on 8088 does not load: the firewall blocks it, or lsws is stopped. Run sudo systemctl status lsws and sudo ufw status.
  • WebAdmin login says the password is wrong: run admpass.sh again to reset it.
  • Port 80 already in use when you add a listener: Apache or Nginx is still running. Find it with sudo ss -ltnp | grep ':80 ' and disable it.
  • PHP pages download or show 503: the LSPHP external app points at a version that is not installed. Fix the path in Server Configuration → External App.
  • Changes in WebAdmin have no effect: OpenLiteSpeed applies most changes only after a Graceful Restart from the top-right of WebAdmin.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.