Getting Started
Environment variables
Required and optional configuration for running the gateway.
Configuration for self-hosted development lives in apps/web/.env.local.
Required
| Variable | Purpose |
|---|---|
MPP_SECRET_KEY | 32-byte hex (openssl rand -hex 32). Signs 402 challenges: not custody. |
AUTH_SECRET | Auth.js session secret. |
NEXT_PUBLIC_BASE_URL | Public origin of the app. |
INTERNAL_API_TOKEN | Guards the in-app stocks upstream behind the paid gateway. |
Optional
| Variable | Purpose |
|---|---|
NEXT_PUBLIC_API_URL | Machine-surface origin; defaults to the base URL. |
AUTH_GITHUB_ID / AUTH_GITHUB_SECRET | GitHub OAuth. |
AUTH_GOOGLE_ID / AUTH_GOOGLE_SECRET | Google OAuth. |
STORAGE_DIR | Local storage directory override. |
Production secrets
Set with npx wrangler secret put NAME in apps/web:
| Secret | Purpose |
|---|---|
MPP_SECRET_KEY | Signs 402 challenges. |
AUTH_SECRET | Auth.js session secret. |
RELAYER_PRIVATE_KEY | Settlement relayer wallet: needs ETH on chain 4663 for gas. |
ROBINHOOD_RPC_URL | Dedicated RPC endpoint. |
INTERNAL_API_TOKEN | Guards the in-app stocks upstream. |