Skip to content

1. Run the server

The server is oliviadb-server: one process serving the network API (HTTPS), and when configured the native protocol, MCP and the web console. The command-line tool oliviadb checks schemas and runs maintenance. Pick one of three ways to get them.

Linux amd64 and arm64, on GitHub's registry and Docker Hub. The image makes a self-signed certificate and an API key at its first start, in the volume /data.

docker run -d --name oliviadb -p 8443:8443 -p 7655:7655 \
  -e OLIVIADB_NATIVE=1 -e OLIVIADB_PRINCIPAL=app -e OLIVIADB_TENANT=acme \
  -v oliviadb-data:/data ghcr.io/oliviadb/oliviadb:0.1
docker exec oliviadb cat /data/api-key > api-key        # the generated API key
docker cp oliviadb:/data/tls/server.pem server.pem       # its certificate, to trust it

Port 8443 is HTTPS, 7655 the native protocol (OLIVIADB_NATIVE=1). OLIVIADB_PRINCIPAL and OLIVIADB_TENANT name the identity the key belongs to (defaults operator and demo); step 4 gives that principal a profile. Every variable and what /data holds: the container image.

Each release has one archive per platform (platforms): oliviadb-v0.1.3-<target>.tar.gz for x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, x86_64-unknown-linux-musl, aarch64-unknown-linux-musl, aarch64-apple-darwin and x86_64-apple-darwin, with SHA256SUMS and an SPDX SBOM.

curl -fsSLO https://github.com/OliviaDB/oliviadb/releases/download/v0.1.3/oliviadb-v0.1.3-x86_64-unknown-linux-gnu.tar.gz
tar -xzf oliviadb-v0.1.3-x86_64-unknown-linux-gnu.tar.gz
export PATH="$PWD/oliviadb-v0.1.3-x86_64-unknown-linux-gnu:$PATH"

To check what you downloaded: the archive against SHA256SUMS, and SHA256SUMS against its keyless signature, made by the release workflow of OliviaDB/oliviadb for the tag (cosign 2.4 or later); the archives also carry GitHub build provenance (gh attestation verify):

B=https://github.com/OliviaDB/oliviadb/releases/download/v0.1.3
curl -fsSLO $B/SHA256SUMS && curl -fsSLO $B/SHA256SUMS.sigstore.json
sha256sum --ignore-missing -c SHA256SUMS            # macOS: shasum -a 256 --ignore-missing -c SHA256SUMS
cosign verify-blob --bundle SHA256SUMS.sigstore.json \
  --certificate-identity https://github.com/OliviaDB/oliviadb/.github/workflows/release.yml@refs/tags/v0.1.3 \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com SHA256SUMS
gh attestation verify oliviadb-v0.1.3-x86_64-unknown-linux-gnu.tar.gz --repo OliviaDB/oliviadb

Then write a configuration and start the server, as below.

Rust as pinned in rust-toolchain.toml of the repository:

git clone https://github.com/OliviaDB/oliviadb && cd oliviadb
cargo build --release -p oliviadb-server -p oliviadb-ops
export PATH="$PWD/target/release:$PATH"

Then write a configuration and start the server, as below.

Start the binary with a configuration

The binary takes one JSON configuration file (--config). This one listens on this machine only, over TLS with a self-signed certificate for localhost, with one API key. The server keeps only the key's SHA-256 (oliviadb-server --hash-key), so the key itself stays in your file api-key.

# A certificate for localhost (use your own in production: "tls" below names its files).
openssl req -x509 -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes -days 365 \
  -subj /CN=localhost -addext subjectAltName=DNS:localhost,IP:127.0.0.1 \
  -addext basicConstraints=critical,CA:FALSE -addext extendedKeyUsage=serverAuth \
  -keyout server.key -out server.pem 2>/dev/null
# An API key: you keep the key, the server gets its hash.
(umask 077; openssl rand -hex 24 > api-key)
cat > config.json <<EOF
{"listen": "127.0.0.1:8443", "native_listen": "127.0.0.1:7655", "dir": "data",
 "tls": {"cert": "server.pem", "key": "server.key"},
 "api_keys": [{"sha256": "$(oliviadb-server --hash-key "$(cat api-key)")",
               "tenant": "acme", "principal": "app", "profiles": ["read", "memory"]}]}
EOF
oliviadb-server --config config.json >> server.log 2>&1 &
echo $! > oliviadb.pid
# Ready when /readyz answers.
until curl -fsS --cacert server.pem https://localhost:8443/readyz; do sleep 0.2; done
  • listen: HTTPS (plain HTTP is served on a loopback address only, when tls is absent).
  • native_listen: the native protocol (default port 7655), TLS with the same certificate.
  • dir: where the server keeps everything: this is the database (step 3).
  • api_keys: who may connect. profiles are the key's scopes: read for reads, memory for writes, admin for operator reports and erasure.

Every member of the file: network API, configuration and the comment at the top of open/crates/oliviadb-server/src/config.rs. Stop the server with kill $(cat oliviadb.pid); it keeps its data in dir across restarts.

With your coding agent

With the OliviaDB skills installed (step 0), the agent does this step from one request, and runs the commands above:

Ask your agent

Using the oliviadb-develop skill, start OliviaDB locally from the container image with the native protocol on, and give me the API key file and the CA file to connect with.

Next: connect.