Skip to main content

Environment Variables

All environment variables used by Terra.

Required

VariableDescription
NEXT_PUBLIC_SUPABASE_URLSupabase project URL
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase anonymous key
SUPABASE_SERVICE_ROLE_KEYSupabase service role key (server only)
WORKOS_API_KEYWorkOS API key
WORKOS_CLIENT_IDWorkOS client ID
WORKOS_COOKIE_PASSWORDSession encryption secret (32+ chars)
ENCRYPTION_KEYPII encryption key (64 hex chars)

Authentication

VariableDescription
WORKOS_REDIRECT_URIOAuth callback URL

Email (Resend)

VariableDescription
RESEND_API_KEYResend API key
EMAIL_FROMDefault sender address

SMS (Twilio)

VariableDescription
TWILIO_ACCOUNT_SIDTwilio account SID
TWILIO_AUTH_TOKENTwilio auth token
TWILIO_PHONE_NUMBERSender phone number

Translation (DeepL)

VariableDescription
DEEPL_API_KEYDeepL API key

Address (Smarty Streets)

VariableDescription
SMARTY_AUTH_IDSmarty auth ID
SMARTY_AUTH_TOKENSmarty auth token

Plaid

VariableDescription
PLAID_CLIENT_IDPlaid client ID
PLAID_SECRETPlaid secret
PLAID_ENVsandbox, development, or production

Google Drive

VariableDescription
GOOGLE_SERVICE_ACCOUNT_JSONService account credentials JSON

Cron Jobs

VariableDescription
CRON_SECRETShared secret for /api/cron/worker (sent as x-cron-secret)

AI (Form Import)

VariableDescription
ANTHROPIC_API_KEYClaude API key
GOOGLE_AI_API_KEYGemini API key
FIRECRAWL_API_KEYFirecrawl API key
REDUCTO_API_KEYReducto API key

Analytics

VariableDescription
NEXT_PUBLIC_POSTHOG_KEYPostHog project key
NEXT_PUBLIC_POSTHOG_HOSTPostHog host URL

Error Tracking

VariableDescription
SENTRY_DSNSentry DSN
SENTRY_AUTH_TOKENSentry auth token

Local Development

Setting up your environment