Installation
Get Open Brain running in ~15 minutes.
Prerequisites
| Tool | Purpose | Install |
|---|---|---|
| Python 3.10+ | Runs the MCP server | python.org |
| Docker Desktop | Hosts PostgreSQL + pgvector | docker.com |
| Ollama | Local embeddings (free) | ollama.com |
Step 1: Clone and create a virtual environment
Activate it:
Install dependencies:
Step 2: Configure environment
On Windows: copy .env.example .env
Edit .env. The defaults work out of the box for local Ollama + Docker.
WSL + Windows Ollama
If you run Ollama on Windows and the MCP server from WSL, enable mirrored networking in C:\Users\<USERNAME>\.wslconfig:
Then run wsl --shutdown and restart WSL.
Step 3: Start PostgreSQL
Verify with docker ps. You should see open-brain-db running.
Step 4: Initialize the database
This creates the memories table, pgvector extension, HNSW index, and all supporting indexes.
Step 5: Start brain_v2 database (recommended)
v2 runs on a separate Postgres container alongside v1:
This starts open-brain-v2-db on port 5433 with database open_brain_v2. The schema is applied automatically on first boot_session_v2 call.
Step 6: Set up the test database (optional)
Open Brain uses a separate Docker container for tests so they never touch your production data.
This starts open-brain-test-db on port 5434 with database openbrain_test. No persistent volume — test data is wiped on container removal.
Run tests:
See the full Testing guide for details on safety layers, fake embeddings, and troubleshooting.
Step 7: Pull the embedding model
Optional but recommended. Pull a metadata LLM for richer extraction:
Dual model setup
If you use both nomic-embed-text and a metadata model, start Ollama with OLLAMA_MAX_LOADED_MODELS=2 to avoid repeated model evictions.
Step 8: Verify
The server should start without errors. Now wire it into your AI tools.
Step 9: Launch the Dashboard (Windows)
Open Brain includes a dark-themed monitoring dashboard. It auto-detects whether services are running and starts them if needed.
To create Desktop shortcuts (ON, OFF, SSE Proxy, Dashboard):
See the full Dashboard guide for details on event-driven refresh, observability, and troubleshooting.