Skip to content

Server Guide

Zann server provides the API, shared vaults, and token issuance for CLI access.

  • HTTP API for clients (desktop and CLI)
  • Shared vault encryption and access control
  • Service account tokens for automation
Terminal window
git clone https://github.com/constXife/zann
cd zann
docker compose up -d
Terminal window
docker pull constxife/zann-server:latest

Start from config/config.example.yaml and supply required secrets via env:

  • ZANN_PASSWORD_PEPPER
  • ZANN_TOKEN_PEPPER
  • ZANN_SMK_FILE or server.master_key
  • ZANN_CONFIG_PATH

Common env vars:

  • ZANN_CONFIG_PATH - path to the server config file
  • ZANN_ENV - environment name (prod enables stricter output in health checks)
  • ZANN_PASSWORD_PEPPER / ZANN_PASSWORD_PEPPER_FILE
  • ZANN_TOKEN_PEPPER / ZANN_TOKEN_PEPPER_FILE
  • ZANN_SMK / ZANN_SMK_FILE

Run database migrations via the server CLI:

Terminal window
zann-server migrate

Create and manage tokens for CLI automation:

Terminal window
zann-server token create ci-prod infra:/
zann-server token list
zann-server token revoke <token_id>

For server-side bootstrap flows, use the privileged provisioning helpers:

Terminal window
zann-server provision ensure-system-user
zann-server provision ensure-vault --name Infrastructure --slug infra
zann-server provision set-field --vault infra --path rlyeh/yogg/grafana --key client_id --value grafana-rlyeh
zann-server provision ensure-token yogg-grafana infra:rlyeh/yogg/grafana read --write-token-file /run/secrets/yogg-zann-token

The server exposes a health check at:

GET /health

It includes component status (db, db_pool, kdf, oidc) and version info.

  • Prefer HTTPS and pin the server fingerprint in clients.
  • Keep token scopes narrow and rotate regularly.