Skip to content

Self-hosting configuration

Environment variables for self-hosted Fajita: required keys, optional SMTP and worker tuning, and validation with selfhost:doctor.

Core · 8 min

Set FAJITA_DEPLOYMENT_MODE=self_hosted first. All configuration flows through environment variables.

Required variables

VariablePurpose
FAJITA_DEPLOYMENT_MODEMust be self_hosted
NEXT_PUBLIC_APP_URLPublic URL for links, heartbeats, status pages
NEXT_PUBLIC_SUPABASE_URLPostgREST API base URL
NEXT_PUBLIC_SUPABASE_ANON_KEYAnon JWT for client reads
SUPABASE_SERVICE_ROLE_KEYService role for server mutations
DATABASE_URLPostgres connection string
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEYYour Clerk application
CLERK_SECRET_KEYYour Clerk application
MONITOR_SECRET_KEYRINGAES-256-GCM keyring for monitor secrets
CRON_SECRETBearer token for cron routes

Email (optional)

Use Resend (RESEND_API_KEY) or SMTP (SMTP_HOST, SMTP_PORT, SMTP_FROM, and auth variables).

Validate configuration

bash
npm run selfhost:doctor

Was this page helpful?