Datahub
One record for all your machines, or your team.
On Postgres, every machine captures into the same memory and the workers run next to the database. Several people can share one datahub; each person’s memory stays private to them until they share it.
Set up a node
- Prepare the database: the
vectorandpg_trgmextensions and the LEAKPROOF operator marks need a superuser once per database. Operations reference has the statements. - Run the release’s
rivethub-migrate postgres. Releases from 0.8.4 require Postgres schema 75 (0.8.3 required 62). No service migrates on start, and each one refuses to run behind the schema it needs. For an existing store, follow the datahub upgrade steps. - Write
~/.rivethub/config.yamland check it withrh config validate,rh gateway --checkandrh doctor. - Use the service guide; stop a detached node first. A Postgres unit runs the supervisor, while a standalone SQLite unit runs
rh local.
runtime:
default_agent: summarizer
agents:
summarizer: { provider: local-llm, model: example-model }
providers:
local-llm: { type: openai-compatible, base_url: http://llm.example:8000/v1, model: example-model }
memory:
backend: postgres
postgres:
connection_string: ${RIVETHUB_PG_URL}
embed_endpoint: http://embed.example:8001/v1
embed_model: example-embedding-model
gateway:
host: 127.0.0.1
port: 5174Off loopback the gateway refuses to start without TLS: set gateway.host, gateway.tls_cert and gateway.tls_key.
Workers
Run one rh worker --role <role> process per role, usually as systemd units next to Postgres. Each uses the model of its configuration’s runtime.default_agent.
| Role | Jobs |
|---|---|
embedder | embeddings for new messages, chunks and summaries |
summarizer | the summary tree, tool-call synthesis, idle and stale sweeps |
categorizer | filing conversations into topics, Tidy proposals |
wiki-builder | wiki extraction, consolidation and recompiles; needs RIVETHUB_WIKI_EXTRACTION=1 |
all | every role in one process |
rh memory queue-status shows each task’s pending, running and dead jobs. Unit files, memory limits and tuning variables are in Operations reference.
Tenancy
gateway.users_file (or RIVETHUB_USERS_FILE) names the node’s users. The file holds only SHA-256 digests of bearer tokens, never a token itself:
{
"ownerUserId": "alice",
"unmappedIsOwner": false,
"users": { "alice": { "tokens": ["<sha256 hex>"] }, "bob": { "tokens": ["<sha256 hex>"] } },
"spaces": { "home": { "kind": "household", "name": "Home", "members": ["alice", "bob"] } }
}- Every captured row records its owner: a bearer token’s user, or the node’s owner for an authenticated local owner request.
- Everything is private to its owner until shared with a space (
household,teamorcompartment). Only an item’s owner can share it. - A session’s visibility is its own mark, else its topic’s, else its owner’s default, else private.
- Postgres enforces this with forced row-level security on every owned table. Workers and operator commands run as maintenance.
- Wiki pages live in scopes: yours at the root, another person’s under
users/<user>/, a space’s underspaces/<space>/. A private session’s notes never reach a shared page.
A person can also be given their own Postgres role, pinned to them by the store; Operations reference covers person logins.
SQLite is for one person. A standalone node stores visibility marks but does not filter reads by them.
Backups
Dump Postgres as a superuser: a role under forced row-level security cannot pg_dump its own tables. The wiki is git; back up each scope’s repository. Operations reference has both procedures and the restore steps.
New to rh?
Start with a standalone node. A datahub can take its sessions in later.