Formbase validates environment variables on startup. Missing or invalid values will fail fast, so configure them before you deploy.
Core variables
| Variable | Required | Description | Example |
|---|
NEXT_PUBLIC_APP_URL | Yes | Public base URL used for redirects and auth links. | https://forms.example.com |
DATABASE_URL | Yes | libSQL/SQLite connection string. Must start with libsql:// or file:. | file:./local.db |
TURSO_AUTH_TOKEN | Conditionally | Required when DATABASE_URL starts with libsql://. | turso_xxx |
BETTER_AUTH_SECRET | Yes | Secret for auth encryption (32+ chars). | your-long-secret |
ALLOW_SIGNIN_SIGNUP | Yes | Enable or disable signups (true/false). | true |
Email
| Variable | Required | Description | Example |
|---|
SMTP_TRANSPORT | Yes | Email transport (smtp or resend). | smtp |
SMTP_HOST | If SMTP | SMTP host name. | smtp.mailgun.org |
SMTP_PORT | If SMTP | SMTP port. | 587 |
SMTP_USER | If SMTP auth | SMTP username. Must be paired with SMTP_PASS. | [email protected] |
SMTP_PASS | If SMTP auth | SMTP password. Must be paired with SMTP_USER. | smtp-password |
RESEND_API_KEY | If Resend | Resend API key. | re_xxx |
Storage (file uploads)
| Variable | Required | Description | Example |
|---|
STORAGE_ENDPOINT | If uploads | S3-compatible endpoint host. | localhost |
STORAGE_PORT | If uploads | Storage port. | 9002 |
STORAGE_USESSL | If uploads | Use SSL (true/false). | false |
STORAGE_ACCESS_KEY | If uploads | Storage access key. | formbase |
STORAGE_SECRET_KEY | If uploads | Storage secret key. | password |
STORAGE_BUCKET | If uploads | Bucket name. | formbase |
Optional
| Variable | Required | Description | Example |
|---|
NODE_ENV | No | Runtime mode. | production |
PORT | No | Server port. | 3000 |
AUTH_GITHUB_ID | No | GitHub OAuth client ID. | github-client-id |
AUTH_GITHUB_SECRET | No | GitHub OAuth client secret. | github-client-secret |
AUTH_GOOGLE_ID | No | Google OAuth client ID. | google-client-id |
AUTH_GOOGLE_SECRET | No | Google OAuth client secret. | google-client-secret |
UMAMI_TRACKING_ID | No | Umami analytics site ID. | uuid |
VERCEL_URL | No | Vercel deployment URL. | formbase.vercel.app |
Email configuration is required for user verification and password reset emails, even if you do not enable submission notifications.