Skip to Content
OpenPerf

Services

api

The dashboard API and auth. Port 4000.

Reads PostgreSQL, ClickHouse, Redis, object storage, proxies, integrations and logging.

VariableRequiredDefaultDescription
API_ORIGINyesPublic origin of api, such as https://api.example.com. Builds callback URLs.
APP_DASHBOARD_ORIGINyesDashboard origin. The only origin CORS and auth trust.
BETTER_AUTH_SECRETyesAt least 32 characters: openssl rand -hex 32. Changing it signs everyone out.
MCP_ORIGINnohttp://localhost:4500Public origin of mcp. OAuth access tokens are issued for MCP_ORIGIN/mcp only.
PORTno4000HTTP port.
NODE_ENVnodevelopmentproduction turns on secure cookies and hides the OpenAPI documents.
BETTER_AUTH_COOKIE_DOMAINnoCookie domain, such as .example.com, when api and the dashboard are sibling subdomains.
API_RATE_LIMIT_PER_MINUTEno6000Requests per client address per minute on /api/v1/*. 0 turns rate limiting off.

Invalid API tokens have a fixed built-in limit of 60 failed attempts per client address per minute (disabled when API_RATE_LIMIT_PER_MINUTE is 0).

Commands

The image exposes the api command:

CommandWhat it does
apiRuns the service.
api migrateApplies the PostgreSQL migrations and exits.
api healthcheckExits with 0 when /health/ready on PORT answers, else 1.

Sign-in

People sign in with a passkey or an email code. A GitHub or Google button appears when both of its variables are set. Accounts with the same verified email are linked.

VariableDescription
AUTH_GITHUB_CLIENT_IDGitHub OAuth app client ID. Callback URL: API_ORIGIN/api/auth/callback/github.
AUTH_GITHUB_CLIENT_SECRETGitHub OAuth app client secret.
AUTH_GOOGLE_CLIENT_IDGoogle OAuth client ID. Redirect URI: API_ORIGIN/api/auth/callback/google.
AUTH_GOOGLE_CLIENT_SECRETGoogle OAuth client secret.

Passkeys are bound to the host of APP_DASHBOARD_ORIGIN. Changing that host breaks existing passkeys.

OAuth for mcp

api is the OAuth server that mcp trusts. It sends users to the dashboard's /oauth pages to sign in and consent, and serves its signing keys at /api/auth/jwks. Set the same MCP_ORIGIN in api and mcp.

Background jobs

api queues work for worker-jobs. Without it, project cleanup, the first repository sync, emails and alert test notifications never run.

On this page