Skip to main content
LangBot runtime configuration lives in data/config.yaml. The first startup generates it from the default template. The example below is kept aligned with src/langbot/templates/config.yaml.
Most self-hosted deployments only need to change public URLs, databases/vector stores, object storage, and Box Runtime. Keep capacity and Cloud safety limits at their defaults unless you understand their operational impact.

Complete default configuration

Configuration groups

API, WebUI, and invitations

  • api.port is the HTTP API and WebUI port. api.webhook_prefix is the public base URL used to generate platform callback URLs; production deployments normally set it to the HTTPS reverse-proxy origin.
  • Set api.webui_url when the browser UI and API use different origins. OAuth redirects trust only this server-side value and webhook_prefix, never request Host or Origin headers.
  • api.global_api_key authenticates the HTTP Service API and built-in MCP server through X-API-Key or Authorization: Bearer, without a login session or a database-backed lbk_ key. Empty means disabled.
  • workspace.invitations.public_web_url controls invitation links and falls back to api.webui_url, then api.webhook_prefix. Email delivery is optional; choose resend or smtp, or leave provider empty for link-only invitations.
Treat the global API key, JWT secret, database credentials, S3 credentials, email-provider secrets, and E2B key as secrets. Prefer environment variables in production, never commit real values, and expose authenticated endpoints only over HTTPS.

Admission and capacity limits

  • concurrency bounds running and queued pipeline work globally and per Workspace.
  • webhooks bounds enabled destinations per Workspace and instance-wide outbound requests. Full request admission fails open rather than retaining an unbounded task queue.
  • cloud.directory contains operational safety ceilings for one logical Cloud instance, not subscription entitlements. Oversized authoritative directory updates are rejected atomically instead of being truncated. Most self-hosted deployments should keep these defaults.
  • system.blocking_executor, task_retention, session_retention, websocket_retention, and response_limits bound process-local workers, cached records, sockets, and upstream output.
  • Values under system.limitation are instance limits; -1 means unlimited. force_box_session_id_template is intended for SaaS sandbox confinement and should remain empty for normal self-hosting.

Databases and vector stores

  • database.use selects SQLite or PostgreSQL. A non-empty database.postgresql.url overrides the structured connection fields and preserves TLS/query options.
  • PostgreSQL pool and timeout settings bound shared runtime resources. database.cloud_migration.operator_dsn_env names the environment variable containing the operator-only migration DSN; keep that role separate from the runtime role.
  • vdb.use selects the vector backend. Configure only the selected backend. runtime_cache_limit bounds process-local collection/index handles.
  • vdb.pgvector.use_business_database reuses database.postgresql; allowed_dimensions controls the partial ANN indexes created by release migrations.
  • Valkey Search requires a Valkey server with the Search module, such as valkey/valkey-bundle:9.1.0.

Storage, plugins, MCP, and monitoring

  • storage.max_object_read_bytes caps objects materialized into Core memory. Cleanup limits bound file scans, and s3.max_concurrency bounds synchronous boto3 operations delegated to worker threads.
  • plugin.worker defines hard per-installation and instance-wide budgets. Plugin manifests cannot raise them. Restart-window settings suppress Runtime restart storms.
  • mcp.lifecycle_concurrency bounds MCP startup/shutdown bursts. mcp.stdio.enabled can disable local stdio transports without disabling HTTP/SSE MCP servers.
  • Monitoring query and cleanup limits prevent large pages, exports, offsets, or backlogs from monopolizing memory or PostgreSQL.

Box sandbox

  • box.enabled is the master switch. Disabling it also disables native sandbox tools, Skill add/edit, and stdio MCP, while read-only Skill listing and HTTP/SSE MCP remain available.
  • box.backend selects local, docker, nsjail, or e2b; runtime.endpoint connects an external WebSocket Runtime.
  • box.limits bounds sessions, processes, workspace scans, retained admission fences, and RPC file size.
  • box.admission is the Cloud v2 hard-admission policy. OSS defaults to required: false; pipelines, Workspace entitlements, and tool calls cannot relax Runtime-owned limits.
  • box.local controls workspace roots and mount allowlists. In Docker deployments, use an absolute host_root that the Box container can mount.
  • box.default_memory_mb is the default nsjail cgroup limit for each stdio MCP process. Node.js MCP servers usually need more memory than Python servers; too little commonly produces exit code 137.

LangBot Space

space.url, models_gateway_api_url, and oauth_authorize_url control Space OAuth/API and MaaS endpoints. The two disable_* flags independently disable model service use and telemetry.

Environment-variable overrides

Convert a nested key to uppercase and join levels with double underscores:
  • API__PORTapi.port
  • WORKSPACE__INVITATIONS__PUBLIC_WEB_URLworkspace.invitations.public_web_url
  • CONCURRENCY__PENDING_QUERIES_PER_WORKSPACEconcurrency.pending_queries_per_workspace
  • DATABASE__POSTGRESQL__POOL_SIZEdatabase.postgresql.pool_size
  • STORAGE__CLEANUP__MAX_FILES_PER_RUNstorage.cleanup.max_files_per_run
  • PLUGIN__WORKER__MAX_TOTAL_MEMORY_MBplugin.worker.max_total_memory_mb
  • MCP__STDIO__ENABLEDmcp.stdio.enabled
  • BOX__DEFAULT_MEMORY_MBbox.default_memory_mb
At startup, LangBot applies these overrides and writes the resulting configuration to data/config.yaml.
In Docker deployments, set unified BOX__* variables on the langbot service. LangBot sends Box configuration to langbot_box through INIT RPC; variables set directly on langbot_box are not read.