Quickback Docs

Environment Variables

Environment variables for the Quickback CLI and generated projects.

CLI Environment Variables

These variables configure the Quickback CLI itself.

VariableDescriptionDefault
QUICKBACK_API_URLCompiler API endpointhttps://compiler.quickback.dev
QUICKBACK_API_KEYAPI key for headless authentication (CI/CD)
QUICKBACK_AUTH_URLAuth server URL (custom deployments)

Authentication

The CLI authenticates via two methods:

  1. Interactive loginquickback login stores credentials in ~/.quickback/credentials.json
  2. API key — Set QUICKBACK_API_KEY for CI/CD environments
# Use the cloud compiler (default)
quickback compile

# Use a local compiler instance
QUICKBACK_API_URL=http://localhost:3000 quickback compile

# CI/CD with API key
QUICKBACK_API_KEY=qb_key_... quickback compile

Compiler Service Variables

These variables are used by the compiler service/runtime itself.

VariableDescriptionDefault
QUICKBACK_SECURITY_REPORT_SIGNING_KEYHMAC key for signing security-contracts.report.json artifacts

When compiler.securityContracts.report.signature.required is true, this variable (or signature.key) must be set or compile fails.

Cloudflare Variables

Wrangler Bindings

These are configured as bindings in wrangler.toml, not environment variables. The compiler generates them automatically.

BindingTypeDescription
AUTH_DBD1 DatabaseBetter Auth tables (dual mode)
DBD1 DatabaseFeature tables (dual mode)
DATABASED1 DatabaseAll tables (single DB mode)
KVKV NamespaceKey-value storage
R2_BUCKETR2 BucketFile storage (if configured)
AIWorkers AIEmbedding generation (if configured)
VECTORIZEVectorizeVector similarity search (if configured)
EMBEDDINGS_QUEUEQueueAsync embedding jobs (if configured)
WEBHOOKS_DBD1 DatabaseWebhook events (if configured)
WEBHOOKS_QUEUEQueueWebhook delivery (if configured)
FILES_DBD1 DatabaseFile metadata (if R2 configured)
BROADCASTERService BindingRealtime broadcast worker (if configured)

Worker Variables

Set these in wrangler.toml under [vars] or in the Cloudflare dashboard:

VariableDescriptionRequired
BETTER_AUTH_URLPublic URL of your auth endpointYes
APP_NAMEApplication name (used in emails)No

Email (AWS SES)

Required when using the emailOtp plugin with AWS SES:

VariableDescription
AWS_ACCESS_KEY_IDAWS access key
AWS_SECRET_ACCESS_KEYAWS secret key
AWS_SES_REGIONSES region (e.g., us-east-2)
EMAIL_FROMSender email address
EMAIL_FROM_NAMESender display name
EMAIL_REPLY_TOReply-to address

Drizzle Kit (Migrations)

For running remote migrations with drizzle-kit, set these in .env:

VariableDescription
CLOUDFLARE_ACCOUNT_IDYour Cloudflare account ID
CLOUDFLARE_API_TOKENAPI token with D1 permissions
CLOUDFLARE_AUTH_DATABASE_IDAuth D1 database ID (dual mode)
CLOUDFLARE_FEATURES_DATABASE_IDFeatures D1 database ID (dual mode)
CLOUDFLARE_AUDIT_DATABASE_IDSecurity audit D1 database ID (unsafe cross-tenant actions)
CLOUDFLARE_DATABASE_IDDatabase ID (single DB mode)

Bun Variables

Set these in a .env file in your project root:

VariableDescriptionDefault
NODE_ENVRuntime environmentdevelopment
PORTServer port3000
BETTER_AUTH_SECRETAuth encryption secret— (required)
BETTER_AUTH_URLPublic URL of your serverhttp://localhost:3000
DATABASE_PATHPath to SQLite file./data/app.db

Turso (LibSQL) Variables

In addition to the Bun variables above:

VariableDescriptionDefault
DATABASE_URLLibSQL connection URLfile:./data/app.db
DATABASE_AUTH_TOKENTurso auth token (required for remote)
# Local development
DATABASE_URL=file:./data/app.db

# Production (Turso cloud)
DATABASE_URL=libsql://your-db-slug.turso.io
DATABASE_AUTH_TOKEN=eyJhbGciOi...

Social Login Providers

When social login is configured in your auth provider:

VariableDescription
GOOGLE_CLIENT_IDGoogle OAuth client ID
GOOGLE_CLIENT_SECRETGoogle OAuth client secret
GITHUB_CLIENT_IDGitHub OAuth client ID
GITHUB_CLIENT_SECRETGitHub OAuth client secret
DISCORD_CLIENT_IDDiscord OAuth client ID
DISCORD_CLIENT_SECRETDiscord OAuth client secret

See Also

On this page