Skip to content

Installation

Docker Compose runs the platform and web UI as two containers. This is the recommended method for single-machine deployments.

  1. Create a project directory

    Terminal window
    mkdir nimblebrain && cd nimblebrain
  2. Create nimblebrain.json

    nimblebrain.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.

  3. Create docker-compose.yml

    docker-compose.yml
    services:
    platform:
    image: ghcr.io/nimblebraininc/nimblebrain:latest
    restart: unless-stopped
    volumes:
    - workspace:/data
    - ./nimblebrain.json:/data/nimblebrain.json:ro
    environment:
    - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
    - OPENAI_API_KEY=${OPENAI_API_KEY:-}
    - GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY:-}
    networks:
    - internal
    web:
    image: ghcr.io/nimblebraininc/nimblebrain-web:latest
    restart: unless-stopped
    ports:
    - "27246:8080"
    environment:
    - PLATFORM_URL=http://platform:27247
    depends_on:
    platform:
    condition: service_healthy
    networks:
    - internal
    volumes:
    workspace:
    networks:
    internal:

    The platform image is built on python:3.13-slim and bundles Bun, Node.js 24, and the mpak CLI — the toolchain MCP server bundles shell out to at runtime. The runtime working directory inside the container is /data (set via NB_WORK_DIR), so the config mount lands at /data/nimblebrain.json.

  4. Start the services

    Terminal window
    export ANTHROPIC_API_KEY=sk-ant-api03-...
    docker compose up

    The platform API runs on port 27247 (internal). The web UI is published on port 27246. Health is checked internally at http://localhost:27247/v1/health.

    With no instance.json present, the platform runs in dev mode — unauthenticated, single built-in user. To require real auth, add an instance.json next to your config with an oidc or workos adapter (see Authentication below).

To build the images from a checkout instead of pulling :latest, add a build: key and use docker compose up --build:

docker-compose.yml (build from source)
services:
platform:
image: ghcr.io/nimblebraininc/nimblebrain:latest
build: .
# ...
web:
image: ghcr.io/nimblebraininc/nimblebrain-web:latest
build: web/
# ...
Terminal window
docker compose up --build
VariableRequiredDescription
ANTHROPIC_API_KEYYesAnthropic API key for Claude. At least one provider key is required.
OPENAI_API_KEYNoOpenAI provider key.
GOOGLE_GENERATIVE_AI_API_KEYNoGoogle provider key.
PORTNoHTTP port for the API server. Default: 27247.
NB_PUBLIC_ORIGINNoCanonical 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_DIRNoWorking directory for conversations, skills, and app state. Default: .nimblebrain/ (project-local) or ~/.nimblebrain (global serve). Set to /data in the Docker image.
ALLOWED_ORIGINSNoComma-separated allowed CORS origins. Default: all origins.
MCP_MAX_SESSIONSNoMaximum concurrent MCP sessions. Above this, new sessions evict the least-recently-used transport. Default: 100.
MCP_SESSION_TTL_SECONDSNoMCP session idle TTL in seconds. Default: 28800 (8 hours).
NB_TELEMETRY_DISABLEDNoSet to 1 to disable anonymous telemetry.
DO_NOT_TRACKNoSet to 1 to disable anonymous telemetry.

NimbleBrain’s auth mode is determined by the presence of an instance.json file alongside your config:

  • No instance.json — the platform runs in dev mode: requests are unauthenticated and resolve to a single built-in user. Fine for local development; not for shared or networked deployments.
  • instance.json with an auth.adapter — a real identity provider is used. Supported adapters are oidc (any OpenID Connect issuer) and workos. On successful login the provider’s callback sets an nb_session cookie.
instance.json (OIDC example)
{
"auth": {
"adapter": "oidc",
"issuer": "https://your-idp.example.com",
"clientId": "your-client-id",
"allowedDomains": ["example.com"]
}
}

NimbleBrain reads nimblebrain.json at startup. A minimal config:

nimblebrain.json
{
"$schema": "https://schemas.nimblebrain.ai/v1/nimblebrain-config.schema.json",
"version": "1"
}

See the configuration reference for all options.