Skip to content

Configuration

Octipus keeps configuration in two places, with a clear split:

  1. A minimal .env — only the handful of values needed to boot: which storage mode to use, how to reach the database/cache, and the security keys. Nothing else belongs here.
  2. The database (and encrypted vault) — the source of truth at runtime for everything else: model config and provider keys, channel tokens, workspace paths, agent limits, feature flags, ports, and so on. Edit these under Settings → Configuration in the web UI, or via the API.

This is the entire .env for a typical install. bun run setup writes it for you (and generates the three secrets). Copy .env.example if you prefer to do it by hand.

# ── Storage mode ────────────────────────────────────────────
# 'embedded' = PGlite + in-memory cache (zero external deps, local dev)
# 'external' = PostgreSQL + pgvector + Valkey (production)
STORAGE_MODE=external
# ── Database + cache (external mode ONLY — omit for embedded) ─
DATABASE_URL=postgresql://octipus:octipus@localhost:5442/octipus
# Valkey is Redis-compatible; the var stays REDIS_URL for client compatibility.
REDIS_URL=redis://localhost:6379
# ── Security keys (required, ≥ 32 chars — `bun run setup` generates these) ─
MASTER_KEY=
JWT_SECRET=
SESSION_SECRET=
# ── API server (optional — these are the defaults) ──────────
API_HOST=127.0.0.1
API_PORT=3005
VariableRequired?Notes
STORAGE_MODEYesembedded or external
DATABASE_URLExternal onlyPostgres + pgvector connection string
REDIS_URLExternal onlyValkey/Redis connection string
MASTER_KEYYesVault encryption root (AES-256-GCM). Derives per-user data-encryption keys.
JWT_SECRETYesSigns auth tokens
SESSION_SECRETYesSigns sessions
API_HOST / API_PORTNoDefault 127.0.0.1 / 3005. HOST / PORT also accepted.
DATA_DIRNoEmbedded-mode data dir (default ~/.octipus/data)
ServiceDefaultSet via
Backend API3005API_PORT (env, bootstrap)
Web UI3007WEB_PORT (env, bootstrap)
PostgreSQL5442 → 5432repo docker-compose.yml (POSTGRES_PORT)
Valkey6389 → 6379repo docker-compose.yml (REDIS_PORT)

The container ports above are the repo compose mappings (host → container). When you run the backend natively (bun run start:all) it listens directly on 3005 / 3007.

You will not find these in .env — set them in the web UI once Octipus is running:

AreaWhere to set it
Models & default modelModels page
Provider API keys (OpenAI, Anthropic, Gemini, Grok, DeepSeek, OpenRouter, Voyage)Encrypted vault (added on the Models / Secrets pages)
Channel tokens (Telegram, Slack, Teams, WhatsApp)Settings → Channels / vault
Agent limits (token budget, timeout, iterations)Settings → Configuration
Enabled tools, workspace pathSettings → Configuration
Logging level, CORS originsSettings → Configuration
Multi-user flags, org/SSOAdmin pages
  1. bun run setup — interactive wizard; writes the minimal .env, registers the admin, optionally wires the first model.
  2. .env — the minimal bootstrap values above (and, for CI, optional one-time seeds).
  3. Web UI → Settings → Configuration — the canonical place to change anything at runtime.