Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration

Everything is environment variables with sensible defaults. All limits exist to keep hostile or pathological documents from taking the service down.

VariableDefaultPurpose
DOCRAY_PORT41619HTTP listen port
DOCRAY_CLI_PATHdocray beside the server binary, else on PATHWorker binary the server spawns per document
DOCRAY_PDFIUM_DIR./.pdfium/libDirectory of the PDFium dynamic library
DOCRAY_DATA_DIR./dataJob uploads, results, and the SQLite job store
DOCRAY_SYNC_MAX_BYTES26214400 (25 MB)Sync upload cap
DOCRAY_SYNC_MAX_PAGES200Sync page cap
DOCRAY_JOBS_MAX_BYTES1073741824 (1 GiB)Jobs upload cap
DOCRAY_TIMEOUT_SECS300Wall-clock limit per extraction
DOCRAY_OUTPUT_CAP_BYTES536870912 (512 MB)Max JSON a worker may produce
DOCRAY_MEM_LIMIT_BYTES2147483648 (2 GiB)Per-worker memory rlimit (enforced on Linux)
DOCRAY_WORKERSCPU cores (min 1)Job worker pool size; also bounds concurrent sync extractions
DOCRAY_RESULT_TTL_SECS86400 (24 h)How long finished jobs and results are kept

Invalid values fall back to the default rather than failing startup.

Sizing guidance

Task/container memory should exceed DOCRAY_WORKERS × DOCRAY_MEM_LIMIT_BYTES plus headroom for the server process itself (e.g. 2 workers × 2 GiB + ~1 GiB ≈ 5 GiB). The per-worker rlimit caps each extraction before container-level OOM would trigger.