This guide covers deploying the WLED Server using Docker.
- Single Container running both services:
- Rust backend on port 3010
- lighttpd serving static frontend on port 3011
- Volume Mounts: Configuration and data persist across container restarts
- Auto-restart: Container automatically restarts on crashes or reboots
- Pre-built Binaries: Container uses cross-compiled backend and pre-built frontend (no build tools in image)
- Docker and Docker Compose installed
- SSH access (for remote deployment)
- Sufficient storage for application and data
- Docker (for local testing)
- SSH access to target host configured (for remote deployment)
- rsync installed (for deployment scripts)
- Start the services:
docker-compose up -d --build- Create/Edit boards.toml:
cp data/boards.toml.example data/boards.toml
nano data/boards.tomlAdd your WLED boards:
[[boards]]
id = "board-1"
ip = "192.168.1.100"
[[groups]]
id = "all-boards"
members = ["board-1"]- Access the application:
- Frontend:
http://localhost:3011 - Backend API:
http://localhost:3010
For remote deployment, you'll need to create a deployment script that:
- Syncs project files to the target host
- Builds Docker images on the target
- Starts the containers
Example workflow:
# Sync files to remote host
rsync -avz --exclude 'target' --exclude 'node_modules' \
./ user@remote-host:/path/to/wled-server/
# SSH to host and deploy
ssh user@remote-host "cd /path/to/wled-server && docker-compose up -d --build"# All logs
docker-compose logs -f
# Backend only
docker-compose logs -f backend
# Frontend only
docker-compose logs -f frontenddocker-compose psdocker-compose restartdocker-compose downdocker-compose down
docker-compose up -d --builddocker exec -it wled-server bashnano data/boards.toml
docker-compose restartThe following directories are mounted as volumes:
./data: Configuration files (boards.toml)./audio: Uploaded audio files for programs./programs: Light program definitions./presets: Saved preset configurations
Edit docker-compose.yml to configure environment variables:
environment:
- RUST_LOG=info # Log level: debug, info, warn, error
- API_URL=http://localhost:3010 # Backend API URLDefault ports can be changed in docker-compose.yml:
ports:
- "3010:3010" # Backend API
- "3011:3011" # FrontendThe application will be accessible from:
- Same machine:
http://localhost:3011 - Local network:
http://[host-ip]:3011 - Mobile devices: Access via the host's IP address
The frontend automatically connects to the backend using the browser's hostname.
Check logs for errors:
docker-compose logsCheck what's using the port:
# Linux/macOS
sudo lsof -i :3010
sudo lsof -i :3011
# Windows
netstat -ano | findstr :3010
netstat -ano | findstr :3011Kill the process or change ports in docker-compose.yml.
Clear Docker cache and rebuild:
docker-compose down
docker system prune -a
docker-compose up -d --buildEnsure configuration files exist:
ls -la data/boards.tomlIf missing, copy from example:
cp data/boards.toml.example data/boards.tomlRestart after editing:
docker-compose restart- Verify network connectivity from container:
docker exec -it wled-server ping [wled-board-ip]- Check board configuration:
cat data/boards.toml- Check container logs for connection errors:
docker-compose logs -f backendTo update to a new version:
- Pull latest code (if using git):
git pull- Rebuild and restart:
docker-compose down
docker-compose up -d --buildFor remote deployments, run your deployment script to sync and rebuild.
Typical resource usage:
- RAM: 15-35MB total (Rust backend ~10-30MB, lighttpd ~5MB)
- CPU: <5% idle, 10-30% during active operations
- Disk: ~50MB base install + user data
This setup is designed for local network use. For public internet access, consider:
- Reverse Proxy: Use nginx or traefik for SSL termination
- HTTPS: Add SSL/TLS certificates
- Authentication: Implement an auth layer
- Firewall: Restrict access to trusted networks
- Updates: Keep Docker and system packages updated
Current CORS policy allows all origins (suitable for local network only).
For issues:
- Check container logs:
docker-compose logs -f - Verify network connectivity to WLED devices
- Review configuration files in
data/directory - Check Docker daemon status
- Create an issue in the repository