Docs_archive
Getting started
Source docs/GETTING_STARTED.md · All_docs
Single entry point for new operators and contributors. You do not need external SaaS, mesh, or microVMs to run the dashboard and API on your machine.
1. What you are installing (choose your path)
Firecracker / KVM is for per-agent microVM isolation. Many features work without it; the UI may hide or degrade VM-specific actions until Docker+KVM is available. Do not block your first install on Linux+KVM.
2. Prerequisites
- Node.js ≥ 22 (see
enginesinapp/package.json). - Docker + Docker Compose (recommended) or PostgreSQL 16+ and Redis 7+ installed yourself.
- Git.
Windows: use PowerShell; for env vars use $env:VAR="value". Docker Desktop must be running.
3. Minimal environment (copy-paste)
Create app/.env.local (never commit it). These values match the default app/docker-compose.yml Postgres/Redis.
# Database (default Docker Compose credentials)
DATABASE_URL=postgres://hive:hive_secret@localhost:5432/hive
# Auth — AUTH_SECRET must be ≥ 32 characters
AUTH_SECRET=change-me-to-a-long-random-string-at-least-32-chars
AUTH_URL=http://localhost:3000
# Encryption — exactly 64 hex characters (32 bytes). Generate a fresh one:
# node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
ENCRYPTION_KEY=0000000000000000000000000000000000000000000000000000000000000000
# Redis
REDIS_URL=redis://localhost:6379
# First admin password (used by db:seed)
ADMIN_PASSWORD=changeme
# Docker API — optional. On Windows + Docker Desktop, omit DOCKER_HOST (Hive uses the named pipe by default).
# Linux/macOS non-default socket only:
# DOCKER_HOST=/var/run/docker.sock
Before first run: replace ENCRYPTION_KEY with output from the node -e one-liner above. Replace AUTH_SECRET with a long random string.
Windows: do not set DOCKER_HOST to unix:///var/run/docker.sock — leave it unset unless you use a remote engine.
The full variable catalog (federation, public A2A, OTel, …) is in app/.env.example — you can ignore almost all of it until you need those features.
4. First run (development) — from repository root
All commands below assume you cloned the repo and your current directory is the Hive/ root (the folder that contains app/ and packages/a2a-sdk/). Do not use a sparse checkout without the SDK — npm install in app/ and the production Docker image both need that path.
4.1 Start Postgres and Redis
cd app
docker compose up -d postgres redis
Wait until both are healthy (docker compose ps).
4.2 Install dependencies
cd app
npm install
The monorepo may build the local A2a SDK during npm run build; for dev, npm install in app/ is enough.
4.3 Configure env
cp .env.example .env.local
Edit .env.local: set at least the minimal block in §3 (especially ENCRYPTION_KEY and AUTH_SECRET). After cp .env.example, you do not need to uncomment DOCKER_HOST on Windows — defaults match Docker Desktop.
4.4 Database migrations and admin user
npm run db:migrate:run
npm run db:seed
4.5 Start the app
npm run dev
- Open http://localhost:3000
- Log in with admin and the password from
ADMIN_PASSWORDin.env.local.
4.6 Quick sanity checks
- Public health (load balancers):
curl -sS http://localhost:3000/api/health— expect200(shallow check; deep check is optional via env, see PRODUCTION.md). - Authenticated system health: after login,
GET /api/system/health(viewer+) — Postgres + Redis + Docker status.
5. Shorter variant: mesh:infra
From app/, you can start only Postgres + Redis with:
npm run mesh:infra
Then continue from §4.2 (same app/ directory).
6. Optional: A2A on the same instance
Redis + Postgres are enough for v1 JSON-RPC and tasks. Configure Agent Card / JSON-RPC in the UI (Settings → A2A / mesh) and read A2A_INTEGRATION.md.
7. Planetary stack (NATS + stubs)
Not required for minimal Hive (dashboard + agents), but included in docker/docker-compose.local.yml so un docker compose … up côté docker/ installe aussi planetary. À la racine du dépôt : docker compose up -d --build suffit pour NATS + registry + gateway + bridge + subscriber (Hive sur l’hôte en npm run dev ou via compose local).
When you are ready to dig in:
- Read MESH_PLANETARY_PRODUCT.md (scope).
- Follow the TL;DR in MESH_PLANETARY_DEV_STACK.md.
- From
app/:npm run smoke:planetaryafter services are up.
Production-style checklist: MESH_PLANETARY_V1_ADOPTION.md.
8. Production
- SERVER_INSTALL.md (fr) — installer Hive sur un serveur : Docker Compose prod, DNS, Let’s Encrypt, wizard
/setup, migrations, dépannage. - PRODUCTION.md — TLS, env, health, security (référence détaillée).
- docker/docker-compose.prod.yml — stack Traefik + app + Postgres + Redis.
9. Troubleshooting
10. Where to go next
11. Contributing / CI
After changing code: from app/, run npm run lint, npx tsc --noEmit, npm test as appropriate. Planetary OpenAPI/schemas: npm run docs:validate-planetary. See .github/CONTRIBUTING.md.
11.1 End-to-end tests (Playwright)
From app/ with Postgres + Redis up, migrations applied, and npm run db:seed (same env as § 3 — at minimum DATABASE_URL, AUTH_SECRET, AUTH_URL, ENCRYPTION_KEY):
- Optional MFA (matches CI): set
E2E_MFA_SECRETto a base32 string (16+ chars, e.g. fromotplib/ RFC 4648 alphabet), then runnpm run e2e:prepare-mfaso the seed admin has TOTP enabled. Without this step, E2E still works if the admin user has MFA off. - Start the app in another terminal:
npm run dev(locally, Playwright does not auto-start the server unlessCI=true). - Install the browser once:
npx playwright install chromium. - Run:
npm run test:e2e.
Authenticated specs use e2e/helpers/login.ts (E2E_ADMIN_EMAIL / E2E_ADMIN_PASSWORD, defaults align with seed). If MFA is on, E2E_MFA_SECRET must match what you passed to e2e:prepare-mfa. See app/README.md for script names and CI behaviour.
Dataset maintenance scripts that clone third-party repos document their paths in app/AGENTS.md (LANGFLOW_CLONE_DIR, MASTRA_CLONE_DIR).