LabelZoom Print Agent
The LabelZoom Print Agent runs on a computer near your printers and sends labels to them in the printer’s own language. Cloud printing prints jobs from the dashboard, the Cloud Print API, and integrations, and is in public beta. Local printing prints from the LabelZoom web app in your browser.
Before you begin
Section titled “Before you begin”- A computer that can reach your printers, on TCP port 9100 for network printers.
- Outbound HTTPS access from that computer to
api.labelzoom.comon port 443. The agent needs no inbound ports. - For cloud printing, an enrollment code. On the Printers page, click Add agent to get one.
Install on Windows
Section titled “Install on Windows”The installer runs the agent as a Windows service. To install it, follow these steps:
- Download and run labelzoom-print-agent-setup.exe.
- Optional: On the LabelZoom Cloud Enrollment page, paste your enrollment code to turn on cloud printing. Leave it blank for local printing only; you can enroll later.
- Finish the wizard. The installer starts the LabelZoom Print Agent service.
- To check that the agent is running, open
http://localhost:52045/ping. The response is{"message":"pong"}.
Manage the agent
Section titled “Manage the agent”Run these commands from an administrator prompt in C:\Program Files\LabelZoom\Print Agent:
| Command | Description |
|---|---|
lz-print-agent.exe enroll --code ENROLLMENT_CODE |
Enrolls the agent for cloud printing. Then restart the service. |
lz-print-agent.exe service status |
Shows whether the service is running or stopped. |
lz-print-agent.exe service restart |
Restarts the service. start, stop, install, and uninstall also work. |
lz-print-agent.exe update |
Updates the agent now. Add --check to only report whether an update exists. |
lz-print-agent.exe set-auto-update off |
Turns off automatic updates; on turns them back on. Restart the service afterward. |
The agent’s key is in %ProgramData%\LabelZoom\agent.yaml, and its log is %ProgramData%\LabelZoom\logs\agent.log. To uninstall the agent, go to Settings > Apps and uninstall LabelZoom Print Agent.
Install on Linux
Section titled “Install on Linux”The install script runs the agent as a systemd service on a 64-bit x86 or ARM computer, or on a 32-bit ARMv7 computer such as a Raspberry Pi. To install the agent, follow these steps:
-
Run this command, replacing
ENROLLMENT_CODEwith your enrollment code:Terminal window curl -fsSL https://downloads.labelzoom.com/print-agent/install.sh | sudo sh -s -- --code ENROLLMENT_CODEThe script checks the download, enrolls the agent, and starts the
labelzoom-print-agentservice. -
To check that the agent is running, run
systemctl status labelzoom-print-agent. The status isactive (running).
The script needs root only to install the service. The agent itself runs as the unprivileged labelzoom user, with write access to /etc/labelzoom only. To read the script before you run it, download it first:
curl -fsSLO https://downloads.labelzoom.com/print-agent/install.shless install.shsudo sh install.sh --code ENROLLMENT_CODEThe install script takes these options:
| Option | Description |
|---|---|
--code ENROLLMENT_CODE |
Enrolls the agent. Ignored once the agent is enrolled. |
--name NAME |
The agent’s name on the Printers page. The default is the computer’s hostname. |
--uninstall |
Removes the agent and keeps its enrollment, so a reinstall needs no new code. |
--purge |
Removes the agent and its enrollment. Also remove the agent on the Printers page. |
Manage the Linux agent
Section titled “Manage the Linux agent”| Command | Description |
|---|---|
sudo systemctl restart labelzoom-print-agent |
Restarts the agent. stop and start also work. |
journalctl -u labelzoom-print-agent -f |
Shows the agent’s log. |
curl -fsSL https://downloads.labelzoom.com/print-agent/install.sh | sudo sh -s -- --uninstall |
Uninstalls the agent. |
The agent’s key is in /etc/labelzoom/agent.yaml, readable only by the labelzoom user the service runs as. To set an environment variable from Configuration, add a NAME=value line to /etc/default/labelzoom-print-agent, and then restart the agent.
Run with Docker
Section titled “Run with Docker”On macOS, or on Linux without systemd, run the agent with the labelzoom/print-agent Docker image. A Docker agent prints to network printers only.
For cloud printing, start the container with your enrollment code and the lz-print-agent volume. Cloud printing needs no port mapping.
docker run -d --name lz-print-agent --restart unless-stopped \ -v lz-print-agent:/etc/labelzoom \ -e LZ_ENROLL_CODE=ENROLLMENT_CODE \ labelzoom/print-agentAlways mount the volume at /etc/labelzoom. An enrollment code is single-use, so a container recreated without the volume can’t enroll again.
With Docker Compose, use the same volume, and then run docker compose up -d:
services: lz-print-agent: image: labelzoom/print-agent:latest restart: unless-stopped environment: - LZ_ENROLL_CODE=ENROLLMENT_CODE volumes: - lz-print-agent:/etc/labelzoom
volumes: lz-print-agent:For local printing from the browser, map host port 52045 to the container’s port 8080:
docker run -d --restart unless-stopped -p 52045:8080 labelzoom/print-agentAn enrolled container serves local printing only if you also set LZ_LOCAL_ADDR=:8080.
Configuration
Section titled “Configuration”| Setting | Environment variable or flag | Default | Description |
|---|---|---|---|
| Enrollment code | LZ_ENROLL_CODE, --code |
None | Ignored once the agent is enrolled. |
| Agent key | LZ_AGENT_KEY |
None | An issued key, used instead of enrolling on a container without a volume. LZ_AGENT_ID is optional with it. |
| Configuration file | LZ_CONFIG, --config |
%ProgramData%\LabelZoom\agent.yaml on Windows, /etc/labelzoom/agent.yaml on Linux and in Docker |
Holds the agent’s key. |
| API base URL | LZ_API_BASE_URL, --api |
https://api.labelzoom.com |
Change it only if LabelZoom gives you another URL. |
| Local printing address | LZ_LOCAL_ADDR, --local |
127.0.0.1:52045 for the Windows service, :8080 in Docker, off for the Linux service |
Where local printing listens. |
| Automatic updates | LZ_AUTO_UPDATE |
On | false turns off automatic updates for the Windows service. |
Supported printers
Section titled “Supported printers”When you add a printer on the Printers page, choose one of these:
| Connection | Type or mode | Printers | Agent |
|---|---|---|---|
| Network (TCP/IP) | Zebra (ZPL) | ZPL printers. The agent reports printer status, such as paper out or head open. | Windows, Linux, or Docker |
| Network (TCP/IP) | Generic RAW | Other printers that accept RAW commands, such as Honeywell, SATO, and TSC. The agent reports reachability only. | Windows, Linux, or Docker |
| USB / Local printer | RAW passthrough | Label printers installed with the Generic / Text Only driver. | Windows |
| USB / Local printer | Windows driver | Printers without a label language, such as Rollo, DYMO, and Brother. LabelZoom renders each label at 203 or 300 dpi, and the agent prints it through the installed driver. | Windows |
To use a network port other than 9100, enter the address as HOST:PORT. Install a USB printer for all users, because the service runs as LocalSystem; see Install a Windows printer for RAW label printing.
Update the agent
Section titled “Update the agent”To print more than one copy, the agent must be up to date. An older agent makes the request fail with 422 and the code agent_update_required; see Copies.
- On Windows, an enrolled agent updates itself unless you cleared Automatically install updates when available during setup. To update now, run
lz-print-agent.exe update. - On Linux, run the install command again. You can leave off
--code, because the agent keeps its enrollment. - In Docker, run
docker compose pull && docker compose up -d. Withdocker run, pulllabelzoom/print-agent, remove the old container, and run the same command again. With thelz-print-agentvolume mounted, the new container keeps its enrollment.
Security
Section titled “Security”- Cloud printing uses only an outbound connection to
api.labelzoom.comon port 443. - An enrollment code is single-use and expires in 15 minutes.
agent.yamlholds the agent’s key. Protect it like a password: anyone with the key can print to your printers.- To revoke an agent immediately, remove it on the Printers page.
Troubleshooting
Section titled “Troubleshooting”Check the log first: %ProgramData%\LabelZoom\logs\agent.log on Windows, journalctl -u labelzoom-print-agent on Linux, or docker logs lz-print-agent. On the Printers page, the printer’s Queue shows each job’s status and error.
| Symptom | Fix |
|---|---|
http://localhost:52045/ping doesn’t respond. |
On Windows, run lz-print-agent.exe service status. In Docker, check the host port in your -p mapping. |
| The Linux install script reports an unsupported architecture, or that systemd isn’t running. | Run the agent with Docker. |
| Enrollment fails. | The code was used or has expired. On the Printers page, click Add agent for a new code, and enroll again. |
A Docker agent that worked before exits with Invalid or expired enrollment code. |
The container was recreated without its volume and lost its key. Mount -v lz-print-agent:/etc/labelzoom, and enroll with a new code. |
| The agent is running but shows Offline. | A proxy or firewall that inspects TLS breaks the connection. Allow api.labelzoom.com on port 443 without TLS inspection, including WebSocket upgrades. |
A job stays queued. |
No agent that serves the printer is online. The job prints when one reconnects. |
| A job fails, and nothing prints. | Read the job’s error in the Queue. Test the printer from the agent’s computer with nc -vz PRINTER_IP 9100, or Test-NetConnection PRINTER_IP -Port 9100 in PowerShell. A USB printer needs its exact Windows name, an all-users install, and a RAW driver. |
| Labels print garbled, rotated, or at the wrong size. | Choose Zebra (ZPL) only for a ZPL printer, and match a Windows driver printer’s resolution to its dpi. To change a setting, delete the printer and add it again. |
| A Windows driver job fails with the driver’s maximum copies. | The driver limits copies per job. Request fewer copies, or split the run into several jobs. |
A print request fails with a limit error or 429. |
See Limits. The Printers page shows your usage and when the daily job count resets. |