How to Install OpenLiteSpeed on a Linux VPS

OpenLiteSpeed is a high-performance, open-source web server known for excellent PHP performance (via LSPHP) and built-in HTTP/3 support, making it a popular alternative to Nginx and Apache, especially for WordPress hosting.

Prerequisites

  • Ubuntu 22.04/24.04 or Debian 11/12 VPS
  • Root or sudo access

Step 1 — Add the OpenLiteSpeed Repository

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

Step 2 — Install OpenLiteSpeed

sudo apt update
sudo apt install openlitespeed -y

Step 3 — Install LSPHP (LiteSpeed's PHP Implementation)

sudo apt install lsphp83 lsphp83-mysql lsphp83-common -y

Adjust the version number (e.g. lsphp82) based on which PHP release you need.

Step 4 — Set the Admin Password

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

Step 5 — Start OpenLiteSpeed

sudo systemctl enable lsws
sudo systemctl start lsws
sudo systemctl status lsws

Step 6 — Open the Required Ports

sudo ufw allow 7080/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

Step 7 — Access the Admin Console

https://YOUR_SERVER_IP:7080

Log in with the admin username and the password set in Step 4. Your browser will warn about the self-signed certificate — this is expected for the admin console.

Step 8 — Verify the Default Website

http://YOUR_SERVER_IP

Setting Up a Virtual Host

Virtual hosts in OpenLiteSpeed are managed through the WebAdmin Console under Virtual Hosts → Add, rather than editing text config files directly — a key workflow difference from Nginx/Apache.

OpenLiteSpeed vs Nginx vs Apache

FeatureOpenLiteSpeedNginxApache
PHP handlingBuilt-in LSPHP (very fast)Requires PHP-FPMmod_php or PHP-FPM
.htaccess supportYesNoYes
Admin interfaceWeb-based consoleConfig filesConfig files
HTTP/3Built-inRequires extra modulesRequires extra modules

Common Errors

Can't reach port 7080 — confirm the firewall rule and that lsws is running: sudo systemctl status lsws.

PHP files download instead of executing — confirm LSPHP is installed and correctly selected in the virtual host's PHP settings within the admin console.

Best Practices

  • Change the default admin console port and restrict it to trusted IPs if possible
  • Keep OpenLiteSpeed and LSPHP updated together
  • Use the WebAdmin Console rather than manually editing config files, to avoid syntax errors

FAQ

Is OpenLiteSpeed free?
Yes, unlike the commercial LiteSpeed Enterprise product, OpenLiteSpeed is free and open source.

Related Articles

  • How to Install Nginx on Ubuntu & Debian
  • How to Install PHP 8.4 on Ubuntu 24.04 VPS
  • How to Install Let's Encrypt SSL with Certbot (Nginx & Apache)
  • openlitespeed, litespeed, lsphp, web server
  • 0 أعضاء وجدوا هذه المقالة مفيدة
هل كانت المقالة مفيدة ؟

مقالات مشابهة

How to Install Nginx on Ubuntu & Debian (Complete Guide)

Nginx is one of the world's most widely used web servers, known for its speed, low resource...

How to Install Apache on Ubuntu & Debian (Complete Guide)

Apache HTTP Server is one of the most widely used web servers, valued for its stability, flexible...

Nginx Virtual Hosts (Server Blocks): Hosting Multiple Websites on One VPS

Nginx "server blocks" (the equivalent of Apache's virtual hosts) let you host multiple...

Apache Virtual Hosts: Hosting Multiple Websites on One VPS

Apache Virtual Hosts allow a single server to host multiple independent websites, each identified...

How to Configure Nginx as a Reverse Proxy for Node.js/Docker Apps

A reverse proxy sits in front of your application, handling incoming traffic on standard ports...