VPS (Generic)
This guide works on any Linux VPS with Docker installed. Tested on Ubuntu 22.04+ and Debian 12+.
Prerequisites
Section titled “Prerequisites”- A VPS with at least 1 GB RAM and Docker installed
- A domain pointing to your VPS IP (optional but recommended for TLS)
- SSH access
1. Install Docker
Section titled “1. Install Docker”curl -fsSL https://get.docker.com | shsudo usermod -aG docker $USER# Log out and back in, then verify:docker --version2. Run WCP
Section titled “2. Run WCP”docker run -d \ --name wcp \ --restart unless-stopped \ -p 8000:8000 \ -v wcp_data:/data \ -e WCP_DB_PATH=/data/sync.db \ -e WCP_CONFIG_PATH=/data/config.json \ -e WCP_CORS_ORIGINS=https://your-dashboard.example.com \ ghcr.io/lucasmella-stack/wcp:latestVerify it’s running:
curl http://localhost:8000/health# {"status":"ok","version":"0.1.0"}3. Add TLS with Caddy (Recommended)
Section titled “3. Add TLS with Caddy (Recommended)”Caddy provides automatic HTTPS with zero configuration.
# Install Caddysudo apt install -y debian-keyring debian-archive-keyring apt-transport-httpscurl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpgcurl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.listsudo apt update && sudo apt install caddyCreate /etc/caddy/Caddyfile:
wcp.yourdomain.com { reverse_proxy localhost:8000}
dashboard.yourdomain.com { root * /var/www/wcp-dashboard file_server try_files {path} /index.html}sudo systemctl reload caddyCaddy automatically provisions Let’s Encrypt certificates.
4. Deploy the Dashboard
Section titled “4. Deploy the Dashboard”# On your local machine, build the dashboardcd dashboardVITE_API_URL=https://wcp.yourdomain.com npm run build
# Upload to the VPSscp -r dist/* user@your-vps:/var/www/wcp-dashboard/5. Firewall
Section titled “5. Firewall”sudo ufw allow 80/tcpsudo ufw allow 443/tcpsudo ufw allow 22/tcpsudo ufw enable6. Updates
Section titled “6. Updates”docker pull ghcr.io/lucasmella-stack/wcp:latestdocker stop wcp && docker rm wcp# Re-run the docker run command from step 2Or use Watchtower for automatic updates:
docker run -d --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ containrrr/watchtower --interval 3600 wcpAlternative: Docker Compose
Section titled “Alternative: Docker Compose”Create docker-compose.yml:
services: wcp: image: ghcr.io/lucasmella-stack/wcp:latest restart: unless-stopped ports: - "8000:8000" volumes: - wcp_data:/data environment: - WCP_DB_PATH=/data/sync.db - WCP_CONFIG_PATH=/data/config.json - WCP_CORS_ORIGINS=https://your-dashboard.example.com
volumes: wcp_data:docker compose up -d