The practical configuration guide

Know what each
setting changes.

109 template settings, grouped exactly as .env.example. Search names and explanations without opening or exposing your local configuration.

Configuration precedence01 → 03
# Inbound MCP token:label list (distinct from API token)
MCP_API_TOKENS=<unique-secret>:local-agent
01 / CLI selection wins firstExplicit launcher flags (such as -NoMcp or -Frontend) override environment values for that command. 02 / Shell environment → selected .env fileExported shell variables override .env; .env overrides Compose and application defaults. 03 / Active vs commented native examplesSection 14 lists commented native overrides (optional) that stock Compose does not forward.
Examples describe shipped defaults. Your machine and secrets are never inspected.
Smart Document Manager / Precedence, credentials & searchable .env.example reference
01 / Before you edit

A small file.
A few rules.

The file is a contract between you and the launchers. Three habits keep it safe.

01 / The template

Keep .env.example intact.

Copy the template to .env and edit only the copy. The versioned template stays the reference; your file holds local values and secrets. Never commit or publish .env.

02 / The format

One name, one value.

Each line is NAME=value. No spaces around the equals sign, no comments on a value line that change its meaning, and use a plain-text editor so the file keeps its encoding and its leading dot.

03 / The role

A file, not a document.

.env is read by the launcher and Compose; it is not documentation for others and not a place for prose. This guide explains every name so the file can stay terse.

02 / Day one

Change three secrets.
Leave the rest.

The template defaults carry the whole first run. Only the credentials need your decision.

Set OCR_SERVER_API_TOKENS to a strong random secret followed by a label such as :console — the console's API key field takes the secret alone. Set MCP_API_TOKENS to a different secret followed by :local-agent. Set UPSTREAM_CLIENT_TOKEN to a third plain secret, no label: the MCP server presents it to the API, which accepts it automatically.

Everything else stays at the shipped defaults for a first run: ports, budgets, GPU overrides and the storage profile. Reach for them when a real need appears — every name below is documented.

Your three assignments · placeholder values
OCR_SERVER_API_TOKENS=<strong-random-secret>:console
MCP_API_TOKENS=<different-secret>:local-agent
UPSTREAM_CLIENT_TOKEN=<third-secret>

Illustrative placeholders — generate real secrets on your own machine and keep them out of chat.

03 / Precedence & file rules

Separate the template
from your values.

Defaults are a contract. Local credentials are not documentation.

01 / Template vs working copy

Keep .env.example intact

Use .env.example as the versioned reference and .env for local values. Compose reads the selected env file; it does not automatically read the example.

02 / Override order

Know which value wins

CLI selection overrides shell values, then the selected env file, then the Compose ${VAR:-fallback} — missing and empty values both use the fallback. Inside ocr-api an empty OCR_VL_LANES, OCR_PAGE_PARALLELISM or OCR_LAYOUT_THREADS falls through to the calibrated hardware profile, every other empty value to the built-in default; GPU overrides stay empty for automatic hardware selection.

03 / Container vs native

Check runtime scope

The native API reads its process environment, not a dotenv file. Native MCP started from a source checkout also reads the repository root .env (the shell still wins); an installed package reads only its process environment. Section 14 entries are commented native examples and are not forwarded by Compose.

04 / Optional S3 archive

Archive outputs.
Only when asked.

The storage profile is off by default. The API runs the same without it — enabling it adds SeaweedFS, a gateway and a one-shot initializer.

Run python scripts/configure_storage.py to activate it. The helper writes into .env — locally, never printed. It always switches on the three activation keys and fills the rest only where empty:

On the next up, startup runs the synchronous bucket and identity initializer before the API. Disabling the profile later excludes it from future start plans; already running storage containers remain until stopped or down.

What the helper writes · shape only
COMPOSE_PROFILES=…,storage
OCR_STORAGE_ENABLED=true
OCR_STORAGE_BROWSER_ENABLED=true
OCR_S3_BUCKET=ocr-outputs
OCR_S3_RETENTION_DAYS=30
OCR_S3_* / OCR_SEAWEED_* = generated locally

Existing credentials and behaviour values are preserved, the activation keys are always set; secrets are never displayed. Groups 12 and 13 below document every name.

