Environment variables
Every environment variable the app reads, from .env.example and the code.
Every variable listed in .env.example or read as process.env.NAME in the app code (tests, scripts and the docs app excluded). Required is "yes" when the .env.example comment says so and empty when it says nothing; Purpose is that comment. Variables read under a computed name are not listed. What each variable does and when you need it: Configuration reference.
57 variables.
| Variable | Required | In .env.example | Purpose | Read in |
|---|---|---|---|---|
ANTHROPIC_API_KEY | yes | AI. Leave empty to use keys saved in the admin panel. | lib/enrichment/e2b/agent-script.ts | |
BETTER_AUTH_SECRET | yes | Better Auth | lib/auth.ts | |
BETTER_AUTH_URL | yes | Better Auth | lib/auth.ts | |
CI | no | prisma/seeds/seed.ts | ||
COMPANY_NAME | no | lib/enrichment/e2b/agent-script.ts | ||
COMPANY_WEBSITE | no | lib/enrichment/e2b/agent-script.ts | ||
DATABASE_URL | yes | yes | PostgreSQL connection string (required). Default: the local Docker Postgres from docker-compose.dev.yml (pnpm db:up). | lib/prisma-base.ts, prisma/seeds/seed.ts |
E2B_API_KEY | no | inngest/functions/enrich-target-contact.ts, inngest/functions/enrich-target.ts, lib/enrichment/target-enrichment-keys.ts | ||
E2B_ENRICHMENT_TEMPLATE | no | inngest/functions/enrich-target-contact.ts, inngest/functions/enrich-target.ts | ||
EMAIL_ENCRYPTION_KEY | yes | Encrypts stored mailbox passwords and API keys — generate with: openssl rand -hex 32 Set once and never change it, or the stored values become unreadable. | lib/email-crypto.ts | |
EMAIL_FROM | yes | verified sender for login codes, e.g. noreply@yourdomain.com | actions/admin/send-mail-to-all/index.ts, actions/admin/users/activate-user.ts, actions/admin/users/invite-user.ts +16 more | |
EMAIL_HOST | no | lib/sendmail.ts | ||
EMAIL_PASSWORD | no | lib/sendmail.ts | ||
EMAIL_USERNAME | no | lib/sendmail.ts | ||
FIRECRAWL_API_KEY | yes | get from https://firecrawl.dev | ||
GOOGLE_CALENDAR_CLIENT_ID | yes | Google Calendar sync — Workspace-internal OAuth app | lib/crm/calendar/google.ts | |
GOOGLE_CALENDAR_CLIENT_SECRET | yes | Google Calendar sync — Workspace-internal OAuth app | lib/crm/calendar/google.ts | |
GOOGLE_ID | yes | Google OAuth | lib/auth.ts | |
GOOGLE_SECRET | yes | Google OAuth | lib/auth.ts | |
INNGEST_APP_NAME | no | inngest/client.ts | ||
INNGEST_EVENT_KEY | no | inngest/client.ts | ||
INNGEST_ID | no | inngest/client.ts | ||
INNGEST_SIGNING_KEY | no | inngest/client.ts | ||
KNOWN_DOMAIN | no | lib/enrichment/e2b/agent-script.ts | ||
KV_URL | no | app/api/mcp/[transport]/route.ts | ||
MAILTRAP_API_KEY | no | lib/mailtrap.ts | ||
MAIL_ALLOW_PRIVATE_HOSTS | no | lib/net/host-guard.ts | ||
MINIO_ACCESS_KEY | yes | MinIO / S3 object storage MINIO_ENDPOINT is what the server uses; MINIO_PUBLIC_ENDPOINT is what browsers use (presigned uploads and file links). Leave it empty when both are the same URL. | lib/minio.ts | |
MINIO_BUCKET | yes | MinIO / S3 object storage MINIO_ENDPOINT is what the server uses; MINIO_PUBLIC_ENDPOINT is what browsers use (presigned uploads and file links). Leave it empty when both are the same URL. | lib/minio.ts | |
MINIO_ENDPOINT | yes | MinIO / S3 object storage MINIO_ENDPOINT is what the server uses; MINIO_PUBLIC_ENDPOINT is what browsers use (presigned uploads and file links). Leave it empty when both are the same URL. | lib/minio.ts | |
MINIO_PUBLIC_ENDPOINT | yes | MinIO / S3 object storage MINIO_ENDPOINT is what the server uses; MINIO_PUBLIC_ENDPOINT is what browsers use (presigned uploads and file links). Leave it empty when both are the same URL. | ||
MINIO_SECRET_KEY | yes | MinIO / S3 object storage MINIO_ENDPOINT is what the server uses; MINIO_PUBLIC_ENDPOINT is what browsers use (presigned uploads and file links). Leave it empty when both are the same URL. | lib/minio.ts | |
NEXTCRM_TOKEN | no | app/api/crm/contacts/create-from-remote/route.ts, app/api/crm/leads/create-lead-from-web/route.ts | ||
NEXT_PUBLIC_APP_DOMAIN | no | actions/invoices/send-invoice-email.ts | ||
NEXT_PUBLIC_APP_NAME | no | actions/admin/send-mail-to-all/index.ts, actions/admin/users/activate-user.ts, actions/admin/users/invite-user.ts +27 more | ||
NEXT_PUBLIC_APP_URL | no | actions/admin/users/activate-user.ts, actions/crm/contacts/create-contact.ts, actions/crm/leads/create-lead.ts +27 more | ||
NEXT_PUBLIC_DISCORD_INVITE_URL | no | components/support.tsx | ||
NEXT_PUBLIC_GITHUB_ISSUES_URL | no | components/support.tsx | ||
NEXT_PUBLIC_GITHUB_REPO_API | no | actions/github/get-repo-stars.ts | ||
NEXT_PUBLIC_GITHUB_REPO_URL | no | app/[locale]/(auth)/layout.tsx | ||
NEXT_PUBLIC_GITHUB_TOKEN | no | actions/github/get-repo-stars.ts | ||
NEXT_PUBLIC_NEXT_VERSION | no | app/[locale]/(routes)/components/Footer.tsx | ||
NEXT_RUNTIME | no | instrumentation.ts | ||
NODE_ENV | no | app/api/auth/test-otp/route.ts, app/api/profile/calendar-connections/google/authorize/route.ts, app/api/profile/calendar-connections/google/callback/route.ts +4 more | ||
OPENAI_API_KEY | yes | AI. Leave empty to use keys saved in the admin panel. | inngest/functions/documents/enrich-document.ts, inngest/lib/embedding-utils.ts | |
PLUGIN_HTTP_ALLOW_PRIVATE_HOSTS | no | lib/plugins/http.ts | ||
REDIS_URL | no | app/api/mcp/[transport]/route.ts | ||
RESEND_API_KEY | yes | Email Service (Resend). Leave the key empty to use the one saved in Admin > Resend; an env value always wins over the admin panel. | inngest/functions/crm/kill-rule.ts, inngest/functions/crm/recycle-targets.ts, lib/crm/auto-task.ts | |
RESEND_FROM_EMAIL | yes | e.g. noreply@yourdomain.com | inngest/functions/campaigns/send-step.ts, inngest/functions/crm/kill-rule.ts, inngest/functions/crm/recycle-targets.ts +2 more | |
RESEND_WEBHOOK_SECRET | yes | Resend webhook signing secret (whsec_…, Svix-signed) | lib/campaigns/resend-signature.ts | |
SEED_CONTACT_EMAIL | no | prisma/seeds/seed.ts | ||
SEED_DEMO_DATA | yes | Seed the demo CRM dataset on pnpm db:seed (1 = yes) | prisma/seeds/seed.ts | |
SKIP_ENV_VALIDATION | no | instrumentation.ts | ||
TARGET_EMAIL | no | lib/enrichment/e2b/agent-script.ts | ||
TARGET_NAME | no | lib/enrichment/e2b/agent-script.ts | ||
TEST_USER_EMAIL | no | prisma/seeds/seed.ts | ||
UPSTASH_REDIS_REST_URL | no | lib/enrichment/rate-limit.ts |