---
title: "Deploy Open Notebook"
description: "Self-hosted NotebookLM alternative with SurrealDB, notes, chat and podcasts"
category: "AI/ML"
url: https://railway.com/deploy/open-notebook-2
---

# Deploy Open Notebook

Self-hosted NotebookLM alternative with SurrealDB, notes, chat and podcasts

**[Deploy Open Notebook on Railway](https://railway.com/template/open-notebook-2)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/open-notebook-2/manifest.json

- **Creator:** Protemplate
- **Category:** AI/ML
- **Total deploys:** 2

## Template content

### SurrealDB https://raw.githubusercontent.com/surrealdb/surrealdb/main/img/icon.png

- **Image:** surrealdb/surrealdb:v2.6.5
- **Start command:** `/surreal start --log info`
- **Health check:** /health

### Open Notebook https://raw.githubusercontent.com/lfnovo/open-notebook/main/logo.png

- **Image:** lfnovo/open_notebook:1.14.0
- **Health check:** /api/auth/status
- **Public domain:** Yes

## Documentation

# Deploy and Host Open Notebook on Railway

Open Notebook is an open-source, self-hosted alternative to Google's NotebookLM. You collect sources (PDFs, web pages, YouTube, audio, text), chat with them with citations, keep notes, run reusable transformations, search across everything, and generate multi-speaker podcasts. It works with OpenAI, Anthropic, Google, Groq, Mistral, OpenRouter, Ollama, and any OpenAI-compatible endpoint, configured from the UI.

## About Hosting Open Notebook

Hosting Open Notebook means running its container (Next.js UI, FastAPI backend, and a background worker under supervisord) next to a SurrealDB instance. This template mirrors the upstream two-service `docker-compose.yml`: the app image `lfnovo/open_notebook:1.14.0` with a volume at `/app/data` for uploads, podcasts, and caches, and `surrealdb/surrealdb:v2.6.5` with a volume at `/data` for the RocksDB datastore. Only the UI port (8502) is public; the frontend proxies `/api/*` to the backend, so a single Railway domain covers both. `API_URL` is pinned to the generated public domain because the frontend would otherwise auto-detect a `:5055` URL that Railway does not expose. SurrealDB binds `[::]:8000` for IPv6 private networking and runs with `RAILWAY_RUN_UID=0` so the non-root image can write the root-mounted volume. Both services have healthchecks with `PORT` set to their listen ports.

## Common Use Cases

- **Research workspace**: organize papers, articles, and transcripts into notebooks and ask grounded questions
- **Private NotebookLM**: keep sources and notes on your own infrastructure with your own provider keys
- **Podcast generation**: turn a notebook into a multi-speaker episode with configurable speaker profiles
- **Content transformations**: summaries, key insights, study guides, and custom prompts over any source
- **Team knowledge base**: password-protected instance with search across sources, notes, and insights

## Dependencies for Open Notebook Hosting

- **SurrealDB 2.x**: required, included as an internal-only service with its own volume
- **AI provider API key**: needed for chat, embeddings, transformations, and podcasts; added after deploy in **Manage → Models** (stored encrypted in the database)
- **No Redis, Postgres, or GPU required**

### Deployment Dependencies

- [Open Notebook Docker Compose install guide](https://github.com/lfnovo/open-notebook/blob/main/docs/1-INSTALLATION/docker-compose.md)
- [Environment variable reference](https://github.com/lfnovo/open-notebook/blob/main/docs/5-CONFIGURATION/environment-reference.md)
- [Reverse proxy and API_URL guide](https://github.com/lfnovo/open-notebook/blob/main/docs/5-CONFIGURATION/reverse-proxy.md)
- [Open Notebook GitHub repository](https://github.com/lfnovo/open-notebook)

### Implementation Details

First steps after deploy:

1. Open the generated domain and sign in with `OPEN_NOTEBOOK_PASSWORD` (Open Notebook service → Variables)
2. Go to **Manage → Models** → **Add Credential**, pick a provider, paste the key, **Test Connection**, **Discover Models**
3. Create a notebook, add a source, start chatting

Key variables:

```env
# Open Notebook
PORT=8502
API_URL=https://${{Open Notebook.RAILWAY_PUBLIC_DOMAIN}}
OPEN_NOTEBOOK_ENCRYPTION_KEY=${{secret(64)}}
OPEN_NOTEBOOK_PASSWORD=${{secret(24)}}
SURREAL_URL=ws://${{SurrealDB.RAILWAY_PRIVATE_DOMAIN}}:8000/rpc
SURREAL_USER=${{SurrealDB.SURREAL_USER}}
SURREAL_PASSWORD=${{SurrealDB.SURREAL_PASS}}
SURREAL_NAMESPACE=open_notebook
SURREAL_DATABASE=open_notebook

# SurrealDB (start command: /surreal start --log info)
PORT=8000
SURREAL_BIND=[::]:8000
SURREAL_USER=root
SURREAL_PASS=${{secret(32)}}
SURREAL_PATH=rocksdb:/data/mydatabase.db
RAILWAY_RUN_UID=0
```

Do not rotate `OPEN_NOTEBOOK_ENCRYPTION_KEY` after saving provider credentials, and do not change `SURREAL_PASS` after first boot (the root user is only created when none exists). Provider keys via env (`OPENAI_API_KEY`, etc.) still work but are deprecated upstream; the UI is the source of truth. Optional `OPEN_NOTEBOOK_ENABLE_DOCLING` / `OPEN_NOTEBOOK_ENABLE_CRAWL4AI` install heavy extraction runtimes on the next boot and cache them on the volume.

## Why Deploy Open Notebook on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Open Notebook on Railway, you get a password-protected research workspace with SurrealDB, generated secrets, persistent volumes for both services, healthchecks, managed SSL on one public domain, and private networking between the app and its database.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/open-notebook-2
