Loading...
FastStaq is configured entirely through environment variables. The server reads server/.env and the client reads client/.env. The bundled env.example files are the authoritative, commented reference; this article is a guided overview.
server/env.example documents every server variable with inline notes.client/env.example documents the client (NEXT_PUBLIC_*) variables.Copy each to .env and fill in the values for your environment.
NEXT_PUBLIC_ and are baked in at next build time. Rebuild and redeploy the client to apply changes.These are the variables you need for a working local instance:
| Variable | Purpose |
|---|---|
DATABASE_URL | PostgreSQL connection string |
REDIS_URL | Redis connection (queues, sockets, cache) |
JWT_SECRET | Signs auth tokens (min 32 chars) |
FRONTEND_URL | Public URL of the client app |
Everything else turns on a specific feature.
PAYMENT_PROVIDER, STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, STRIPE_PRICE_*. See Configure Stripe payments.SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS, FROM_EMAIL, FROM_NAME. See Configure email and SMTP.S3_ENDPOINT, S3_REGION, S3_BUCKET, S3_ACCESS_KEY, S3_SECRET_KEY, S3_PUBLIC_URL. See Configure file storage (R2/S3).GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_REDIRECT_URI. See Configure Google OAuth.GITHUB_TOKEN, GITHUB_CUSTOMERS_REPO_OWNER, GITHUB_CUSTOMERS_REPO_NAME, GITHUB_INVITE_PERMISSION.Set strong, unique values in production and rotate on a schedule: JWT_SECRET, ENCRYPTION_KEY, API_KEY_PEPPER, AFFILIATE_ATTRIBUTION_SECRET, and METRICS_BEARER_TOKEN. Never commit real secrets to Git.
pnpm setup to scaffold env files interactively.COMPLIANCE_* before changing them.Open a support ticket if a variable is unclear.
Sign in to leave feedback on this article.