CLI as Docker container
The zplCloud remote agent as a Docker container - for Raspberry Pi, Synology NAS and any Docker host. No inbound ports, no firewall changes.
What is the Docker agent and what is it good for?
The zplcloud-agent is the zplcloud CLI as a prebuilt
container. It runs on a machine near your Zebra printers and connects
outbound to api.zplcloud.com - similar to TeamViewer. Afterwards you can
create printers in the zplCloud "Remote Printers" tab and forward print jobs, profiles and probes
via the agent to the printers in your local LAN (TCP 9100) or to USB printers.
- No inbound ports - only one outbound HTTPS/WebSocket connection, works behind NAT and firewalls.
- One container instead of a file path - ideal for Raspberry Pi (64-bit), Synology, Intel/Apple-Silicon-Mac with Docker Desktop.
- Multi-arch image -
linux/amd64+linux/arm64, public, no login. - USB printers - ZPL via USB virtual COM ports (CDC-ACM) or libusb (printer class).
- Autostart & logs -
restart: unless-stopped, optional daily log file.
Prerequisites
- Docker (Desktop, Docker Engine or Synology Container Manager).
- An API key from the zplCloud API tab.
- Printers reachable in the same LAN (TCP 9100) or connected via USB.
docker-compose.agent.yml
Download the file (or copy it) and adjust ZPLCLOUD_API_KEY and ZPLCLOUD_AGENT:
Environment variables (all parameters)
| Variable | Required | Meaning |
|---|---|---|
| ZPLCLOUD_API_KEY | yes | API key from the zplCloud API tab; authenticates the agent to the backend. |
| ZPLCLOUD_AGENT | yes | Display name in the "Remote Printers" tab (free choice, e.g. "Warehouse Berlin", "PI"). |
| ZPLCLOUD_API_BASE | no | Base URL (default: https://api.zplcloud.com). |
| ZPLCLOUD_VERBOSE | no | true = SignalR negotiation/transport trace (troubleshooting). |
| ZPLCLOUD_LOG | no | true = writes zplcloud-<yyyy-MM-dd>.log into ZPLCLOUD_LOG_DIR. |
| ZPLCLOUD_LOG_DIR | no | Log directory inside the container (e.g. /logs, mounted via volume). |
| ZPLCLOUD_TIMEOUT | no | Connect/read timeout in ms (default: 5000). |
Start & manage
Supported platforms
linux/amd64- x64 Linux, x64 Synology, Intel Docker hosts, Windows Docker (WSL2).linux/arm64- 64-bit Raspberry Pi (Pi OS 64-bit), ARM Synology, Apple Silicon Docker.- 32-bit Raspberry Pi: no 32-bit ARM image → use the direct installer instead.
USB printers in the container
- Simplest way:
privileged: true- works for the USB printer class (libusb) and CDC-ACM serial. - Safer: remove
privilegedand mount the devices explicitly (devices:above, commented out) plus a udev rule, e.g.GROUP="dialout", MODE="0660"for the Zebra printer.
Troubleshooting
| Symptom | Solution |
|---|---|
| Agent does not appear online | Check ZPLCLOUD_API_KEY, inspect the logs (docker compose logs -f), set ZPLCLOUD_VERBOSE=true for a trace. |
| USB printer not reachable | Set privileged: true or configure devices + udev rule; /dev/bus/usb must be mounted. |
| TCP 9100 not reachable | Check the printer IP/host in the Remote Printers tab; printer and container must be in the same LAN. |