✅ Official Docker Image Available
OpenLiteSpeed has an official Docker image maintained by LiteSpeed Technologies:
litespeedtech/openlitespeed(500K+ pulls).
OpenLiteSpeed is a high-performance web server with native HTTP/3 (QUIC) support. The official Docker image provides an easy way to deploy OpenLiteSpeed with WordPress, PHP, MariaDB, and more.
| Field | Value |
|---|---|
| Image | litespeedtech/openlitespeed |
| Maintainer | LiteSpeed Technologies |
| Pulls | 500K+ |
| Stars | 108+ |
| Base | Ubuntu 24.04 |
| Size | ~283 MB |
| HTTP/3 | ✅ Supported |
LiteSpeed Technologies provides an official Docker Compose setup.
git clone https://github.com/litespeedtech/ols-docker-env.git
cd ols-docker-env
# Start in foreground
docker compose up
# Or start in background
docker compose up -d
bash bin/webadmin.sh my_secure_password
| Service | URL | Credentials |
|---|---|---|
| Admin Console | https://localhost:7080 | admin / your_password |
| Test Page | http://localhost:8088 | - |
| phpMyAdmin | http://localhost:8089 | root / (check .env) |
mkdir -p /opt/openlitespeed
cd /opt/openlitespeed
# docker-compose.yml
services:
openlitespeed:
image: litespeedtech/openlitespeed:latest
container_name: openlitespeed
ports:
- "80:80"
- "443:443"
- "7080:7080" # Admin console
- "8088:8088" # Test page
volumes:
- ./conf:/usr/local/lsws/conf
- ./vhosts:/usr/local/lsws/conf/vhosts
- ./logs:/usr/local/lsws/logs
- ./www:/var/www/html
environment:
- TZ=UTC
restart: unless-stopped
networks:
- ols-network
networks:
ols-network:
driver: bridge
docker compose up -d
docker exec -it openlitespeed bash /usr/local/lsws/admin/misc/admpass.sh
OpenLiteSpeed includes a ready-to-use WordPress image.
# docker-compose.yml
services:
openlitespeed-wp:
image: litespeedtech/openlitespeed:wordpress
container_name: openlitespeed-wordpress
ports:
- "80:80"
- "443:443"
- "7080:7080"
volumes:
- ./wordpress:/var/www/html
- ./conf:/usr/local/lsws/conf
environment:
- WORDPRESS_DB_HOST=mariadb
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
- WORDPRESS_DB_NAME=wordpress
depends_on:
- mariadb
restart: unless-stopped
mariadb:
image: mariadb:10.5
container_name: ols-mariadb
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress
volumes:
- ./mariadb-data:/var/lib/mysql
restart: unless-stopped
docker compose up -d
Access WordPress at http://localhost and complete the installation.
The official repository includes helpful management scripts:
| Script | Purpose |
|---|---|
bash bin/webadmin.sh <password> |
Set admin password |
bash bin/demosite.sh |
Start demo site |
bash bin/domain.sh -A example.com |
Add domain/virtual host |
bash bin/domain.sh -D example.com |
Delete domain |
bash bin/database.sh -D example.com |
Create database |
./bin/appinstall.sh -A wordpress -D example.com |
Install WordPress |
bash bin/webadmin.sh -U |
Upgrade web server |
bash bin/webadmin.sh -M enable |
Enable OWASP mod_security |
Virtual host configurations are stored in:
./conf/vhosts/
Use Let’s Encrypt via admin console or mount certificates:
volumes:
- ./ssl/example.com.crt:/etc/ssl/certs/example.com.crt:ro
- ./ssl/example.com.key:/etc/ssl/private/example.com.key:ro
LSAPI PHP is included in the image. Configure via admin console:
docker compose logs -f openlitespeed
docker compose restart
docker compose down
docker compose pull
docker compose up -d
# Access shell
docker exec -it openlitespeed bash
# Check version
docker exec openlitespeed /usr/local/lsws/bin/lswsctrl -v
# Reload configuration
docker exec openlitespeed /usr/local/lsws/bin/lswsctrl reload
Change Admin Password Immediately
docker exec -it openlitespeed bash /usr/local/lsws/admin/misc/admpass.sh
Restrict Admin Console Access
ports:
- "127.0.0.1:7080:7080" # Localhost only
Use TLS/SSL
Enable mod_security
bash bin/webadmin.sh -M enable
Use Read-Only Root Filesystem
security_opt:
- no-new-privileges:true
Network Isolation
networks:
- ols-internal
See OpenLiteSpeed Security and OpenLiteSpeed Hardening for additional guidance.
| Issue | Solution |
|---|---|
| Cannot access admin console | Check port 7080 is open, use HTTPS |
| Container exits immediately | Check logs: docker compose logs openlitespeed |
| PHP not working | Verify LSAPI PHP handler configuration |
| SSL certificate errors | Use Let’s Encrypt via admin console |
| Permission denied | Ensure correct volume ownership |
Deploying OpenLiteSpeed in containers for production? Our consulting covers:
Get expert help: office@linux-server-admin.com | Contact Page