Running Labelixa on your own server: environment variables, Docker deployment, custom fonts and the stateless architecture.
The rendering service is deliberately stateless: incoming ZPL is never written to disk or logged. This matters for data protection (GDPR) and makes horizontal scaling easy — you just add workers or servers.
| Variable | Purpose | Default |
|---|---|---|
LABELIXA_DB | SQLite database path (account/usage) | ./labelixa.db |
DATABASE_URL | PostgreSQL connection (instead of SQLite) | none |
LABELIXA_FONT | Custom text font (TTF path) | Liberation Sans Bold |
STRIPE_SECRET_KEY | Stripe secret key (subscriptions) | none |
STRIPE_WEBHOOK_SECRET | Stripe webhook signing secret | none |
STRIPE_PRICE_STARTER | Stripe price ID for the Starter plan | none |
STRIPE_PRICE_PRO | Stripe price ID for the Professional plan | none |
STRIPE_PRICE_ENTERPRISE | Enterprise (on-prem) price ID | none |
STRIPE_PRICE_*_YEARLY | Annual price IDs for the plans | none |
SITE_URL | Canonical domain on SEO pages | from the request |
CORS_ORIGINS | Allowed origins (comma-separated) | * (everyone) |
LABELIXA_VEKIL | Reverse-proxy topology (which identity header is trusted); set to 'genel' unless you run behind Cloudflare | cloudflare |
LOG_JSON | One JSON object per log line | 0 |
LOG_LEVEL | Log level (DEBUG|INFO|WARNING|ERROR) | INFO |
METRICS_TOKEN | Enables the Prometheus /metrics endpoint (closed without it) | none |
WEB_CONCURRENCY | uvicorn worker count | 2 |
The Dockerfile in the repository root builds a single image:
docker build -t labelixa .
docker run -p 8000:8000 \
-e LABELIXA_DB=/data/labelixa.db \
-e LABELIXA_FONT=/fonts/MyFont.ttf \
-v $PWD/data:/data -v $PWD/fonts:/fonts labelixaZebra's built-in fonts (font 0 = CG Triumvirate Bold Condensed) are proprietary and are not part of the ZPL code; the ZPL only carries the font's number, height and width. By default the closest open font by width, Liberation Sans Bold, is used. If you need the output to match down to the stroke weight, define your licensed font with LABELIXA_FONT and the engine uses it for all text. If the path is wrong the service does not silently fall back — the font.sorun field and the status page warn you.
GET /health returns the component status as JSON; /durum is a human-readable status page. /health can be used for load-balancer health probes.