Skip to content

Configuration

All components configure from environment variables only. No secrets ship in images or composes — node secrets arrive as dstack sealed env (encrypted to the CVM at deploy time), and key material is never configuration at all: it is derived from the TEE seed at boot.

VariableRequiredDefaultPurpose
CHAIN_IDyesEVM chain id (8453 live).
RPC_URLyesEVM RPC endpoint (read path).
BUNDLER_URLyesEIP-4337 bundler RPC (may equal RPC_URL on Alchemy).
INDEXER_REGISTRY_ADDRyesPer-chain IndexerRegistry address.
GAS_POLICY_IDno""Alchemy Gas Manager policy for sponsored UserOps.
MEMBER_CONTRACTnounsetExplicit member address. Leave unset on dstack base KMS — the sidecar self-discovers its app id at runtime.
GATEWAY_DOMAINnounsetdstack gateway base domain (live: dstack-base-prod5.phala.network). Peer ingresses resolve as <app_id>-<port>s.<domain>. Unset → registration-only mode (no mesh).
WG_TCP_PORTno51900The wg-over-TCP ingress port (exposed through the gateway).
WG_LISTEN_PORTno51821Wireguard’s outer (kernel) listen port. Distinct from the in-mesh heartbeat port 51820.
DSTACK_SOCKETno/var/run/dstack.sockdstack guest-agent socket (keys, quotes, identity).
AGENT_GRPC_SOCKETno/var/run/attestmesh/agent.sockApplication-facing gRPC unix socket.
HEALTH_HTTP_ADDRno127.0.0.1:9090Health endpoint bind (use 0.0.0.0:9090 to expose via the gateway).
LOG_FORMAT / LOG_LEVELnojson / infoTracing output.

Container requirements: NET_ADMIN capability, /dev/net/tun, the dstack socket mounted, and ports 9090 + 51900 published.

VariableRequiredDefaultPurpose
CHAIN_IDyesChain to watch (8453 live).
RPC_URLyesEVM RPC endpoint.
INDEXER_REGISTRY_ADDRyesRegistry to self-check against.
CLUSTER_DIAMOND_FACTORY_ADDRyesFactory watched for cluster discovery.
INDEXER_START_BLOCKno0Catch-up floor — set it. The factory’s deploy block; 0 means a genesis scan, which on a mainnet effectively never finishes. deploy/indexer.sh computes it automatically (getCode binary search). Live: 46868742.
BLOCK_BATCH_SIZEno200Blocks per eth_getLogs page (live runs 2000).
BLOCK_POLL_INTERVAL_MSno2000Head-polling cadence.
INDEXER_CODE_IDnozeroExpected code id for the boot self-check (non-fatal mismatch).
INDEXER_GRPC_ADDRno0.0.0.0:50051Subscription gRPC bind.
HEALTH_HTTP_ADDRno0.0.0.0:9090Health/metrics bind.
STATE_DIRno/var/lib/attestmesh-indexerPersistent cursor store (mount a volume).
DSTACK_SOCKETno/var/run/dstack.sockTEE identity derivation.
LOG_FORMAT / LOG_LEVELnojson / infoTracing output.

Configured via wrangler (vars + secrets):

VariablePurpose
EXPECTED_CHAIN_ID8453 live.
RPC_URL (secret)For provenance verification calls.
ALCHEMY_WEBHOOK_TOKEN (secret)Shared token the policy presents.
Factory / cluster addressesThe recognized deployment the worker validates against.

The deploy routines load operator credentials from the environment — deployer key, RPC/bundler URLs, gas policy id, Phala API session, ghcr pull credentials, and Cloudflare tokens. See the repo’s deploy/ README header comments; none of these ever reach a container image.