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

# Environment Variables

> Required and optional configuration for OpenChat deployments.

# Environment Variables

Use this as the minimum baseline for local and production deployments.

## Required Core Variables

```bash theme={null}
VITE_CONVEX_URL=...
VITE_CONVEX_SITE_URL=...
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
BETTER_AUTH_SECRET=...
OPENROUTER_ENCRYPTION_KEY=<base64 32-byte key>
```

## AI and Search

```bash theme={null}
OPENROUTER_API_KEY=...      # shared hosted/provider fallback path
VALYU_API_KEY=...           # web search tool support
```

## Workflow and Rate Limit Infrastructure

```bash theme={null}
UPSTASH_REDIS_REST_URL=...
UPSTASH_REDIS_REST_TOKEN=...
QSTASH_TOKEN=...
QSTASH_CURRENT_SIGNING_KEY=...
QSTASH_NEXT_SIGNING_KEY=...
WORKFLOW_CLEANUP_TOKEN=...
```

## Networking and Trust

```bash theme={null}
TRUST_PROXY=cloudflare|vercel|true
VITE_APP_URL=https://your-app-domain
```

<Warning>
  Set `TRUST_PROXY` correctly in production or model endpoint IP rate limiting can be bypassed or fail closed.
</Warning>
