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 and instance.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.

    Create instance.json beside it. It names the identity provider, and the platform does not start without it (see Authentication below). The dev adapter signs every request in as one local developer, with no login:

    instance.json
    {
    "auth": {
    "adapter": "dev"
    }
    }
  3. Create docker-compose.yml

    docker-compose.yml
    services:
    platform:
    image: ghcr.io/nimblebraininc/nimblebrain:${NIMBLEBRAIN_TAG:-latest}
    restart: unless-stopped
    volumes:
    - workspace:/data
    - ./nimblebrain.json:/data/nimblebrain.json:ro
    - ./instance.json:/data/instance.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:-}
    - 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:
    - internal
    web:
    image: ghcr.io/nimblebraininc/nimblebrain-web:${NIMBLEBRAIN_TAG:-latest}
    restart: unless-stopped
    ports:
    - "127.0.0.1:27246:8080"
    environment:
    - PLATFORM_URL=http://platform:27247
    depends_on:
    platform:
    condition: service_healthy
    networks:
    - internal
    volumes:
    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 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 of this machine only (127.0.0.1). Health is checked internally at http://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.

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:${NIMBLEBRAIN_TAG:-latest}
build: .
# ...
web:
image: ghcr.io/nimblebraininc/nimblebrain-web:${NIMBLEBRAIN_TAG:-latest}
build: web/
# ...
Terminal window
docker compose up --build
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.

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