Quickstart
Get up and running with Kopai in under 5 minutes.
Prerequisites
Section titled “Prerequisites”- Node.js v22.5.0+ installed
Step 1: Start Kopai
Section titled “Step 1: Start Kopai”Run the local backend — this starts an OTEL collector on port 4318 and an API server on port 8000:
npx @kopai/app startYour app’s telemetry will be sent to http://localhost:4318 and you can query it or view the dashboard at http://localhost:8000.
Step 2: Instrument Your Application
Section titled “Step 2: Instrument Your Application”See the integration guides for instrumentation examples for your programming language/runtime:
When running the app set the following env var to make the apps send telemetry to @kopai/app on localhost
export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318Step 3: Verify that your application instrumentation works as expected
Section titled “Step 3: Verify that your application instrumentation works as expected”Open @kopai/app web interface on http://localhost:8000
and inspect the Logs, Metrics and Traces
Step 4: Go multiplayer -> sign up for a Kopai account
Section titled “Step 4: Go multiplayer -> sign up for a Kopai account”Step 5: Get Your Backend Token
Section titled “Step 5: Get Your Backend Token”- Go to Settings → Access Tokens in your
kopai.appdashboard - Click Generate Token
- Copy the token (it won’t be shown again)
Step 6: Point Your App to Kopai Cloud
Section titled “Step 6: Point Your App to Kopai Cloud”Set your Kopai endpoint and backend token as env vars for your instrumented app:
export OTEL_EXPORTER_OTLP_ENDPOINT="https://otlp.kopai.app"export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer YOUR_BACKEND_TOKEN"Step 7: Invite your team
Section titled “Step 7: Invite your team”- Go to Team in your
kopai.appdashboard - Click Invite Member
Step 8: Authenticate the CLI
Section titled “Step 8: Authenticate the CLI”Every team member can create their own CLI token to query traces, logs, and metrics sent to kopai.app:
- Go to Settings → Access Tokens in your
kopai.appdashboard - Click Generate Token and select CLI as the token type
- Copy the token
Then log in:
npx @kopai/cli loginPaste the CLI token at the prompt. See Authentication for full details.