Deploy and test Hanzo on your own machine

A tested path to run Hanzo Cloud and a local model on your own hardware, check that both work, and move them to a machine with no network. Every command here was run, and the output shown is real.

This page takes you from nothing to a running Hanzo install on one Linux machine, and shows you how to check that it works. Every command below was run on 2026-11-29. The output under each command is what we saw. Anything we did not run is marked Not tested.

If you only want a private model on your laptop, Private AI on your own machine is shorter.

What you get, and where each piece lives

A self-hosted install has two parts you run, and one tool you use to fetch models.

PieceWhat it doesSourceHow you run it hereAddress
Hanzo CloudThe API server: /v1 routes, health checks, the OpenAPI spec, and an MCP endpoint for agentshanzoai/cloudDocker image ghcr.io/hanzoai/cloud-oss:main, started with the repo's deploy/compose.yml127.0.0.1:8080
Hanzo EngineRuns open models on your CPU or GPU behind an OpenAI-compatible APIhanzoai/engineBuilt from source into one binary, hanzo-engine127.0.0.1:1234
Hanzo CLIDownloads models (hanzo pull)hanzoai/clinpm i -g hanzonone (client only)
your app, curl, or an OpenAI SDK
   │
   ├──► 127.0.0.1:8080   Hanzo Cloud    (Docker container "hanzo-cloud")
   │         └── data in the Docker volume deploy_cloud-data, mounted at /var/lib/cloud
   │
   └──► 127.0.0.1:1234   Hanzo Engine   (hanzo-engine process)
             └── model files in ~/.cache/huggingface/hub, fetched by `hanzo pull`

The two parts do not talk to each other in this guide. Wiring Cloud's model routes to your own engine is Not tested yet.

Read this first: what works today

We are opening this stack up in public, and some edges are still rough. You should know these before you start:

  1. Use the Docker image for Cloud, not a source build. A clean build of hanzoai/cloud or hanzoai/iam from source stops with could not read Username for 'https://github.com'. Both depend on Go modules that are not public yet. The published image ghcr.io/hanzoai/cloud-oss:main needs none of that.
  2. Build the engine from source. The engine you get from npm i -g hanzo is the older release v1.7.92. In our test it failed to load zen-nano (shape mismatch for model.embed_tokens.weight). The engine built from main worked.
  3. Cloud runs, but it does not store your data yet. The health checks, the OpenAPI spec and the MCP tool list all work. The data routes we tried (/v1/kv, writes to /v1/base, /v1/kms) answered 503 audit_unavailable. Every request that touches data must be written to an audit log first, and the service that keeps that log is not in the open image. Signing in with your own Hanzo IAM, which data routes also need, is Not tested. See What is not covered yet.

What you need

Tested withNotes
OSDebian 13, x86-64Other Linux distributions, macOS and Windows are Not tested.
CPU and memory8 cores, 16 GB RAM, no GPUCloud used about 600 MiB at idle. The engine peaked at about 4.1 GiB with zen-nano.
DiskAbout 20 GB freeCloud image: 7.3 GB. zen-nano model: 6.13 GiB. Engine build folder: 2.2 GB.
DockerDocker Engine 26.1.5 with Compose 2.26.1Needed for Cloud. Run docker as root or as a user in the docker group.
Git, curl, OpenSSLany recent versionOpenSSL makes the encryption key.
Ruststable, installed with rustupNeeded for the engine. Its README asks for 1.88 or newer. We used gcc 14 as the C compiler.
Node.js24, with npm 11Needed for the CLI that downloads models.
Networkonly for the downloadsAfter that, both parts run with no network. See Run it air-gapped.

Part 1: Run Hanzo Cloud

1

Get the compose file

git clone --depth 1 https://github.com/hanzoai/cloud
cd cloud

You only need deploy/compose.yml from this repository. Nothing gets built.

2

Make an encryption key

Cloud encrypts the data it stores with a key you hold. Make one in the cloud folder and keep the file safe. The hanzoai/cloud README says stored data opens only with the key that wrote it.

(umask 077 && openssl rand -base64 32 > master.key)

Give the key to the container. Save this as compose.override.yml in the cloud folder:

services:
  cloud:
    environment:
      CLOUD_KMS_MASTER_KEY_REF: ${CLOUD_KMS_MASTER_KEY_REF:?set it from master.key}

Without a key, Cloud started the first time but came back unhealthy after a restart. With the key, it was healthy both times.

3

Start it

export CLOUD_KMS_MASTER_KEY_REF="$(cat master.key)"
export HANZO_HTTP_PORT=127.0.0.1:8080 HANZO_METRICS_PORT=127.0.0.1:9090 HANZO_ZAP_PORT=127.0.0.1:9653
docker compose -f deploy/compose.yml -f compose.override.yml up -d

The three HANZO_*_PORT lines keep every port on 127.0.0.1. Leave them out and the compose file publishes ports 8080, 9090 and 9653 on every network interface, so other machines on your network can reach Cloud.

