Skip to content

Quick start configs

Minimal local config (no Supabase)

bash
DATA_SOURCE=file
WEB_BASE_URL=http://localhost:3000
API_URL=http://localhost:8786

Full Supabase config

bash
SUPABASE_URL=https://<project>.supabase.co
SUPABASE_ANON_KEY=<anon-key>
SUPABASE_SERVICE_ROLE_KEY=<service-role-key>
DATA_SOURCE=supabase
WEB_BASE_URL=http://localhost:3000
AUTH_BASE_URL=http://localhost:3004
API_URL=http://localhost:8786

Supabase

VariableUsed byRequiredDescription
SUPABASE_URLFrontend, CLIWhen DATA_SOURCE=supabasePostgREST base URL for your Supabase project
SUPABASE_ANON_KEYFrontend, CLIWhen DATA_SOURCE=supabasePublic anon key — safe to commit
SUPABASE_URLCLI, backend tasksWhen DATA_SOURCE=supabaseNon-Vite alias used by CLI and scripts
SUPABASE_ANON_KEYCLI, backend tasksWhen DATA_SOURCE=supabaseNon-Vite alias used by CLI and scripts
SUPABASE_SERVICE_ROLE_KEYCLI, migrations, seedsNoPrivileged key — never commit, never expose to browser

Storage

VariableDefaultValuesDescription
DATA_SOURCEsupabasesupabase | fileSelects the active storage backend. file uses ~/.lenserfight/ local storage; no Supabase required.
DEFAULT_STORAGE_ADAPTERsupabasesupabase | localOverrides the default adapter in storage.registry.ts. r2 is intentionally rejected until the adapter is implemented.

See Storage Adapters for the full adapter reference and ~/.lenserfight/ directory layout.


Service URLs

VariableDefaultDescription
WEB_BASE_URLhttp://localhost:3000Root URL of the web app
AUTH_BASE_URLhttp://localhost:3004Auth app base URL
API_URLhttp://localhost:8786Execution platform API. Production: https://api.lenserfight.com
DOCS_BASE_URLhttp://localhost:3002Docs site base URL
STATUS_BASE_URLhttp://localhost:3003Status page base URL
ARENA_URLhttp://localhost:3000Arena URL (same as web in community edition)
LENSERFIGHT_CLOUD_API_URLhttps://api.lenserfight.comCLI override for the cloud API base URL
LENSERFIGHT_OLLAMA_BASE_URLhttp://localhost:11434Node/CLI/server override for the Ollama base URL
OLLAMA_BASE_URLhttp://localhost:11434Browser-build override for the Ollama base URL

Auth & tokens

VariableUsed byDescription
LENSERFIGHT_API_KEYCLI, scriptsAPI key used in place of a session token. Set to a developer or service token. Recommended for CI and AI agent integrations.
LENSERFIGHT_DEVELOPER_TOKENCLIOverride the developer token stored in ~/.lenserfight/lenserfight.json
LENSERFIGHT_DEVELOPER_TOKEN_EXPIRES_ATCLIOverride the stored developer token expiry (ISO 8601 string)

Token precedence in the CLI: LENSERFIGHT_API_KEY → explicit developer-token automation path → stored session → stored developer token.


Feature flags

The web app no longer reads generic FEATURE_* toggles for core product surfaces; those routes and panels are compiled in with fixed defaults. One client-exposed switch remains:

VariableDefaultDescription
FEATURE_CHAINABIT_SIGNINtrueSet to false to hide the "Continue with Chainabit" button on auth screens

Analytics

VariableRequiredDescription
PUBLIC_POSTHOG_PROJECT_TOKENNoPostHog project API key. Omit to disable analytics entirely.
PUBLIC_POSTHOG_HOSTNoPostHog ingestion host. Defaults to https://us.i.posthog.com.

Development & testing

VariableDefaultDescription
CAPTCHA_SITE_KEYhCaptcha site key for the auth flow. Use a test key in development.

Behaviour rules

  • The CLI reads from the process environment, then .env.local, then .env, then ~/.lenserfight/lenserfight.json.
  • Never commit SUPABASE_SERVICE_ROLE_KEY or any token values to source control.