To create LiteSpeed on a Linux server, choose OpenLiteSpeed (free) or LiteSpeed Enterprise (commercial), install via the official repository or one-line installer, open required firewall ports (80, 443, 7080), set the WebAdmin password, configure a virtual host, add PHP (lsphp), enable HTTPS, and tune caching with LiteSpeed Cache for maximum speed.
In this guide, I’ll show you how to create LiteSpeed on a Linux server step by step, whether you prefer OpenLiteSpeed (OLS) or LiteSpeed Web Server Enterprise (LSWS). We’ll cover installation on Ubuntu/Debian and RHEL-based distros, security, HTTPS, WordPress optimization, performance tuning, and troubleshooting—all in beginner-friendly language.
What is LiteSpeed and Which Edition Should You Use?
LiteSpeed Web Server is a high‑performance, event‑driven web server with built‑in HTTP/3 (QUIC), advanced caching, and Apache compatibility. There are two editions:
OpenLiteSpeed (Free) vs LiteSpeed Enterprise (Paid)
- OpenLiteSpeed (OLS): Free, blazing fast, ideal for standalone sites. Not fully .htaccess compatible; rewrite rules are applied at vHost level.
- LiteSpeed Enterprise (LSWS): Drop‑in replacement for Apache, reads httpd.conf/.htaccess, integrates tightly with cPanel/WHM, Plesk, and DirectAdmin; supports advanced enterprise features and support.
- Use OLS for single VPS setups and budget projects.
- Use LSWS Enterprise for cPanel servers, multi‑tenant hosting, or when you need direct Apache compatibility.
Prerequisites
- Fresh Linux server (Ubuntu 20.04/22.04/24.04, Debian 11/12, AlmaLinux/Rocky/CloudLinux 8/9, CentOS Stream).
- Root or sudo access.
- A domain pointed to your server’s public IP (A/AAAA records).
- Firewall access to ports 80 (HTTP), 443 (HTTPS), 7080 (WebAdmin), and optionally 8088 (OLS default test site) and UDP/443 for HTTP/3.
- Updated packages: run your distro’s update before installation.
# Ubuntu/Debian
sudo apt update && sudo apt -y upgrade
# RHEL/AlmaLinux/Rocky
sudo dnf -y update
Option A: Install OpenLiteSpeed (Free)
Ubuntu/Debian
# Add LiteSpeed repo and install OpenLiteSpeed
wget -O - https://repo.litespeed.sh | sudo bash
sudo apt install -y openlitespeed
# Install PHP (choose one version; 81/82/83 available)
sudo apt install -y lsphp83 lsphp83-common lsphp83-mysql lsphp83-curl lsphp83-zip lsphp83-opcache
# Point lsphp symlink to chosen version
sudo ln -sf /usr/local/lsws/lsphp83/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp
# Set WebAdmin password
sudo /usr/local/lsws/admin/misc/admpass.sh
# Start & enable service
sudo systemctl enable --now lsws
RHEL/AlmaLinux/Rocky
# Add LiteSpeed repo and install OLS + PHP
wget -O - https://repo.litespeed.sh | sudo bash
sudo dnf install -y openlitespeed lsphp83 lsphp83-common lsphp83-mysql lsphp83-curl lsphp83-zip lsphp83-opcache
sudo ln -sf /usr/local/lsws/lsphp83/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp
sudo /usr/local/lsws/admin/misc/admpass.sh
sudo systemctl enable --now lsws
By default, OpenLiteSpeed serves a test page on port 8088 and the WebAdmin panel on 7080.
Option B: Install LiteSpeed Web Server Enterprise (Paid/Trial)
LSWS Enterprise offers a 15‑day trial and reads Apache configs, making migration painless. Use the official one‑line installer:
bash <( curl -sk https://get.litespeed.org/lsws )
The installer guides you through license (trial or key), admin credentials, and port selection. On cPanel/WHM servers, use the LiteSpeed WHM plugin to switch from Apache to LSWS in minutes.
Open Firewall Ports and SELinux Rules
UFW (Ubuntu/Debian)
sudo ufw allow 80,443/tcp
sudo ufw allow 7080/tcp
sudo ufw allow 8088/tcp # OLS test site (optional)
sudo ufw allow 443/udp # HTTP/3 QUIC
sudo ufw reload
firewalld (RHEL/AlmaLinux/Rocky)
sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-port=7080/tcp
sudo firewall-cmd --permanent --add-port=8088/tcp
sudo firewall-cmd --permanent --add-port=443/udp
sudo firewall-cmd --reload
If SELinux is enforcing, allow web connections and set writable paths (for caches/uploads) as needed:
sudo setsebool -P httpd_can_network_connect 1
sudo chcon -R -t httpd_sys_rw_content_t /path/to/your/site
Access WebAdmin and Create a Virtual Host
Open your browser:
- OpenLiteSpeed WebAdmin: https://your-server-ip:7080
- LiteSpeed Enterprise WebAdmin: https://your-server-ip:7080
Log in with the admin credentials you set. Then:
- Create a Listener for ports 80/443 (with your IP or ANY).
- Create a Virtual Host for your domain (document root like /var/www/example.com/public).
- Map the domain to the vHost via a Listener > Virtual Host Mapping.
- For OLS, add rewrite rules at the vHost level (not .htaccess).
Enable HTTPS (Let’s Encrypt)
OpenLiteSpeed Built‑in ACME
OLS provides a helper script to issue Let’s Encrypt certificates fast:
sudo /usr/local/lsws/admin/misc/letsencrypt.sh -d example.com -d www.example.com
Assign the generated cert and key in your 443 Listener or vHost SSL tab, then restart LSWS.
Certbot (Generic)
# Webroot method (replace paths/domains)
sudo certbot certonly --webroot -w /var/www/example.com/public -d example.com -d www.example.com
# Point LSWS/OLS SSL fields to:
# /etc/letsencrypt/live/example.com/fullchain.pem
# /etc/letsencrypt/live/example.com/privkey.pem
sudo systemctl restart lsws
Add an HTTP→HTTPS redirect either in Listener > Rewrite or in your vHost rewrite rules.
Install PHP and WordPress (Best‑Practice Path)
Create Database and User
# MySQL/MariaDB secure install (if not done)
sudo mysql_secure_installation
# Create DB/user
mysql -u root -p -e "CREATE DATABASE wpdb DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
mysql -u root -p -e "CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'StrongPass!';"
mysql -u root -p -e "GRANT ALL PRIVILEGES ON wpdb.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES;"
Download and Configure WordPress
sudo mkdir -p /var/www/example.com/public
cd /var/www/example.com/public
sudo wget https://wordpress.org/latest.tar.gz
sudo tar -xzf latest.tar.gz --strip-components=1
sudo chown -R nobody:nogroup /var/www/example.com # OLS default user (or lsadm)
sudo find /var/www/example.com -type d -exec chmod 755 {} \;
sudo find /var/www/example.com -type f -exec chmod 644 {} \;
Visit https://example.com to finish the WordPress setup wizard.
Enable LiteSpeed Cache for WordPress
- Install the “LiteSpeed Cache” plugin in WordPress.
- In LSWS/OLS WebAdmin, enable server/vHost cache and set a cache root.
- Set Object Cache (Redis/Memcached) in the plugin for dynamic sites.
- Connect QUIC.cloud CDN for image optimization, critical CSS, and global caching.
Performance Tuning Checklist
- Enable HTTP/3 (QUIC): open UDP/443 and toggle QUIC in Listener/Server settings.
- Compression: enable Brotli (if available) or Gzip for text assets.
- TLS 1.3: ensure TLS 1.3 is enabled for faster handshakes.
- PHP Opcache: ensure lsphp opcache is enabled and tuned (memory, revalidate_freq).
- Keep‑Alive: use Smart Keep‑Alive; tune connection/worker limits based on RAM.
- Caching rules: respect WooCommerce/Carts/Logged-in exemptions in LSCache.
- Image/WebP and CDN: use QUIC.cloud or a CDN for global delivery.
- Benchmarks: use wrk, ab, or k6; monitor with top/htop and LSWS Real‑Time Stats.
Security Hardening
- Change WebAdmin defaults: strong admin password, restrict 7080 to your IP, or move the port.
- Auto‑update: keep LSWS/OLS, PHP, WordPress, and plugins updated.
- ModSecurity (Enterprise/OLS): enable ModSecurity with the OWASP Core Rule Set.
- File permissions: minimal write access; separate system users per site on multi‑tenant servers.
- Backups: automate daily off‑server backups and test restores.
Migrating from Apache or Nginx
Apache → LiteSpeed Enterprise (Easiest)
- LSWS Enterprise reads Apache configs and .htaccess files directly.
- On cPanel/WHM servers, install the LiteSpeed plugin and switch with one click.
- Roll back to Apache anytime if needed (safe testing path).
Nginx/Apache → OpenLiteSpeed
- Port rewrite rules into vHost context (OLS ignores .htaccess at runtime).
- Recreate server blocks/listeners and SSL bindings in WebAdmin.
- Test redirects, pretty permalinks, and cache behavior before going live.
Troubleshooting and Logs
- Service status:
sudo systemctl status lsws, restart withsudo systemctl restart lsws. - Logs (default):
/usr/local/lsws/logs/error.log,access.log, and per‑vHost logs if configured. - WebAdmin won’t open: check port 7080 firewall and rerun
admpass.sh. - SSL errors: verify fullchain/key paths and permissions; reload LSWS.
- High CPU: inspect Real‑Time Stats, disable abusive bots, tune cache and PHP workers.
Real‑World Tips from Production
- Size your server for PHP concurrency, not just CPU clocks; LSCache reduces PHP hits drastically.
- Use Redis for object caching on dynamic WordPress and WooCommerce.
- Enable ESI in LiteSpeed Cache for personalized fragments (carts, account menus).
- Schedule image optimization and Critical CSS generation during low traffic windows.
- Monitor QUIC adoption in logs; it can significantly reduce TTFB on mobile networks.
When to Choose Managed LiteSpeed Hosting
If you’d rather avoid the sysadmin work, a managed LiteSpeed stack can save hours. At YouStable, our LiteSpeed‑optimized VPS and WordPress plans come pre‑tuned with HTTP/3, LSCache, Redis, and real‑time monitoring—plus hands‑on support for migrations and performance tuning. It’s the fastest path to a production‑ready LiteSpeed environment.
Command Quick Reference
# Install OLS + PHP (all distros)
wget -O - https://repo.litespeed.sh | sudo bash
sudo apt install -y openlitespeed lsphp83 lsphp83-mysql || sudo dnf install -y openlitespeed lsphp83 lsphp83-mysql
sudo ln -sf /usr/local/lsws/lsphp83/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp
sudo /usr/local/lsws/admin/misc/admpass.sh
sudo systemctl enable --now lsws
# Install LSWS Enterprise
bash <( curl -sk https://get.litespeed.org/lsws )
# WebAdmin
https://SERVER_IP:7080
# Logs
tail -f /usr/local/lsws/logs/error.log
FAQ’s
Is OpenLiteSpeed fast enough for WooCommerce?
Yes. With LiteSpeed Cache (ESI enabled), Redis object caching, and HTTP/3, OLS handles WooCommerce very well. For cPanel environments or heavy multi‑tenant workloads, LSWS Enterprise offers better compatibility and management.
Can I replace Apache with LiteSpeed without breaking .htaccess?
Use LiteSpeed Enterprise for a drop‑in Apache replacement; it respects .htaccess and httpd.conf. OpenLiteSpeed does not process .htaccess at runtime—you must move rewrite rules to the vHost.
Which PHP version should I install with LiteSpeed?
Use the latest supported version for your apps (PHP 8.2/8.3 at the time of writing). Install the matching lsphp packages and enable Opcache for best performance and security.
How do I enable HTTP/3 (QUIC) on LiteSpeed?
In WebAdmin, enable QUIC under Server/Listener SSL settings and open UDP/443 in your firewall. Most modern browsers will automatically use HTTP/3 when available.
What’s the easiest way to get HTTPS on OpenLiteSpeed?
Run the included Let’s Encrypt helper script, then assign the certificate in your 443 Listener or vHost and restart LSWS. Alternatively, use Certbot with the webroot method.
Conclusion
That’s how to create LiteSpeed on a Linux server the right way—from installation to HTTPS, caching, and hardening. Whether you choose OpenLiteSpeed or Enterprise, you’ll gain lower TTFB, better concurrency, and a simpler path to high Core Web Vitals. Need it done for you? YouStable’s LiteSpeed‑ready hosting can get you live in minutes.