docs/1-INSTALLATION/from-source.md
Clone the repository and run locally. For developers and contributors.
curl -LsSf https://astral.sh/uv/install.sh | shgit clone https://github.com/lfnovo/open-notebook.git
cd open-notebook
# If you forked it:
git clone https://github.com/YOUR_USERNAME/open-notebook.git
cd open-notebook
git remote add upstream https://github.com/lfnovo/open-notebook.git
uv sync
uv pip install python-magic
If you prefer using Conda to manage your environments, follow these steps instead of the standard uv sync:
# Create and activate the environment
conda create -n open-notebook python=3.11 -y
conda activate open-notebook
# Install uv inside conda to maintain compatibility with the Makefile
conda install -c conda-forge uv nodejs -y
# Sync dependencies
uv sync
Note: Installing
uvinside your Conda environment ensures that commands likemake start-allandmake apicontinue to work seamlessly.
# Terminal 1
make database
# or: docker compose up surrealdb
cp .env.example .env
# Edit .env and set:
# OPEN_NOTEBOOK_ENCRYPTION_KEY=my-secret-key
After starting the app, configure AI providers via the Settings → API Keys UI in the browser.
# Terminal 2
make api
# or: uv run --env-file .env uvicorn api.main:app --host 0.0.0.0 --port 5055
# Terminal 3
cd frontend && npm install && npm run dev
# Format and lint Python
make ruff
# or: ruff check . --fix
# Type checking
make lint
# or: uv run python -m mypy .
uv run pytest tests/
# Start everything
make start-all
# View API docs
open http://localhost:5055/docs
# Check database migrations
# (Auto-run on API startup)
# Clean up
make clean
python --version # Check version
uv sync --python 3.11 # Use specific version
Install Node.js from https://nodejs.org/
docker ps # Check SurrealDB running
docker logs surrealdb # View logs
# Use different port
uv run uvicorn api.main:app --port 5056