Prerequisites
- Know which features you plan to enable
- Access to your deployment environment for setting secrets
Steps
- Copy
apps/api/example.envtoapps/api/.env - Add required base vars (
DATABASE_URL,BETTER_AUTH_SECRET) - Add provider vars only for enabled features
- Restart the API server to load changes
Required Variables (Base API)
Server & Logging
Authentication Providers
Apple Sign In
Use eitherAPPLE_PRIVATE_KEYorAPPLE_PRIVATE_KEY_BASE64.
Google Sign In
Email & SMS
Payments (Stripe)
AI Providers
File Uploads (S3)
Push Notifications
APNS (iOS)
FCM (Android)
Push Campaign API
Notes
- The API reads env vars directly at startup. Missing required values will cause runtime errors, so prefer setting envs before boot.
- If you don’t need a feature, you can leave its env vars unset and disable the corresponding mobile feature flag.
DATABASE_ORM=drizzleexpects a Postgres-compatible database (Neon works well).
Troubleshooting
- Server fails on boot: confirm required vars exist
- OAuth callbacks fail: verify
BETTER_AUTH_URL - File uploads fail: check S3 vars and bucket permissions