Gitpod Self-Hosted
Cloud development environments from Git repositories.
Overview
Gitpod is an open-source developer platform that automates the provisioning of ready-to-code development environments. Originally developed by TypeFox and later spun off as an independent company, Gitpod eliminates the "works on my machine" problem by providing consistent, cloud-based development environments that spin up directly from Git repositories. The platform supports multiple IDEs including VS Code, IntelliJ, and Eclipse Theia, making it accessible to developers regardless of their preferred tooling.
This self-hosted Gitpod deployment combines four critical components to deliver a complete cloud development platform. MySQL serves as the primary database for storing workspace metadata, user sessions, and configuration data. MinIO provides S3-compatible object storage for workspace snapshots, prebuilds, and user uploads, while the Docker Registry handles container image storage for custom workspace images and cached layers. Together, these services enable Gitpod to manage the full lifecycle of ephemeral development environments.
This stack is ideal for organizations wanting complete control over their development infrastructure, companies with strict data residency requirements, or teams seeking to reduce cloud costs while maintaining the benefits of cloud-native development. Educational institutions, enterprise development teams, and open-source projects particularly benefit from this setup as it provides unlimited workspaces without per-seat licensing constraints while keeping sensitive code on-premises.
Key Features
- Ephemeral workspace creation from any Git repository with automatic dependency installation
- MinIO S3-compatible storage for workspace snapshots and incremental prebuilds
- MySQL-backed user management with OAuth integration for GitHub, GitLab, and Bitbucket
- Private Docker Registry for custom workspace images and cached development containers
- Workspace sharing capabilities with real-time collaboration features
- Automated prebuild system that prepares development environments before code changes
- Resource quotas and usage tracking for multi-tenant development environments
- Browser-based IDE access with support for VS Code extensions and terminal sessions
Common Use Cases
- 1Enterprise development teams requiring on-premises code execution with centralized environment management
- 2Educational institutions providing standardized programming environments for computer science courses
- 3Open-source projects offering contributors instant development environments without local setup
- 4Remote development teams needing consistent environments across different operating systems and hardware
- 5Companies with strict data governance requirements preventing cloud-based development platforms
- 6Development agencies managing multiple client projects with isolated, reproducible environments
- 7Organizations implementing secure code review processes with temporary workspace provisioning
Prerequisites
- Minimum 8GB RAM (4GB for Gitpod services, 2GB for MySQL, 2GB for MinIO operations)
- Valid domain name with DNS configuration pointing to your Docker host for HTTPS access
- Docker host with at least 50GB available storage for workspace data and container images
- SSL certificates configured for your domain (Let's Encrypt or commercial certificates)
- OAuth application credentials from your Git provider (GitHub, GitLab, or Bitbucket)
- Basic understanding of Gitpod workspace configuration and .gitpod.yml syntax
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 gitpod: 3 image: eu.gcr.io/gitpod-core-dev/build/installer:latest4 environment: 5 - GITPOD_DOMAIN=${GITPOD_DOMAIN}6 - GITPOD_PROTOCOL=https7 - DB_HOST=mysql8 - DB_PORT=33069 - DB_PASSWORD=${MYSQL_PASSWORD}10 volumes: 11 - gitpod-data:/var/gitpod12 - /var/run/docker.sock:/var/run/docker.sock13 ports: 14 - "443:443"15 - "80:80"16 depends_on: 17 - mysql18 - minio19 - registry20 networks: 21 - gitpod-network22 restart: unless-stopped2324 mysql: 25 image: mysql:8.026 environment: 27 - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}28 - MYSQL_DATABASE=gitpod29 - MYSQL_USER=gitpod30 - MYSQL_PASSWORD=${MYSQL_PASSWORD}31 volumes: 32 - mysql-data:/var/lib/mysql33 networks: 34 - gitpod-network35 restart: unless-stopped3637 minio: 38 image: minio/minio:latest39 command: server /data --console-address ":9001"40 environment: 41 - MINIO_ROOT_USER=${MINIO_ACCESS_KEY}42 - MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY}43 volumes: 44 - minio-data:/data45 networks: 46 - gitpod-network47 restart: unless-stopped4849 registry: 50 image: registry:251 volumes: 52 - registry-data:/var/lib/registry53 networks: 54 - gitpod-network55 restart: unless-stopped5657volumes: 58 gitpod-data: 59 mysql-data: 60 minio-data: 61 registry-data: 6263networks: 64 gitpod-network: 65 driver: bridge.env Template
.env
1# Gitpod2GITPOD_DOMAIN=gitpod.localhost3MYSQL_ROOT_PASSWORD=secure_root_password4MYSQL_PASSWORD=secure_mysql_password5MINIO_ACCESS_KEY=gitpod6MINIO_SECRET_KEY=secure_minio_secretUsage Notes
- 1Access via https://gitpod.localhost
- 2Configure OAuth with Git provider
- 3Prebuilds for faster startup
- 4Requires DNS configuration
- 5Kubernetes recommended for production
Individual Services(4 services)
Copy individual services to mix and match with your existing compose files.
gitpod
gitpod:
image: eu.gcr.io/gitpod-core-dev/build/installer:latest
environment:
- GITPOD_DOMAIN=${GITPOD_DOMAIN}
- GITPOD_PROTOCOL=https
- DB_HOST=mysql
- DB_PORT=3306
- DB_PASSWORD=${MYSQL_PASSWORD}
volumes:
- gitpod-data:/var/gitpod
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "443:443"
- "80:80"
depends_on:
- mysql
- minio
- registry
networks:
- gitpod-network
restart: unless-stopped
mysql
mysql:
image: mysql:8.0
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=gitpod
- MYSQL_USER=gitpod
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
volumes:
- mysql-data:/var/lib/mysql
networks:
- gitpod-network
restart: unless-stopped
minio
minio:
image: minio/minio:latest
command: server /data --console-address ":9001"
environment:
- MINIO_ROOT_USER=${MINIO_ACCESS_KEY}
- MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY}
volumes:
- minio-data:/data
networks:
- gitpod-network
restart: unless-stopped
registry
registry:
image: registry:2
volumes:
- registry-data:/var/lib/registry
networks:
- gitpod-network
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 gitpod:5 image: eu.gcr.io/gitpod-core-dev/build/installer:latest6 environment:7 - GITPOD_DOMAIN=${GITPOD_DOMAIN}8 - GITPOD_PROTOCOL=https9 - DB_HOST=mysql10 - DB_PORT=330611 - DB_PASSWORD=${MYSQL_PASSWORD}12 volumes:13 - gitpod-data:/var/gitpod14 - /var/run/docker.sock:/var/run/docker.sock15 ports:16 - "443:443"17 - "80:80"18 depends_on:19 - mysql20 - minio21 - registry22 networks:23 - gitpod-network24 restart: unless-stopped2526 mysql:27 image: mysql:8.028 environment:29 - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}30 - MYSQL_DATABASE=gitpod31 - MYSQL_USER=gitpod32 - MYSQL_PASSWORD=${MYSQL_PASSWORD}33 volumes:34 - mysql-data:/var/lib/mysql35 networks:36 - gitpod-network37 restart: unless-stopped3839 minio:40 image: minio/minio:latest41 command: server /data --console-address ":9001"42 environment:43 - MINIO_ROOT_USER=${MINIO_ACCESS_KEY}44 - MINIO_ROOT_PASSWORD=${MINIO_SECRET_KEY}45 volumes:46 - minio-data:/data47 networks:48 - gitpod-network49 restart: unless-stopped5051 registry:52 image: registry:253 volumes:54 - registry-data:/var/lib/registry55 networks:56 - gitpod-network57 restart: unless-stopped5859volumes:60 gitpod-data:61 mysql-data:62 minio-data:63 registry-data:6465networks:66 gitpod-network:67 driver: bridge68EOF6970# 2. Create the .env file71cat > .env << 'EOF'72# Gitpod73GITPOD_DOMAIN=gitpod.localhost74MYSQL_ROOT_PASSWORD=secure_root_password75MYSQL_PASSWORD=secure_mysql_password76MINIO_ACCESS_KEY=gitpod77MINIO_SECRET_KEY=secure_minio_secret78EOF7980# 3. Start the services81docker compose up -d8283# 4. View logs84docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/gitpod-complete/run | bashTroubleshooting
- Gitpod workspaces failing to start: Verify Docker daemon is accessible and has sufficient disk space for workspace containers
- OAuth login redirecting to localhost: Update GITPOD_DOMAIN environment variable to match your actual domain name
- MySQL connection refused errors: Ensure MySQL container is fully initialized before Gitpod startup using health checks
- MinIO storage errors during workspace snapshots: Check MINIO_ACCESS_KEY and MINIO_SECRET_KEY match Gitpod configuration
- Registry push/pull failures: Verify registry container has write permissions to registry-data volume mount
- Workspace creation timeout: Increase Docker daemon timeout settings and verify network connectivity between containers
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
gitpodmysqlminioregistry
Tags
#gitpod#cloud-dev#ide#workspace#remote-development
Category
Development ToolsAd Space
Shortcuts: C CopyF FavoriteD Download