Skip to content

Environment Variables

Required Variables

These variables are required for Abacus to function:

VariableDescription
POSTGRES_URLPostgreSQL connection string
BETTER_AUTH_SECRETSecret for session encryption. Generate with: openssl rand -base64 32
GOOGLE_CLIENT_IDGoogle OAuth client ID
GOOGLE_CLIENT_SECRETGoogle OAuth client secret
NEXT_PUBLIC_DOMAINEmail domain to restrict access (e.g., sentry.io)
CRON_SECRETSecret for authenticating cron job requests. Generate with: openssl rand -hex 32

Provider Variables

Claude Code (Anthropic)

VariableDescription
ANTHROPIC_ADMIN_KEYAnthropic Admin API key (starts with sk-admin-)
ANTHROPIC_ADMIN_KEYSJSON array of keys for multiple organizations (see Multi-Organization Keys)

See Claude Code setup for details.

Cursor

VariableDescription
CURSOR_ADMIN_KEYCursor Admin API key
CURSOR_ADMIN_KEYSJSON array of keys for multiple teams (see Multi-Organization Keys)

See Cursor setup for details.

GitHub Commits

VariableDescription
GITHUB_APP_IDGitHub App ID
GITHUB_APP_PRIVATE_KEYGitHub App private key (full PEM content)
GITHUB_APP_INSTALLATION_IDInstallation ID for your organization
GITHUB_WEBHOOK_SECRETWebhook secret for verifying requests

For local development only:

VariableDescription
GITHUB_TOKENFine-grained personal access token (alternative to App)

See GitHub Commits setup for details.

Optional Variables

VariableDescription
NEXT_PUBLIC_SENTRY_DSNSentry DSN for error tracking

Local Development

VariableDescription
AUTH_BYPASS_LOCALSet to true to bypass SSO login locally. Returns a mock “Dev User” session.

Multi-Organization Keys

For managing multiple Anthropic organizations or Cursor teams, use a JSON array:

Terminal window
ANTHROPIC_ADMIN_KEYS='[{"key":"sk-admin-xxx","name":"Engineering"},{"key":"sk-admin-yyy","name":"Research"}]'
CURSOR_ADMIN_KEYS='[{"key":"cur_xxx","name":"Team Alpha"},{"key":"cur_yyy","name":"Team Beta"}]'

Each entry requires:

  • key: The admin API key
  • name: A label identifying the organization or team (used in reports)