If you run Docker through sudo, put the variables after sudo, because sudo drops your exported ones. We ran it this way: sudo CLOUD_KMS_MASTER_KEY_REF="$(cat master.key)" HANZO_HTTP_PORT=127.0.0.1:8080 HANZO_METRICS_PORT=127.0.0.1:9090 HANZO_ZAP_PORT=127.0.0.1:9653 docker compose -f deploy/compose.yml -f compose.override.yml up -d.

The first up downloads the 7.3 GB image. That took under 3 minutes on our connection.

4

Wait until it is healthy

The compose file has a health check. It runs a probe that ships inside the image. Wait until the status reads (healthy). That took about 35 seconds for us.

docker compose -f deploy/compose.yml ps
NAME          IMAGE                            ...   STATUS                   PORTS
hanzo-cloud   ghcr.io/hanzoai/cloud-oss:main   ...   Up 41 seconds (healthy)   127.0.0.1:8080->8080/tcp, 127.0.0.1:9090->9090/tcp, 127.0.0.1:9653->9653/tcp

Checks sent before then can answer 503 with mount /v1: no instance running. That only means Cloud is still starting.

Verify Cloud works

Run the same probe yourself:

docker compose -f deploy/compose.yml exec cloud /smoke -class health -base http://127.0.0.1:8080 -timeout 5
      SUBSYSTEM               STATUS    PATH
PASS  base-health             200       /v1/base/health
PASS  ready                   200       /readyz
PASS  health                  200       /v1/health
3 passed, 0 failed, 3 total

SMOKE PASS: every core subsystem returned a working code (no 402-on-read, no 5xx)

Or check each route with curl:

curl -s http://127.0.0.1:8080/v1/health
{"revision":"8f2725d58e0fc7218d457aa7f9d40eab1b386c4f","status":"ok"}

revision is the hanzoai/cloud commit the image was built from.

curl -s http://127.0.0.1:8080/v1/base/health
{"service":"base","status":"ok"}
curl -s http://127.0.0.1:8080/readyz
{"absent":{"s3":"exited before listening: exit status 1"},"status":"ok"}

absent lists the parts that did not start. Object storage (s3) does not start in this image yet. Everything else above still works without it.

See every route this server has:

curl -s -o openapi.json -w "%{http_code}\n" http://127.0.0.1:8080/v1/openapi.json
200

List the tools an agent sees over MCP:

curl -s http://127.0.0.1:8080/v1/mcp -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

The answer is JSON-RPC with a result.tools list. We got 127 tools.

What you will see if you try to store data

curl -s http://127.0.0.1:8080/v1/kv/demo/hello
{"error":{"code":"audit_unavailable","message":"Request could not be securely recorded"}}

That is expected today. Cloud records every request that touches data in an audit log before it runs, and it refuses the request when it cannot. The service that keeps the log is not in the open image yet.

Stop, restart, remove

ToRun
Stop and keep your datadocker compose -f deploy/compose.yml down
Start againthe up -d command from step 3, with the same master.key
Delete everything, data toodocker compose -f deploy/compose.yml down -v

Part 2: Run a model with Hanzo Engine

1

Build the engine

git clone --depth 1 https://github.com/hanzoai/engine
cd engine
cargo build --locked --release -p hanzo-cli

This took 5 minutes on 8 cores, starting from an empty Cargo cache. The result is one file, target/release/hanzo-engine (134 MB). ldd shows it links only the system libraries libc, libm and libgcc_s.

2

Download a model

npm i -g hanzo
export HANZO_TELEMETRY=0
hanzo pull zen-nano
  • HANZO_TELEMETRY=0 stops the CLI from sending a usage event after each command.
  • zen-nano is short for zenlm/zen-nano-0.6b, a small model that runs on any machine. The download is 35 files, 6.13 GiB, into ~/.cache/huggingface/hub. It took about 3 minutes for us.
  • npm 11 may warn that a postinstall script was not run. hanzo pull worked anyway.
hanzo engine list
MODEL                                              SIZE  REV
zenlm/zen-nano-0.6b                            6.13 GiB  442ced4e
3

Serve it on loopback only

From the engine folder:

HF_HUB_OFFLINE=1 ./target/release/hanzo-engine serve \
  --host 127.0.0.1 -p 1234 --no-advertise \
  --served-model-name zen-nano -m zenlm/zen-nano-0.6b --cpu --dtype f32
  • --host 127.0.0.1 keeps it off your network. The default is every interface.
  • --no-advertise turns off its mDNS announcement.
  • HF_HUB_OFFLINE=1 makes it read only the files you already downloaded.

It is ready when the log says Server listening on http://127.0.0.1:1234. That took about 8 seconds. Leave this terminal open.

Verify the engine works

In a second terminal:

curl -s http://127.0.0.1:1234/v1/models
{"object":"list","data":[{"id":"zen-nano","object":"model","created":1795991075,"owned_by":"local","status":"loaded"}]}
curl -s http://127.0.0.1:1234/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"zen-nano","messages":[{"role":"user","content":"What is 2+2? Answer in one short sentence."}],"max_tokens":60}'

