Multi-host deployment (Docker host + ZeroClaw host)¶
The default setup in compose.all-in-one.yml runs everything on one Docker host. This document describes the multi-host split: xiaozhi-server on a Linux Docker host and ZeroClaw + the bridge on a separate ZeroClaw host.
When you'd want this¶
- Dedicated hardware for the brain. ZeroClaw runs as a native binary (Rust, not containerized). If you already have a Pi running ZeroClaw for other channels (chat, CLI, other agents), keeping the bridge there avoids duplicating the install.
- Resource isolation. The voice pipeline (ASR model loading, TTS) and the LLM bridge have different resource profiles. Splitting them across hosts avoids contention.
- Docker host already in use. If you already run a Linux Docker host (NAS, home-server, mini-PC) and don't want to install Rust/ZeroClaw tooling on it, the Pi is a natural home for the bridge.
How it differs from all-in-one¶
| Aspect | All-in-one | Multi-host |
|---|---|---|
| Compose file | compose.all-in-one.yml |
docker-compose.yml (xiaozhi only) |
| Bridge runs as | Docker container | systemd service on the Pi |
LLM URL in .config.yaml |
http://bridge:8080/api/message/stream (Docker network) |
http://<ZEROCLAW_HOST>:8080/api/message/stream (real LAN IP) |
| ZeroClaw install | On the Docker host, bind-mounted into the bridge container | Native on the Pi (cargo install zeroclaw) |
| Network | Docker bridge network between services | LAN — xiaozhi-server reaches the Pi over WiFi/Ethernet |
Setup¶
The main SETUP guide and architecture page already document this layout in detail. The short version:
- Docker host:
- Clone this repo to
<XIAOZHI_PATH>. - Edit
data/.config.yaml: setLLM.ZeroClawLLM.urltohttp://<ZEROCLAW_HOST>:8080/api/message/stream. -
Run
docker compose up -d(uses the standarddocker-compose.yml). -
ZeroClaw host:
- Install ZeroClaw:
cargo install zeroclaw(see zeroclaw-labs/zeroclaw). - Configure the agent: edit
~/.zeroclaw/config.tomlwith your LLM provider, API keys, and persona. - Copy
bridge.pyandbridge/requirements.txtto<BRIDGE_PATH>. - Create a venv and install deps:
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt. -
Install the systemd unit: copy
zeroclaw-bridge.serviceto/etc/systemd/system/, edit paths, thensystemctl enable --now zeroclaw-bridge. -
StackChan device:
- Set OTA URL to
http://<XIAOZHI_HOST>:8003/xiaozhi/ota/.
Migrating from all-in-one to multi-host¶
- Stop the all-in-one stack:
docker compose -f compose.all-in-one.yml down. - Edit
data/.config.yaml: change the LLM URL fromhttp://bridge:8080/...tohttp://<ZEROCLAW_HOST>:8080/.... - Set up the Pi as described above.
- Start xiaozhi-server alone:
docker compose up -d(standarddocker-compose.yml).
Reference¶
- Full architecture diagram: architecture.md
- Endpoint table: architecture.md
- Bridge internals: protocols.md (ACP JSON-RPC section)
- Troubleshooting: troubleshooting.md