Prerequisites
- Docker Engine 20+ and Compose 2+, or a Kubernetes 1.24+ cluster
- PostgreSQL 14+ (Compose automatically provisions PostgreSQL 15)
NEXTAUTH_SECRET,ENCRYPTION_KEY, andAPI_KEY_SECRETconfigured before first start- A stable HTTPS reverse proxy in production (for auth callbacks and webhook ingestion)
Generating...
Generating...
Generating...
Docker Compose (Recommended Starter)
Clone the repository, copy env.example to .env, inject your generated secrets, and launch the stack:
compose
git clone https://github.com/opsknight-labs/OpsKnight.git cd OpsKnight cp env.example .env # Set NEXTAUTH_SECRET, ENCRYPTION_KEY, and API_KEY_SECRET in .env docker compose -f deploy/compose/docker-compose.yml up -d
Then navigate to http://localhost:3000/setup to initialize the primary administrator account.
Docker Swarm (Multi-Node HA)
Native multi-node Swarm deployment with automated Raft-encrypted secrets, rolling zero-downtime updates, and isolated worker lanes:
swarm
git clone https://github.com/opsknight-labs/OpsKnight.git cd OpsKnight/deploy/swarm # Initialize Docker Swarm (if not already active) docker swarm init # Deploy multi-node HA cluster with automatic Raft secrets & validation ./scripts/deploy.sh
Split Production Runtime (v2.0)
For high-throughput installations, OpsKnight separates Web, Scheduler, General Worker, Critical Worker, Bulk Worker, and Status Projector into independently scalable containers:
split-compose
cp env.example .env # Set NEXTAUTH_SECRET, ENCRYPTION_KEY, and API_KEY_SECRET in .env export OPSKNIGHT_IMAGE="ghcr.io/opsknight-labs/opsknight:2.0.0" # Deploy 6 dedicated split roles + migration runner docker compose \ -f deploy/compose/docker-compose.yml \ -f deploy/compose/docker-compose.split.yml \ up -d
Kubernetes (Helm Chart)
For versioned, repeatable Kubernetes deployments with Horizontal Pod Autoscaling (HPA), Ingress TLS, and Enterprise HA:
helm
# 1. Create namespace & production secrets kubectl create namespace opsknight kubectl -n opsknight create secret generic opsknight-secrets \ --from-literal=DATABASE_URL='postgresql://opsknight:<password>@postgres:5432/opsknight?sslmode=require&connection_limit=20' \ --from-literal=DIRECT_DATABASE_URL='postgresql://opsknight:<password>@postgres:5432/opsknight?sslmode=require&connection_limit=5' \ --from-literal=NEXTAUTH_SECRET="$(openssl rand -base64 32)" \ --from-literal=ENCRYPTION_KEY="$(openssl rand -hex 32)" \ --from-literal=API_KEY_SECRET="$(openssl rand -base64 32)" # 2. Deploy OpsKnight Helm Chart with Enterprise HA values helm upgrade --install opsknight deploy/kubernetes/helm/opsknight \ --namespace opsknight \ -f deploy/kubernetes/helm/opsknight/examples/values-enterprise-ha.yaml
Other Supported Topologies
- · Kustomize & GitOps:Declarative base and overlay manifests designed for ArgoCD and Flux pipelines. Kustomize guide
- · PgBouncer & External Postgres:Connection-pool overlays (`docker-compose.pgbouncer.yml`) for high concurrency. Capacity & deployment guide
- · Cloud & Serverless Containers:Deploy to AWS ECS / Fargate with RDS PostgreSQL, or GCP Cloud Run with Cloud SQL. Cloud container deployment
- · Upgrading from 1.x:Database migrations, env variable updates, and rollback procedure for existing 1.x installs. Migration from v1 guide
Hardware Sizing Matrix
Recommended capacity for OpsKnight and PostgreSQL based on monthly alert volume:
| Tier | Alert Volume | Compute | Topology |
|---|---|---|---|
| Starter / Eval | < 10k / mo | 1 vCPU · 1 GB RAM | Integrated Compose ($5 VPS) |
| Team / Growth | 10k – 100k / mo | 2 vCPU · 2 GB RAM | Split Compose or Docker Swarm |
| Enterprise scale | 100k+ / mo | 4+ vCPU · 4–8 GB | Helm / Kustomize Split + PgBouncer |
Community and commercial boundary
This page installs the self-hosted OpsKnight Community application under AGPL-3.0-only. Separately licensed Enterprise modules, support, or hosted offerings may be documented and packaged independently. Check the current release documentation for exact Community feature availability and limits. The canonical installation reference is the quickstart guide.