Skip to content

Environment variables

The Wasp app reads its configuration from app/.env.server (server-side) and app/.env.client (client-side). Both files are git-ignored. Copy the templates and fill in the values:

Terminal window
cd app
cp .env.server.example .env.server
cp .env.client.example .env.client

Wasp validates every variable below at server startup using the schemas in app/src/env.ts and the per-feature app/src/**/env.ts files. If a required variable is missing or empty, the server refuses to boot — there is no silent fallback.

Server (app/.env.server)

Auth

VariableRequiredDefaultNotes
DATABASE_URLOptional in devunsetIf you run wasp start db you don’t need to set this — Wasp wires up a local Postgres for you. Set it explicitly when pointing at a managed Postgres. Secret.
ADMIN_EMAILSNo""Comma-separated emails granted admin on signup. Empty string disables admin grants.
GOOGLE_CLIENT_IDIf Google auth enabledFrom Google Cloud OAuth credentials. Currently disabled in main.wasp — uncomment the google: {} block to enable.
GOOGLE_CLIENT_SECRETIf Google auth enabledPair with GOOGLE_CLIENT_ID. Secret.

Email sending

Trademark Sentinel uses Brevo for transactional email in production, plumbed through Wasp’s SMTP provider — Wasp 0.23 has no native Brevo provider, so Brevo’s transactional SMTP relay (smtp-relay.brevo.com:587) is the supported path. The default Dummy provider doesn’t send real email — it logs links to the server console — and ignores the SMTP_* vars below.

VariableRequiredDefaultNotes
SMTP_HOSTProductionBrevo: smtp-relay.brevo.com. Only required when app/main.wasp’s emailSender.provider is set to SMTP.
SMTP_PORTProductionBrevo: 587 (STARTTLS).
SMTP_USERNAMEProductionBrevo SMTP login (the email shown in Senders, Domains & Dedicated IPs → SMTP & API → SMTP).
SMTP_PASSWORDProductionBrevo SMTP key (xkeysib-...) generated alongside the login. Secret.

Payments — Stripe (default provider)

VariableRequiredDefaultNotes
STRIPE_API_KEYYesSecret API key (sk_test_... for dev, sk_live_... for prod). Secret.
STRIPE_WEBHOOK_SECRETYesFrom stripe listen output (dev) or the dashboard webhook config (prod). Secret.
STRIPE_PRICE_ID_SOLOYesStripe recurring price ID for the Solo tier. Free tier has no price ID — it’s the default for new signups.
STRIPE_PRICE_ID_TEAMYesStripe recurring price ID for the Team tier.
STRIPE_PRICE_ID_ENTERPRISEYesStripe recurring price ID for the Enterprise tier.

Payments — Lemon Squeezy (alternative)

These are validated by lemonSqueezyEnvSchema in app/src/payment/lemonSqueezy/env.ts. Trademark Sentinel ships with Stripe wired in paymentsWebhook; switch only if you remove the Stripe schema import from app/src/env.ts first.

VariableRequiredNotes
LEMONSQUEEZY_API_KEYIf using Lemon SqueezySecret.
LEMONSQUEEZY_WEBHOOK_SECRETIf using Lemon SqueezySecret.
LEMONSQUEEZY_STORE_IDIf using Lemon SqueezyFind in Lemon Squeezy store settings.

Payments — Polar (alternative)

Validated by polarEnvSchema. Same caveat as Lemon Squeezy — exclusive of Stripe.

VariableRequiredNotes
POLAR_ORGANIZATION_ACCESS_TOKENIf using PolarSecret.
POLAR_WEBHOOK_SECRETIf using PolarSecret.
POLAR_SANDBOX_MODEIf using Polartrue for sandbox, false for live.

File uploads (AWS S3)

Required only if you keep the file-upload feature. Remove the fileUploadEnvSchema import from app/src/env.ts to drop these.

VariableRequiredNotes
AWS_S3_IAM_ACCESS_KEYIf file uploads enabledSecret.
AWS_S3_IAM_SECRET_KEYIf file uploads enabledSecret.
AWS_S3_FILES_BUCKETIf file uploads enabledBucket name.
AWS_S3_REGIONIf file uploads enablede.g. eu-west-2.

AI demo

Required by demoAiAppEnvSchema. Remove the import from app/src/env.ts if you delete the demo AI app.

VariableRequiredNotes
OPENAI_API_KEYIf demo AI app keptOpenAI API key. Secret.

Analytics (optional)

The Plausible and Google Analytics schemas are imported in app/src/env.ts by default. Drop the imports if you don’t want either backend.

VariableRequiredNotes
PLAUSIBLE_API_KEYIf using PlausibleSecret.
PLAUSIBLE_SITE_IDIf using Plausiblee.g. yoursite.com.
PLAUSIBLE_BASE_URLIf using Plausiblehttps://plausible.io/api for hosted, your URL for self-hosted.
GOOGLE_ANALYTICS_CLIENT_EMAILIf using GAService account email.
GOOGLE_ANALYTICS_PRIVATE_KEYIf using GABase64-encoded JSON key. Secret.
GOOGLE_ANALYTICS_PROPERTY_IDIf using GAGA4 property ID.

Client (app/.env.client)

Wasp exposes only variables prefixed with REACT_APP_ to client code (see the Wasp env-vars docs).

VariableRequiredNotes
REACT_APP_GOOGLE_ANALYTICS_IDIf using GA on the cliente.g. G-XXXXXXX.

Security notes

  • Anything marked Secret must never be committed to git. The .env.server file is in .gitignore; double-check before staging.
  • For Fly.io, set production secrets with fly secrets set KEY=value rather than baking them into a Dockerfile or fly.toml.
  • The Dummy email provider prints verification URLs to the server log — fine for dev, never enable in production.
  • Rotate Stripe and Brevo keys if a .env.server file is ever leaked.

Out of date?

This table is derived from app/.env.server.example, app/.env.client.example, and the schemas under app/src/**/env.ts. If you add or remove a feature in app/src/env.ts, please update this page in the same PR.