05 / Access & credentials

Trace each credential
to its target.

The OCR stack uses distinct labelled credentials for the API and MCP, plus one service token between them.

You → OCR API (:8020)

API inbound

OCR_SERVER_API_TOKENS holds unique token:label pairs; clients send the token half alone. Empty disables API authentication. Health, enabled docs and frontend assets stay public.

Agent → MCP (:8021)

MCP inbound

MCP_API_TOKENS holds unique token:label pairs, separate from the API secret. Compose requires credentials even on host loopback.

MCP → OCR API

MCP outbound

UPSTREAM_CLIENT_TOKEN is one plain service token. The API accepts it automatically under the label @mcp, so it never goes in the API list. Required when API authentication is on.

Host → vLLM (:8081)

Model server

The published vLLM port has no configured bearer authentication. The OCR API token does not protect it. Keep loopback publications; CORS is not an access token.

Protect a full stack in four steps.

  1. Set the API credentials. OCR_SERVER_API_TOKENS gates the console and every API call, plus a separate UPSTREAM_CLIENT_TOKEN for the MCP server.
  2. Set a different MCP secret. MCP_API_TOKENS uses its own token:label list — reusing the API secret blurs two boundaries.
  3. Keep loopback publications. Every host port is 127.0.0.1 in Compose, including unauthenticated vLLM docs on OCR_VLLM_DOCS_PORT.
  4. Separate storage roles. When the archive is enabled, OCR_S3_* identities carry least-privilege roles — never share them with the API or MCP secrets.
Different doors. Different keys.
Console / REST → :8020 → OCR_SERVER_API_TOKENS (token:label)
Agent        → :8021 → MCP_API_TOKENS (token:label)
MCP          → API   → UPSTREAM_CLIENT_TOKEN
Host browser → :8081 → no bearer — keep loopback
Archive      → :8333 → OCR_S3_* role keys

Each door checks only its own key. The API also accepts the MCP service token, logged as @mcp.

06 / Apply a change

Save. Verify.
Apply.

Edits take effect through the launcher, not by saving alone. Three steps keep the change deliberate.

  1. Save and verify.

    Save .env in your editor, then run verify. It checks the token/storage relationships and Compose security without touching Docker state — fix what it names before applying.

    Run from the repository root

    Windows · PowerShell 7
    pwsh .\stack.ps1 verify
    Linux / macOS · Bash
    bash stack.sh verify

  2. Preview the resolved file.

    config prints the resolved Compose configuration with credentials redacted — check the value you changed is the one Compose will see. Shell variables still win over the file.

    Run from the repository root

    Windows · PowerShell 7
    pwsh .\stack.ps1 config
    Linux / macOS · Bash
    bash stack.sh config

  3. Apply and check health.

    Use up when .env changed — restart reuses the existing container configuration and keeps the old value. Afterwards, check /health for status=healthy and vllm=reachable.

    Run from the repository root

    Windows · PowerShell 7
    pwsh .\stack.ps1 up -Wait
    Invoke-RestMethod http://127.0.0.1:8020/health
    Linux / macOS · Bash
    bash stack.sh up --wait
    curl --fail --show-error --silent http://127.0.0.1:8020/health

07 / Look it up when you need it

Find the setting,
then change it locally.

Active assignments and commented native examples have different effects. Search includes names, defaults and explanations.

01 / Compose profiles and optional services3 settings
COMPOSE_PROFILESActive assignment
Template: (empty)

Empty starts the base stack. The storage profile adds the optional SeaweedFS services and provisioning.

MCP_SERVER_ENABLEDActive assignment
Template: true

Launcher-only selection. False omits MCP from startup, stops/removes a previously enabled MCP container during up and skips MCP token validation in verify; a direct docker compose up ignores it.

OCR_ARCHIVE_ONLYActive assignment
Template: false

Archive-only mode: read stored OCR archives with no vllm-paddleocr container and no GPU reservation. The launchers apply it through compose.archive-only.yml (-ArchiveOnly / --archive-only force it for one run): the API answers 503 ocr_disabled_archive_only on /parse, /ocr and /parse/chunks, skips autotune and the vLLM poll, and reports mode=archive_only with vllm=disabled in /health (healthy once the archive bucket probe succeeds); storage, /chunk, RAG refinement and Office previews keep working. Needs OCR_STORAGE_ENABLED and OCR_STORAGE_BROWSER_ENABLED; a direct docker compose up ignores it.

