3 Configuration Reference

TraxrGRC takes its server-level configuration from environment variables set in .env. Everything else (email, sign-in integrations, sessions, branding, notifications) is configured in the application under Settings and stored in the database.

3.1 How values reach the containers

Compose reads .env to fill in docker-compose.yml. Each container receives only the variables docker-compose.yml lists for it, sometimes under another name (for example, APP_URL is also passed as AUTH_URL). Setting a variable in .env that docker-compose.yml does not use changes nothing. To pass anything else, add it to the service's environment in docker-compose.override.yml.

After changing .env, apply it with the same command you start the stack with, for example:

docker compose --profile tls up -d

Compose recreates the containers whose configuration changed; migrate runs again first.

In the tables below, Required means Compose or the application refuses to start without the value. Secret values must be kept out of tickets, chat and source control.

3.2 Instance settings (.env)

VariablePurposeDefaultRequiredSecret
Core
APP_URLThe public address of the instance, with scheme and no trailing slash. Used for sign-in redirects (passed to Auth.js as AUTH_URL), links in emails, the SAML service provider addresses, SCIM and MCP addresses, and as an accepted origin for cross-site request checks. Use https://; SAML sign-in requires it.NoneYes (Compose)No
APP_NAMEProduct name shown until one is set under Settings → Branding.GRC PlatformNoNo
AUTH_SECRETSigns session tokens and the SAML sign-in state. Unless SETTINGS_ENCRYPTION_KEY is set, it is also the source of the key that encrypts stored integration secrets. web refuses to start in production when it is missing, shorter than 32 characters, or contains a placeholder (change-me, changeme or dev-secret).NoneYes (Compose and web)Yes
SETTINGS_ENCRYPTION_KEYSource of the key that encrypts the SMTP password or client secret, LDAP bind password, SAML private key, DocuSign private key and Connect HMAC key, and each user's two-step verification secret in the database. When empty, the key is derived from AUTH_SECRET. At least 32 characters when set. Changing it (or AUTH_SECRET while it is empty) makes existing two-step verification enrollments unreadable; see Two-step verification.EmptyNoYes
API_RATE_LIMIT_PER_MINUTERequests per minute each API token may make on /api/v1 before it is refused with 429 and a Retry-After header. Counted in the database and shared by all web processes. Default 600; 0 turns the limit off.
WORKER_WATCHoff stops web emailing administrators when the worker has stopped. For a restore drill only; the banner still says so.
WORKER_HEALTH_PORTNot for Compose, whose file doesn't pass it on. A port on which the worker answers /live, for hosts whose probes can't run a command: see the Azure guide. Unset, no port opens.
LOG_FORMATHow web and worker write their logs: json (one JSON line per entry, the default) or plain. Secrets are removed from both.
UPDATE_KEEP_ROLLBACKSSet in the shell running deploy/update.sh, not in .env. How many rollback images of this instance it keeps. Default 3; 0 keeps them all.
JOBS_DB_POOL_MAXMost database connections the job queue opens in each web and worker process, beside the application's own pool (whose size is set with connection_limit in DATABASE_URL). Lower it when many processes share one database server. Any value that is not a whole number of 1 or more counts as the default.10NoNo
TRUSTED_PROXY_HOPSHow many reverse proxies in front of web append the client address to X-Forwarded-For. The client address is read that many entries from the right. Any value that is not a whole number of 1 or more counts as 1.1NoNo
Object storage
STORAGE_DRIVERWhere attachments live: azure-blob or s3. Empty means the uploads volume. Anything else stops the instance, as a fallback to the volume could put files on temporary disk. See Object storage.EmptyNoNo
STORAGE_ATTACHMENTSThe container or bucket.EmptyWith a driverNo
STORAGE_AZURE_ACCOUNT_URLThe Azure storage account's address.EmptyFor azure-blobNo
STORAGE_S3_REGIONThe S3 region.EmptyFor s3No
STORAGE_S3_ENDPOINTThe https address of an S3-compatible store. Leave empty for Amazon S3.EmptyNoNo
STORAGE_READ_FROMOnly while files move off a store: azure-blob or s3, the store this instance keeps using so unmoved files still open, and so deleting a record that has not moved deletes its file there. Never copy this into a drill or clone. A store's address alone never makes this instance use it.EmptyNoNo
Database
POSTGRES_PASSWORDPassword of the database owner. Used by db, migrate and the backup scripts. Keep it URL-safe.NoneYes (Compose)Yes
APP_DB_PASSWORDPassword of the application role that web and worker connect as. migrate sets it on every start. Keep it URL-safe.NoneYes (Compose; migrate requires 16 characters or more)Yes
POSTGRES_DBDatabase name.grcNoNo
POSTGRES_USERDatabase owner role name.grcNoNo
APP_DB_USERApplication role name: lower-case letters, digits and underscores, starting with a letter or underscore, and different from POSTGRES_USER.grc_appNoNo
First administrator
INITIAL_ADMIN_EMAILEmail of the administrator created when the database has no users.EmptyOnly on an empty databaseNo
INITIAL_ADMIN_PASSWORDIts password, 12 characters or more. Remove it after the first sign-in.EmptyOnly on an empty databaseYes
HTTPS (bundled Caddy)
DOMAINHost name Caddy serves and requests a certificate for.EmptyWith --profile tlsNo
ACME_EMAILContact address for the certificate authority.EmptyWith --profile tlsNo
Docker
COMPOSE_PROJECT_NAMEProject name; prefixes container and volume names.grcNoNo
APP_IMAGETag of the application image Compose builds and runs. Leave it unset unless you need a specific name; it must differ between instances on one server.grc-platform-<COMPOSE_PROJECT_NAME>:latestNoNo
WEB_BINDHost address the web port is published on.127.0.0.1NoNo
WEB_PORTHost port for web.3000NoNo

