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.
| Piece | What it does | Source | How you run it here | Address |
|---|---|---|---|---|
| Hanzo Cloud | The API server: /v1 routes, health checks, the OpenAPI spec, and an MCP endpoint for agents | hanzoai/cloud | Docker image ghcr.io/hanzoai/cloud-oss:main, started with the repo's deploy/compose.yml | 127.0.0.1:8080 |
| Hanzo Engine | Runs open models on your CPU or GPU behind an OpenAI-compatible API | hanzoai/engine | Built from source into one binary, hanzo-engine | 127.0.0.1:1234 |
| Hanzo CLI | Downloads models (hanzo pull) | hanzoai/cli | npm i -g hanzo | none (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:
- Use the Docker image for Cloud, not a source build. A clean build of
hanzoai/cloudorhanzoai/iamfrom source stops withcould not read Username for 'https://github.com'. Both depend on Go modules that are not public yet. The published imageghcr.io/hanzoai/cloud-oss:mainneeds none of that. - Build the engine from source. The engine you get from
npm i -g hanzois the older release v1.7.92. In our test it failed to loadzen-nano(shape mismatch for model.embed_tokens.weight). The engine built frommainworked. - 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) answered503 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 with | Notes | |
|---|---|---|
| OS | Debian 13, x86-64 | Other Linux distributions, macOS and Windows are Not tested. |
| CPU and memory | 8 cores, 16 GB RAM, no GPU | Cloud used about 600 MiB at idle. The engine peaked at about 4.1 GiB with zen-nano. |
| Disk | About 20 GB free | Cloud image: 7.3 GB. zen-nano model: 6.13 GiB. Engine build folder: 2.2 GB. |
| Docker | Docker Engine 26.1.5 with Compose 2.26.1 | Needed for Cloud. Run docker as root or as a user in the docker group. |
| Git, curl, OpenSSL | any recent version | OpenSSL makes the encryption key. |
| Rust | stable, installed with rustup | Needed for the engine. Its README asks for 1.88 or newer. We used gcc 14 as the C compiler. |
| Node.js | 24, with npm 11 | Needed for the CLI that downloads models. |
| Network | only for the downloads | After that, both parts run with no network. See Run it air-gapped. |
Part 1: Run Hanzo Cloud
Get the compose file
git clone --depth 1 https://github.com/hanzoai/cloud
cd cloudYou only need deploy/compose.yml from this repository. Nothing gets built.
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.
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 -dThe 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.
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 psNAME 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/tcpChecks 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.json200List 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
| To | Run |
|---|---|
| Stop and keep your data | docker compose -f deploy/compose.yml down |
| Start again | the up -d command from step 3, with the same master.key |
| Delete everything, data too | docker compose -f deploy/compose.yml down -v |
Part 2: Run a model with Hanzo Engine
Build the engine
git clone --depth 1 https://github.com/hanzoai/engine
cd engine
cargo build --locked --release -p hanzo-cliThis 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.
Download a model
npm i -g hanzo
export HANZO_TELEMETRY=0
hanzo pull zen-nanoHANZO_TELEMETRY=0stops the CLI from sending a usage event after each command.zen-nanois short forzenlm/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 pullworked anyway.
hanzo engine listMODEL SIZE REV
zenlm/zen-nano-0.6b 6.13 GiB 442ced4eServe 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.1keeps it off your network. The default is every interface.--no-advertiseturns off its mDNS announcement.HF_HUB_OFFLINE=1makes 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.tarOn the offline machine:
docker load -i cloud-oss-main.tarThe 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 nonefrom the loaded image, came up and answered/healthzand/v1/base/healthwith200. - The engine, started in a Linux network namespace with nothing but loopback,
loaded
zen-nanoand 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.
| Setting | Where | What it does |
|---|---|---|
CLOUD_KMS_MASTER_KEY_REF | Cloud container | The encryption key for stored data. Keep it; data opens only with the key that wrote it. |
HANZO_HTTP_PORT, HANZO_METRICS_PORT, HANZO_ZAP_PORT | docker compose | Host side of each published port. Add 127.0.0.1: to keep a port off your network. |
--host, -p | hanzo-engine serve | Address and port. |
--no-advertise | hanzo-engine serve | No mDNS announcement. |
--cpu, --dtype f32 | hanzo-engine serve | Run on CPU with 32-bit weights. |
HF_HUB_OFFLINE=1 | engine | Use downloaded model files only. |
HANZO_TELEMETRY=0 | hanzo CLI | No 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 see | Why | Fix |
|---|---|---|
could not read Username for 'https://github.com' while building hanzoai/cloud or hanzoai/iam | They depend on Go modules that are not public yet | Use the Docker image (Part 1). |
Error: shape mismatch for model.embed_tokens.weight from hanzo engine serve | The engine npm installs (v1.7.92) cannot load zen-nano | Build the engine from source (Part 2). |
503 mount /v1: no instance running | Cloud is still starting | Wait for (healthy) in docker compose ps. |
Container goes unhealthy after a restart | No encryption key was set | Set CLOUD_KMS_MASTER_KEY_REF (step 2). |
503 audit_unavailable | The audit log service is not in the open image | Expected today. See What is not covered yet. |
/readyz lists s3 under absent | Object storage does not start in this image | Expected. The rest still works. |
http://127.0.0.1:8080/ answers 503 | The open image ships no web console | Use the API routes above. |
Cannot connect to the Docker daemon | Docker is not running, or your user cannot reach it | Start 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
/v1model routes to your engine. - A fixed image version.
cloud-oss:mainmoves with themainbranch. We tested the build of commit8f2725d. - 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.
| Item | Version |
|---|---|
ghcr.io/hanzoai/cloud-oss:main | sha256:5fd1ffc1ee57c03651addc2aeae969bd8f162809f047eb7da45a14067c3b1099, built from hanzoai/cloud 8f2725d |
hanzoai/engine | main at 4a6cd9a, hanzo-engine 1.7.109 |
hanzo CLI | 8.5.1496 from npm |
| Docker | Engine 26.1.5, Compose 2.26.1 |
| Rust | stable, 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
- Discord: discord.gg/XthHQQj reaches the engineers who build Cloud and the engine.
- GitHub issues:
hanzoai/cloud,hanzoai/engine, orhanzoai/docswhen this page is wrong. - Deployment help: enterprise@hanzo.ai.
For everything else in the open-source stack, see the Self-Hosting & Air-Gapped reference.