Skip to Content
OpenPerf

Getting started

Local development

Run the stores in Docker and the services from the repository.

The stores run in Docker. Every service runs from the repository, in its own terminal.

Copy the environment files

for app in api api-ingest mcp worker-errors worker-jobs web; do cp apps/$app/.env.example apps/$app/.env; done

Set BETTER_AUTH_SECRET in apps/api/.env to at least 32 characters: openssl rand -hex 32. Leave optional variables out rather than empty: KEY= fails validation. Every variable is in Configuration.

Start the stores

docker compose up -d
StorePort
PostgreSQL5432
ClickHouse8123
Valkey for state6379
Valkey for cache6380
RustFS9000

All of them listen on 127.0.0.1 only. A root .env overrides ports and credentials.

Install and migrate

bun install
bun run --cwd apps/api db:migrate
bun run --cwd apps/api-ingest db:migrate

Start the services

Run bun run dev (or filter a single app with bunx turbo run dev --filter=@openperf/api).

ServiceURL
webhttps://openperf.localhost
apihttps://api.openperf.localhost
api-ingesthttps://ingest.openperf.localhost
mcphttps://mcp.openperf.localhost

Hostnames

Services run behind portless.

  • The first run asks for sudo once to bind port 443 and trust its certificate.
  • Node processes outside portless that call these URLs need NODE_EXTRA_CA_CERTS=~/.portless/ca.pem.
  • PORTLESS=0 runs a service on its own port. Then point the origins in its .env at http://localhost and remove BETTER_AUTH_COOKIE_DOMAIN.

Other commands

CommandDoes
bun run --cwd packages/seeder seed --organization <id|slug>Fills an organization with demo telemetry. See Demo telemetry.
bun run --cwd apps/web-corpsite devServes this site on http://localhost:4300, outside portless.
bun run wt:setupPrepares a linked worktree instead of docker compose. See Worktrees.

On this page