Most people never need these; everything else is in Settings.
Network and access
| Variable | Default | What it does |
|---|
PORT | 8124 | Port of the web studio. |
XIANSCAN_BIND | not set | lan or local. Overrides the LAN setting in the app. |
XIANSCAN_TRUST_LOOPBACK | on | Set to 0 so that even requests from the same machine need the token. |
ML_PORT | 8123 | Internal engine port (loopback only). |
Storage
| Variable | Default | What it does |
|---|
XDG_DATA_HOME (Linux) | ~/.local/share | Moves the whole XianScan folder, including the database and token. This is the right way to move data on Linux. |
DATABASE_PATH | <data>/xianscan.db | Location of the SQLite database only. |
DATA_ROOT | <data> | Location of images and fonts only. The database and access token stay in the data folder, so prefer XDG_DATA_HOME. |
XIANSCAN_APP_DIR | <XianScan>/app | Where the web app is unpacked. |
Hardware and performance
| Variable | Default | What it does |
|---|
MT_DEVICE | not set | Force cpu, cuda, dml or coreml while the device setting is Auto. |
ONNX_THREADS | CPU cores, at most 8 | CPU threads per model. Raise it on large servers. |
ONNX_GPU_THREADS | CPU cores, at most 4 | CPU threads that feed a GPU model. |
ORT_CUDA_MEM_LIMIT_MB | automatic | GPU memory limit per model (CUDA). The limit set in the app wins. |
PIPELINE_PAGE_CONCURRENCY | 3 | Pages processed in parallel within a chapter. |
Limits and logging
| Variable | Default | What it does |
|---|
XIANSCAN_MAX_IMAGE_MP | 100 | Largest accepted image, in megapixels. |
XIANSCAN_MAX_RESLICE_MP | 200 | Largest re-slice canvas, in megapixels. |
RUST_LOG | info | Engine log level (debug, warn...). |
LOG_REQUESTS | off | Set to 1 to log every web request. |