Overview
Docker deployment allows you to:- Isolated environment - Run CCS Dashboard in a container with all dependencies
- Persistent configuration - Keep your config, credentials, and CLI tools across restarts
- Resource limits - Control memory and CPU usage for production deployments
- Easy deployment - Deploy to any system with Docker installed
- Pre-installed CLIs - claude, gemini, grok, opencode, and ccs ready to use
Architecture
Prerequisites
- Docker 20.10+ or Docker Desktop
- Docker Compose 2.0+ (optional, for compose setup)
- 1GB free disk space
- Ports 3000 and 8317 available
Quick Start (Docker Run)
Build the Image
Clone the CCS repository and build the Docker image:Build time: ~5-10 minutes (one-time operation).
Run the Container
Start the CCS Dashboard container:Note:
--restart unless-stopped ensures the container restarts on system reboot.Docker Compose Setup
For production deployments, use Docker Compose for easier management.Create .env File (Optional)
Create a
.env file in the docker/ directory to customize ports and configuration:Environment Variables
Common CCS environment variables supported in Docker:| Variable | Purpose | Default |
|---|---|---|
CCS_PORT | Dashboard HTTP port | 3000 |
CCS_DEBUG | Enable verbose logging | 0 |
NO_COLOR | Disable ANSI colors | 0 |
CCS_SKIP_PREFLIGHT | Skip API key validation | 0 |
CCS_WEBSEARCH_SKIP | Skip WebSearch integration | 0 |
CCS_PROXY_HOST | Remote proxy hostname | - |
CCS_PROXY_PORT | Remote proxy port | - |
CCS_PROXY_PROTOCOL | http or https | https |
CCS_PROXY_AUTH_TOKEN | Remote proxy auth token | - |
CCS_PROXY_TIMEOUT | Health check timeout (ms) | 2000 |
CCS_PROXY_FALLBACK_ENABLED | Enable local fallback | true |
CCS_ALLOW_SELF_SIGNED | Accept self-signed certs | false |
Persistent Storage
The container uses named volumes for persistent data:| Volume | Container Path | Purpose |
|---|---|---|
ccs_home | /home/node/.ccs | CCS config, credentials, profiles |
claude_home | /home/node/.claude | Claude sessions, logs, todolists |
opencode_home | /home/node/.opencode | OpenCode configuration |
grok_home | /home/node/.grok-cli | Grok CLI configuration |
ccs_home is required. Other volumes are optional (used if you run respective CLIs inside the container).
Backup Configuration
Resource Limits
For production deployments, limit container resources to prevent overconsumption.Docker Run
Docker Compose
Default limits are set indocker-compose.yml:
Healthcheck
The container includes a healthcheck that verifies:- Dashboard HTTP server (port 3000)
- CLIProxy API (port 8317)
Graceful Shutdown
CCS handlesSIGTERM gracefully. When stopping the container:
init: true in docker-compose.yml ensures proper signal forwarding to the Node.js process.
Using Pre-installed CLIs
The container includes pre-installed CLI tools for convenience.Execute Commands Inside Container
Configure Credentials
Each CLI has its own authentication method. Refer to their respective documentation:Troubleshooting
Permission Errors (EACCES)
If you see permission errors on startup:Port Already in Use
Container Keeps Restarting
Debug Mode
Enable verbose logging:docker-compose.yml:
Image Build Fails
Common issues: Network timeout during build:Security Best Practices
Secrets Management
For sensitive values likeCCS_PROXY_AUTH_TOKEN:
Option 1: .env file (not committed to git)
Network Security
-
Bind to localhost only - For development:
-
Use reverse proxy - For production (nginx, traefik):
Updates
Regularly rebuild the image to get security patches:Production Deployment
For production deployments, consider:- Use Docker Compose - Easier management and configuration
- Set resource limits - Prevent resource exhaustion
- Enable healthcheck - Auto-restart on failures
- Use .env file - Separate config from code
- Backup volumes - Regular backups of
ccs_home - Monitor logs - Centralized logging (ELK, Loki)
- Reverse proxy - nginx/traefik with TLS
- Secret management - Docker secrets or vault
