The proxy-router is configured through .env (or container env vars). This page documents every variable. The canonical .env.example lives in the repo at proxy-router/.env.example and the full annotated dump at docs/proxy-router.all.env.
Defaults below are from the source of truth (proxy-router/internal/config/config.go). When in doubt, the source wins.

Conflicting / overlapping variables — read this first

Several pairs of variables look like they do “the same thing.” They don’t. The proxy-router resolves each pair with a specific precedence rule, and getting it wrong is a common cause of “I changed the env but nothing happened.”
For every *_CONTENT*_PATH pair below, the *_CONTENT variable is a one-shot file seeder, not a runtime override. It only takes effect when the corresponding file does not exist. After the first successful start the file exists, and changing the *_CONTENT env on subsequent runs has no effect until you delete the file at *_PATH.
Source: proxy-router/internal/system/auth.go (EnsureConfigFilesExist). Practical implications
  • For TEE / Akash / ephemeral container deployments, set COOKIE_CONTENT once on first start; the file gets seeded inside the volume and persists.
  • To rotate credentials on a self-hosted node, use the POST /auth/users endpoint (or edit the cookie file in place) — changing COOKIE_CONTENT after first start does nothing.

MODELS_CONFIG_PATHMODELS_CONFIG_CONTENT

Source: proxy-router/internal/config/models_config.go (ModelConfigLoader.Init). Practical implications
  • Use MODELS_CONFIG_CONTENT (single-line JSON) in TEE/Akash deployments where you can’t mount a volume.
  • To update models on a self-hosted node, edit the JSON file directly and restart — don’t bump MODELS_CONFIG_CONTENT. See models-config.json.

AGENT_CONFIG_PATHAGENT_CONFIG_CONTENT

Same *_CONTENT-only-seeds-the-file rule as the two above. Source: proxy-router/internal/config/agents_config.go.

AUTH_CONFIG_FILE_PATH (no inline twin)

Path to proxy.conf, which holds rpcauth= and rpcwhitelist= lines. There is no AUTH_CONFIG_CONTENT env — the file is built at runtime by the proxy-router itself when you add users via POST /auth/users. For TEE / ephemeral deployments, proxy.conf is created on first start (with the admin entry derived from the cookie file) and managed via the API afterwards.

WALLET_PRIVATE_KEY ↔ system keychain

APP_RESET_KEYCHAIN=true wipes the macOS keychain entry on start (use with care).

WEB_PUBLIC_URL fallback

If WEB_PUBLIC_URL is unset, the proxy-router synthesizes http://localhost:<port-from-WEB_ADDRESS>. For provider deployments where consumers must reach you over the public internet, always set this explicitly to your public URL (e.g. https://provider.example.com). The TLS-pinning step in TEE attestation reads this URL.

ETH_NODE_USE_SUBSCRIPTIONSETH_NODE_POLLING_INTERVAL

Not a precedence pair, but easy to misconfigure:
  • ETH_NODE_USE_SUBSCRIPTIONS=true → expects a WSS ETH_NODE_ADDRESS (e.g. wss://...). Polling interval is irrelevant.
  • ETH_NODE_USE_SUBSCRIPTIONS=false (default) → expects an HTTPS ETH_NODE_ADDRESS and uses ETH_NODE_POLLING_INTERVAL (default 10 seconds).
Mismatch (e.g. subscriptions=true with HTTPS endpoint) makes the node fail to receive blockchain events even though startup may look healthy.

PROXY_STORE_CHAT_CONTEXT is TEE-frozen

In the -tee image this is hard-coded false at build time and cannot be overridden at runtime. Setting it in the env has no effect inside a TEE deployment. See TEE reference. Storage and forwarding are independent. PROXY_STORE_CHAT_CONTEXT persists chats for /v1/chats. PROXY_FORWARD_CHAT_CONTEXT (default false) prepends that stored history onto the next prompt — opt-in for clients that send only the latest turn. OpenAI-compatible clients that already send the full messages[] should leave forwarding off.

Application

Blockchain

Environment

Marketplace

Logging

For TEE images logging is frozen to production / JSON / minimal at build time — these vars have no effect inside a -tee image.

Network ports & URLs

Proxy state & configs

Timeouts & retries

For exact defaults check the source of truth (config.go) — these can change between releases as we tune the network.

Model health self-checks (provider)

On provider nodes the proxy-router periodically probes every model from models-config.json that has an active bid from this provider: LLM models get a small dynamically generated arithmetic prompt (correctness is graded), embedding models get an embeddings request, and other model types are skipped. The report covers the whole ecosystem of bids and configured models — active bids whose model is missing from models-config.json are flagged as no_model_configured (capacity being sold with no backend to serve it). The cached per-model results (on-chain modelId and registered model name, bidId, status, errorKind plus upstream httpStatus on failure, lastHealthy epoch, latency, prompt correctness — never the private models-config.json modelName, apiUrl, or apiKey) are exposed in the models field of GET /healthcheck, in the network.ping (pong) response on the :3333 MOR RPC port, and in POST /proxy/provider/ping, so consumers can see a provider’s model health before opening a session. Full operational guide: Model health self-report.

Session health policy (consumer)

On consumer nodes, SESSION_HEALTH_POLICY controls how strictly the pre-open healthcheck pings gate provider selection when opening a session by model ID (the failover loop). Opening by a specific bid ID is unaffected. Single-bid caveat (healthPolicySingleBid: permissive, fixed): when the hard filters (omitted provider, own bids) leave a single candidate provider for the model, preferred/strict are forced to permissive for that open so the sole provider can still be tried — single-provider models must remain usable.

TEE (Phase 1 + Phase 2 attestation)

These are only consulted when at least one model in the marketplace is tee-tagged. Otherwise they are unused. See TEE overview and TEE reference.

System tuning (optional sysctl tweaks)

These map to OS-level adjustments and only apply when SYS_ENABLE=true.

Mainnet vs testnet quick switch

Comment / uncomment the appropriate block in .env:

Full annotated dump

For the complete annotated reference (every variable, every example value), see docs/proxy-router.all.env in the repo.