> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scandrix.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-Hosted Deployment

> Run ScanDrix inside your own VPC or on-prem — Docker Compose, Kubernetes, and air-gapped setups.

ScanDrix is open-source under **GNU AGPL-3.0** and can be self-hosted inside your own infrastructure: AWS, GCP, or Azure VPC, a private VM, or an air-gapped on-premise environment.

## What you get

* Code never leaves your network (connect internal LLM endpoints such as **vLLM** or **Ollama**, or use BYOK).
* Same product surface: dashboard, Drixy rules, Dry Runs, CLI, and Cockpit metrics.
* Optional signed license key (`SCANDRIX_LICENSE_KEY` / `SCANDRIX_LICENSE_FILE`) for offline-verified Enterprise features (SAML 2.0 SSO, SCIM 2.0, Audit Warehouse).

## Requirements

| Item | Minimum |
| - | - |
| Compute | 4 vCPU / 8 GB RAM (API + worker + web) |
| Database | PostgreSQL 16+ with `pgvector` extension |
| Cache & Locks | Redis 7+ |
| Queue | RabbitMQ 3.13+ with delayed-message exchange plugin |
| Object storage | S3-compatible bucket (AWS S3, Cloudflare R2, or MinIO) |
| LLM access | Internal endpoints (vLLM/Ollama) or BYOK egress allow-list |

## Docker Compose (standard install)

```bash theme={null}
# 1. Clone the repository
git clone https://github.com/Santosh-Prasad-Verma/ScanDrix.git && cd ScanDrix

# 2. Configure environment variables
cp .env.example .env
$EDITOR .env   # set DATABASE_URL, MIGRATION_DATABASE_URL, JWT_SECRET, KMS_MASTER_KEY, and LLM keys

# 3. Start PostgreSQL, RabbitMQ, Redis, migrations, and services
docker compose up -d

# 4. Verify health
curl -fsS http://localhost:8080/healthz
```

Open the dashboard (or configure your reverse proxy hostname — see [Reverse Proxy & TLS](https://docs.scandrix.dev/how-to-deploy/reverse-proxy.md)) and register your first workspace owner account at `/sign-up`.

> [!WARNING]
>
> `.env` holds real secrets — database URLs, signing keys, and provider credentials. Keep it out of version control and load secrets from your platform's secret manager in production.

## Kubernetes

Deploy the same stateless API, webhook ingress, workers, PostgreSQL (`pgvector`), Redis, and RabbitMQ components using Kubernetes manifests / Helm charts. See [Kubernetes Deployment](https://docs.scandrix.dev/how-to-deploy/kubernetes.md).

## Telemetry & air-gapped notes

* Mirror container images and the `scandrix` CLI binary to your internal registry.
* Enable strict air-gapped egress enforcement with `AIR_GAPPED=true` and `AIRGAP_ALLOWED_HOSTS` pointing only at internal inference/SCM endpoints.
* Self-hosted instances send at most one anonymous UTC daily heartbeat containing aggregate counters (zero source code, repo names, or user identifiers). Inspect the payload via `scandrix telemetry preview` or opt out completely with `SCANDRIX_TELEMETRY_DISABLED=true`.
* Enterprise self-hosted tokens are offline Ed25519-verified via `SCANDRIX_LICENSE_PUBLIC_KEY` and `SCANDRIX_LICENSE_FILE`.

## Upgrades

```bash theme={null}
docker compose pull && docker compose up -d
```

Database migrations run automatically via the `migrate` compose service (`scandrix-migrate`) using `MIGRATION_DATABASE_URL`. Keep a database backup before each upgrade.

## Health checks

| Endpoint | Purpose |
| - | - |
| `GET /healthz` | Liveness — process is up |
| `GET /readyz` | Readiness — DB + queue reachable |
| `GET /metrics` | Prometheus metrics scrape |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.