Environment Variables
All configuration values used by Savannah Cloud services and local Docker setup.
The Savannah Cloud stack reads environment settings from a root .env file in local dev and from deployment environment injection in production.
Required variables
| Variable | Required | Description |
|---|---|---|
JWT_SECRET | Yes | Secret for signing JWT tokens |
DATABASE_URL | Auto via Docker | PostgreSQL DSN |
REDIS_URL | Auto via Docker | Redis connection string |
RESEND_API_KEY | Yes for email | Resend API key |
AT_API_KEY | Yes for SMS | Africa's Talking API key |
AT_USERNAME | Yes for SMS | Africa's Talking username |
CLERK_SECRET_KEY | Yes for SSO | Clerk JWT verification and org identity |
CLERK_PUBLISHABLE_KEY | Yes for SSO | Frontend auth setup |
Optional variables
| Variable | Default | Description |
|---|---|---|
APP_URL | https://api.savannahcloud.com | Base URL for invites and app links |
GITHUB_TOKEN | none | GitHub PAT for deployment triggers |
GITHUB_WEBHOOK_SECRET | none | HMAC secret for GitHub pushes |
R2_ENDPOINT | none | Cloudflare R2 endpoint |
R2_ACCESS_KEY_ID | none | R2 access key |
R2_SECRET_ACCESS_KEY | none | R2 secret key |
R2_BUCKET | savannah-cloud | R2 bucket name |
ENCRYPTION_KEY | none | Secret encryption key for stored values |
PDNS_API_URL | http://pdns:8081 | PowerDNS API base URL |
PDNS_API_KEY | none | PowerDNS REST API auth |
PAYSTACK_SECRET_KEY | none | Billing integration secret |
PAYSTACK_PUBLIC_KEY | none | Billing public key |
ML_SERVICE_URL | http://ml-service:8001 | threat detection service URL |
ACME_EMAIL | none | ACME registration email |
WORKER_COUNT | 4 | number of workers |
VITE_API_BASE_URL | http://localhost:8080 | console API base |
Generate a secure JWT secret
# Linux / WSL / macOS
openssl rand -hex 32
# PowerShell
[Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Max 256 }))Example .env
JWT_SECRET=6a8f2c9b1e7d4a3f0c5b8e2d9a6f3c1b4e7d2a5f8c1b4e7d2a5f8c1b4e7d2a5
DATABASE_URL=postgres://user:pass@postgres:5432/savannah?sslmode=disable
REDIS_URL=redis://redis:6379
RESEND_API_KEY=re_123456
AT_API_KEY=atsk_123456
AT_USERNAME=your_at_username
APP_URL=https://api.savannahcloud.comNever commit live secrets to version control. Use environment injection or a local .env kept outside source control.