Docker Compose stack
Configure
git clone https://github.com/Ngamia-AI/Ngamia-Agent.git && cd Ngamia-Agent/deploy
cp .env.example .env
$EDITOR .env # NGAMIA_DOMAIN, ACME_EMAIL, MODEL_GATEWAY_URL, …
bin/init-secrets.sh
$EDITOR secrets/ubongo.env # UBONGO_MONGO_URI=mongodb+srv://…init-secrets.sh runs once and creates everything secret:
| Path | Contents |
|---|---|
secrets/postgres/ | superuser and per-service passwords; TLS server key and certificate |
secrets/ca/ | private CA for PostgreSQL TLS (keep ca.key offline) |
secrets/kida/ | KIDA database URL and RS256 signing key |
secrets/platform/ | database URL, data encryption key, Ed25519 assertion key, KIDA caller credential, UBONGO admin token |
secrets/nak/, secrets/nak.env | NAK assertion key and database URL |
secrets/ubongo*.env | UBONGO admin, parser and metrics tokens; Atlas URI |
generated/kida/ | public JWKS and KIDA’s caller registry (credential hash only) |
.env (appended) | key IDs and the platform’s and NAK’s public keys |
Files are mode 0400 and owned by the container user (65532 for KIDA and the
platform, 10001 for NAK). Back up secrets/ to your secret manager.
Start
docker compose up -d --build
docker compose psPostgreSQL starts first, then the three migration jobs, then KIDA, the platform and NAK. Caddy obtains the certificate on the first request.
Check
curl -s https://api.example.com/healthz
curl -s https://api.example.com/readyz | jq
curl -s https://api.example.com/identity/.well-known/jwks.json | jq '.keys[].kid'
curl -s -o /dev/null -w '%{http_code}\n' https://api.example.com/internal/v1/agents/x # 404Optional engines
# .env: NAK_TE_ENDPOINT=https://…, NAK_TE_ALLOWED_TOOLS=…, TE_IMAGE=…
# NAK_KUMBU_ENDPOINT=https://…, KUMBU_IMAGE=…
# NAK accepts plain HTTP only on loopback: serve TE and KUMBUKUMBU over HTTPS.
docker compose --profile tools --profile memory up -dLast updated on