Menu / Configuration

Reference

Configuration

open-bot is configured with environment variables. In development, the web app and the worker both read the repository's root .env, copied from .env.example. Every value has a development default except OWNER_EMAIL.

Shared secrets

VariableWebWorkerComputerNotes
DATABASE_URLyesyesDefault postgres://openbot:openbot@127.0.0.1:54329/openbot
WORKER_SECRETyesyesAt least 16 characters. Authenticates internal calls and signs VNC and egress tokens.
ENCRYPTION_KEYyesyes32 bytes, base64. Encrypts every stored secret with AES-256-GCM.
BOTD_TOKENyesyesAt least 16 characters. botd refuses to start without it.

Web app

VariableDefaultPurpose
OWNER_EMAILnoneThe only email that can create the account
BETTER_AUTH_SECRETnoneSigns sessions
BETTER_AUTH_URLhttp://localhost:3000The app's public URL. Also the passkey relying party.
WORKER_URLhttp://127.0.0.1:4001Where the web server reaches the worker
NEXT_PUBLIC_WORKER_WS_URLws://localhost:4001Where browsers and the desktop app reach the worker's websockets. Built into the client.

Worker

Parsed with zod in apps/worker/src/env.ts.

VariableDefaultPurpose
WORKER_PORT4001HTTP and websocket port
BOTD_URLhttp://127.0.0.1:7070Where botd listens. Locally, Compose maps it from port 7000.
APP_URLBETTER_AUTH_URL, or http://localhost:3000Webhook URLs start with it
MAX_CONCURRENT_RUNS4Runs executing at once, across all teammates
WATCH_ALLOW_PRIVATE_URLSfalse in production, true otherwiseLet page watches fetch private and local addresses
HOST_CODEX_AUTH_FILE~/.codex/auth.jsonDevelopment: the login the computer borrows
HOST_CODEX_BINcodexDevelopment: the Codex CLI used to refresh that login
OPENAI_API_BASE_URLhttps://api.openai.com/v1Where API key traffic goes
TELEGRAM_API_BASE_URLhttps://api.telegram.orgThe Telegram Bot API. Tests point it at a stand-in.
OPEN_BOT_PLAN_BASE_URLunsetTesting only: send plan traffic to a mock, to rehearse the fallback

Memory AI

Optional, and off unless the URLs are set. See Memory.

VariableDefaultPurpose
MEMORY_EMBEDDING_URLemptyAn OpenAI-compatible /embeddings URL
MEMORY_EMBEDDING_MODELemptyThe embedding model
MEMORY_EMBEDDING_DIMENSIONS768Vector size, 1 to 4096
MEMORY_SEMANTIC_MAX_DISTANCE0.4The cosine-distance cutoff for semantic matches
MEMORY_EXTRACTION_URLemptyAn OpenAI-compatible /chat/completions URL
MEMORY_EXTRACTION_MODELemptyThe extraction model
MEMORY_AI_API_KEYemptyA bearer token for those two endpoints only
MEMORY_AI_DAILY_REQUEST_LIMIT100All memory AI requests per day. 0 turns memory AI off.

The computer (botd)

VariableDefaultPurpose
BOTD_TOKENnoneRequired
MAX_SCREENS4Screens running at once
SCREEN_IDLE_MINUTES20A screen nobody used for this long stops
APPLY_GUARD_EXTRA_DOMAINSemptyComma-separated extra domains for the apply guard. Compose sets host.docker.internal for the tests.
BOTS_GID1100The shared bots group, set in the image

botd's own ports are fixed: 7000 for its API, 4500 for Codex (localhost) and 1080 for SOCKS (localhost). The Codex version is the image's CODEX_VERSION build argument.

Desktop app

VariableDefaultPurpose
OPEN_BOT_URLthe deployed appThe web app to load. Use http://localhost:3000 in development.

The shell's environment may carry ELECTRON_RUN_AS_NODE=1 when launched from some tools, which stops Electron from opening a window. Unset it to run the desktop app.

Settings in the app

Some configuration lives in the database, changed in Settings rather than in the environment:

SettingStored in
ChatGPT sign-in source (borrow the host's, or the computer's own)settings.chatgpt_auth_source
OpenAI API keycredentials, encrypted
Monthly API capsettings.monthly_cap_micros
Your time zonesettings.timezone, set from your browser on first visit
Egress modecomputers.egress_mode
Telegram bot token and linked chatcredentials and telegram
Email domain and Postmark tokenemail_settings
Push devicespush_subscriptions
Connectionsconnections, secrets encrypted

Tests

VariableUsed by
E2E_EMAIL, E2E_PASSWORDPlaywright: the owner account to sign in with
E2E_BASE_URLPlaywright: the web app, default http://localhost:3000
E2E_TELEGRAM=1Run the Telegram tests (with the worker pointed at the stand-in)
E2E_PLAN_REHEARSAL=1Run the plan fallback rehearsal
MEMORY_TEST_DATABASE_URLThe memory suite's isolated database