Skip to content

Getting started: the core image, the console, the demo bank

One container with the network API (agent memory, agent state, native aggregates), the read-only web console and MCP over HTTP (oliviadb-server), and the SQL projection of a synthetic demo bank over the PostgreSQL wire protocol (oliviadb-sql-server), running as a non-root user. The enterprise image (repository oliviadb-enterprise) serves the demo's databases through the network API under agent PSBs too, in one process (oliviadb-agent-server).

docker build -f docker/Dockerfile -t oliviadb:dev .
docker run -d --name oliviadb -p 8443:8443 -p 5432:5432 -v oliviadb-data:/data oliviadb:dev
docker exec oliviadb cat /data/api-key        # the generated API key
docker exec oliviadb cat /data/sql-password   # the generated SQL password (user oliviadb)

Then open https://localhost:8443/console (a self-signed certificate unless you mount one, see below), enter the key. SQL: psql "host=localhost user=oliviadb dbname=oliviadb sslmode=require" -c 'SELECT * FROM bankdb.cust LIMIT 5'. MCP clients: https://localhost:8443/mcp with Authorization: Bearer <key> (Streamable HTTP of revision 2026-07-28, docs/mcp.md).

Image

Build multi-stage: rust:1.100-trixie builds oliviadb-server, oliviadb, oliviadb-sql-server (--locked); the runtime stage is debian:trixie-slim
User oliviadb, uid 10001, no shell; /data is its home and the only writable place
Ports 8443: HTTPS (network API, /console, /mcp, /healthz, /readyz, /metrics); 5432: SQL projection (TLS with the same certificate)
Volume /data (below)
Health HEALTHCHECK with curl on https://127.0.0.1:8443/readyz every 10 s
Init tini (signals, zombies), then docker/entrypoint.sh, which starts oliviadb-sql-server and then exec oliviadb-server

/data

Path What
demo/ the demo bank: library/ (DBD, PSB), psb/ (agent PSBs), replica/ (the store); generated at the first start
tls/server.pem, tls/server.key the server's certificate chain and key (PEM); self-signed at the first start when absent
state/ agent memory and its master key (state/master.key, made at the first start)
api-key, sql-password generated secrets (mode 0600), when not given by the environment
server.json, sql.json the configurations of oliviadb-server and oliviadb-sql-server, written at every start from the environment

A real certificate: put server.pem (chain) and server.key into the volume's tls/ directory before the first start, or mount them: -v /etc/oliviadb/tls:/data/tls:ro. They are used for HTTPS and for SQL; the self-signed one is made only when either file is missing.

Environment

Variable Default
OLIVIADB_API_KEY generated into /data/api-key the key of the one configured identity (profiles read, memory, admin)
OLIVIADB_TENANT, OLIVIADB_PRINCIPAL demo, operator that identity
OLIVIADB_SQL_USER, OLIVIADB_SQL_PASSWORD oliviadb, generated into /data/sql-password the SQL user (stored as a SCRAM-SHA-256 verifier)
OLIVIADB_DEMO 1 0: no demo bank
OLIVIADB_DEMO_CUSTOMERS, OLIVIADB_DEMO_DAYS, OLIVIADB_DEMO_SEED 200, 60, 1 the demo's size and seed
OLIVIADB_REPLICA, OLIVIADB_LIBRARY, OLIVIADB_AGENT_PSB the demo's your own replica, DBD/PSB library and agent PSB of the SQL projection (paths under /data)
OLIVIADB_SCHEMA none a schema file (a path in the container, mounted): its aggregates are served natively under its access profiles (docs/network-api.md, "Native aggregates"); the principal names its profile
OLIVIADB_CACHE_MB none one block cache of that many MiB for every tree (agent memory, agent state, native aggregates); without it each tree has 64 MiB of its own
OLIVIADB_RECALL_INDEX_MB none the agent memory's recall index budget in MiB (recall_index_mb, docs/agent-memory.md "Recall index"); without it 256 MiB
OLIVIADB_NATIVE 0 1: the native protocol (docs/network-api.md, "Native protocol") on port 7655, TLS with the server's certificate
OLIVIADB_DLI_STORE, OLIVIADB_DLI_LIBRARY, OLIVIADB_DLI_PSB none DL/I databases served read only (docs/network-api.md, "DL/I databases"): the DL/I system's directory, the DBD and PSB library, and the view PSB of OLIVIADB_PRINCIPAL (paths under /data or mounted). The server holds the stores exclusively while it runs: run the DL/I programs that write them first
OLIVIADB_DLI_DATABASES none databases kept in stores of their own, DBD=directory,...
OLIVIADB_DLI_RUNTIME ebcdic the DL/I data's representation: ebcdic, ascii-be or ascii-le
OLIVIADB_SQL 1 0: no SQL projection (oliviadb-sql-server is not started)
OLIVIADB_TLS_NAME localhost the name in the self-signed certificate