02 / Published host ports (always 127.0.0.1 in Compose)5 settings
OCR_SERVER_PORTActive assignment
Template: 8020

Host loopback port for the API and console; the API container remains on port 8020.

OCR_VLLM_DOCS_PORTActive assignment
Template: 8081

Host loopback port for the model server API and documentation. It is not protected by the OCR bearer token.

MCP_PORTActive assignment
Template: 8021

MCP listener and published loopback port.

OCR_S3_PORTActive assignment
Template: 8333

Published S3 gateway port, used only by the storage profile.

OCR_STORAGE_CONSOLE_PORTActive assignment
Template: 23646

Published SeaweedFS console port, used only by the storage profile.

03 / API and MCP authentication3 settings
OCR_SERVER_API_TOKENSActive assignment
Template: (empty)

Inbound API and console token:label entries separated by commas; clients and the console's API key field use the token half alone. Tokens and labels must be unique; labels match [A-Za-z0-9._-]+. When set, everything except /, /health, /assets/* and the enabled OpenAPI routes requires the bearer token, including /stats and /metrics. Empty disables API authentication. Replaces the former OCR_SERVER_API_TOKEN, which is now refused. Never put a real token in this guide.

MCP_API_TOKENSActive assignment
Template: (empty)

Inbound MCP token:label entries separated by commas. Tokens and labels must be unique; use secrets distinct from the API tokens and the service token. Required by Compose MCP: empty fails verify and the container start — start with -NoMcp / --no-mcp or MCP_SERVER_ENABLED=false instead.

UPSTREAM_CLIENT_TOKENActive assignment
Template: (empty)

Plain MCP-to-API service token, no label. ocr-api accepts it automatically as @mcp, so it must not appear in OCR_SERVER_API_TOKENS. Required when API authentication is on and MCP is enabled; host-side live verifiers send it too. ocr-api ignores it while OCR_SERVER_API_TOKENS is empty.

04 / Console, documentation and browser access5 settings
EXPOSE_OCR_SWAGGERActive assignment
Template: true

Enable the public API documentation and OpenAPI surface.

EXPOSE_FRONTENDActive assignment
Template: true

Enable the public static web console; data operations still require the configured API token.

OCR_CORS_ORIGINSActive assignment
Template: (empty)

Comma-separated origins passed verbatim to the CORS allowlist; empty sends no CORS headers. Add the literal null only for a standalone file:// page calling the loopback API, and prefer explicit origins over *. Preflights are answered before authentication — this is a browser policy, not an access token.

MCP_ALLOWED_HOSTSActive assignment
Template: (empty)

MCP Host allowlist. Empty uses loopback/local aliases; explicit values replace those defaults.

MCP_ALLOWED_ORIGINSActive assignment
Template: (empty)

MCP browser Origin allowlist. Empty permits no browser clients.

05 / API: admission, memory, uploads, timeouts and rate limiting12 settings
OCR_MAX_QUEUE_SIZEActive assignment
Template: 16

Admission capacity for document preparation and parsing requests.

OCR_ELEMENT_MAX_SLOTSActive assignment
Template: 32

Maximum admitted focused-image OCR slots.

OCR_ELEMENT_MEMORY_BYTESActive assignment
Template: 536870912

Estimated shared memory budget for decoding, copies and encoded images in focused OCR requests, in bytes.

OCR_REQUEST_TIMEOUTActive assignment
Template: 600

Total API request deadline, in seconds; upload time consumes this budget.

OCR_PAGE_TIMEOUTActive assignment
Template: 120

Per-page processing timeout, in seconds.

MAX_FILE_BYTESActive assignment
Template: 31457280

Maximum decoded input file size, in bytes. Align the MCP file limit when using MCP.

OCR_MAX_EMBEDDED_IMAGE_BYTESActive assignment
Template: 20971520

Maximum embedded-image size, in bytes.

