Every service in indiegoon is configured via environment variables. This is the complete reference.
Core
| Variable | Required | Description |
|---|
NEXT_PUBLIC_APP_NAME | ✓ | Your app name (shown in UI, emails, metadata) |
NEXT_PUBLIC_APP_URL | ✓ | Production URL (e.g., https://mysaas.com) |
NEXT_PUBLIC_APP_DESCRIPTION | — | SEO description |
SUPPORT_EMAIL | — | Support contact email |
NEXT_PUBLIC_TWITTER_HANDLE | — | Twitter/X handle (without @) |
Authentication
| Variable | Required | Description |
|---|
BETTER_AUTH_SECRET | ✓ | 256-bit secret for signing tokens |
BETTER_AUTH_URL | ✓ | Auth base URL (same as app URL) |
OAuth Providers (Optional)
# Google
GOOGLE_CLIENT_ID="..."
GOOGLE_CLIENT_SECRET="..."
# GitHub
GITHUB_CLIENT_ID="..."
GITHUB_CLIENT_SECRET="..."
# Twitter
TWITTER_CLIENT_ID="..."
TWITTER_CLIENT_SECRET="..."
If these are set, the provider is automatically enabled. If not, it's skipped.
Database
| Variable | Required | Description |
|---|
DATABASE_URL | ✓ | PostgreSQL connection string |
DATABASE_URL_UNPOOLED | — | Direct connection for migrations (Neon/Supabase) |
Payments
| Variable | Required | Description |
|---|
PAYMENT_PROVIDER | ✓ | stripe / polar / lemon / dodo |
Stripe
STRIPE_SECRET_KEY="sk_..."
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY="pk_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
PRICE_ID_PRO_MONTHLY="price_..."
Polar
POLAR_ACCESS_TOKEN="..."
POLAR_SERVER="https://api.polar.sh" # or sandbox
POLAR_WEBHOOK_SECRET="..."
POLAR_PRODUCT_ID="..."
LemonSqueezy
LEMONSQUEEZY_API_KEY="..."
LEMONSQUEEZY_STORE_ID="..."
LEMONSQUEEZY_STORE_SLUG="..."
LEMONSQUEEZY_WEBHOOK_SECRET="..."
LEMONSQUEEZY_VARIANT_ID="..."
DodoPayments
DODO_API_KEY="..."
DODO_TEST_MODE="true"
DODO_WEBHOOK_SECRET="..."
DODO_PRODUCT_ID="..."
Email
| Variable | Required | Description |
|---|
EMAIL_PROVIDER | ✓ | resend / postmark / sendgrid / mailgun / nodemailer |
EMAIL_FROM_NAME | ✓ | Sender name (e.g., "My SaaS") |
EMAIL_FROM_ADDRESS | ✓ | Sender email (e.g., hello@mysaas.com) |
EMAIL_REPLY_TO | — | Reply-to address |
Resend
RESEND_API_KEY="re_..."
Postmark
POSTMARK_SERVER_TOKEN="..."
SendGrid
SENDGRID_API_KEY="SG...."
Mailgun
MAILGUN_API_KEY="key-..."
MAILGUN_DOMAIN="mg.mysaas.com"
MAILGUN_REGION="us" # or "eu"
Nodemailer (SMTP)
SMTP_HOST="smtp.gmail.com"
SMTP_PORT="587"
SMTP_USER="..."
SMTP_PASS="..."
SMTP_SECURE="false"
Rate Limiting
| Variable | Required | Description |
|---|
UPSTASH_REDIS_REST_URL | — | Upstash Redis URL |
UPSTASH_REDIS_REST_TOKEN | — | Upstash Redis token |
Rate limiting gracefully degrades if not configured (requests pass through).
Analytics (Optional)
NEXT_PUBLIC_POSTHOG_KEY="phc_..."
NEXT_PUBLIC_POSTHOG_HOST="https://app.posthog.com"
AI (Optional, Pro Tier)
ANTHROPIC_API_KEY="sk-ant-..."
OPENAI_API_KEY="sk-..."
Security Tips
- •Never commit
.env — it's in .gitignore by default
- •Use different keys for development and production
- •Rotate secrets if they're ever exposed
- •Use
BETTER_AUTH_SECRET with at least 32 characters (the CLI generates 64)
- •Set webhook secrets — never skip signature verification in production
Next Steps