Skip to main content
Ctrlplane is self-hosted and can be deployed on your infrastructure. This guide covers production-ready deployment options for platform teams.

Deployment Options

Self-Hosted Options

Choose the deployment method that best fits your infrastructure:

Docker Compose (Development & Testing)

Best for: Local development, testing, small teams Prerequisites:
  • Docker Engine 20.10+
  • Docker Compose v2.0+
  • 2GB RAM minimum
Quick Start:
  1. Clone the repository:
  1. Copy environment files:
  1. Start services:
  1. Run database migrations:
  1. Access Ctrlplane:
Services Started:
  • Web UI (port 3000)
  • API Server (port 4000)
  • Workspace Engine (port 50051)
  • PostgreSQL (port 5432)
  • Redis (optional, for job queue)
Configuration: Key environment variables in .env:
Updating:

Kubernetes (Production)

Best for: Production deployments, high availability Prerequisites:
  • Kubernetes cluster 1.24+
  • kubectl configured
  • Helm 3.8+
  • PostgreSQL database (managed or in-cluster)
Installation with Helm:
  1. Add the Ctrlplane Helm repository:
  1. Create a namespace:
  1. Create a values file values.yaml:
  1. Create secrets:
  1. Install the chart:
  1. Run database migrations:
  1. Verify installation:
Accessing Ctrlplane: If you configured ingress:
If using port-forward for testing:
Updating:

Manual Installation

For custom deployments, you can run each component separately. Components:
  1. PostgreSQL Database (required)
    • Version: 14+
    • Extensions: uuid-ossp, pgcrypto
  2. API Server
  3. Workspace Engine
  4. Web UI
  5. Run Migrations

Configuration

Environment Variables

API Server

Workspace Engine

Web UI

Database Setup

Create Database:
Enable Extensions:
Run Migrations:

Authentication Setup

GitHub OAuth

  1. Create a GitHub OAuth App:
    • Go to GitHub Settings → Developer settings → OAuth Apps
    • New OAuth App
    • Homepage URL: https://ctrlplane.example.com
    • Callback URL: https://ctrlplane.example.com/api/auth/callback/github
  2. Configure environment variables:

API Keys

API keys are used for programmatic access (CI/CD integration). Generate salt for API keys:
Set in environment:
Users can generate API keys in the UI under Settings → API Keys.

Resource Requirements

Minimum (Development/Testing)

  • CPU: 2 cores
  • RAM: 4GB
  • Disk: 20GB
  • Database: Shared PostgreSQL
  • CPU: 4-8 cores
  • RAM: 8-16GB
  • Disk: 50GB SSD
  • Database: Managed PostgreSQL (2 vCPU, 8GB RAM)

Scaling (Large Production)

  • API Server: 2-4 replicas (2 vCPU, 2GB RAM each)
  • Workspace Engine: 2-4 replicas (2 vCPU, 4GB RAM each)
  • Web UI: 2+ replicas (1 vCPU, 1GB RAM each)
  • Database: Managed PostgreSQL (4+ vCPU, 16+ GB RAM)
  • Redis: Managed Redis (optional, for job queue)

High Availability

For production deployments:
  1. Multiple Replicas: Run 2+ replicas of each service
  2. Managed Database: Use managed PostgreSQL with automated backups
  3. Load Balancing: Use Kubernetes service or external load balancer
  4. Health Checks: Configure liveness and readiness probes
  5. Monitoring: Set up observability with metrics and logs
  6. Backups: Regular database backups

Upgrades

Before Upgrading

  1. Backup Database: Always backup before upgrading
  2. Check Release Notes: Review breaking changes
  3. Test in Staging: Test upgrade in non-production environment

Upgrade Process

Docker Compose:
Kubernetes:

Rollback

Docker Compose:
Kubernetes:

Troubleshooting

Cannot connect to database

  • Verify DATABASE_URL is correct
  • Check database is running and accessible
  • Verify credentials and database exists

Migrations fail

  • Ensure database user has proper permissions
  • Check for schema conflicts
  • Review migration logs

Services won’t start

  • Check logs: docker compose logs or kubectl logs
  • Verify all environment variables are set
  • Ensure ports are not already in use

Authentication not working

  • Verify AUTH_SECRET is set and consistent across services
  • Check OAuth configuration if using GitHub
  • Review callback URLs match your domain

Next Steps