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; doneSet 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| Store | Port |
|---|---|
| PostgreSQL | 5432 |
| ClickHouse | 8123 |
| Valkey for state | 6379 |
| Valkey for cache | 6380 |
| RustFS | 9000 |
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:migrateStart the services
Run bun run dev (or filter a single app with bunx turbo run dev --filter=@openperf/api).
| Service | URL |
|---|---|
web | https://openperf.localhost |
api | https://api.openperf.localhost |
api-ingest | https://ingest.openperf.localhost |
mcp | https://mcp.openperf.localhost |
Hostnames
Services run behind portless.
- The first run asks for
sudoonce 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=0runs a service on its own port. Then point the origins in its.envathttp://localhostand removeBETTER_AUTH_COOKIE_DOMAIN.
Other commands
| Command | Does |
|---|---|
bun run --cwd packages/seeder seed --organization <id|slug> | Fills an organization with demo telemetry. See Demo telemetry. |
bun run --cwd apps/web-corpsite dev | Serves this site on http://localhost:4300, outside portless. |
bun run wt:setup | Prepares a linked worktree instead of docker compose. See Worktrees. |