Creates the API layer for Open Notebook Creates a services API gateway for the Streamlit front-end Migrates the SurrealDB SDK to the official one Change all database calls to async New podcast framework supporting multiple speaker configurations Implement the surreal-commands library for async processing Improve docker image and docker-compose configurations
9.3 KiB
Open Notebook - Docker Setup Guide for Beginners
A step-by-step guide to get Open Notebook running with Docker - no technical experience required!
What You'll Get
Open Notebook is a powerful AI-powered research and note-taking tool that:
- Helps you organize research across multiple notebooks
- Lets you chat with your documents using AI
- Supports multiple AI providers (OpenAI, Anthropic, Google, and more)
- Creates AI-generated podcasts from your content
- Works with PDFs, web links, videos, audio files, and more
Prerequisites
Before we start, you'll need:
- A computer running Windows, macOS, or Linux
- An internet connection
- At least one AI provider API key (see section below)
Step 1: Install Docker Desktop
Docker Desktop is the software that will run Open Notebook on your computer.
For Windows:
- Go to https://www.docker.com/products/docker-desktop/
- Click "Download for Windows"
- Run the downloaded installer
- Follow the installation wizard
- Restart your computer when prompted
For macOS:
- Go to https://www.docker.com/products/docker-desktop/
- Click "Download for Mac"
- Choose your Mac type (Intel or Apple Silicon)
- Open the downloaded .dmg file
- Drag Docker to your Applications folder
- Open Docker from Applications
For Linux (Ubuntu/Debian):
- Open Terminal
- Run these commands one by one:
sudo apt update
sudo apt install docker.io docker-compose
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker $USER
- Log out and log back in
Step 2: Get Your OpenAI API Key
Open Notebook uses OpenAI's powerful AI models. With just one API key, you'll have access to everything you need:
- Text generation for chat and notes
- Embeddings for search functionality
- Text-to-speech for podcast generation
- Speech-to-text for audio transcription
How to Get Your OpenAI API Key
- Go to https://platform.openai.com/
- Create an account or sign in
- Click on "API Keys" in the left sidebar
- Click "Create new secret key"
- Give your key a name (e.g., "Open Notebook")
- Copy the key that appears (it starts with "sk-")
- Save this key somewhere safe - you won't be able to see it again!
Add Credits to Your Account
Important: OpenAI requires you to add credits before you can use the API.
- In the OpenAI platform, click "Billing" in the sidebar
- Click "Add payment details"
- Add at least $5 in credits (this will last a long time for personal use)
- You can set up usage limits to control spending
Step 3: Create Your Configuration Files
Create the docker-compose.yml file
- Create a new folder on your computer called
open-notebook - Open a text editor (Notepad on Windows, TextEdit on Mac, or any text editor)
- Copy and paste this content -- or download it from here:
services:
open_notebook:
image: lfnovo/open_notebook:latest-single
ports:
- "8080:8502"
env_file:
- ./docker.env
pull_policy: always
volumes:
- ./notebook_data:/app/data
- ./surreal_data:/app/surreal_data
restart: always
- Save this file as
docker-compose.ymlin youropen-notebookfolder
Create the docker.env file
- In the same
open-notebookfolder, create a new file - Copy and paste this content, replacing
YOUR_OPENAI_API_KEY_HEREwith your actual API key -- or download it from here - be sure to rename it todocker.env:
# REQUIRED: Your OpenAI API key
OPENAI_API_KEY=YOUR_OPENAI_API_KEY_HERE
# Database settings (don't change these)
SURREAL_ADDRESS=localhost
SURREAL_PORT=8000
SURREAL_USER=root
SURREAL_PASS=root
SURREAL_NAMESPACE=open_notebook
SURREAL_DATABASE=production
- Important: Replace
YOUR_OPENAI_API_KEY_HEREwith your actual API key from Step 2 - Save this file as
docker.envin youropen-notebookfolder
Step 4: Start Open Notebook
Windows:
- Open Command Prompt
- Navigate to your open-notebook folder:
cd C:\path\to\your\open-notebook - Run:
docker-compose up -d
macOS/Linux:
- Open Terminal
- Navigate to your open-notebook folder:
cd /path/to/your/open-notebook - Run:
docker-compose up -d
What happens next:
- Docker will download the necessary files (this might take a few minutes the first time)
- Two services will start: the database and Open Notebook
- You'll see messages indicating the services are starting
Important
- Make sure that Docker Desktop is running before starting Open Notebook.
- Make sure both the
docker-compose.ymlanddocker.envfiles are in this folder where you run thedocker-compose up -dcommand.
Step 5: Access Open Notebook
- Open your web browser
- Go to: http://localhost:8502
- You should see the Open Notebook interface!
Step 6: Configure Your AI Models
Before creating your first notebook, you need to set up which AI models to use for different tasks.
Navigate to Models Settings
- Click on "⚙️ Settings" in the sidebar
- Click on "🤖 Models" tab
Set Up Your Models
You'll need to configure models for different purposes. Here are the recommended OpenAI models for each category:
1. Language Models (For conversations and general AI assistance)
- Recommended:
gpt-4o-mini(fast and cost-effective) - Alternative:
gpt-4o(more powerful but costs more)
2. Embedding Model (For search and finding similar content)
- Recommended:
text-embedding-3-small(best balance) - Alternative:
text-embedding-3-large(better quality, costs more) - Note: This is required for the search feature to work
3. Text-To-Speech Model (For processing your documents)
- Recommended:
gpt-4o-mini-tts(handles long documents well) - Alternative:
tts-1(cheaper, less quality)
4. Speech-to-Text Model (For generating podcasts)
- Recommended:
whisper-1(best quality for creative content)
How to Configure Each Model
- For each model category, click the dropdown menu
- Select your chosen model from the list
- Click "Save" after configuring all models
- You should see a success message
Tips for Model Selection
- Start with the recommended models - they provide the best balance of quality and cost
- You can change models anytime - experiment to find what works best
- Check your OpenAI usage - monitor costs at https://platform.openai.com/usage
- All these models use your OpenAI API key - no additional setup needed
Step 7: Create Your First Notebook
- Click "Create New Notebook"
- Give it a name (e.g., "My Research")
- Add a description
- Click "Create"
Step 8: Add Your First Source
- In your new notebook, click "Add Source"
- Choose from:
- Link: Paste any web URL
- File: Upload PDFs, documents, audio, or video files
- Text: Paste text directly
- Click "Add Source"
- Wait for processing to complete
Step 9: Start Using Open Notebook
Now you can:
- Chat with your content: Use the chat panel to ask questions about your sources
- Create notes: Write or generate AI-powered notes
- Generate podcasts: Create multi-speaker podcasts from your content
- Search: Find information across all your sources
- Add more sources: Keep building your knowledge base
Troubleshooting
Port already in use
If you get an error about port 8502 being in use:
- Stop the current container:
docker-compose down - Wait a few seconds
- Start again:
docker-compose up -d
Can't access the interface
- Make sure Docker Desktop is running
- Check that both containers are running:
docker-compose ps - Try restarting:
docker-compose restart
API key errors
- Double-check your API keys in the
docker.envfile - Make sure you have credits in your AI provider account
- Verify the keys don't have extra spaces or characters
General issues
- Stop everything:
docker-compose down - Remove old containers:
docker-compose down -v - Start fresh:
docker-compose up -d
Stopping Open Notebook
To stop Open Notebook:
docker-compose down
To start it again:
docker-compose up -d
Getting Help
- Discord: Join the Open Notebook community at https://discord.gg/37XJPXfz2w
- GitHub Issues: Report bugs at https://github.com/lfnovo/open-notebook/issues
- Documentation: Visit https://www.open-notebook.ai for more features and guides
Next Steps
Once you're comfortable with the basics:
- Try the transformation features to extract insights
- Create multi-speaker podcasts from your research
- Experiment with different OpenAI models for various tasks
- Explore the search functionality to find information quickly
Ready for More? Check Out the Advanced Guide!
Now that you have Open Notebook running with OpenAI, you might want to explore more AI providers and advanced features. Check out our Advanced Docker Setup Guide to learn about:
- OpenRouter: Access to 100+ models from different providers (Claude, Gemini, Llama, etc.)
- Ollama: Run AI models locally on your computer for complete privacy
- Additional providers: Anthropic, Google, Groq, and more
- Advanced configurations: Custom model settings and optimizations
Welcome to Open Notebook! 🚀