3.3 Set by Compose and the image

These are set for you. Do not override them unless you are changing how the image runs.

VariableSet toPurpose
DATABASE_URLBuilt from the database settings above: the application role for web and worker, the owner for migrate.Database connection for the application and the job queue.
AUTH_URLAPP_URLBase address Auth.js builds its redirects from.
AUTH_TRUST_HOSTtrueTells Auth.js to trust the proxy's host header.
NODE_ENVproductionProduction mode; enables the AUTH_SECRET check and refuses the demo seed.
PORT, HOSTNAME3000, 0.0.0.0Where web listens inside its container.
UPLOAD_DIR/app/uploadsWhere attachments are stored (the uploads volume).
NEXT_TELEMETRY_DISABLED, CHECKPOINT_DISABLE1Turn off Next.js telemetry and Prisma's update check, so the application makes no unsolicited outbound calls.

3.4 Operator script variables

These are read by the scripts you run on the server, not by the application.

VariableRead byPurposeDefault
BACKUP_AGE_RECIPIENTSdeploy/backup.shPath to a file of age public keys. When set, both backup files are encrypted and the plain-text copies removed.Unset (no encryption)
BACKUP_AGE_IDENTITYdeploy/restore.shPath to the age private key file. Required when restoring .age files.Unset
UPDATE_POLL_SECONDSdeploy/update.shSeconds between health checks while waiting for web (60 checks in all).3
GRC_API_TOKENscripts/load-bundle.tsAPI token used to load a data bundle. See Loading and Importing Data.Unset
NODE_EXTRA_CA_CERTSscripts/load-bundle.tsExtra CA certificates for reaching an instance with an internal certificate.Unset

3.5 Development and demonstration only

Never set these on a production instance.

VariableRead byPurpose
ALLOW_DEMO_SEEDprisma/seed.ts1 lets the destructive development seed run when NODE_ENV is production.
SEED_ADMIN_EMAIL, SEED_ADMIN_PASSWORDprisma/seed.tsAdministrator account the development seed creates.
DEMO_ACCOUNTS_FILEprisma/demo-seed.tsWhere the demonstration seed writes its sign-in accounts (default .demo-accounts). The demonstration seed refuses to run on a database that holds business data.
DEMO_PROFILEprisma/demo-seed.tsbusy (default) or quiet: which picture of the demonstration data to load (see docs/DEMO.md, "Demo profiles"). Any other value stops the seed before it writes anything.

3.6 Settings that live in the application

These are not environment variables. Set them in the application:

SettingAddressChapter
SMTP server, LDAP, SAML single sign-on, SSO only/settings/integrationsNotifications and Email; Authentication and Single Sign-On
Session length, idle timeout, API token lifetime, attachment storage per user, required two-step verification, separation of duties, calendar feeds/settings/security (Sessions)Authentication and Single Sign-On
SCIM provisioning/settings/provisioningAuthentication and Single Sign-On
Product name, logo, color/settings/brandingPlatform Settings
Your words for a customer, vendor and partner (Sponsor, Supplier, Site)/settings/terminologyPlatform Settings
Notification templates and the digest schedule/settings/notificationsNotifications and Email
Audit log retention/settings/audit-logAudit Log and Evidence Integrity