> ## Documentation Index
> Fetch the complete documentation index at: https://docs-terra.withunify.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Environment Variables

> Complete reference for Terra's environment variables

# Environment Variables

> All environment variables used by Terra.

## Required

| Variable                        | Description                             |
| ------------------------------- | --------------------------------------- |
| `NEXT_PUBLIC_SUPABASE_URL`      | Supabase project URL                    |
| `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Supabase anonymous key                  |
| `SUPABASE_SERVICE_ROLE_KEY`     | Supabase service role key (server only) |
| `WORKOS_API_KEY`                | WorkOS API key                          |
| `WORKOS_CLIENT_ID`              | WorkOS client ID                        |
| `WORKOS_COOKIE_PASSWORD`        | Session encryption secret (32+ chars)   |
| `ENCRYPTION_KEY`                | PII encryption key (64 hex chars)       |

## Authentication

| Variable              | Description        |
| --------------------- | ------------------ |
| `WORKOS_REDIRECT_URI` | OAuth callback URL |

## Email (Resend)

| Variable         | Description            |
| ---------------- | ---------------------- |
| `RESEND_API_KEY` | Resend API key         |
| `EMAIL_FROM`     | Default sender address |

## SMS (Twilio)

| Variable              | Description         |
| --------------------- | ------------------- |
| `TWILIO_ACCOUNT_SID`  | Twilio account SID  |
| `TWILIO_AUTH_TOKEN`   | Twilio auth token   |
| `TWILIO_PHONE_NUMBER` | Sender phone number |

## Translation (DeepL)

| Variable        | Description   |
| --------------- | ------------- |
| `DEEPL_API_KEY` | DeepL API key |

## Address (Smarty Streets)

| Variable            | Description       |
| ------------------- | ----------------- |
| `SMARTY_AUTH_ID`    | Smarty auth ID    |
| `SMARTY_AUTH_TOKEN` | Smarty auth token |

## Plaid

| Variable          | Description                               |
| ----------------- | ----------------------------------------- |
| `PLAID_CLIENT_ID` | Plaid client ID                           |
| `PLAID_SECRET`    | Plaid secret                              |
| `PLAID_ENV`       | `sandbox`, `development`, or `production` |

## Google Drive

| Variable                      | Description                      |
| ----------------------------- | -------------------------------- |
| `GOOGLE_SERVICE_ACCOUNT_JSON` | Service account credentials JSON |

## Cron Jobs

| Variable      | Description                                                    |
| ------------- | -------------------------------------------------------------- |
| `CRON_SECRET` | Shared secret for `/api/cron/worker` (sent as `x-cron-secret`) |

## AI (Form Import)

| Variable            | Description       |
| ------------------- | ----------------- |
| `ANTHROPIC_API_KEY` | Claude API key    |
| `GOOGLE_AI_API_KEY` | Gemini API key    |
| `FIRECRAWL_API_KEY` | Firecrawl API key |
| `REDUCTO_API_KEY`   | Reducto API key   |

## Analytics

| Variable                   | Description         |
| -------------------------- | ------------------- |
| `NEXT_PUBLIC_POSTHOG_KEY`  | PostHog project key |
| `NEXT_PUBLIC_POSTHOG_HOST` | PostHog host URL    |

## Error Tracking

| Variable            | Description       |
| ------------------- | ----------------- |
| `SENTRY_DSN`        | Sentry DSN        |
| `SENTRY_AUTH_TOKEN` | Sentry auth token |

***

<Card title="Local Development" icon="laptop" href="/operations/local-development">
  Setting up your environment
</Card>
