Installation
Docker Compose runs the platform and web UI as two containers. This is the recommended method for single-machine deployments.
-
Create a project directory
Terminal window mkdir nimblebrain && cd nimblebrain -
Create
nimblebrain.jsonandinstance.jsonnimblebrain.json {"$schema": "https://schemas.nimblebrain.ai/v1/nimblebrain-config.schema.json","version": "1"}This is runtime config only (model, limits, features). Installed apps are not listed here — per-workspace app installs live in
workspace.json, which the runtime manages. See the configuration reference for all options.Create
instance.jsonbeside it. It names the identity provider, and the platform does not start without it (see Authentication below). Thedevadapter signs every request in as one local developer, with no login:instance.json {"auth": {"adapter": "dev"}} -
Create
docker-compose.ymldocker-compose.yml services:platform:image: ghcr.io/nimblebraininc/nimblebrain:${NIMBLEBRAIN_TAG:-latest}restart: unless-stoppedvolumes:- workspace:/data- ./nimblebrain.json:/data/nimblebrain.json:ro- ./instance.json:/data/instance.json:roenvironment:- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}- OPENAI_API_KEY=${OPENAI_API_KEY:-}- GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY:-}- GREENPT_API_KEY=${GREENPT_API_KEY:-}- NEBIUS_API_KEY=${NEBIUS_API_KEY:-}- XAI_API_KEY=${XAI_API_KEY:-}# Where the browser reaches this install. OAuth callbacks are built on it.- NB_PUBLIC_ORIGIN=${NB_PUBLIC_ORIGIN:-http://127.0.0.1:27246}networks:- internalweb:image: ghcr.io/nimblebraininc/nimblebrain-web:${NIMBLEBRAIN_TAG:-latest}restart: unless-stoppedports:- "127.0.0.1:27246:8080"environment:- PLATFORM_URL=http://platform:27247depends_on:platform:condition: service_healthynetworks:- internalvolumes:workspace:networks:internal:The platform image runs on Bun. Connectors are remote MCP servers, so nothing you install runs inside this container. The runtime working directory inside the container is
/data(set viaNB_WORK_DIR), so the config mount lands at/data/nimblebrain.json. -
Start the services
Terminal window export ANTHROPIC_API_KEY=sk-ant-api03-...docker compose upThe platform API runs on port 27247 (internal). The web UI is published on port 27246 of this machine only (
127.0.0.1). Health is checked internally athttp://localhost:27247/v1/health.Go to http://127.0.0.1:27246, the address connector sign-ins return to and the sign-in cookie is set on.
Build from local source
Section titled “Build from local source”To build the images from a checkout instead of pulling :latest, add a build: key and use docker compose up --build:
services: platform: image: ghcr.io/nimblebraininc/nimblebrain:${NIMBLEBRAIN_TAG:-latest} build: . # ... web: image: ghcr.io/nimblebraininc/nimblebrain-web:${NIMBLEBRAIN_TAG:-latest} build: web/ # ...docker compose up --buildRun from source for development. Requires Bun 1.2.0 or newer (engines.bun is >=1.2.0).
-
Clone and install
Terminal window git clone https://github.com/NimbleBrainInc/nimblebrain.gitcd nimblebrainbun install -
Install web dependencies
Terminal window cd web && bun install && cd .. -
Set your API key
Terminal window export ANTHROPIC_API_KEY=sk-ant-api03-... -
Start development mode
Terminal window bun run devThis starts both the API server (with file watching and auto-restart) and the web client (Vite HMR) in a single terminal. The dev workdir is
~/.nimblebrainunlessNB_WORK_DIRor a config file’sworkDirnames another (see Config resolution). The launcher writes thedevadapter to the workdir’sinstance.jsonwhen it has none, so no auth setup is required locally.
Other dev commands:
bun run dev:empty # Empty state — no apps, fresh workdir (:27249/:27248)bun run dev:minimal # Minimal — no apps, preset model config (:27251/:27250)bun run test # Run unit AND integration testsbun run eval # LLM evals (requires ANTHROPIC_API_KEY)Environment variables
Section titled “Environment variables”| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY |
Yes | Anthropic API key for Claude. At least one provider key is required. |
OPENAI_API_KEY |
No | OpenAI provider key. |
GOOGLE_GENERATIVE_AI_API_KEY |
No | Google provider key. |
PORT |
No | HTTP port for the API server. Default: 27247. |
NB_PUBLIC_ORIGIN |
No | Canonical public origin used to build absolute URLs (OAuth callbacks, post-login landing). Default in dev: http://localhost:27247. Set this in production. See Environment Variables. |
NB_WORK_DIR |
No | Working directory for conversations, skills, and app state. Default: ~/.nimblebrain. Set to /data in the Docker image. |
ALLOWED_ORIGINS |
No | Comma-separated additional CORS origins. Unset: same-origin only. |
DO_NOT_TRACK |
No | Set to 1 to disable anonymous telemetry. |
Authentication
Section titled “Authentication”<workDir>/instance.json names the identity provider, and the platform does not start without it:
"adapter": "dev"— no login: every request resolves to a single built-in user. Fine for local development; not for shared or networked deployments."adapter": "oidc"or"workos"— a real identity provider (any OpenID Connect issuer, or WorkOS). On successful login the provider’s callback sets annb_sessioncookie.
{ "auth": { "adapter": "oidc", "issuer": "https://your-idp.example.com", "clientId": "your-client-id", "allowedDomains": ["example.com"] }}Minimal config file
Section titled “Minimal config file”NimbleBrain reads nimblebrain.json at startup. A minimal config:
{ "$schema": "https://schemas.nimblebrain.ai/v1/nimblebrain-config.schema.json", "version": "1"}See the configuration reference for all options.