> For the complete documentation index, see [llms.txt](https://docs.kangaroodev.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kangaroodev.net/product-docs/getting-started/environment-variables.md).

# Environment variables

***

### Required

| Variable          | Description                                                                                                                                                               |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **DATABASE\_URL** | PostgreSQL connection string. Example: `postgresql://user:password@host:5432/dbname?schema=public`. On Vercel/serverless, some providers recommend `?connection_limit=1`. |

***

### App URL and auth

| Variable           | Description                                                                                                                                          |
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **APP\_BASE\_URL** | Base URL of the application (e.g. `http://localhost:3002` or `https://panel.example.com`). Used for password reset links and Discord OAuth redirect. |

***

### Stripe (payments)

| Variable                | Description                                                                                                                                       |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **STRIPE\_SECRET\_KEY** | Stripe secret key (e.g. `sk_test_...` or `sk_live_...`). If not set, creating payment links in the Admin (Payments) section will return an error. |

***

### Email (password reset)

| Variable               | Description                                                             |
| ---------------------- | ----------------------------------------------------------------------- |
| **SMTP\_HOST**         | SMTP server (e.g. `smtp.zoho.eu`).                                      |
| **SMTP\_PORT**         | Port (e.g. `587` or `465`).                                             |
| **SMTP\_SECURE**       | Set to `true` if using port 465.                                        |
| **SMTP\_AUTH\_METHOD** | e.g. `LOGIN`.                                                           |
| **SMTP\_USER**         | SMTP username.                                                          |
| **SMTP\_PASS**         | SMTP password.                                                          |
| **SMTP\_FROM**         | From address for emails (e.g. `"Your Panel <noreply@yourdomain.com>"`). |

If SMTP is not set, the backend can still generate a reset link and print it in the server console (development only).

***

### Discord OAuth

| Variable                    | Description                                                                                             |
| --------------------------- | ------------------------------------------------------------------------------------------------------- |
| **DISCORD\_CLIENT\_ID**     | Discord application client ID.                                                                          |
| **DISCORD\_CLIENT\_SECRET** | Discord application client secret.                                                                      |
| **DISCORD\_REDIRECT\_URI**  | Must match the redirect URI in Discord Developer Portal (e.g. `https://your-domain/api/auth/callback`). |

These can also be stored in **Admin Settings** in the database (AdminSettings model) and overridden at runtime.

***

### Vercel Blob (optional, for Vercel)

| Variable                     | Description                                                                                                                                                                                                  |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **BLOB\_READ\_WRITE\_TOKEN** | Vercel Blob store token. If set (e.g. on Vercel), user banner uploads are stored in Blob instead of the local filesystem. Required for banner uploads to work on Vercel because the filesystem is read-only. |

***

### Summary table

| Variable                 | Required | Used for                       |
| ------------------------ | -------- | ------------------------------ |
| DATABASE\_URL            | Yes      | PostgreSQL (Prisma).           |
| APP\_BASE\_URL           | No       | Reset links, Discord redirect. |
| STRIPE\_SECRET\_KEY      | No       | Creating Stripe payment links. |
| SMTP\_\*                 | No       | Sending password reset emails. |
| DISCORD\_\*              | No       | Discord OAuth login.           |
| BLOB\_READ\_WRITE\_TOKEN | No       | User banner uploads on Vercel. |

All of these can be set in `.env` for local development and in the host’s environment (e.g. Vercel project settings) for production.