OCR_MAX_PAGESActive assignment
Template: 50

Upper bound for a request's max_pages (422 above it). /parse truncates longer documents with a pages_truncated warning; /parse/chunks refuses them unless the request sets max_pages explicitly.

OCR_RATE_LIMIT_REQUESTS_PER_MINUTEActive assignment
Template: 3600

API requests per minute per client. Zero disables rate limiting. GET /stats, /metrics and /parse/progress/{id} are exempt so console polling cannot starve callers.

OCR_RATE_LIMIT_BURST_SIZEActive assignment
Template: 120

Per-client burst allowance for the API token bucket.

OCR_RATE_LIMIT_MAX_CLIENTSActive assignment
Template: 10000

Maximum tracked client entries in the API limiter.

OCR_RATE_LIMIT_IDLE_SECONDSActive assignment
Template: 600

Idle lifetime of a tracked limiter client, in seconds.

06 / PDF: rasterization and per-page pixel budget2 settings
OCR_PARSE_DPIActive assignment
Template: 250

PDF rasterization resolution, from 50 to 400 DPI.

OCR_PDF_MAX_PAGE_PIXELSActive assignment
Template: 25000000

Maximum rasterized pixels for one PDF page; excess is rejected with 413.

07 / Office/OpenDocument conversion through LibreOffice3 settings
OCR_OFFICE_ENABLEDActive assignment
Template: true

Enable Office/OpenDocument conversion through headless LibreOffice.

OCR_SOFFICE_PATHActive assignment
Template: (empty)

Optional executable path inside the container. Empty searches the container PATH for soffice/libreoffice.

OCR_OFFICE_TIMEOUT_SECONDSActive assignment
Template: 120

Office conversion timeout, in seconds, including admission to the serialized converter.

08 / Hardware autotuning and OCR pipeline concurrency12 settings
OCR_AUTOTUNEActive assignment
Template: quick

Hardware tuning mode: off, quick or full.

OCR_TUNING_OBJECTIVEActive assignment
Template: balanced

Calibration objective: balanced, latency or throughput.

OCR_AUTOTUNE_FORCEActive assignment
Template: false

Force a new hardware calibration instead of reusing a valid profile.

OCR_AUTOTUNE_MAX_SECONDSActive assignment
Template: (empty)

Calibration admission budget, checked between passes. Empty uses 600 seconds for quick or 1200 for full. Native work already running may overrun.

OCR_HEALTH_START_PERIODActive assignment
Template: 1500s

Compose healthcheck start_period for ocr-api (layout model download and startup calibration), expressed as a Compose duration; vllm-paddleocr keeps a fixed 600s.

OCR_VL_LANESActive assignment
Template: (empty)

Manual recognition-lane override. Empty permits a calibrated profile or fallback.

OCR_PAGE_PARALLELISMActive assignment
Template: (empty)

Only 1 is supported. The Paddle predictor processes pages serially; other values are rejected.

OCR_LAYOUT_THREADSActive assignment
Template: (empty)

Manual Paddle CPU-thread override for layout pre- and post-processing; the PP-DocLayoutV3 network itself runs on the GPU. Empty permits a calibrated profile or fallback.

OCR_API_CPUSActive assignment
Template: 4.0

CPU limit of the ocr-api container for rasterization, Office conversion and chunking; layout analysis runs on the GPU. Changing it triggers recalibration. It must not exceed the host's CPU count, or Docker refuses to start ocr-api.

OCR_LAYOUT_GPU_MEMORY_MBActive assignment
Template: 3584

VRAM cap in MiB for PP-DocLayoutV3 layout analysis, which runs on the GPU in ocr-api next to vLLM. The pipeline peaks at about 3.1 GB on 16-page blocks at 250 DPI; 3072 runs out of memory. Raise it with OCR_PARSE_DPI or the pixel budgets. Needs an 8 GB card at least; on 8 GB cards restart vllm-paddleocr and ocr-api together, since layout keeps its VRAM and a lone vLLM restart may not fit its KV cache.

OCR_VL_MAX_INFLIGHTActive assignment
Template: 16

