MeshGateway / Docs
Getting Started

Environment variables

Required and optional configuration for running the gateway.

Configuration for self-hosted development lives in apps/web/.env.local.

Required

VariablePurpose
MPP_SECRET_KEY32-byte hex (openssl rand -hex 32). Signs 402 challenges: not custody.
AUTH_SECRETAuth.js session secret.
NEXT_PUBLIC_BASE_URLPublic origin of the app.
INTERNAL_API_TOKENGuards the in-app stocks upstream behind the paid gateway.

Optional

VariablePurpose
NEXT_PUBLIC_API_URLMachine-surface origin; defaults to the base URL.
AUTH_GITHUB_ID / AUTH_GITHUB_SECRETGitHub OAuth.
AUTH_GOOGLE_ID / AUTH_GOOGLE_SECRETGoogle OAuth.
STORAGE_DIRLocal storage directory override.

Production secrets

Set with npx wrangler secret put NAME in apps/web:

SecretPurpose
MPP_SECRET_KEYSigns 402 challenges.
AUTH_SECRETAuth.js session secret.
RELAYER_PRIVATE_KEYSettlement relayer wallet: needs ETH on chain 4663 for gas.
ROBINHOOD_RPC_URLDedicated RPC endpoint.
INTERNAL_API_TOKENGuards the in-app stocks upstream.

On this page