NextCRM

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.

VariableRequiredIn .env.examplePurposeRead in
ANTHROPIC_API_KEYyesAI. Leave empty to use keys saved in the admin panel.lib/enrichment/e2b/agent-script.ts
BETTER_AUTH_SECRETyesBetter Authlib/auth.ts
BETTER_AUTH_URLyesBetter Authlib/auth.ts
CInoprisma/seeds/seed.ts
COMPANY_NAMEnolib/enrichment/e2b/agent-script.ts
COMPANY_WEBSITEnolib/enrichment/e2b/agent-script.ts
DATABASE_URLyesyesPostgreSQL 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_KEYnoinngest/functions/enrich-target-contact.ts, inngest/functions/enrich-target.ts, lib/enrichment/target-enrichment-keys.ts
E2B_ENRICHMENT_TEMPLATEnoinngest/functions/enrich-target-contact.ts, inngest/functions/enrich-target.ts
EMAIL_ENCRYPTION_KEYyesEncrypts 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_FROMyesverified sender for login codes, e.g. noreply@yourdomain.comactions/admin/send-mail-to-all/index.ts, actions/admin/users/activate-user.ts, actions/admin/users/invite-user.ts +16 more
EMAIL_HOSTnolib/sendmail.ts
EMAIL_PASSWORDnolib/sendmail.ts
EMAIL_USERNAMEnolib/sendmail.ts
FIRECRAWL_API_KEYyesget from https://firecrawl.dev
GOOGLE_CALENDAR_CLIENT_IDyesGoogle Calendar sync — Workspace-internal OAuth applib/crm/calendar/google.ts
GOOGLE_CALENDAR_CLIENT_SECRETyesGoogle Calendar sync — Workspace-internal OAuth applib/crm/calendar/google.ts
GOOGLE_IDyesGoogle OAuthlib/auth.ts
GOOGLE_SECRETyesGoogle OAuthlib/auth.ts
INNGEST_APP_NAMEnoinngest/client.ts
INNGEST_EVENT_KEYnoinngest/client.ts
INNGEST_IDnoinngest/client.ts
INNGEST_SIGNING_KEYnoinngest/client.ts
KNOWN_DOMAINnolib/enrichment/e2b/agent-script.ts
KV_URLnoapp/api/mcp/[transport]/route.ts
MAILTRAP_API_KEYnolib/mailtrap.ts
MAIL_ALLOW_PRIVATE_HOSTSnolib/net/host-guard.ts
MINIO_ACCESS_KEYyesMinIO / 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_BUCKETyesMinIO / 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_ENDPOINTyesMinIO / 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_ENDPOINTyesMinIO / 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_KEYyesMinIO / 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_TOKENnoapp/api/crm/contacts/create-from-remote/route.ts, app/api/crm/leads/create-lead-from-web/route.ts
NEXT_PUBLIC_APP_DOMAINnoactions/invoices/send-invoice-email.ts
NEXT_PUBLIC_APP_NAMEnoactions/admin/send-mail-to-all/index.ts, actions/admin/users/activate-user.ts, actions/admin/users/invite-user.ts +27 more
NEXT_PUBLIC_APP_URLnoactions/admin/users/activate-user.ts, actions/crm/contacts/create-contact.ts, actions/crm/leads/create-lead.ts +27 more
NEXT_PUBLIC_DISCORD_INVITE_URLnocomponents/support.tsx
NEXT_PUBLIC_GITHUB_ISSUES_URLnocomponents/support.tsx
NEXT_PUBLIC_GITHUB_REPO_APInoactions/github/get-repo-stars.ts
NEXT_PUBLIC_GITHUB_REPO_URLnoapp/[locale]/(auth)/layout.tsx
NEXT_PUBLIC_GITHUB_TOKENnoactions/github/get-repo-stars.ts
NEXT_PUBLIC_NEXT_VERSIONnoapp/[locale]/(routes)/components/Footer.tsx
NEXT_RUNTIMEnoinstrumentation.ts
NODE_ENVnoapp/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_KEYyesAI. 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_HOSTSnolib/plugins/http.ts
REDIS_URLnoapp/api/mcp/[transport]/route.ts
RESEND_API_KEYyesEmail 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_EMAILyese.g. noreply@yourdomain.cominngest/functions/campaigns/send-step.ts, inngest/functions/crm/kill-rule.ts, inngest/functions/crm/recycle-targets.ts +2 more
RESEND_WEBHOOK_SECRETyesResend webhook signing secret (whsec_…, Svix-signed)lib/campaigns/resend-signature.ts
SEED_CONTACT_EMAILnoprisma/seeds/seed.ts
SEED_DEMO_DATAyesSeed the demo CRM dataset on pnpm db:seed (1 = yes)prisma/seeds/seed.ts
SKIP_ENV_VALIDATIONnoinstrumentation.ts
TARGET_EMAILnolib/enrichment/e2b/agent-script.ts
TARGET_NAMEnolib/enrichment/e2b/agent-script.ts
TEST_USER_EMAILnoprisma/seeds/seed.ts
UPSTASH_REDIS_REST_URLnolib/enrichment/rate-limit.ts