Skip to main content

OpenLiteSpeed Documentation

A comprehensive guide to installing, configuring, and operating OpenLiteSpeed — a high-performance, event-driven web server built for speed, low resource usage, and modern web workloads.

CLI-First Philosophy

This documentation is written for administrators who work in tmux, navigate with yazi, and build automation with bash. Every task is covered via the command line. You do not need the WebAdmin GUI for day-to-day operations. OpenAI-powered tools like opencode can be piped directly with log output and config files for AI-assisted debugging.


Learning Path

1. Foundations

Start here to understand the server model, filesystem layout, and admin workflow.

2. Core Workflows

Master the layers that make OpenLiteSpeed fast and efficient.

LayerModuleFocus
TunePerformance OptimizationCaching, compression, static delivery, and connection tuning
ExecutePHP IntegrationLSAPI, external apps, handlers, and PHP tuning
ProtectSecurityTLS, access control, ModSecurity, and DDoS protections
ObserveLogging and MonitoringLogs, statistics, and operational metrics

3. Edge & CDN Integration

Connect OpenLiteSpeed to Cloudflare for caching, security, and global delivery.

4. Advanced & Reference

Expert-level routing, containerization, automation, and troubleshooting.

5. Cheatsheets

Quick-reference cards for every OLS operation — designed for fast lookup in a tmux session.

CheatsheetWhat It Covers
CLI Quick ReferenceAll CLI commands — service, logs, PHP, diagnostics
Config File Syntaxhttpd_config.conf and vhconf.conf directives
Virtual Host SetupComplete vhost workflow CLI to live site
PHP & lsphp TuningOPcache, process limits, extensions, overrides
Security HardeningSSL, headers, IP rules, ModSecurity
Performance TuningHTTP/2, compression, caching, benchmarking
Troubleshooting MatrixErrors → root cause → exact fix
Automation & Bash ScriptsProduction scripts, cron, opencode workflows

OpenLiteSpeed at a Glance

Request Flow: What Happens When a Browser Hits Your Server

Tooling Matrix

ToolRoleBest For
OpenLiteSpeedWeb serverSelf-managed VPS, PHP hosting, WordPress
LiteSpeed EnterpriseWeb server (commercial)Shared hosting, enterprise support, advanced features
NginxWeb server / reverse proxyStatic serving, upstream proxying, microservices
ApacheWeb serverLegacy applications, .htaccess-heavy stacks
CloudflareCDN / Edge proxyEdge caching, DDoS, WAF, DNS management

Quick Start

first-setup.sh
# 1) Add the LiteSpeed repository
wget -O - https://repo.litespeed.sh | sudo bash

# 2) Install OpenLiteSpeed and PHP
sudo apt update
sudo apt install openlitespeed lsphp84 lsphp84-common lsphp84-mysql

# 3) Set the admin password
sudo /usr/local/lsws/admin/misc/admpass.sh

# 4) Start the service
sudo systemctl start lsws

# 5) Verify — open in your browser
# Default site: http://your-server-ip:8088
# WebAdmin panel: https://your-server-ip:7080
Prerequisites
  • Basic Linux administration (SSH, file permissions, package management)
  • Comfort with DNS, ports, and TLS terminology
  • Familiarity with PHP hosting helps but is not required

Success Criteria

By the end of this documentation, you will be able to:

  • Install and operate OpenLiteSpeed on Linux.
  • Build clean listener and virtual host layouts.
  • Tune caching, compression, and HTTP protocol settings.
  • Run PHP efficiently with lsphp through LSAPI.
  • Secure deployments with TLS, ModSecurity, and Cloudflare.
  • Set up Cloudflare SSL Full (Strict) with origin certificates.
  • Diagnose common server, permission, and SSL issues.