Shared API admission slots, capped by OCR_VLLM_MAX_NUM_SEQS. Each element call or native parsing worker takes one slot; a parsing worker can dispatch OCR_VL_LANES block requests. This does not cap all upstream VL requests.

OCR_TABLE_REREADActive assignment
Template: (empty)

Second reading of a table or list block the reading model looped on. Such a block comes back cut to a stub or with repeated rows; /parse and /parse/chunks then read it once more at two megapixels and keep the second reading only when it passes the same checks and says more than the first. The table_suspect warning names the block and the outcome either way. false only warns; empty keeps the built-in default (true).

09 / vLLM: image, model, cache and GPU overrides12 settings
OCR_VLLM_IMAGEActive assignment
Template: ocr-vllm:0.32.0-security

Default local security image built from the digest-pinned base in Dockerfile.vllm. A custom override is excluded from launcher builds and needs a separate audit.

OCR_VLLM_SERVED_MODEL_NAMEActive assignment
Template: (empty)

Optional served-model alias shared by the API and model server. Empty uses PaddleOCR-VL-0.9B.

OCR_VLLM_MODEL_REVISIONActive assignment
Template: (empty)

Pinned model/code revision. Empty uses the verified revision; any other value is handed to vLLM as --revision/--code-revision and to ocr-api unchanged, so recalibrate and re-run quality checks after changing it.

OCR_HF_CACHE_DIRActive assignment
Template: /app/model_cache/hf

Read-only model/tokenizer cache path as seen inside the API container.

OCR_GPU_DEVICEActive assignment
Template: (empty)

Docker/NVIDIA index of the one GPU reserved by both vLLM and the API. Empty selects GPU 0; -GpuDevice / --gpu-device overrides it for one run.

OCR_VLLM_GPU_MEM_UTILActive assignment
Template: (empty)

Manual GPU-memory utilization override, a fraction in (0, 1]. Empty permits hardware selection; a value that cannot hold the model (about 3.5 GB) or exceeds the free VRAM budget aborts vLLM startup.

OCR_VLLM_MAX_NUM_SEQSActive assignment
Template: (empty)

Manual concurrent-sequence override. Empty permits the vLLM hardware tier; the API has a fallback of 16.

OCR_VLLM_ENFORCE_EAGERActive assignment
Template: (empty)

Manual eager-execution override. Empty keeps CUDA graphs enabled (no tier selects eager mode); true disables them.

OCR_VLLM_MAX_NUM_BATCHED_TOKENSActive assignment
Template: (empty)

Model-server batch token budget. Empty uses 16384 tokens.

OCR_VLLM_MAX_MODEL_LENActive assignment
Template: (empty)

Model context limit. Empty uses 16384 tokens.

OCR_VLLM_MM_PROCESSOR_CACHE_GBActive assignment
Template: (empty)

Multimodal processor cache size, in GiB. Empty uses zero.

OCR_VLLM_USE_V2_MODEL_RUNNERActive assignment
Template: 0

Zero selects the Docker Desktop/WSL-compatible V1 runner. V2 requires CUDA UVA.

10 / RAG: chunking CPU, token, memory and output limits14 settings
OCR_CHUNK_MAX_INPUT_BYTESActive assignment
Template: 33554432

Maximum serialized chunking input size, in bytes.

OCR_CHUNK_MAX_BLOCKSActive assignment
Template: 20000

Maximum input blocks considered by chunking.

OCR_CHUNK_MAX_UNITSActive assignment
Template: 20000

Maximum chunking units admitted per request.

OCR_CHUNK_MAX_TOKENSActive assignment
Template: 32768

Maximum requested per-chunk token budget.

OCR_CHUNK_MAX_DP_EDGESActive assignment
Template: 320000

Bound on dynamic-programming edges evaluated while choosing chunk boundaries.

OCR_CHUNK_MAX_SPLIT_EVALUATIONSActive assignment
Template: 100000

Bound on candidate split evaluations for one chunking request.

OCR_CHUNK_MAX_TOKEN_EVALUATIONSActive assignment
Template: 1100000

Bound on tokenizer evaluations for one chunking request.

OCR_CHUNK_MAX_RENDERED_BYTESActive assignment
Template: 268435456

Maximum intermediate rendered text size, in bytes.

