1 · Render synchronously
Your application posts records and gets the labels in the format of its Accept header. ZPL is streamed while it is generated; images need a free render slot.
zplCore Server · Docker
zplCore Server is a ready-to-run container: the templates live on the server, your application sends only the data (or the server fetches it itself through a named query) and gets ZPL, PNG, SVG, PDF or ZIP back, printed directly or stored with a signed webhook when the job is done. Everything on this page outside the roadmap is built and covered by tests.
measured with the server's smoke test on win-x64 (developer PC): 71 of 71 answers byte-identical between JIT and NativeAOT; Linux container figures follow with the release
No prices, no purchase.
Big picture
What the server reads: templates from a volume, Git or object storage, data from the request, from databases or from REST services. The container with its building blocks. And where the labels go: back to your application, to printers, into storage, and a webhook when a job is done.
SELECT/WITH, in a read-only transaction.Logos only show that zplCore Server works with these products; zplCore.com is not affiliated with or endorsed by their owners. All trademarks belong to their owners. Logos: Simple Icons 16.34.0 (CC0; Git logo by Jason Long, CC BY 3.0; OpenTelemetry logo CC BY 4.0), details in the logo notice. Amazon S3, Microsoft Azure, SQL Server and Oracle are named in text only.
Flows
What happens inside the server, from the request to the answer. Most checks come before the first byte: unknown templates, job fields and fonts are answered at once, and with twin: block the first labels are checked against the printer before anything is sent.
Your application posts records and gets the labels in the format of its Accept header. ZPL is streamed while it is generated; images need a free render slot.
One call prints all open shipments of a country: the server reads them read-only from PostgreSQL, checks the labels against the printer and sends them over TCP 9100.
Large or many jobs run asynchronously: the answer comes at once, the result lands in S3 with its SHA-256, and your system gets a signed webhook.
Templates
The server takes the same JSON templates as the SDK: label JSON (Label.ToJson), print-job JSON with start and end labels, or a zplCore Designer document. It reads them from one or more sources, checks them strictly and keeps them in memory; your application calls them by path, e.g. versand/dhl-100x150.
Every *.json below the folder, the path without .json. File watcher plus polling every 10 s. A Kubernetes ConfigMap is a volume too: its ..data folders are skipped, and symbolic links never lead out of the folder.
No Git client inside the server: the git-sync sidecar checks the repository out into a shared volume, the server polls it and takes the commit as the source version of every template it loads. Examples for Docker Compose and Kubernetes ship with the server.
AWS SDK client, also for MinIO and other S3-compatible stores (serviceUrl, pathStyle). Lists every 30 s and downloads only changed objects. Older versions come from bucket versioning on demand. Keys from secret files, otherwise the AWS default chain (e.g. IRSA on EKS, ECS/EC2 role).
Azure SDK client: connection string or SAS token from a secret file, or identity: managed / workload with an own, NativeAOT-safe token fetch (no Azure.Identity). Blob versions become source versions.
Own client for the JSON API with a read-only scope: service-account key file, or the metadata server (GKE Workload Identity, Cloud Run, Compute Engine). Exactly the listed generation is loaded.
Loaded on first use, then polled with If-None-Match; 404 or 410 removes the template. Only https (http on request), host allow-list, SSRF guard and size limit; HTML answers such as error or login pages are rejected and never become a template.
versand/x comes from the first source that has it, shared:versand/x from that source.versand/x@<hash> or ?version=; headers X-Template-Version and X-Template-Source-Version.GET /v1/templates, in /ready and in the metrics. keepVersions (10) keeps older versions callable./ready answers 503 until every source was read once, so a rolling update with wrong credentials never replaces running pods.maxObjects per prefix (10,000), maxTemplateBytes, strict label check with schema migration.POST /v1/render takes the template in the request; off by default (templates:inline:enabled).templates: sources: # priority order - name: local type: volume # also a ConfigMap or a git-sync volume path: /templates - name: shared type: s3 # MinIO: serviceUrl + pathStyle: true bucket: labels prefix: prod/ region: eu-central-1 # no keys: AWS default chain (IRSA, ECS/EC2 role) - name: azure type: azureblob serviceUrl: https://<account>.blob.core.windows.net container: labels identity: workload # or managed; or connectionStringFile keepVersions: 10
Data
Records come with the request, or the server reads them itself through a named, read-only query that you define once in zplcore.yaml. No SQL and no URL ever comes from the request.
application/json (one object, an array, or { "records": [...], "variables": {...} }), application/x-ndjson and text/csv (RFC 4180, delimiter detected or ?delimiter=), both streamed. All three give the same ZPL. Variables reach the start and end labels of a print job.
Called by name: ?query=open-shipments&country=AT or { "query": { "name": …, "parameters": {…} } }. Exactly one SELECT or WITH statement, checked at start; parameters are always bound, never pasted into the SQL. Rows keep their column types, so a DATE formats with Format([ShipDate], "dd.MM.yyyy").
READ ONLY transactionSTART TRANSACTION READ ONLYquery_onlydb_datareader); NativeAOT image: SQL logins-full, with the Oracle driver you add yourselfstring, int, long, decimal, double, bool, date, datetime; required and pattern (the whole value must match, linear regex engine: no ReDoS). Unknown, doubled or wrongly typed values are a 400 before any SQL runs.
maxRows, timeout (30 s, then 504) and maxBytes per query. Above a limit the job fails; it is never cut short. countSql knows the number of labels before the first one: for the start label, TOTAL_PAGES and Stored Formats.
provider: rest with baseUrl, a path with URL-encoded {parameters}, items as a JSON path and paging by Link header or JSON path. Bearer, basic or header auth from secret files. Every address is checked by the SSRF guard; all pages are read before the first label.
/ready waits for required connectionsA connection with required: true is probed (select 1 or any HTTP answer, 3 s, cached for 10 s); while it is down /ready answers 503 without naming it.GET /v1/queries lists names, parameters and limits, never SQL, URLs or connection strings. Connection strings come only from secret files or environment variables.data: connections: wms: provider: postgresql # sqlite | postgresql | sqlserver | mysql | rest connectionStringFile: /run/secrets/wms-db required: true # /ready waits for it queries: open-shipments: connection: wms sql: > select tracking_no as "TrackingId", name as "Name", city as "City", ship_date as "ShipDate" from shipments where country = @country and status = 'open' countSql: select count(*) from shipments where country = @country and status = 'open' parameters: country: { type: string, required: true, pattern: "[A-Z]{2}" } maxRows: 100000
# all open shipments for Austria as one PDF curl -X POST "$ZPLCORE/v1/labels/versand/dhl-100x150?query=open-shipments&country=AT" \ -H "X-Api-Key: $API_KEY" -H 'Accept: application/pdf' -o shipments.pdf # the same as ZPL, parameters in the body curl -X POST "$ZPLCORE/v1/labels/versand/dhl-100x150" \ -H "X-Api-Key: $API_KEY" -H 'Content-Type: application/json' \ -d '{"query":{"name":"open-shipments","parameters":{"country":"AT"}}}' # which queries exist (no SQL, no connection) curl "$ZPLCORE/v1/queries" -H "X-Api-Key: $API_KEY"
Stored procedures: map them to a view or a table-valued function and select from it; the server accepts no EXEC.
Output & printing
The Accept header picks the format. Printing always sends ZPL, to printers that are named in the configuration, one job after the other per printer.
| Accept | Result |
|---|---|
application/vnd.zpl | ZPL (default), streamed while it is generated, also for 100,000 labels and more. Stored Formats (^DF/^XF) from 1,000 records when the number is known. |
image/png, image/svg+xml | exactly one label (more: 406); SVG with a sandbox content security policy. |
application/pdf | all labels in one PDF, up to maxRenderLabels (1,000). |
application/zip | one PNG or SVG per label (?format=png|svg), written while rendering. |
application/json | report: records, labels, bytes, SHA-256; ?diagnostics=true renders and lists the diagnostics, ?zpl=true includes the ZPL. |
If a stream breaks after it started, the server cuts the connection: a client never receives a partial job that looks complete.
Requests name a printer, never an address, so the server is no open TCP proxy. Model and dpi choose the printer-twin profile (e.g. ZD421-203); an unknown profile, option or a wrong dpi stops the start.
Jobs go out one after the other (queueLimit, full: 503). The connection is retried with growing waits only before the first byte; once bytes are sent, a broken connection ends the job with the number of bytes sent, never with a second copy. A printer that stops reading ends in sendTimeout; checkStatus asks ~HS first.
The first 20 labels are checked against the printer profile: printhead width, options such as cutter or RFID, firmware, fonts, memory. twin: off | warn | block per printer, ?twin= per request; block stops with 422 and nothing is sent. Findings are in the job status.
?copies=n sets ^PQ per label, so the ZPL keeps one format per label. At most printing:maxCopies (1,000); more is a 422 that names the setting. A copiesField of the template is multiplied.
GET /v1/printers lists profile, dpi, twin mode and queue (waiting, sending, sent, failed, last error). GET /v1/printers/{name}/status asks ~HS live: 502 when unreachable, 504 without an answer.
All bytes handed over and the connection closed normally. Raw TCP 9100 cannot confirm the physical print; checkStatus checks before the job, not after it.
By default the server prints text in TrueType fonts as a graphic (^GF). That runs on every ZPL printer, including the ZPL emulations of Honeywell, TSC, SATO, Citizen and others. With the option fonts: printer (per printer or as the server default) the fonts go into the printer's memory with ~DY instead: faster and smaller ZPL, but only for printers that support TrueType and ~DY. Fonts never land in the printer by themselves.
Fonts come from the template, from the template's folder or from output:fontFolders, never from the host: preview and print are the same on every host. A missing font is a 422 that names it, never a silent substitute.
The printer twin knows 24 device profiles, including ZD421, ZD621, ZT411 and ZT610; every profile fact cites its source or is marked unknown. More on the checks page.
Jobs & webhooks
Big jobs do not have to wait in an open HTTP connection. The server queues them, stores the result with its checksum and tells your system when it is done, signed.
?async=true or Prefer: respond-async on /v1/labels, /v1/print and /v1/batch, or POST /v1/jobs with the job as one JSON document. Answer 202 with Location: /v1/jobs/{id}; GET for the status, /result for the output (ETag = SHA-256), DELETE cancels, also on another instance.
Status in the storage (jobs/{id}/status.json) and in Redis; the storage is authoritative, so a Redis outage keeps /ready at 200 with redis: unavailable. Progress every 2 s, heartbeat every 30 s. A job without a heartbeat for 2 minutes is reported lost and not restarted, because that could print twice. Kept for 24 h.
?store=<sink> and job results: volume, S3, Azure Blob, GCS. Written in one piece (volume: temporary file and rename); every output carries its SHA-256 as metadata and as <key>.sha256 for sha256sum -c. Key pattern {date}/{jobId}.{ext}, also {time} and {template}.
Named targets only. A JSON POST with event (job.succeeded, job.failed, job.canceled), job id, counts, bytes, SHA-256 and location. Headers X-ZplCore-Event, X-ZplCore-Delivery (the same in every attempt), X-ZplCore-Timestamp and X-ZplCore-Signature. Retries with doubling waits on network errors, timeouts, 408, 429 and 5xx; Retry-After is honoured.
With a storage sink every delivery is written before its first attempt. Retries survive a restart, and each attempt is claimed by exactly one instance through a conditional create (S3 and Azure If-None-Match: *, GCS ifGenerationMatch=0).
POST /v1/batch: parts { template, records, variables, version } as JSON (every part checked before the first byte) or NDJSON (part by part). Each part is its own print job. Output: one ZPL stream, a ZIP with one entry per part (ZPL or PDF), or a JSON report; with print, store, webhook or async as a job.
# parts.ndjson: one part per line # {"template":"versand/dhl-100x150","records":[...]} curl -i -X POST "$ZPLCORE/v1/batch?async=true&store=archive&webhook=erp" \ -H "X-Api-Key: $API_KEY" -H 'Content-Type: application/x-ndjson' \ --data-binary @parts.ndjson # HTTP/1.1 202 Accepted # Location: /v1/jobs/<id> curl "$ZPLCORE/v1/jobs/<id>" -H "X-Api-Key: $API_KEY" curl "$ZPLCORE/v1/jobs/<id>/result" -H "X-Api-Key: $API_KEY" -o labels.zpl
# X-ZplCore-Signature: sha256=<hex HMAC-SHA256 over "<timestamp>.<raw body>"> sig=$(printf '%s.%s' "$TIMESTAMP" "$BODY" \ | openssl dgst -sha256 -hmac "$SECRET" -hex | sed 's/^.* //') [ "sha256=$sig" = "$SIGNATURE" ] && echo valid # also reject old timestamps (replay) and compare in fixed time
Security
The server does not start without an authentication mode, takes secrets only from files or environment variables and checks every outgoing connection before it is made.
apikey (at least 16 characters, compared as SHA-256 in fixed time), jwt/oidc (authority and audience required) or none for a local test or behind your own proxy. Without a mode the start ends with exit code 2 and one line that names ZPLCORE__AUTH__MODE.zplcore.yaml stop the start. They never appear in logs, errors, catalogues or /ready.allowedNetworks.ZplLimits on every generation and render: image pixels (40 MP), image bytes (10 MB) and SVG size (2 MB), above: 413. Image files only from the template's own volume folder; inline and remote templates read no local files.application/problem+json in English with a trace id; texts of SDKs, operating system and services only in the log. Request log without query values; anonymous /ready shows only the status./templates read-only and pins the base images by digest. Meant to run with --read-only, --cap-drop ALL and no-new-privileges.X-Content-Type-Options: nosniff on every answer, SVG with Content-Security-Policy: sandbox.X-ZplCore-License: licensed | evaluation.Operations
One configuration file or environment variables, probes for Docker and Kubernetes, metrics for Prometheus and OpenTelemetry, and several instances that share their jobs.
/openapi/v1.json and interactive API docs at /docs (Scalar), served from the container without a CDN. Every endpoint with its parameters and problem answers.
/health: the process lives. /ready: renderer loaded, every template source read once, every required connection reachable. Details (version, licence edition, templates, problems, delivery) only for authenticated callers.
/metrics is off by default; on an internal port (metrics:port, e.g. 9464) or on the main port with its own key. Requests, labels, bytes, durations, rejections, render slots, templates, print jobs, jobs, stored outputs, webhook deliveries. OTLP export of metrics, traces and logs as soon as OTEL_EXPORTER_OTLP_ENDPOINT is set.
zplcore.yaml (--config, ZPLCORE_CONFIG or /config/zplcore.yaml) or ZPLCORE__SECTION__KEY environment variables. Every configuration error names its key and ends the start with exit code 2.
No keys in the cluster if you do not want them: the AWS default chain (IRSA, ECS/EC2 role), Azure Managed Identity and Workload Identity, Google service-account file or metadata server (GKE Workload Identity), for template sources and storage.
Instances on a common storage sink (plus Redis, if you like) share jobs, results and webhook deliveries: every instance answers for every job and can cancel it.
1.0.0 (NativeAOT) and 1.0.0-full, and zplcore/designer 1.0.0 – each for linux/amd64 and linux/arm64, signed with cosign, with the SBOM as a signed attestation (cosign.pub).-full for SQL Server with Entra ID and Oracle with your own driver (/app/drivers/oracle). The images themselves are verified for the release.Measured
Measurements from the development of the server, not a guarantee. Each figure names where it was taken; the Linux container figures follow with the release.
| Case | Result | Conditions |
|---|---|---|
| 1,000 shipping labels as ZPL, one request | 20 ms | warm, NativeAOT, parallel generation; VM with 16 vCPU (AMD EPYC 9454P), Windows Server 2025, quiet machine; evaluation mode and licensed |
| 10,000 shipping labels as ZPL, one request | 112–117 ms | as above (112 ms evaluation mode, 117 ms licensed) |
100,000 labels streamed from /v1/labels | 3.2 s (≈ 31,700/s) | NativeAOT, developer PC win-x64 under 80–97 % CPU load from other builds, evaluation mode, Stored Formats, best of 3 |
/v1/batch, 100 parts × 1,000 records, NDJSON | 2.7 s (≈ 37,200/s) | as above |
| Printing 100,000 labels to a TCP peer (twin off) | 3.6 s (≈ 27,700/s) | as above; the peer discards the data |
Label: versand/dhl-100x150 (100 × 150 mm, 203 dpi). The smoke test (build/zplcore-server-smoke.sh) starts the JIT and the NativeAOT build side by side and compares every answer byte for byte: ZPL from JSON, NDJSON and CSV, PNG, SVG, PDF, ZIP, reports, template sources, queries, printing, storage, webhooks, jobs and batches. The engine itself is measured on the performance page.
Quick start
This is how it looks. The authentication mode is required: none only for a local test.
# serve the templates in ./templates, no authentication docker run --rm -p 8080:8080 \ -v ./templates:/templates:ro \ -e ZPLCORE__AUTH__MODE=none \ zplcore/server # data in, ZPL out curl -X POST \ localhost:8080/v1/labels/versand/dhl-100x150 \ -H 'Accept: application/vnd.zpl' \ -H 'Content-Type: application/json' \ -d '{"Name":"Anna Huber","City":"Wien"}' # interactive API docs: http://localhost:8080/docs
docker run --rm -p 8080:8080 \
--read-only --tmpfs /tmp \
--cap-drop ALL --security-opt no-new-privileges \
-v ./templates:/templates:ro \
-v ./zplcore.yaml:/config/zplcore.yaml:ro \
-v ./zplcore.license:/run/secrets/zplcore-license:ro \
-e ZPLCORE__AUTH__MODE=apikey \
-e ZPLCORE__AUTH__APIKEYS__0="$API_KEY" \
zplcore/server
# PNG preview of one label
curl -X POST "$ZPLCORE/v1/labels/versand/dhl-100x150" \
-H "X-Api-Key: $API_KEY" -H 'Accept: image/png' \
-H 'Content-Type: application/json' -d @one.json -o label.png# compose.yaml services: server: image: zplcore/server:1.1.0 ports: ["8080:8080"] volumes: ["./templates:/templates:ro"] environment: ZPLCORE__AUTH__MODE: apikey ZPLCORE__AUTH__APIKEYS__0: ${API_KEY} read_only: true tmpfs: [/tmp] designer: image: zplcore/designer:1.1.0 ports: ["8081:8080"] volumes: ["./templates:/templates:ro"] environment: ZPLCORE_DESIGNER__AUTH__MODE: apikey ZPLCORE_DESIGNER__AUTH__APIKEYS__0: ${API_KEY} read_only: true tmpfs: [/tmp]
# 1. key (at least 16 characters) and a first template echo "API_KEY=$(openssl rand -hex 16)" > .env mkdir templates echo '{"unit":"Mm","width":50.8,"height":25.4,"items":[{"type":"text","name":"title","x":3,"y":4,"width":44,"height":6,"fontSize":10,"dataField":"name"}]}' > templates/hello.json # 2. start server and designer docker compose up -d . ./.env # 3. data in, ZPL out – and the same label as PNG curl -X POST localhost:8080/v1/labels/hello \ -H "X-Api-Key: $API_KEY" -H 'Content-Type: application/json' \ -d '{"name":"Hello zplCore"}' curl -X POST localhost:8080/v1/labels/hello \ -H "X-Api-Key: $API_KEY" -H 'Content-Type: application/json' \ -H 'Accept: image/png' -d '{"name":"Hello zplCore"}' -o hello.png # 4. open the designer in the browser # http://localhost:8081/designer/ # API docs of the server: http://localhost:8080/docs
Both containers read the same ./templates folder: the server serves every *.json in it as a template (templates/hello.json → /v1/labels/hello), the designer at http://localhost:8081/designer/ is where you design labels – export the design as JSON into ./templates and the server prints it. Without a licence key both run in evaluation mode with watermark.
printers: lager-1: host: 10.0.5.21 port: 9100 model: ZD421 # twin profile ZD421-203 dpi: 203 twin: block # off | warn | block # fonts: printer # optional: TrueType fonts into printer memory (~DY) sinks: archive: type: s3 bucket: labels-out prefix: zpl/ region: eu-central-1 webhooks: erp: url: https://erp.example.com/hooks/labels secretFile: /run/secrets/erp-webhook jobs: sink: archive # results, status, webhook outbox redis: connectionStringFile: /run/secrets/redis
# print the open shipments of Austria on lager-1 curl -X POST "$ZPLCORE/v1/print/lager-1?template=versand/dhl-100x150&query=open-shipments&country=AT" \ -H "X-Api-Key: $API_KEY" # raw ZPL, checked by the twin first curl -X POST "$ZPLCORE/v1/print/lager-1?twin=block" \ -H "X-Api-Key: $API_KEY" -H 'Content-Type: application/vnd.zpl' \ --data-binary @label.zpl # three copies of every label, and store the ZPL curl -X POST "$ZPLCORE/v1/labels/versand/dhl-100x150?copies=3&store=archive" \ -H "X-Api-Key: $API_KEY" -H 'Content-Type: application/json' -d @shipments.json # printers, queues, live status curl "$ZPLCORE/v1/printers" -H "X-Api-Key: $API_KEY" curl "$ZPLCORE/v1/printers/lager-1/status" -H "X-Api-Key: $API_KEY"
| Endpoint | Purpose |
|---|---|
POST /v1/labels/{template} | records in, labels out; ?query=, ?print=, ?store=, ?webhook=, ?copies=, ?async=true |
POST /v1/render | template in the request (off by default) |
GET /v1/templates, /v1/templates/{path}, …/preview | catalogue with versions and sources, template JSON, PNG preview with sample data |
GET /v1/queries | named queries with their parameters |
POST /v1/print/{printer} | print raw ZPL, or ?template= with records or a query |
GET /v1/printers, /v1/printers/{name}/status | printers and queues, ~HS live |
POST /v1/batch | several templates and record groups: ZPL stream, ZIP, JSON report |
POST /v1/jobs, GET|DELETE /v1/jobs/{id}, GET /v1/jobs/{id}/result | asynchronous jobs: submit, status, cancel or delete, result |
/health, /ready, /metrics, /docs, /openapi/v1.json | probes, metrics, API docs |
Roadmap
These points belonged to the plan from the start. They are not built or not yet verified with zplCore Server, so nothing above relies on them.
No prices, no purchase. Ask for a trial of the SDK today.
Request a trial