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:
sudo apt update && sudo apt upgrade -y
wget -O - https://repo.litespeed.sh | sudo bashIf 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
sudo apt install openlitespeedThe server installs to /usr/local/lsws. Key paths:
/usr/local/lsws/conf/httpd_config.conffor 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:
sudo systemctl enable --now lsws
sudo systemctl status lsws --no-pagerStep 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:
apt-cache search lsphp | grep -E '^lsphp[0-9]+ 'Install a version with the extensions most sites need (PHP 8.3 shown):
sudo apt install lsphp83 lsphp83-common lsphp83-mysql lsphp83-curl lsphp83-intl lsphp83-imagickRun 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:
sudo /usr/local/lsws/admin/misc/admpass.shEnter 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:
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/tcpReplace 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:
ssh -L 7080:127.0.0.1:7080 deploy@203.0.113.10Then open https://localhost:7080 on your computer.
Check it works
- Open
http://203.0.113.10:8088in a browser. You should see the OpenLiteSpeed example page. - Open
https://203.0.113.10:7080, accept the self-signed certificate warning, and log in with the WebAdmin details you set. - On the WebAdmin dashboard, confirm the server status shows Running.
- Check PHP: the example site includes a
phpinfo.phppage athttp://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
lswsis stopped. Runsudo systemctl status lswsandsudo ufw status. - WebAdmin login says the password is wrong: run
admpass.shagain 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
- Host your own domains: Add virtual hosts and domains in OpenLiteSpeed.
- Add HTTPS: Add Let's Encrypt SSL to OpenLiteSpeed.
- Run WordPress with page caching: Install WordPress on OpenLiteSpeed with LSCache.