OCR_CHUNK_MAX_TABLE_CELLSActive assignment
Template: 100000

Maximum table cells considered during chunking.

OCR_CHUNK_MAX_OUTPUT_CHUNKSActive assignment
Template: 10000

Maximum returned chunk count.

OCR_CHUNK_MAX_OUTPUT_BYTESActive assignment
Template: 67108864

Maximum serialized chunking result size, in bytes.

OCR_CHUNK_MAX_WORKERSActive assignment
Template: 2

Maximum CPU worker processes for chunking.

OCR_CHUNK_TIMEOUT_SECONDSActive assignment
Template: 120

Chunking execution deadline, in seconds.

OCR_CHUNK_QUEUE_WAIT_SECONDSActive assignment
Template: 0.5

Maximum wait for chunking admission, in seconds.

11 / MCP: timeouts, retries, size limits and local file access10 settings
MCP_HTTP_TIMEOUTActive assignment
Template: 660

Upstream inference HTTP phase timeout, in seconds. Keep it above the API request deadline.

MCP_CHUNK_HTTP_TIMEOUTActive assignment
Template: 780

Total RAG upstream deadline, in seconds. Keep at least API request timeout + chunking timeout + 30.

MCP_CHUNK_MAX_ARGUMENT_BYTESActive assignment
Template: 8388608

Maximum UTF-8 serialized RAG arguments, in bytes, checked again after source preparation.

MCP_CHUNK_MAX_RESULT_BYTESActive assignment
Template: 8388608

Complete serialized RAG result limit, including summary and metadata; also the raw-byte cap for storage/Office downloads. Minimum 1024.

MCP_DIAGNOSTIC_TIMEOUTActive assignment
Template: 5

Total diagnostic GET budget, in seconds, including retries and backoff.

MCP_STORAGE_TIMEOUTActive assignment
Template: 150

Total upstream storage request deadline, in seconds.

MCP_RETRY_ATTEMPTSActive assignment
Template: 3

Maximum attempts (1–10) for idempotent diagnostic and storage GETs within their deadline. Inference POSTs are never retried.

MCP_RETRY_BACKOFF_SECONDSActive assignment
Template: 0.5

Initial retry backoff for diagnostic and storage GETs, in seconds, with jitter.

MCP_INPUT_ROOTSActive assignment
Template: (empty)

Semicolon-separated directories accessible on the MCP server. Empty disables local-file access; Docker also needs explicit read-only mounts.

MCP_MAX_FILE_BYTESActive assignment
Template: 31457280

Maximum decoded MCP input file size, in bytes. Align with the API input cap.

12 / S3/SeaweedFS archive: activation, retention and limits13 settings
OCR_STORAGE_ENABLEDActive assignment
Template: false

Enable writing OCR outputs to the configured S3 archive; run the storage configuration helper first.

OCR_STORAGE_BROWSER_ENABLEDActive assignment
Template: false

