Skip to content

Configuration

Configuration is read from environment variables when the service starts. Empty values are treated as unset where a default is available.

Server and authentication

VariableDefaultDescription
API_TOKENRequiredBearer token for POST /print. Must contain at least 32 characters.
HOST0.0.0.0Hostname or address on which the server listens.
PORT3000Server port from 1 through 65535.

Printer

VariableDefaultDescription
PRINTER_NAMECUPS defaultCUPS queue to use.
PRINTER_TYPEepsonPrinter command set: epson or star.
PRINTER_WIDTH48Printable text width in characters.
PRINTER_DOT_WIDTH576Printable raster width in dots.
PRINTER_CHARACTER_SETpc437_usaCharacter set used to encode printer text.
PRINT_TIMEOUT_MS15000Maximum time allowed for submission to CUPS.
CUPS_SERVER/run/cups/cups.sock in ComposeCUPS server or socket used by the CUPS client.

Optional interfaces

VariableDefaultDescription
EXPOSE_DOCSfalseExposes the Scalar API reference at /docs.
EXPOSE_LLMS_TXTfalseExposes generated Markdown API documentation at /llms.txt.
EXPOSE_MCPfalseExposes the MCP endpoint at /mcp.
MCP_TOKENUnsetSeparate bearer token for MCP. Required and at least 32 characters when MCP is enabled.

Request and image limits

VariableDefaultDescription
MAX_REQUEST_BODY_BYTES10485760Maximum HTTP request size in bytes.
MAX_BLOCKS_PER_PRINT_JOB50Maximum number of blocks in one print request.
MAX_TEXT_CHARS_PER_BLOCK5000Configurable text limit used by text-bearing blocks.
MAX_IMAGE_INPUT_PIXELS25000000Maximum decoded image pixel count.
ALLOW_REMOTE_IMAGE_URLSfalseAllows image blocks to fetch supported images over HTTPS.
MAX_REMOTE_IMAGE_BYTES5242880Maximum remote image download size in bytes.
REMOTE_IMAGE_TIMEOUT_MS5000Remote image request timeout.

The generated /openapi.json reflects configuration-dependent request limits for the running server.