Docker Setup
This guide covers deploying MCPHub using Docker, including development and production configurations.Quick Start with Docker
Using Pre-built Image
Building from Source
Building with Extended Features
The Docker image supports anINSTALL_EXT build argument to include additional tools:
What’s included with INSTALL_EXT=true:
- Docker Engine: Full Docker daemon with CLI for container management. The daemon auto-starts when the container runs in privileged mode.
- Chrome/Playwright (amd64 only): For browser automation tasks
Docker Compose Setup
Basic Configuration
Create adocker-compose.yml file:
Production Configuration with Nginx
Environment Variables
Create a.env file for Docker Compose:
Development Setup
Development Docker Compose
Createdocker-compose.dev.yml:
Development Dockerfile
CreateDockerfile.dev:
Running the Application
Development Mode
Production Mode
Configuration Management
MCP Settings Volume Mount
Create yourmcp_settings.json:
Secrets Management
For production, use Docker secrets:Data Persistence
Database Backups
Add backup service to yourdocker-compose.yml:
scripts/backup.sh:
Monitoring and Health Checks
Health Check Endpoint
Add to your application:Docker Health Checks
Monitoring with Watchtower
Add automatic updates:Troubleshooting
Common Issues
Container fails to start: Check logs withdocker-compose logs mcphub
Database connection errors: Ensure PostgreSQL is healthy and accessible
Port conflicts: Check if ports 3000/5432 are already in use
Volume mount issues: Verify file paths and permissions