Weblink certificate deployment
What is Zebra "Cloud Connect" / "Weblink"?
Weblink (newer name: Cloud Connect) is the built-in cloud connectivity of modern Zebra industrial printers (ZPL printers from the ZT/ZD and ZQ series). The printer includes its own HTTPS/WebSocket client directly in the firmware and connects outbound to a central endpoint - the "Location" URL in its Weblink configuration. This makes the printer reachable behind NAT, corporate firewalls or in pure Wi-Fi, without opening a single inbound port (TeamViewer principle, just reversed: the printer is the client).
The printer picks one of two configuration slots
(weblink.ip.conn1.location / weblink.ip.conn2.location),
in which the relay URL is stored, and registers there. Print jobs, SGD commands and
configuration changes can then be sent to the printer over this connection - which
stays open permanently from the printer outbound.
For the printer to trust the relay server over TLS, the relay's certificate must be
installed on the printer. Exactly for this, zplCloud generates the three files
WEBLINK2_CA.NRD, WEBLINK2_CERT.NRD and
WEBLINK2_KEY.NRD per domain + printer (certificates tab or
POST /api/certificates/generate) - and exactly these files are installed on the
printer by the deploy script below.
zplCloud's Weblink relay (e.g. weblink.zplcloud.com or
live.zplcloud.com) is such an endpoint: your printers connect outbound
there, and via the zplCloud platform ("Weblink" tab, Remote Printers, CLI) you can then
address them like local devices - send ZPL, apply profiles and watch the connection
status live. The script documented here is the last step of this setup: it brings the
certificates to the printer and sets the Weblink slot configuration (URL, NTP, time),
so the connection can start.
What does this script do and what is it good for?
For a Zebra printer to connect securely via TLS to your Weblink relay, it needs
three certificate files (WEBLINK2_CA.NRD, WEBLINK2_CERT.NRD,
WEBLINK2_KEY.NRD). These files are managed in zplCloud per domain + printer.
The deploy script fetches them via API key from the backend and installs them directly on
the printer - fully self-contained, without extra tools:
- Download the NRD files (API-key protected) for domain + printer.
- Delete old files on the printer (SGD
file.delete). - Upload via ~DYE over TCP 9100 (standard Zebra upload).
- Configure the Weblink slot + clock -
weblink.ip.conn2.location, NTP server, timezone, RTC date/time. - Reset the printer (
device.reset) so the new configuration becomes active.
Prerequisites
- The certificates for the printer must have been generated in zplCloud (certificates tab or
POST /api/certificates/generate). - An API key with access to the domain.
- The printer must be reachable via TCP 9100 (IP or hostname).
Parameters
| Parameter | Required | Meaning |
|---|---|---|
| hostname | yes | Printer name - determines the NRD storage (domain folder) and is the default TCP target. |
| apikey | yes | API key (db.apikeys); authorizes the download of the NRD files. Validated server-side. |
| ip | no | TCP target (IPv4 or hostname) that actually establishes the connection. Default: hostname. |
Windows - PowerShell (weblink-deploy.ps1)
The script is generated server-side for your printer. Run it directly (PowerShell 5.1+):
The command is idempotent: old files are deleted before the upload, and the printer is reset at the end.
macOS / Linux / Raspberry Pi - bash (weblink-deploy.sh)
The same logic as a bash script (needs only bash + curl or wget):
Supports x64 and arm64 (also Raspberry Pi / Pi OS), uses /dev/tcp for the TCP connection and mktemp for temporary files.
What happens in detail (both variants)
Notes
- The API key is in the URL parameter - this authorizes the download; the script itself cannot be fetched without a key (server-side validation).
- Error messages appear in the script output ("ERROR ..."); for problems, first check TCP reachability (port 9100) and whether the certificates were generated.
- Both scripts write their progress log to the console - so you see every file and every SGD response.