- Replace old docs structure with new comprehensive documentation - Organize into 8 major sections (0-START-HERE through 7-DEVELOPMENT) - Convert CONFIGURATION.md, CONTRIBUTING.md, MAINTAINER_GUIDE.md to redirects - Remove outdated MIGRATION.md and DESIGN_PRINCIPLES.md - Fix all internal documentation links and cross-references - Add progressive disclosure paths for different user types - Include 44 focused guides covering all features - Update README.md to remove v1.0 breaking changes notice
6.3 KiB
Docker Compose Installation (Recommended)
Multi-container setup with separate services. Best for most users.
Alternative Registry: All images are available on both Docker Hub (
lfnovo/open_notebook) and GitHub Container Registry (ghcr.io/lfnovo/open-notebook). Use GHCR if Docker Hub is blocked or you prefer GitHub-native workflows.
Prerequisites
- Docker Desktop installed (Download)
- 5-10 minutes of your time
- API key for at least one AI provider (OpenAI recommended for beginners)
Step 1: Get an API Key (2 min)
Choose at least one AI provider. OpenAI recommended if you're unsure:
OpenAI: https://platform.openai.com/api-keys
Anthropic: https://console.anthropic.com/
Google: https://aistudio.google.com/
Groq: https://console.groq.com/
Add at least $5 in credits to your account.
(Skip this if using Ollama for free local models)
Step 2: Create Configuration (2 min)
Create a folder open-notebook and add this file:
docker-compose.yml:
services:
surrealdb:
image: surrealdb/surrealdb:v2
command: start --user root --pass password --bind 0.0.0.0:8000 memory
ports:
- "8000:8000"
volumes:
- surreal_data:/mydata
api:
image: lfnovo/open_notebook:v1-latest
ports:
- "5055:5055"
environment:
# AI Provider (choose ONE)
- OPENAI_API_KEY=sk-... # Your OpenAI key
# - ANTHROPIC_API_KEY=sk-ant-... # Or Anthropic
# - GOOGLE_API_KEY=... # Or Google
# Database
- SURREAL_URL=ws://surrealdb:8000/rpc
- SURREAL_USER=root
- SURREAL_PASSWORD=password
- SURREAL_NAMESPACE=open_notebook
- SURREAL_DATABASE=production
# API Configuration
- API_URL=http://localhost:5055
depends_on:
- surrealdb
volumes:
- ./data:/app/data
restart: always
frontend:
image: lfnovo/open_notebook-frontend:v1-latest
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_URL=http://localhost:5055
depends_on:
- api
restart: always
volumes:
surreal_data:
Edit the file:
- Replace
sk-...with your actual OpenAI API key - (Or use Anthropic, Google, Groq keys instead)
- If you have multiple keys, uncomment the ones you want
Step 3: Start Services (2 min)
Open terminal in the open-notebook folder:
docker compose up -d
Wait 15-20 seconds for all services to start:
✅ surrealdb running on :8000
✅ api running on :5055
✅ frontend running on :3000
Check status:
docker compose ps
Step 4: Verify Installation (1 min)
API Health:
curl http://localhost:5055/health
# Should return: {"status": "healthy"}
Frontend Access: Open browser to:
http://localhost:3000
You should see the Open Notebook interface!
Step 5: First Notebook (2 min)
- Click New Notebook
- Name: "My Research"
- Description: "Getting started"
- Click Create
Done! You now have a fully working Open Notebook instance. 🎉
Configuration
Using Different AI Providers
Change environment section in docker-compose.yml:
# For Anthropic (Claude)
- ANTHROPIC_API_KEY=sk-ant-...
# For Google Gemini
- GOOGLE_API_KEY=...
# For Groq (fast, free tier available)
- GROQ_API_KEY=...
# For local Ollama (free, offline)
- OLLAMA_BASE_URL=http://ollama:11434
Adding Ollama (Free Local Models)
Add to docker-compose.yml:
ollama:
image: ollama/ollama:latest
ports:
- "11434:11434"
volumes:
- ollama_models:/root/.ollama
restart: always
volumes:
surreal_data:
ollama_models:
Then update API service:
environment:
- OLLAMA_BASE_URL=http://ollama:11434
Restart and pull a model:
docker compose restart
docker exec open_notebook-ollama-1 ollama pull mistral
Environment Variables Reference
| Variable | Purpose | Example |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key | sk-proj-... |
ANTHROPIC_API_KEY |
Anthropic/Claude key | sk-ant-... |
SURREAL_URL |
Database connection | ws://surrealdb:8000/rpc |
SURREAL_USER |
Database user | root |
SURREAL_PASSWORD |
Database password | password |
API_URL |
API external URL | http://localhost:5055 |
NEXT_PUBLIC_API_URL |
Frontend API URL | http://localhost:5055 |
Common Tasks
Stop Services
docker compose down
View Logs
# All services
docker compose logs -f
# Specific service
docker compose logs -f api
Restart Services
docker compose restart
Update to Latest Version
docker compose down
docker compose pull
docker compose up -d
Remove All Data
docker compose down -v
Troubleshooting
"Cannot connect to API" Error
- Check if Docker is running:
docker ps
- Check if services are running:
docker compose ps
- Check API logs:
docker compose logs api
- Wait longer - services can take 20-30 seconds to start on first run
Port Already in Use
If you get "Port 3000 already in use", change the port:
ports:
- "3001:3000" # Use 3001 instead
Then access at http://localhost:3001
API Key Not Working
- Double-check your API key in the file (no extra spaces)
- Verify key is valid at provider's website
- Check you added credits to your account
- Restart:
docker compose restart api
Database Connection Issues
Check SurrealDB is running:
docker compose logs surrealdb
Reset database:
docker compose down -v
docker compose up -d
Next Steps
- Add Content: Sources, notebooks, documents
- Configure Models: Settings → Models (choose your preferences)
- Explore Features: Chat, search, transformations
- Read Guide: User Guide
Production Deployment
For production use, see:
Getting Help
- Discord: Community support
- Issues: GitHub Issues
- Docs: Full documentation