Skip to Content
The Ngamia platform API is in preview. Endpoints may change before general availability.
Self-hostingDocker Compose stack

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:

PathContents
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.envNAK assertion key and database URL
secrets/ubongo*.envUBONGO 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 ps

PostgreSQL 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 # 404

Optional 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 -d
Last updated on