Environment Variables Reference
Complete reference of configuration variables for madar_server and madar_admin_console.
Core Server & Control Plane Variables
Configure these environment variables in .env or your container orchestrator before starting the services:
| Variable | Default | Description |
|---|---|---|
| DEPLOYMENT_PROFILE | workspace (self-hosted) / personal | Selects active profile; 'workspace' disables all personal social routes |
| DATABASE_URL | postgresql://... | PostgreSQL 18 connection URI |
| REDIS_URL | redis://localhost:6379 | Redis connection URI for pub/sub and rate limits |
| MASTER_ENCRYPTION_KEY | (Required in prod) | 64-hex-character (256-bit) master key for AES-256-GCM field encryption |
| JWT_SECRET | (Required in prod) | High-entropy secret for access token signing |
| ADMIN_API_ENABLED | true | Set to false on public edge nodes to return 404 on /api/v1/admin/* |
| ADMIN_PLANE_SECRET | (Recommended) | Shared secret verified via X-Madar-Control-Plane-Key header |
| TENANT_TOKEN | (Optional) | Authorization token for Madar Blind Push & SMS Relay |