# Self-host Open Notebook

> An open source, self-hosted alternative to NotebookLM for researching with your own sources, with podcasts and chat. Add model provider keys in the app after install.

- Page: https://levelrail.com/templates/open-notebook/
- JSON: https://levelrail.com/templates/open-notebook.json
- Category: AI
- Licence: MIT (Permissive license)
- Source: https://github.com/lfnovo/open-notebook
- Upstream docs: https://github.com/lfnovo/open-notebook/blob/main/docs/1-INSTALLATION/docker-compose.md

## Requirements
- Memory: about 1.5 GiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 1.15.0

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| open_notebook | lfnovo/open_notebook | 1.15.0 | 8502, 5055 | notebook_data -> /app/data |
| surrealdb | surrealdb/surrealdb | v2.6.5 | none | surreal_data -> /home/nonroot |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| open_notebook | API_URL | preset |
| open_notebook | OPEN_NOTEBOOK_ENCRYPTION_KEY | generated |
| open_notebook | OPEN_NOTEBOOK_PASSWORD | generated |
| open_notebook | SURREAL_DATABASE | preset |
| open_notebook | SURREAL_NAMESPACE | preset |
| open_notebook | SURREAL_PASSWORD | generated |
| open_notebook | SURREAL_URL | preset |
| open_notebook | SURREAL_USER | preset |
| surrealdb | SURREAL_PASS | generated |
| surrealdb | SURREAL_USER | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install open-notebook --name my-open-notebook
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain open_notebook=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/open-notebook/install \
  -d '{
    "name": "my-open-notebook"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## Questions

### Can I deploy Open Notebook on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id open_notebook for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image lfnovo/open_notebook:1.15.0, surrealdb/surrealdb:v2.6.5 is what you deploy there.

Self-host Open Notebook, Open Notebook docker compose file, deploy Open Notebook on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
