Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/deploy-your-app/llms.txt

Use this file to discover all available pages before exploring further.

Running Deploy Your App on your own infrastructure requires configuring environment variables across several independent services: the Next.js web app, the Express API server, the BullMQ builder, the worker, the reverse proxy, and the notification microservice. This page is the authoritative reference for every variable each service reads, with its type, default value, and purpose.

Web App (apps/web)

The web app is a Next.js application that serves the dashboard and exposes the REST API consumed by the other services.
VariableRequiredDefaultDescription
DATABASE_URL✅ YesPostgreSQL connection string. Example: postgresql://postgres:postgres@localhost:5432/mydb
BETTER_AUTH_SECRET✅ YesSecret key used by better-auth to sign and verify session tokens. Must be at least 32 characters
BETTER_AUTH_URL✅ YesFull public URL of the web app. Example: https://app.yourdomain.com
GITHUB_CLIENT_ID✅ YesClient ID of your GitHub OAuth App
GITHUB_CLIENT_SECRET✅ YesClient secret of your GitHub OAuth App
MASTER_ENCRYPTION_KEY✅ YesAES encryption key used to encrypt project environment variables at rest. Must be a 64-character hex string (32 bytes). Must match the value set in apps/api
NEXT_PUBLIC_BASE_DOMAIN✅ YesBase domain used when generating subdomains for deployed apps. Example: yourdomain.com

API Service (apps/api)

The API service is a lightweight Express server that receives GitHub webhook events and enqueues deployment jobs into BullMQ.
VariableRequiredDefaultDescription
PORTNo4000Port the API server listens on
DATABASE_URL✅ YesPostgreSQL connection string, same database as the web app
REDIS_HOSTNolocalhostHostname of the Redis instance used by BullMQ
REDIS_PORTNo6379Port of the Redis instance
GITHUB_WEBHOOK_SECRETNodevelopment-secretHMAC secret used to verify the X-Hub-Signature-256 header on incoming GitHub webhook payloads. Set this to a strong random string in production
MASTER_ENCRYPTION_KEY✅ YesMust match the value set in apps/web. Used to decrypt project environment variables before passing them to the builder

Builder (apps/builder)

The builder is a BullMQ worker that consumes the execution-queue, clones repositories, builds Docker images, and either runs containers or uploads static output to Cloudflare R2.
VariableRequiredDefaultDescription
REDIS_HOSTNolocalhostHostname of the Redis instance
REDIS_PORTNo6379Port of the Redis instance
R2_ENDPOINT✅ For static sitesCloudflare R2 S3-compatible endpoint URL. Example: https://<account-id>.r2.cloudflarestorage.com
R2_ACCESS_KEY_ID✅ For static sitesR2 access key ID
R2_SECRET_ACCESS_KEY✅ For static sitesR2 secret access key
R2_BUCKET_NAME✅ For static sitesName of the R2 bucket where static build output is uploaded
BASE_DOMAIN✅ YeslocalhostBase domain for subdomain generation after deployment. Should match NEXT_PUBLIC_BASE_DOMAIN in the web app
WORKER_CONCURRENCYNo1Maximum number of build jobs to process in parallel

Worker (apps/worker)

The worker is a separate BullMQ consumer process. It shares the same Redis instance as the builder and API service.
VariableRequiredDefaultDescription
REDIS_HOSTNolocalhostHostname of the Redis instance
REDIS_PORTNo6379Port of the Redis instance

Proxy (apps/proxy)

The reverse proxy routes incoming requests to the correct deployed container or Cloudflare R2 static asset bucket, using subdomain and custom-domain mappings.
VariableRequiredDefaultDescription
R2_PUBLIC_URL✅ YesPublic base URL of the Cloudflare R2 bucket used to serve static site assets. Example: https://pub-xxxx.r2.dev
BASE_DOMAIN✅ YesBase domain the proxy listens on for subdomain routing. Example: yourdomain.com
PORTNo8080Port the proxy server listens on

Notification Service (apps/nortification)

The notification service listens on the notification-queue BullMQ queue and dispatches messages across Email, Slack, Discord, and WhatsApp. All variables for this service are optional — channels are skipped gracefully when their credentials are absent.
VariableRequiredDefaultDescription
REDIS_HOSTNolocalhostHostname of the Redis instance
REDIS_PORTNo6379Port of the Redis instance
RESEND_API_KEYNoAPI key for the Resend email service. Example: re_...
SLACK_WEBHOOK_URLNoSlack incoming webhook URL. Example: https://hooks.slack.com/services/...
DISCORD_WEBHOOK_URLNoDiscord webhook URL. Example: https://discord.com/api/webhooks/...
TWILIO_ACCOUNT_SIDNoTwilio Account SID for WhatsApp messaging
TWILIO_AUTH_TOKENNoTwilio authentication token
TWILIO_WHATSAPP_FROMNoWhatsApp-enabled sender number in Twilio format. Example: whatsapp:+14155238886
All notification service environment variables are optional. If a channel’s required credentials are not set, the service logs a warning and silently skips that channel without crashing. You only need to configure the channels you intend to use.
MASTER_ENCRYPTION_KEY must be identical in apps/web and apps/api. This key is used to AES-encrypt project environment variables when they are saved (web app) and to decrypt them just before they are injected into a deployment build (API service). If the values differ — or if the key is rotated after environment variables have already been stored — decryption will fail silently and your deployed containers will start with incorrect or empty environment variables.

Build docs developers (and LLMs) love