Skip to main content

Configuration

All configuration is via environment variables (see .env.example). Values marked clamped are limited to the Graphtec-specified range even if you set something wilder.

Cutters

VariableDefaultMeaning
CUTTERSMulti-cutter setup: name=host[:port] entries, comma-separated. Example: left=192.168.1.104:9100,right=192.168.1.105. Overrides CUTTER_HOST. Names must be unique, alphanumeric/dash/underscore.
CUTTER_HOST127.0.0.1Single-cutter fallback address
CUTTER_PORT9100Single-cutter fallback port
CUTTER_NAMEcutterDisplay name in single-cutter mode
DLS_ENABLEDfalseStart Data Link polling at boot. Keep false until a cutter is connected.
DLS_POLL_INTERVAL_SECONDS1.0Status poll cadence (clamped 0.5–2.0)
DLS_TIMEOUT_SECONDS5.0Per-command socket timeout (clamped 3–10)
SEND_RETRY_TOTAL_MS3000Cumulative wait budget for send retries (the mechanism that lets tools time-share the cutter's single connection)
SEND_RETRY_INTERVAL_MS50Delay between retry attempts
GPGL_STEPS_PER_MM10Must match the cutter's GP-GL STEP SIZE (10 = 0.1 mm factory default; also 20, 40, 100). A mismatch scales every cut; the startup handshake warns loudly if it detects one.

API

VariableDefaultMeaning
API_HOST / API_PORT0.0.0.0 / 8080Bind address
API_KEY(empty)When set, every endpoint except /, /health, and /version requires the X-API-Key header. Empty = open (trusted network).
MAX_UPLOAD_BYTES20971520Size cap for uploaded PDFs and command sequences
LOG_LEVELINFOPython logging level
VariableDefaultMeaning
CUT_SPOT_COLORSCutContourComma-separated spot-color names accepted as legacy cut markers. ISO 19593-1 processing steps are always accepted regardless.
BARCODE_PREFIXFPrefix for server-minted barcodes (rest is a base36 counter). Must not start with G — Graphtec reserves it.
PRINT_INGEST_ENABLEDtrueWatch the print hot folder
PRINT_INBOX_DIR$APP_DATA_DIR/inbox/printPrint hot folder
PRINT_OUTBOX_DIR$APP_DATA_DIR/outbox/printMarked print files
PRINT_ERROR_DIR$APP_DATA_DIR/errorsRejected print files

Cut-file hot folder

VariableDefaultMeaning
INGEST_ENABLEDtrueWatch the cut hot folder
INGEST_INBOX_DIR$APP_DATA_DIR/inbox/cutCut hot folder
INGEST_PROCESSED_DIR$APP_DATA_DIR/processedConsumed inputs
INGEST_ERROR_DIR$APP_DATA_DIR/errorsRejected inputs
INGEST_POLL_INTERVAL_SECONDS2.0Folder poll cadence
INGEST_FILE_MIN_AGE_SECONDS2.0A file must sit unchanged this long before pickup (guards against half-copied files)

Webhooks

VariableDefaultMeaning
WEBHOOK_URL(empty)POST target for job.sent / barcode.no_match events. Empty = disabled.
WEBHOOK_SECRET(empty)When set, payloads are signed: X-OGS-Signature: sha256=<HMAC-SHA256 hex>

Storage

VariableDefaultMeaning
APP_DATA_DIR./data (/data in Docker)Root of all state
DATABASE_PATH$APP_DATA_DIR/jobs.dbSQLite job library
LOCK_FILE_PATH$APP_DATA_DIR/dls.lockBase name for per-cutter Data Link lock files (dls-<name>.lock)