The reply is in choices[0].message.content. Ours was "\n\n2 + 2 = 4.", after about 9 seconds on CPU. Any OpenAI client can use http://127.0.0.1:1234/v1 as its base URL.

The engine also serves a chat page at http://127.0.0.1:1234/ui.

Run it air-gapped

Do the downloads on a machine with network, then carry three things across.

1. The Cloud image. On the connected machine:

docker save ghcr.io/hanzoai/cloud-oss:main -o cloud-oss-main.tar

On the offline machine:

docker load -i cloud-oss-main.tar

The file is 7.3 GB. Loading it took 29 seconds. Also copy the cloud folder (for deploy/compose.yml), your compose.override.yml, and master.key.

2. The engine. Copy target/release/hanzo-engine. Running a copy on a second machine is Not tested; we ran it on the machine that built it.

3. The model. Copy ~/.cache/huggingface/hub/models--zenlm--zen-nano-0.6b to the same place on the offline machine. Run it offline shows how to package and check it.

What we checked with no network:

  • Cloud, started with docker run --network none from the loaded image, came up and answered /healthz and /v1/base/health with 200.
  • The engine, started in a Linux network namespace with nothing but loopback, loaded zen-nano and answered a chat request.

One thing to change for air-gapped use: deploy/compose.yml sets HANZO_IAM_ISSUER to https://hanzo.ai unless you set it. Point it at your own identity server, or leave it unused while data routes are unavailable.

Configuration

These are the settings this guide uses. Each one was set and run.

SettingWhereWhat it does
CLOUD_KMS_MASTER_KEY_REFCloud containerThe encryption key for stored data. Keep it; data opens only with the key that wrote it.
HANZO_HTTP_PORT, HANZO_METRICS_PORT, HANZO_ZAP_PORTdocker composeHost side of each published port. Add 127.0.0.1: to keep a port off your network.
--host, -phanzo-engine serveAddress and port.
--no-advertisehanzo-engine serveNo mDNS announcement.
--cpu, --dtype f32hanzo-engine serveRun on CPU with 32-bit weights.
HF_HUB_OFFLINE=1engineUse downloaded model files only.
HANZO_TELEMETRY=0hanzo CLINo usage events.

deploy/compose.env.example in hanzoai/cloud lists the rest of the compose settings. We did not test those.

Production and Kubernetes

Not tested. This guide covers one machine. hanzoai/cloud/deploy/README.md describes a native engine pool behind Cloud's gateway, and says Kubernetes deployments are kept elsewhere. We have not run either. Ask us before you plan a production rollout (see Get help).

Troubleshooting

You seeWhyFix
could not read Username for 'https://github.com' while building hanzoai/cloud or hanzoai/iamThey depend on Go modules that are not public yetUse the Docker image (Part 1).
Error: shape mismatch for model.embed_tokens.weight from hanzo engine serveThe engine npm installs (v1.7.92) cannot load zen-nanoBuild the engine from source (Part 2).
503 mount /v1: no instance runningCloud is still startingWait for (healthy) in docker compose ps.
Container goes unhealthy after a restartNo encryption key was setSet CLOUD_KMS_MASTER_KEY_REF (step 2).
503 audit_unavailableThe audit log service is not in the open imageExpected today. See What is not covered yet.
/readyz lists s3 under absentObject storage does not start in this imageExpected. The rest still works.
http://127.0.0.1:8080/ answers 503The open image ships no web consoleUse the API routes above.
Cannot connect to the Docker daemonDocker is not running, or your user cannot reach itStart Docker, or use sudo / the docker group.

What is not covered yet

These are open, and this page will grow as each one lands:

  • Storing data in Cloud. It needs the audit log service in the open image, and a sign-in token from a Hanzo IAM you run.
  • Running your own Hanzo IAM. There is no tested path yet: its source build needs Go modules that are not public.
  • Connecting Cloud's /v1 model routes to your engine.
  • A fixed image version. cloud-oss:main moves with the main branch. We tested the build of commit 8f2725d.
  • macOS, Windows, GPUs, and models other than zen-nano.

What was tested

Run on 2026-11-29 on Debian 13 x86-64, with 8 cores, 16 GB RAM and no GPU.

ItemVersion
ghcr.io/hanzoai/cloud-oss:mainsha256:5fd1ffc1ee57c03651addc2aeae969bd8f162809f047eb7da45a14067c3b1099, built from hanzoai/cloud 8f2725d
hanzoai/enginemain at 4a6cd9a, hanzo-engine 1.7.109
hanzo CLI8.5.1496 from npm
DockerEngine 26.1.5, Compose 2.26.1
Ruststable, cargo 1.100.1

The engine build and the model download ran in a fresh home folder, with no GitHub sign-in and empty Cargo and Hugging Face caches. The source builds of hanzoai/cloud and hanzoai/iam that failed ran the same way.

Get help

For everything else in the open-source stack, see the Self-Hosting & Air-Gapped reference.

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