docs/0-START-HERE/quick-start-external-ollama.md
Run Open Notebook with a separately installed Ollama (not via Docker). This avoids Docker running the Ollama service while you use your own local Ollama installation.
Docker Desktop installed (for SurrealDB and Open Notebook)
Ollama installed separately
ollama --versionModels downloaded in Ollama:
ollama pull mistral
ollama pull nomic-embed-text
Start the Ollama server:
# Default: runs on http://localhost:11434
ollama serve
Keep this terminal open. Ollama will run in the background.
Optional: Start Ollama on a custom port or network interface:
OLLAMA_HOST=0.0.0.0:11434 ollama serve
Create a new folder open-notebook-external-ollama and add these files:
docker-compose.yml:
services:
surrealdb:
image: surrealdb/surrealdb:v2
command: start --user root --pass password --bind 0.0.0.0:8000 rocksdb:/mydata/mydatabase.db
user: root
ports:
- "8000:8000"
volumes:
- ./surreal_data:/mydata
open_notebook:
image: lfnovo/open_notebook:v1-latest
pull_policy: always
ports:
- "8502:8502" # Web UI (React frontend)
- "5055:5055" # API (required!)
environment:
# Encryption key for credential storage (required)
- OPEN_NOTEBOOK_ENCRYPTION_KEY=change-me-to-a-secret-string
# Database (required)
- SURREAL_URL=ws://surrealdb:8000/rpc
- SURREAL_USER=root
- SURREAL_PASSWORD=password
- SURREAL_NAMESPACE=open_notebook
- SURREAL_DATABASE=open_notebook
volumes:
- ./notebook_data:/app/data
depends_on:
- surrealdb
restart: always
Note: No Ollama service in Docker — we use the host's Ollama.
When Open Notebook runs inside Docker, it cannot reach localhost:11434 on your host directly. Use the special hostname:
| Host OS | Ollama URL in Open Notebook |
|---|---|
| Linux | http://host.containers.internal:11434 |
| macOS | http://host.docker.internal:11434 |
| Windows | http://host.docker.internal:11434 |
Open terminal in your open-notebook-external-ollama folder:
docker compose up -d
Wait 10-15 seconds for services to start.
http://host.docker.internal:11434http://host.containers.internal:11434ollama/mistral (or whichever model you downloaded)ollama/nomic-embed-textOpen your browser:
http://localhost:8502
ollama serve in terminal)http://localhost:8502Verify Ollama is running:
curl http://localhost:11434/api/version
Check firewall allows local connections on port 11434
For Windows/macOS, ensure host.docker.internal is reachable from inside the container:
docker exec <open_notebook_container> curl http://host.docker.internal:11434/api/version
# Check Ollama logs
ollama list
# Pull a model again
ollama pull mistral
docker compose down
docker compose up -d
| Approach | Ollama in Docker | Ollama External |
|---|---|---|
| Resource isolation | Separated | Shares with host |
| GPU access | Requires Docker GPU setup | Native GPU access |
| Model management | Via docker exec | Via terminal directly |
| Memory usage | Isolated from host | Shared with host apps |
External Ollama is recommended if you:
ollama pull <model>, then re-discover from Open Notebookollama list shows downloaded models~/.ollama/config.yaml for advanced settingsNeed Help? Join our Discord community