Skip to main content

Prerequisites

  • Know which features you plan to enable
  • Access to your deployment environment for setting secrets

Steps

  1. Copy apps/api/example.env to apps/api/.env
  2. Add required base vars (DATABASE_URL, BETTER_AUTH_SECRET)
  3. Add provider vars only for enabled features
  4. Restart the API server to load changes

Required Variables (Base API)

Server & Logging

Authentication Providers

Apple Sign In

Use either APPLE_PRIVATE_KEY or APPLE_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=drizzle expects 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

Next Steps