Skip to content
Opod

Core reference

Environment variables

Every environment variable opod reads, who reads it (leader, worker or CLI), and what it does.

In short

Every setting can come from an environment variable. A variable wins over config.yaml, which wins over the built-in default. Some variables override a config field; others are the contract a manager sets on a leader or worker process and have no YAML form.

OPOD_LISTEN=:8090 OPOD_LOG_LEVEL=debug opod up

Opod reads three groups of variables. Environment wins over config.yaml, which wins over the defaults. A boolean in the contract tables is true for 1 or true; the config overrides accept any Go boolean (1, t, true, 0, false, …).

Overrides of config.yaml fields

VariableOverridesNotes
OPOD_LISTENlistenDefault :8080.
OPOD_TLS_CERT / OPOD_TLS_KEYtls_cert / tls_keyBoth set: the listener speaks TLS.
OPOD_PROBE_LISTENprobe_listenSecond, always-plain listener for the probes and /metrics.
OPOD_PLAIN_LISTENplain_listenSecond, always-plain listener for the whole API. Clear text.
OPOD_DATA_DIRdata_dir
OPOD_STORAGE_DSNstorage.dsnAlso gives a managed leader a durable store.
OPOD_LOG_LEVELlog_leveldebug, info, warn, error.
OPOD_EXTERNAL_URLexternal_url
OPOD_MAX_BODY_BYTESmax_body_bytes
OPOD_TRUST_PROXY_HEADERStrust_proxy_headers
OPOD_BLOCK_PRIVATE_TARGETSblock_private_targets
OPOD_ENGINEengine.preferred
OPOD_OLLAMA_ENDPOINT, OPOD_VLLM_ENDPOINT, OPOD_SGLANG_ENDPOINT, OPOD_MLX_ENDPOINT, OPOD_LLAMACPP_ENDPOINT, OPOD_TRTLLM_ENDPOINTengine.*_endpoint
OPOD_VLLM_API_KEY—Bearer token sent to a vLLM server. The older VLLM_API_KEY is read too; the prefixed one wins.
OPOD_REQUIRE_KEYSauth.require_keys
OPOD_ADMIN_TOKENauth.admin_tokenSeeded as an admin key at every start. A front door uses it to call its leader.
OPOD_JOIN_TOKENauth.join_tokenLeader: seeded as a node key at every start. Worker: the token opod join presents when the URL has none.
OPOD_DEFAULT_MODELrouter.default_model
OPOD_PULL_DEFAULT_MODELrouter.pull_default_model1 = the leader serves the default model itself.
OPOD_HEARTBEAT_MAX_AGE_SECONDSrouter.heartbeat_max_age_secondsDefault 30; 0 = 60 s.
OPOD_STICKY_SESSION_TTL_SECONDSrouter.sticky_session_ttl_seconds
OPOD_LATENCY_P95_SECONDSrouter.latency_fallback_p95_seconds
OPOD_PLACEMENT_ALLOWED_FAILS / OPOD_PLACEMENT_COOLDOWN_SECONDSrouter.placement_allowed_fails / placement_cooldown_seconds
OPOD_OTLP_ENDPOINTobservability.otlp_endpointURL or bare host:port. In core v0.4.6 only the host and port are used and spans go to /v1/traces. From core v0.4.7 a path is kept as a prefix: /v1/traces is added unless the path ends in it (https://gw.example.com/otel → …/otel/v1/traces). Headers: OPOD_OTLP_HEADERS.
OPOD_EXCLUSIVEplacement.exclusive
OPOD_PLACEMENT_RESERVE_PERCENTplacement.reserve_percent0–99; another value is ignored. 0 = the default, 20 %.
OPOD_PLACEMENT_DRAIN_TIMEOUT_SECONDSplacement.drain_timeout_seconds0 = the default, 30 s.
OPOD_MANAGEDsurfaces.managedoff, 0, false, no mean off; anything else non-empty means on.

Each variable is the same as its config.yaml field. For example, a leader on another port, with TLS, debug logs, a second plain probe port and traces:

OPOD_LISTEN=:8443 \
OPOD_TLS_CERT=/etc/opod/tls.crt OPOD_TLS_KEY=/etc/opod/tls.key \
OPOD_PROBE_LISTEN=:8081 OPOD_PLAIN_LISTEN=:8082 \
OPOD_LOG_LEVEL=debug \
OPOD_OTLP_ENDPOINT=otel-collector.example.com:4318 \
OPOD_EXTERNAL_URL=https://opod.example.com \
opod up

A one-machine leader that serves a model itself, with its data elsewhere:

OPOD_DATA_DIR=/srv/opod OPOD_STORAGE_DSN=/srv/opod/state.db \
OPOD_ENGINE=vllm OPOD_VLLM_ENDPOINT=http://127.0.0.1:8000 OPOD_VLLM_API_KEY=<vllm key> \
OPOD_DEFAULT_MODEL=qwen2.5-7b-instruct OPOD_PULL_DEFAULT_MODEL=1 \
opod up

Router, placement and safety knobs:

OPOD_HEARTBEAT_MAX_AGE_SECONDS=20 \
OPOD_STICKY_SESSION_TTL_SECONDS=600 \
OPOD_LATENCY_P95_SECONDS=8 \
OPOD_PLACEMENT_ALLOWED_FAILS=3 OPOD_PLACEMENT_COOLDOWN_SECONDS=30 \
OPOD_EXCLUSIVE=1 OPOD_PLACEMENT_RESERVE_PERCENT=10 OPOD_PLACEMENT_DRAIN_TIMEOUT_SECONDS=60 \
OPOD_MAX_BODY_BYTES=33554432 OPOD_TRUST_PROXY_HEADERS=1 OPOD_BLOCK_PRIVATE_TARGETS=1 \
opod up

Other engines take their own endpoint variable: OPOD_OLLAMA_ENDPOINT=http://127.0.0.1:11434, OPOD_SGLANG_ENDPOINT=http://127.0.0.1:30000, OPOD_MLX_ENDPOINT=http://127.0.0.1:8080, OPOD_LLAMACPP_ENDPOINT=http://127.0.0.1:8089, OPOD_TRTLLM_ENDPOINT=http://127.0.0.1:8000. Keys and the managed switch: OPOD_REQUIRE_KEYS=0 (development only), OPOD_ADMIN_TOKEN=sk-orc-<admin-key>, OPOD_JOIN_TOKEN=sk-orc-<node-token>, OPOD_MANAGED=1.

Process contract: leader

These have no YAML equivalent. They are what a manager sets on a leader process.

VariableWhat it does
OPOD_PLAN_FILEThe plan the leader serves within. Default /etc/opod/plan.json. Absent file = standalone, no restriction.
OPOD_AUTH_FILEThe auth snapshot. Default /etc/opod-auth/auth.json. off = no watcher.
OPOD_POLICY_FILEThe policy snapshot. Default /etc/opod-auth/policy.json. off = no watcher.
OPOD_COORDINATOR_NODEPin the llama.cpp gang coordinator to a node id. local = the leader.
OPOD_OTLP_LOGS_ENDPOINTSend the leader's own log records to an OTLP/HTTP collector (URL or host:port), beside stderr. The queue is bounded and never blocks a request. Empty = off. In core v0.4.6 only the host and port are used and records go to /v1/logs; from core v0.4.7 a path is kept as a prefix, by the rule of OPOD_OTLP_ENDPOINT.
OPOD_OTLP_HEADERSFrom core v0.4.7. Headers sent on every trace and log export (OPOD_OTLP_ENDPOINT, OPOD_OTLP_LOGS_ENDPOINT), k=v,k=v (the OTEL_EXPORTER_OTLP_HEADERS form), for a collector that wants a token. Example: Authorization=Bearer <collector token>. A value may contain = but not ,, and is sent as written (no percent-decoding). Unset = no headers. A part that is not k=v turns that export off with a warning (tracing disabled, log export disabled); the leader still starts. So does an endpoint that is not a usable URL. The start line names the headers, never their values.
OPOD_USAGE_OTLP_ENDPOINTNew in core v0.4.0. The OTLP/HTTP logs URL the leader pushes one usage record per request to, for example http://otel-collector.example.com:4318/v1/logs. It must be a full http:// or https:// URL; a bare host:port is refused: the leader logs usage push not started, keeps serving and sends nothing. A record leaves the leader's queue only on a 2xx. Empty = records are held in the queue, the oldest are dropped at the cap, and nothing is sent. See Usage push.
OPOD_USAGE_OTLP_HEADERSNew in core v0.4.0. Headers for that push, k=v,k=v (the OTEL_EXPORTER_OTLP_HEADERS form). A value may contain =, so a base64 token works. Example: Authorization=Bearer sk-orc-<printed once>. A part that is not k=v is refused the same way: usage push not started.
OPOD_USAGE_QUEUE_MBNew in core v0.4.0. The usage queue's size in MiB, each record's encoding plus its slot. Default 64, about 440,000 records. Past it the oldest record is dropped and counted on opod_usage_dropped_total. A value that is not a positive whole number is a warning, and the default is used.
OPOD_TRACE_SAMPLE_RATIOShare of the traces the leader starts that it records, 0 to 1, when OPOD_OTLP_ENDPOINT is set. Unset = 1. A request with a traceparent follows its caller's decision. Any other value stops the start.
OPOD_ROLEleader (default), gateway or door.
OPOD_LEADER_URLThe leader a gateway mirrors and pushes to. Required with OPOD_ROLE=gateway.
OPOD_GATEWAY_IDThis front door's name in the leader's door count. Unset = the hostname.
OPOD_DOOR_ROUTESThe routes file a door watches. Required with OPOD_ROLE=door.
OPOD_VERTEX1 = also serve a Vertex AI custom container's predict and health routes. These routes take no key.
AIP_PREDICT_ROUTEVertex predict route. Default /v1/vertex:predict.
AIP_HEALTH_ROUTEVertex health route. Default /v1/vertex/health.

A managed leader, then a front door and a cell door:

OPOD_MANAGED=1 OPOD_PLAN_FILE=/etc/opod/plan.json \
OPOD_AUTH_FILE=/etc/opod-auth/auth.json OPOD_POLICY_FILE=/etc/opod-auth/policy.json \
OPOD_COORDINATOR_NODE=n_abc123 \
OPOD_OTLP_ENDPOINT=otel-collector.example.com:4318 OPOD_TRACE_SAMPLE_RATIO=0.1 \
OPOD_OTLP_LOGS_ENDPOINT=otel-collector.example.com:4318 \
OPOD_OTLP_HEADERS='Authorization=Bearer <collector token>' \
OPOD_USAGE_OTLP_ENDPOINT=http://otel-collector.example.com:4318/v1/logs OPOD_USAGE_QUEUE_MB=128 \
opod up --no-wizard
 
OPOD_ROLE=gateway OPOD_LEADER_URL=http://leader:8080 OPOD_GATEWAY_ID=door-1 \
OPOD_ADMIN_TOKEN=sk-orc-<admin-key> opod up
 
OPOD_ROLE=door OPOD_DOOR_ROUTES=/etc/opod-door/routes.json opod up

The OPOD_USAGE_* lines need a leader from core v0.4.0; v0.3.0 ignores them and serves usage on the usage stream.

A leader in a Vertex AI custom container:

OPOD_VERTEX=1 AIP_PREDICT_ROUTE=/v1/vertex:predict AIP_HEALTH_ROUTE=/v1/vertex/health opod up

Process contract: worker

VariableWhat it does
OPOD_ACCELERATORThe vendor the worker runs on: nvidia, amd, intel, tt or none. Unset = what the worker detects.
OPOD_ENGINE_FLAGSJSON map of engine flags, e.g. {"tp":"2","max_model_len":"32768"}. Only allow-listed keys are used: see Engines.
OPOD_ADAPTERSJSON list of LoRA adapters [{"name","source","rank"}], served as <model>:<name>.
OPOD_REJECT_BEARER1 = the worker API accepts HMAC-signed calls only.
OPOD_KV_EVENTS1 = vLLM or SGLang publishes prefix-cache events on localhost and the worker reports block hashes on its heartbeat, so the leader can route by what a worker holds. From core v0.4.7, on the head worker of a vLLM Ray or SGLang gang the leader starts the gang's engine with the publisher, and the head's blocks are scored for the gang.
OPOD_SLEEP_MODE1 = vLLM starts with sleep mode on.
OPOD_WORKER_ROLEprefill or decode for disaggregated serving. Unset = a whole worker. Any other value stops the start.
OPOD_DRAIN_SECONDSHow long a stopping worker lets running requests finish, in whole seconds from 0 to 3600. 0 = stop at once. Unset = 10. Any other value stops the start.
OPOD_KV_TIERcpu or peer: the tier below VRAM the engine keeps KV cache in. With peer, the leader counts a prefix a sibling holds as a hit for this worker. Any other value stops the start.
OPOD_PLAN_REVISIONThe plan revision this process serves (a positive number). The leader splits traffic per revision. A bad value is ignored with a warning.
OPOD_ADVERTISE_ADDRThe host:port the leader should dial. The worker's API also binds to it, so it must be an address this machine owns — unless OPOD_BIND_ADDR is set.
OPOD_BIND_ADDRFrom core v0.4.0. The host[:port] the worker listens on, and the host its llama.cpp gang processes (rpc-server, the llama-server coordinator) bind, when the advertised address is not one this machine owns (NAT, a port forward). No port = the advertised port. Unset = the advertised address. 0.0.0.0 only when set, with a warning. Example: OPOD_BIND_ADDR=10.0.0.5. See Behind NAT.
OPOD_NODE_IDA stable node id across restarts.
POD_NAMEWithout OPOD_NODE_ID and node.yaml, the id becomes n_<POD_NAME>.
OPOD_LEADER_CAPEM certificate the worker trusts for a TLS leader. Exactly that one.
OPOD_NODE_CERT / OPOD_NODE_KEYClient certificate and key the worker presents. Its SPIFFE SAN spiffe://<domain>/opod/node/<id> is the worker's identity. With it, a join needs no token.
OPOD_VRAM_BUDGET_GBThe share of the card this worker may use. Same as --vram-budget.
OPOD_CARD_MIBThe card's memory in MiB, as the manager measured it. Used to turn the budget into the engine's memory setting. Unset = ask nvidia-smi; without an answer the budget is not applied.
OPOD_ENGINE_OVERHEAD_MIBWhat the engine holds on its card outside its KV pool, in MiB, for the card's vendor. A budgeted vLLM or SGLang launch takes it off the budget before it divides by the card. Unset = core's measured figure for the engine (for vLLM, its largest one, for a vendor not measured); SGLang uses 768 MiB. Feature engine_overhead.
OPOD_GPU_INDEXThe device index the worker is pinned to. Same as --gpu.
OPOD_LOAD_MODELThe catalog id the worker loads itself once its engine answers.
OPOD_LOAD_REPO / OPOD_LOAD_FILEOverride the catalog's repo and file for that load.
OPOD_FETCH_RESULTA path opod fetch writes one JSON result line to.

A vLLM worker pinned to one card with a budget, a stable id and LoRA adapters:

OPOD_ENGINE=vllm OPOD_ACCELERATOR=nvidia \
OPOD_NODE_ID=n_slot-0 OPOD_ADVERTISE_ADDR=192.0.2.51:8081 \
OPOD_GPU_INDEX=0 OPOD_VRAM_BUDGET_GB=20 OPOD_CARD_MIB=49140 OPOD_ENGINE_OVERHEAD_MIB=1024 \
OPOD_LOAD_MODEL=qwen2.5-7b-instruct \
OPOD_ENGINE_FLAGS='{"max_model_len":"32768"}' \
OPOD_ADAPTERS='[{"name":"sql","source":"org/sql-lora","rank":16}]' \
OPOD_KV_EVENTS=1 OPOD_SLEEP_MODE=1 OPOD_DRAIN_SECONDS=60 \
OPOD_REJECT_BEARER=1 OPOD_PLAN_REVISION=7 \
opod join "http://leader:8080?token=sk-orc-<node-token>"

A prefill worker with a CPU KV tier, joining a TLS leader with a certificate instead of a token:

OPOD_WORKER_ROLE=prefill OPOD_KV_TIER=cpu \
OPOD_LEADER_CA=/etc/opod/ca.crt OPOD_NODE_CERT=/etc/opod/node.crt OPOD_NODE_KEY=/etc/opod/node.key \
opod join https://leader.example.com:8080

A worker that loads a GGUF from another repo than the catalog's, and a prefetch that reports its result:

OPOD_LOAD_MODEL=llama-3.2-3b OPOD_LOAD_REPO=bartowski/Llama-3.2-3B-Instruct-GGUF \
OPOD_LOAD_FILE=Llama-3.2-3B-Instruct-Q4_K_M.gguf \
opod join "http://leader:8080?token=sk-orc-<node-token>"
 
# a prefetch that writes its result line for the manager
OPOD_FETCH_RESULT=/dev/termination-log \
  opod fetch bartowski/Llama-3.2-3B-Instruct-GGUF Llama-3.2-3B-Instruct-Q4_K_M.gguf --dir /data/models

In Kubernetes, POD_NAME comes from the downward API (fieldRef: metadata.name).

Process contract: both

VariableWhat it does
OPOD_CATALOG_DIRA catalog directory merged over the embedded catalog. ~/.opod/catalog still wins over it.
OPOD_CATALOG_PUBKEYA minisign public key (the base64 line, or a file holding it). A catalog file with a .minisig beside it must verify.
OPOD_CATALOG_REQUIRE_SIGNED1 = an unsigned catalog file in a directory is refused too. Needs OPOD_CATALOG_PUBKEY.
OPOD_SKIP_SOURCE_CHECK1 = never HEAD-check a model's upstream.
HF_TOKENHugging Face token for gated repositories.
HF_ENDPOINTHugging Face base URL, for a mirror. Default https://huggingface.co.
OPOD_MODEL_REVISIONPin the Hub revision. Cached under <repo>@<rev>. Empty = main.
OPOD_MODEL_SHA256Expected SHA-256 of the model file. A mismatch removes the file and fails the load.
OPOD_CATALOG_DIR=/etc/opod/catalog \
OPOD_CATALOG_PUBKEY=/etc/opod/minisign.pub OPOD_CATALOG_REQUIRE_SIGNED=1 \
OPOD_SKIP_SOURCE_CHECK=1 \
HF_TOKEN=hf_<your token> HF_ENDPOINT=https://hf-mirror.example.com \
OPOD_MODEL_REVISION=a09a354 OPOD_MODEL_SHA256=<64 hex characters> \
opod join "http://leader:8080?token=sk-orc-<node-token>"

CLI only

VariableRead byWhat it does
OPOD_TOKENopod connectThe key put in snippets, before ~/.opod/admin.key.
OPOD_BASE_URLopod connect, opod batch runThe base URL.
OPOD_API_KEY, then OPENAI_API_KEYopod batch runThe key sent with each request.
OPOD_BATCH_INPUT_URL, OPOD_BATCH_OUTPUT_URL, OPOD_BATCH_ERROR_URLopod batch runDefaults for --input-url, --output-url, --error-url.
OPOD_MODELS_DIRopod fetch, opod cacheDefault --dir.
OPOD_UNLOAD_ON_EXITopod up1 sets the default of --unload-on-exit.
NO_COLOR, OPOD_NO_COLORevery commandAny value turns colour off.
EDITORopod config editThe editor it names. Default vi.
OPOD_TOKEN=sk-orc-<alice-key> OPOD_BASE_URL=http://leader.example.com:8080 opod connect cursor
OPOD_API_KEY=sk-orc-<key> OPOD_BASE_URL=http://leader:8080 opod batch run --input requests.jsonl --dir ./run1
OPOD_BATCH_INPUT_URL="https://bucket.example.com/in.jsonl?X-Amz-Signature=…" \
OPOD_BATCH_OUTPUT_URL="https://bucket.example.com/out.jsonl?X-Amz-Signature=…" \
OPOD_BATCH_ERROR_URL="https://bucket.example.com/err.jsonl?X-Amz-Signature=…" \
  opod batch run --base-url http://leader:8080 --dir /work
OPOD_MODELS_DIR=/data/models opod cache ls
OPOD_UNLOAD_ON_EXIT=1 opod up
OPOD_NO_COLOR=1 opod node ls
EDITOR=nano opod config edit

The container images' entrypoint reads a few more (OPOD_ROLE=worker, OPOD_MODELS_DIR, POD_IP, OPOD_ENGINE_START). See Images.

Read by the engine launch

The engine processes a worker starts inherit the worker's environment. A few variables change the launch line itself:

VariableWhat it does
CUDA_VISIBLE_DEVICES, HIP_VISIBLE_DEVICES, ONEAPI_DEVICE_SELECTORSet from --gpu / OPOD_GPU_INDEX. A value already in the environment wins.
NCCL_SOCKET_IFNAME, GLOO_SOCKET_IFNAMEThe network interface the collective libraries of a multi-node vLLM gang use. Opod never names an interface itself: set them on the worker. When only NCCL_SOCKET_IFNAME is set, a vLLM expert-parallel rank also exports it as GLOO_SOCKET_IFNAME, so both libraries use one interface.
PYTHONHASHSEEDWith the vLLM engine flag kv_tier_fs (a disk KV tier), the launch exports PYTHONHASHSEED=0 unless it is already set, so every process that shares the directory names a prefix with the same file.

Last updated · Source: content/docs/core-reference/environment.mdx · View as Markdown