For anything beyond this (JWT issuers, several identities, audit log) mount your own configurations and run oliviadb-server --config FILE (and oliviadb-sql-server --config FILE) (docs/network-api.md, docs/sql.md).

Licences of what goes into the image

  • OliviaDB's binaries: the crates of Cargo.lock, checked by tools/licenses.py and listed in THIRD_PARTY.md (copied into the image with LICENSE.md under /usr/share/doc/oliviadb).
  • The base and the added packages (ca-certificates, openssl, curl, tini): Debian main only, so free software by Debian's guidelines; sources at sources.debian.org. docker/packages.txt lists every package the image may hold with the licences its copyright file names; tools/docker-test.sh fails when the image holds a package that is not listed. No models, no reference data.

The console

GET /console (any server: oliviadb-server, oliviadb-agent-server, HA nodes): a static page and script that hold no data and load nothing else (content security policy default-src 'none', script and style from the server itself). The key typed in stays in the tab's session storage. It reads through the authenticated routes, so it sees exactly what the key's identity may see (agent PSB: tables, fields, rows, masks):

  • the catalog (/v1/data/catalog) and memory's entities;
  • browsing by path (/v1/path): lists with paging, a segment with its fields decoded by the layout and its child types; as of a UTC time (the source time of the replica);
  • statistics (GET /v1/admin/stats) and the integrity check (GET /v1/admin/check, the same report as oliviadb check: in the core image over the server's own storage trees, in the enterprise image over the DL/I replica), admin profile only.

Read-only: the page calls no route that writes.

The demo bank

oliviadb demo --out DIR [--customers N] [--days N] [--seed N] (open/crates/oliviadb-ops/src/demo.rs): a synthetic retail bank from a seed (invented names, tax ids and amounts; the same seed gives the same bank). BANKDB (HIDAM): CUST (customer number, name, branch, tax id, customer since, segment) → ACCT (account number, kind, status, balance in cents, opened) → TXN (number, amount in cents, code, memo). It is built as a change stream in source-time order: day 0 (2026-01-01) opens every customer's accounts with a deposit, each later day adds transactions (a unit of work each: the transaction and the account's new balance), now and then an account is paid out and closed. So reads as of a day show the bank on that day. Agent PSBs: teller.psb (everything, the tax id masked), branch.psb (the caller's branch, from the branch attribute, no tax id).

What holds by construction and is tested from the data read back (oliviadb-ops/tests/demo.rs): every balance is the sum of the account's transactions, at the latest time and as of an earlier day; a closed account holds nothing.

Tests

  • tools/docker-test.sh builds the image and checks it from outside, on a Docker network: healthy, uid 10001, TLS only (plain HTTP refused), the console page and its policy, agent memory (no key: 401; remember, then recall finds the fact), MCP tools/list, SQL with the postgres:16 image's psql over TLS (customer count; no account whose balance differs from the sum of its transactions), memory and data kept across a restart, and the package list.
  • oliviadb-server/tests/mcp_http.rs: MCP over HTTP, the console's files, report refusals.

Open: no published image (build it locally); one identity configured by the entrypoint; the console is checked by its HTTP behaviour and script syntax, not yet in a browser by a test.