OpenLiteSpeed
High-performance, lightweight open-source HTTP server.
Overview
OpenLiteSpeed is a high-performance, open-source HTTP server developed by LiteSpeed Technologies as the community edition of their commercial LiteSpeed Web Server. Built with an event-driven architecture, OpenLiteSpeed excels at handling thousands of concurrent connections with minimal resource usage, making it particularly effective for dynamic content delivery and PHP applications. Unlike traditional web servers that use process-based or thread-based models, OpenLiteSpeed employs an asynchronous, non-blocking I/O model that significantly reduces memory overhead while maximizing throughput.
This Docker deployment creates a complete web server environment with OpenLiteSpeed's built-in PHP processing capabilities and administrative interface. The configuration includes persistent storage for web content and server data, ensuring your websites and configurations survive container restarts. OpenLiteSpeed's native support for Apache .htaccess rules means existing websites can be migrated without rewriting rewrite rules or access controls.
This setup is ideal for developers and system administrators who need a lightweight yet powerful alternative to Apache or Nginx, particularly when hosting PHP applications like WordPress, Drupal, or custom web applications. The included web-based administration panel simplifies server management tasks that typically require command-line expertise, making OpenLiteSpeed accessible to users who prefer graphical interfaces for server configuration and monitoring.
Key Features
- Event-driven architecture with asynchronous I/O handling up to 200,000+ concurrent connections
- Native LSCache engine with built-in object caching and ESI support for dynamic content acceleration
- Web-based administration console accessible on port 7080 for real-time server management
- Built-in PHP LSAPI for optimal PHP performance without requiring separate PHP-FPM processes
- Apache .htaccess compatibility allowing drop-in replacement without configuration changes
- Real-time statistics and monitoring with bandwidth throttling and connection limits
- Integrated ModSecurity WAF support for web application security protection
- HTTP/3 and QUIC protocol support for improved performance over unreliable networks
Common Use Cases
- 1High-traffic WordPress hosting requiring LSCache plugin integration for maximum performance
- 2Development environments for PHP applications needing Apache-compatible rewrite rules
- 3Small to medium business websites requiring reliable performance with minimal server resources
- 4Content delivery optimization for e-commerce sites with heavy dynamic content loads
- 5Migration from Apache servers while maintaining existing .htaccess configurations
- 6Educational environments teaching web server administration through graphical interfaces
- 7Staging servers for testing website performance under different server configurations
Prerequisites
- Docker Engine 20.10+ and Docker Compose V2 for container orchestration support
- Minimum 512MB RAM available for OpenLiteSpeed processes and caching operations
- Ports 80, 443, and 7080 available on the host system for HTTP, HTTPS, and admin access
- Basic understanding of web server concepts and virtual host configuration
- Knowledge of PHP application deployment if hosting dynamic websites
- SSL certificate files ready if enabling HTTPS for production websites
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 openlitespeed: 3 image: litespeedtech/openlitespeed:latest4 container_name: openlitespeed5 restart: unless-stopped6 environment: 7 TZ: UTC8 volumes: 9 - ./html:/var/www/vhosts/localhost/html10 - ols_data:/usr/local/lsws11 ports: 12 - "80:80"13 - "443:443"14 - "7080:7080"15 networks: 16 - ols-network1718volumes: 19 ols_data: 2021networks: 22 ols-network: 23 driver: bridge.env Template
.env
1TZ=UTCUsage Notes
- 1Docs: https://openlitespeed.org/kb/
- 2Admin panel at https://localhost:7080 (default: admin/123456)
- 3CHANGE DEFAULT PASSWORD immediately after first login
- 4LSCache plugin for WordPress - significant performance boost
- 5Event-driven architecture - handles many connections efficiently
- 6Compatible with Apache .htaccess rewrite rules
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 openlitespeed:5 image: litespeedtech/openlitespeed:latest6 container_name: openlitespeed7 restart: unless-stopped8 environment:9 TZ: UTC10 volumes:11 - ./html:/var/www/vhosts/localhost/html12 - ols_data:/usr/local/lsws13 ports:14 - "80:80"15 - "443:443"16 - "7080:7080"17 networks:18 - ols-network1920volumes:21 ols_data:2223networks:24 ols-network:25 driver: bridge26EOF2728# 2. Create the .env file29cat > .env << 'EOF'30TZ=UTC31EOF3233# 3. Start the services34docker compose up -d3536# 4. View logs37docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/openlitespeed/run | bashTroubleshooting
- Admin panel shows 'Connection refused' on port 7080: Ensure firewall allows traffic on port 7080 and container is fully started before accessing
- PHP scripts download instead of executing: Configure virtual host document root correctly and verify PHP is enabled for the specific virtual host
- High memory usage during traffic spikes: Adjust max connections and memory limits in server configuration through admin panel tuning section
- LSCache not working with WordPress: Install LSCache WordPress plugin and configure cache root directory to match OpenLiteSpeed cache settings
- .htaccess rules not working: Enable rewrite engine in virtual host settings and verify AllowOverride is set to appropriate level
- SSL certificate errors: Upload certificate files through admin panel SSL tab and restart gracefully to apply new certificates
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
openlitespeed
Tags
#openlitespeed#litespeed#performance#php#wordpress
Category
Web Servers & Reverse ProxiesAd Space
Shortcuts: C CopyF FavoriteD Download