TheShipStack Docs

Environment Variables

Reference for every variable in .env.example.

All env vars are validated at startup with Zod. The app will throw a descriptive error and refuse to start if a required value is missing or malformed.

Database

VariableDescriptionExample
DATABASE_URLPostgreSQL connection stringpostgresql://postgres:postgres@localhost:5432/shipforge

In production use your Neon connection string.

Auth

VariableDescriptionExample
BETTER_AUTH_SECRETRandom secret for session signingopenssl rand -base64 32
BETTER_AUTH_URLFull URL of your apphttp://localhost:3000
GOOGLE_CLIENT_IDGoogle OAuth app client IDFrom Google Cloud Console
GOOGLE_CLIENT_SECRETGoogle OAuth app client secretFrom Google Cloud Console

File Uploads

VariableDescriptionExample
STORAGE_ENDPOINTS3-compatible endpointhttp://localhost:9000 (MinIO) or B2 endpoint
STORAGE_ACCESS_KEYAccess key IDminioadmin locally
STORAGE_SECRET_KEYSecret access keyminioadmin locally
STORAGE_BUCKETBucket nameshipforge
STORAGE_REGIONRegionus-east-1

Email

VariableDescriptionExample
RESEND_API_KEYResend API keyre_... — leave empty locally (Mailpit is used)
EMAIL_FROMSender addressnoreply@yourdomain.com

App

VariableDescriptionExample
NEXT_PUBLIC_APP_URLPublic-facing URLhttp://localhost:3000

Stripe (Billing)

VariableDescriptionExample
STRIPE_SECRET_KEYStripe secret keysk_live_... / sk_test_...
STRIPE_WEBHOOK_SECRETWebhook signing secretFrom Stripe dashboard → Webhooks
STRIPE_PRICE_ID_STARTER_MONTHLYStripe Price ID for Starter monthlyprice_...
STRIPE_PRICE_ID_STARTER_ANNUALStripe Price ID for Starter annualprice_...
STRIPE_PRICE_ID_PRO_MONTHLYStripe Price ID for Pro monthlyprice_...
STRIPE_PRICE_ID_PRO_ANNUALStripe Price ID for Pro annualprice_...
STRIPE_PRICE_ID_BUSINESS_MONTHLYStripe Price ID for Business monthlyprice_...
STRIPE_PRICE_ID_BUSINESS_ANNUALStripe Price ID for Business annualprice_...

In development, use Stripe test mode keys (sk_test_...). Create test Price objects in the Stripe dashboard using the same plan amounts as production.

On this page