Skip to main content

Linux Installation

OpenLiteSpeed runs on Linux. Everything — packages, logs, config, service control — assumes a Linux environment. This page gives you the exact commands to go from a fresh server to a running OpenLiteSpeed instance.

CLI-First Approach

All steps below are done entirely from the terminal. No GUI required. If you are in tmux, open a second pane with Ctrl+b % to keep this doc visible while you type commands.

What You Need Before Starting

  • A fresh or clean Linux server (Ubuntu 22.04/24.04 LTS, Debian 12, AlmaLinux 9, Rocky Linux 9)
  • Root or sudo access
  • Ports 80, 443, 7080 available (check with sudo ss -tlnp)
  • A hostname planned (even server.example.com is fine for now)
# Verify your OS before starting
cat /etc/os-release

# Check what is already using port 80 or 443
sudo ss -tlnp | grep -E ':80|:443|:7080'

Ubuntu / Debian Install

install-ubuntu.sh
# Step 1: Add the LiteSpeed package repository
wget -O - https://repo.litespeed.sh | sudo bash

# Step 2: Update and install OpenLiteSpeed + PHP
sudo apt update
sudo apt install -y openlitespeed lsphp84 lsphp84-common lsphp84-mysql lsphp84-curl lsphp84-json

# Step 3: Confirm the binary exists
ls -la /usr/local/lsws/bin/lshttpd
/usr/local/lsws/bin/lshttpd -v

# Step 4: Set the WebAdmin password (interactive)
sudo /usr/local/lsws/admin/misc/admpass.sh

# Step 5: Enable and start the service
sudo systemctl enable lsws
sudo systemctl start lsws
sudo systemctl status lsws

AlmaLinux / Rocky Linux / RHEL-Family Install

install-rhel.sh
# Step 1: Add the LiteSpeed repository
wget -O - https://repo.litespeed.sh | sudo bash

# Step 2: Install packages
sudo dnf update -y
sudo dnf install -y openlitespeed lsphp84 lsphp84-common lsphp84-mysqlnd lsphp84-curl

# Step 3: Confirm binary and set password
/usr/local/lsws/bin/lshttpd -v
sudo /usr/local/lsws/admin/misc/admpass.sh

# Step 4: Enable and start
sudo systemctl enable lsws
sudo systemctl start lsws

Post-Install Verification

Always verify a clean install before doing anything else. These checks take under 30 seconds.

# 1. Service is active
sudo systemctl status lsws

# 2. Main process is running
ps aux | grep lshttpd | grep -v grep

# 3. Listening on expected ports
sudo ss -tlnp | grep lshttpd

# 4. HTTP listener responds
curl -I http://localhost:8088

# 5. Check error log for startup issues
sudo tail -30 /usr/local/lsws/logs/error.log

# 6. lsphp binary is in place
ls /usr/local/lsws/lsphp84/bin/lsphp
/usr/local/lsws/lsphp84/bin/lsphp -v

Expected output for step 3:

LISTEN 0 511 0.0.0.0:8088 0.0.0.0:* users:(("lshttpd",pid=...,fd=...))
LISTEN 0 511 0.0.0.0:7080 0.0.0.0:* users:(("lshttpd",pid=...,fd=...))

Firewall Setup (UFW or firewalld)

warning

Port 7080 (WebAdmin) should never be open to the public internet. Lock it down immediately after install.

Ubuntu / Debian — UFW

# Allow web traffic
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

# Allow WebAdmin only from your IP (replace 1.2.3.4 with yours)
sudo ufw allow from 1.2.3.4 to any port 7080

# Enable UFW if not already active
sudo ufw enable
sudo ufw status numbered

AlmaLinux / Rocky — firewalld

# Allow web ports in default zone
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https

# Lock WebAdmin to specific source IP only
sudo firewall-cmd --permanent --add-rich-rule='rule family="ipv4" source address="1.2.3.4" port protocol="tcp" port="7080" accept'

# Reload and verify
sudo firewall-cmd --reload
sudo firewall-cmd --list-all

Quick Troubleshooting After Install

ProblemLikely CauseFix
Port 80 already in useApache or Nginx runningsudo systemctl stop apache2 nginx
lsws fails to startConfig error or port conflictsudo tail -50 /usr/local/lsws/logs/error.log
WebAdmin login failsPassword not set yetRe-run admpass.sh
PHP files download rawlsphp not installedapt install lsphp84 lsphp84-common
7080 unreachable remotelyFirewall blocking itOpen your firewall — but only from your IP

What's Next