BuildBaseBuildBase

Configuration

All environment variables and Docker images for self-hosted BuildBase.

Environment Variables

Installation (Required)

These are provided by the BuildBase dashboard when you create an Installation.

VariableDescription
INSTALLATION_API_KEYInstallation API key (from dashboard)
INSTALLATION_IDInstallation ID (from dashboard)

Server (Required)

VariableDescription
NODE_ENVSet to production
PORTServer port (default: 3000)
MONGO_CONNECTION_URLMongoDB connection string
REDIS_HOSTRedis hostname (default: localhost)
REDIS_PORTRedis port (default: 6379)
SERVER_URLPublic URL of the tenant server (default: http://localhost:4101)
APPLICATION_URLPublic URL of the client app (default: http://localhost:4100)
AUTH_SERVER_URLPublic URL of the auth portal (default: http://localhost:4103)
JWT_PASSJWT signing secret
DB_ENCRYPTION_KEYDatabase field encryption key
SECRET_KEYGeneral application secret
OAUTH2_SECRETOAuth2 token secret
INSTALLATION_API_KEYInstallation API key (from BuildBase dashboard)
INSTALLATION_IDInstallation ID (from BuildBase dashboard)

Client App

VariableDescription
NEXT_PUBLIC_SERVER_URLTenant server URL
NEXT_PUBLIC_DEFAULT_TENANT_SERVER_URLDefault tenant server URL
NEXT_PUBLIC_INSTALLATION_IDInstallation ID (for org filtering)

CORS

VariableDescription
CORS_WHITELISTED_DOMAINSComma-separated list of allowed origins

The platform origins (console.buildbase.app) are always allowed by default.

Redis

VariableDescriptionDefault
REDIS_PASSWORDPassword (if required)
REDIS_DBDatabase number0

Optional Services

VariableDescription
TRUST_PROXYHow many proxies sit in front of the server and append to X-Forwarded-For. Defaults to 0 for self-hosted, which is right when the compose file publishes the port directly. Set it to the number of appending proxies if you put nginx, a load balancer or Cloudflare in front - too high and every per-IP rate limit is bypassable by a header the caller writes.
GOOGLE_AUTH_CLIENT_IDGoogle OAuth client ID (for Google vendor + Gmail sender)
GOOGLE_AUTH_CLIENT_SECRETGoogle OAuth client secret
GOOGLE_STORAGE_ASSETS_BUCKET_NAMEGCS bucket for file uploads
GOOGLE_WEB_RISK_API_KEYGoogle Web Risk API key for checking redirect destinations. Unset disables reputation checks; links still work.
MAIL_TRACKING_SECRETSigning key for email open/click tracking links. Derived from JWT_PASS when unset; set it to make the tracking key fully independent of the auth key.
URL_SAFETY_LOG_ONLYRecord URL reputation verdicts without acting on them. Defaults to false, so setting GOOGLE_WEB_RISK_API_KEY starts refusing malicious destinations straight away. Set this to true first to measure the false-positive rate before enforcing. (default: false)
URL_SAFETY_ENABLEDMaster switch for URL reputation checks. Only the literal "false" turns them off, and every lookup then returns UNKNOWN. (default: true)
URL_SAFETY_CLEAN_TTL_SECONDSHow long a clean verdict may be cached, in seconds, capped at 86400. A threat verdict ignores this and honours the expiry Google returns. (default: 3600)
WEB_RISK_TIMEOUT_MSTimeout for a single Web Risk lookup, in milliseconds. Lookups sit on a background path but must not hang a worker. (default: 5000)
MAILGUN_API_KEYMailgun API key (for transactional emails)
NEW_RELIC_LICENSE_KEYNew Relic ingest license key for YOUR OWN account. Unset (default) disables all APM/log telemetry - nothing is collected or sent
NEW_RELIC_APP_NAMEAPM application name shown in New Relic (defaults to buildbase-server-selfhost)
NEW_RELIC_BROWSER_ACCOUNT_IDNew Relic account ID for browser monitoring of the client and auth frontends (shared across apps). Unset (default) disables browser monitoring
NEW_RELIC_BROWSER_LICENSE_KEYNew Relic browser license key (NRJS-…, shared across apps) for YOUR OWN account
NEW_RELIC_BROWSER_APP_ID_CLIENTNew Relic browser application ID for the client (console) frontend
NEW_RELIC_BROWSER_APP_ID_AUTHNew Relic browser application ID for the auth frontend

Generating Secrets

All secret values should be unique, random strings. Generate them with:

openssl rand -hex 32

Or generate all required secrets at once:

for i in JWT_PASS DB_ENCRYPTION_KEY SECRET_KEY OAUTH2_SECRET REDIS_PASSWORD; do echo "$i=$(openssl rand -hex 32)"; done

Docker Images

ImageDescriptionPortHealth Check
buildbaseapp/tenant-serverBackend API server3000GET /api/ready
buildbaseapp/clientWeb dashboard (Next.js SSR)3000GET /
buildbaseapp/authAuth portal (Next.js)3000GET /health

All images are multi-arch (linux/amd64, linux/arm64), built on Node.js 22 Alpine. docker pull selects the correct variant for the host automatically. 32-bit ARM (linux/arm/v7) is not supported - see Supported architectures.

Architecture

Loading diagram...

Your data never leaves your infrastructure. The central server only handles authentication tokens, installation licensing, and organization metadata.