Self-hosting

Bring your own database

The page store is a small Postgres-backed service with a documented HTTP API. Run it next to your app, or let the desktop app stay fully local.

The HTTP API

A handful of REST endpoints over page snapshots — the same surface the app and SDK use.

text
GET    /api/pages           # list pages
POST   /api/pages           # create  { name, data }
GET    /api/pages/:id       # read a page snapshot
PUT    /api/pages/:id       # update
DELETE /api/pages/:id       # remove

Run it

Set DATABASE_URL and start the server. Local development uses an embedded Postgres (PGlite); production points at any Postgres instance.

bash
# Point the store at your database and run it.
export DATABASE_URL=postgres://user:pass@host:5432/openbook
pnpm --filter @book.dev/server start

# Seed the reactive sample document to verify end-to-end:
pnpm seed

Local-first first

Hosting the store is optional. OpenBook works fully offline against local storage; the server exists for sync and multi-device access, not as a hard dependency.