Self-host Hanzo Cloud locally or air-gapped

Boot the open-source single-binary Hanzo Cloud server locally or in an air-gapped datacenter using the exact same /v1/ contract as api.hanzo.ai.

The hosted cloud and the binary you run on your own metal are the same software. Self-host hanzoai/cloud for air-gapped, sovereign, or zero-egress environments with identical SDKs and CLI commands.

Architecture & contract

One Go binary bundles Base, KMS hooks, PubSub/JetStream, and API routing with zero mandatory external Postgres or Redis during local boot. For multi-node Kubernetes clusters, hanzo up provisions a Dockerless local microVM k3s cluster.

Primary endpoint: GET /v1/models · Status: shipped · Level: practitioner

Run it across all four surfaces

git clone https://github.com/hanzoai/cloud && cd cloud
make dev
# Verify local health and models endpoint
curl -sS http://127.0.0.1:9090/healthz
import { Configuration, AiApi } from 'hanzoai';

const local = new AiApi(new Configuration({
  basePath: 'http://127.0.0.1:8080',
  accessToken: process.env.HANZO_API_KEY,
}));
const { data } = await local.getModels();
console.log(data);
import os
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AiApi

client = ApiClient(Configuration(host="http://127.0.0.1:8080", access_token=os.environ["HANZO_API_KEY"]))
print(AiApi(client).get_models())
# Same /v1/models contract works locally (http://127.0.0.1:8080) and hosted (https://api.hanzo.ai)
curl -s https://api.hanzo.ai/v1/models | jq '.data | length'
curl -s -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "platform",
      "arguments": {"op": "get_platform_health", "input": {}}
    }
  }'

Verify the outcome

  • Verify http://127.0.0.1:9090/healthz returns HTTP 200 and a local /v1/base write persists across restarts.

Production guardrails

  • Keep root disk usage below 85% on self-hosted nodes and back up encrypted KMS root keys out of band.

Next steps & Hanzo University

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.
Last updated Nov 25, 2026