# Get Started with Wake on Self-Hosted GitLab Runners

Deploy Wake in 5 minutes using the public multi-arch container image (`ghcr.io/strange-metal/wake:latest`, `linux/amd64` + `linux/arm64`).

## Step 1 — Run Pre-Flight Diagnostics
```bash
docker run --rm -v "$PWD:/repo" -w /repo \
  ghcr.io/strange-metal/wake:latest \
  wake doctor --repo . --offline
```

## Step 2 — Capture Baseline Flamegraph (`wake xray`, Free Forever)
```bash
docker run --rm -v "$PWD:/out" -e GITLAB_TOKEN \
  ghcr.io/strange-metal/wake:latest \
  wake xray --gitlab-url https://git.your-vpc.internal \
  --project group/monorepo --html /out/wake-xray.html
```

## Step 3 — Dry-Run & Install Dynamic Child Pipelines
```bash
# Preview affected-only pruning locally (free forever)
docker run --rm -v "$PWD:/repo" -w /repo \
  ghcr.io/strange-metal/wake:latest \
  wake plan --repo . --changed packages/web-ui/src/app.ts --dry-run

# Wrap .gitlab-ci.yml non-destructively (moves original jobs to .wake-pipeline.yml)
docker run --rm -v "$PWD:/repo" -w /repo \
  ghcr.io/strange-metal/wake:latest \
  wake init --repo . --apply
```

## Step 4 — Activate Your Offline `WAKE_LICENSE_KEY`
1. Obtain a Team ($499/mo) or Enterprise ($1,990/mo) offline Ed25519 license key at https://wakeci.dev/pricing.
2. In GitLab, navigate to **Settings → CI/CD → Variables → Add variable**, create `WAKE_LICENSE_KEY` with **Masked** enabled, and paste your token.
3. Verify offline locally:
```bash
docker run --rm -e WAKE_LICENSE_KEY \
  ghcr.io/strange-metal/wake:latest \
  wake license status
```

## Manage Billing & Invoices
Visit https://wakeci.dev/start#billing-portal or contact chris@wakeci.dev.