Enable the /storage/* routes, the console STORAGE tab and MCP archive browsing/deletion with the separate OCR_S3_BROWSER_* identity (startup fails without it); single-file deletion and RAG refinement also need OCR_STORAGE_ENABLED.

OCR_S3_ENDPOINTActive assignment
Template: http://storage-gateway:8333

Internal S3 gateway endpoint. Host clients use the published loopback S3 port instead.

OCR_S3_BUCKETActive assignment
Template: ocr-outputs

Bucket used for archived OCR outputs.

OCR_S3_REGIONActive assignment
Template: us-east-1

S3 signing region.

OCR_S3_ADDRESSING_STYLEActive assignment
Template: path

S3 addressing style for the configured backend.

OCR_S3_RETENTION_DAYSActive assignment
Template: 30

Bucket lifecycle expiration in days, applied by storage-init; 0 disables it. verify requires an integer ≥ 0.

OCR_STORAGE_TIMEOUT_SECONDSActive assignment
Template: 10

Storage operation timeout, in seconds.

OCR_STORAGE_MAX_INFLIGHTActive assignment
Template: 2

Maximum concurrent archive-write operations.

OCR_STORAGE_MAX_BYTESActive assignment
Template: 134217728

Maximum archived/downloaded content budget, in bytes.

OCR_STORAGE_MAX_OBJECTSActive assignment
Template: 1024

Maximum objects in one archived output set.

OCR_STORAGE_SAVE_INPUTActive assignment
Template: false

Opt in to archiving original source documents. Consider their confidentiality and retention.

OCR_STORAGE_SAVE_PARSEDActive assignment
Template: true

Save the pre-chunking /parse result as parsed.json in /parse/chunks archives; /parse archives always keep their JSON and Markdown.

13 / Storage secrets: separate identities by privilege10 settings
OCR_S3_ADMIN_ACCESS_KEYActive assignment
Template: (empty)

Provisioning administrator access key. Generated locally; never passed to the API.

OCR_S3_ADMIN_SECRET_KEYActive assignment
Template: (empty)

Provisioning administrator secret. Keep it in local configuration only.

OCR_S3_ACCESS_KEYActive assignment
Template: (empty)

API writer access key for listing/writing archives.

OCR_S3_SECRET_KEYActive assignment
Template: (empty)

API writer secret, generated by the storage helper.

OCR_S3_READER_ACCESS_KEYActive assignment
Template: (empty)

External read-only archive access key.

OCR_S3_READER_SECRET_KEYActive assignment
Template: (empty)

External read-only archive secret.

OCR_S3_BROWSER_ACCESS_KEYActive assignment
Template: (empty)

API browser access key for listing, reading and deleting archives.

OCR_S3_BROWSER_SECRET_KEYActive assignment
Template: (empty)

API browser secret, separate from writer and administrator identities.

OCR_SEAWEED_ADMIN_PASSWORDActive assignment
Template: (empty)

Separate SeaweedFS console password for the administrator.

OCR_SEAWEED_READER_PASSWORDActive assignment
Template: (empty)

Separate SeaweedFS console password for the reader.

14 / Native startup: options NOT forwarded by Compose6 settings
MCP_UPSTREAM_URLCommented native example
Template: http://127.0.0.1:8020

Native MCP endpoint for the API. Compose fixes its internal service URL instead.

MCP_BIND_HOSTCommented native example
Template: 127.0.0.1

Native MCP advertised bind host/default Host allowlist. Does not change Compose host publication.

MCP_LISTEN_HOSTCommented native example
Template: 127.0.0.1

Native MCP listener address. Compose fixes the container listener to 0.0.0.0 behind loopback publication.

MCP_ALLOW_UNAUTHENTICATED_LOCALCommented native example
Template: false

Native-only explicit anonymous mode, allowed only with both MCP hosts on loopback. Compose fixes this to false.

OCR_VLLM_URLCommented native example
Template: http://127.0.0.1:8081/v1

Native API endpoint for the model server. Export it in the API process environment; Compose fixes the internal URL.

OCR_VLLM_SERVED_MODELCommented native example
Template: PaddleOCR-VL-0.9B

Native API model alias. Compose supplies the shared alias through its service environment.

08 / Common questions

Apply changes
deliberately.

Validate the configuration before rebuilding and recreating containers.

Can this page edit my local settings?

No. This is a static reference to the versioned template. It never reads your .env, accepts a credential or saves changes.

How do I apply a change?

Run from the repository root

Windows · PowerShell 7
pwsh .\stack.ps1 verify
pwsh .\stack.ps1 up -Wait

Linux / macOS · Bash
bash stack.sh verify
bash stack.sh up --wait

Restart alone retains container configuration. Check shell overrides if the applied value differs from your file.

How are storage secrets created?

Run from the repository root

Windows · PowerShell 7
python scripts/configure_storage.py

Linux / macOS · Bash
python3 scripts/configure_storage.py

The helper generates missing credentials locally, preserves existing values and enables the storage profile. It is an explicit operator action; this guide does not run it.

Why did changing a Section 14 variable do nothing in Docker?

Section 14 documents native-process variables (such as MCP_UPSTREAM_URL and OCR_VLLM_URL). Stock compose.yml pins internal container URLs and bind addresses directly so host port edits do not break container-to-container routing.

09 / Keep going

Keep the contract
close.

These guides teach the workflow. The owning documents define its exact behavior.