RootTrace

Server configuration reference

Operational settings of the RootTrace server container can be overridden with environment variables at startup (docker run -e or Compose environment:). Most are read once at process start. The selected deployment security profile is also stored through the platform-admin UI and validated against the running configuration before the update is accepted. The database-backed profile and JWT algorithm do not require an API restart. This page lists the operator-facing variables for an on-prem deployment. For the supported end-to-end path, start with the Docker Compose install guide.

Select the server image from the RootTrace Server Amazon ECR Public Gallery. The public Gallery shows the supported tags and pull commands. Air-gapped installations must mirror that image and the RootTrace Agent image before configuring the server to generate collector install instructions.

Minimal configuration

Configure these runtime connectivity settings before first use. Browser identity, the application secret, the first-owner bootstrap token, and the metrics token are also required for the production first-boot flow described in the install guide.

VariableDefaultWhy you set it
ROOTTRACE_MONGO_URImongodb://localhost:27017MongoDB connection string; the localhost default is useless inside a container. Compose constructs this from the application Mongo credentials. The unprefixed MONGO_URI is accepted as a legacy alias.
ROOTTRACE_SECURITY_PROFILEregulated in production; default otherwiseStartup baseline: default, regulated, or air_gapped. The platform-admin UI can store the next-startup value.
ROOTTRACE_ELASTICSEARCH_HOSTempty on-premHTTPS Elasticsearch URL backing AI and semantic search. Leave empty to disable those features. Regulated profiles reject a non-HTTPS URL.
ROOTTRACE_FORWARDED_ALLOW_IPS127.0.0.1,::1Exact upstream addresses allowed to set X-Forwarded-*. Never use * with a regulated profile. The bundled compose uses its fixed nginx address.
ROOTTRACE_APM_TOKENunsetCollector token that turns on the server's own APM self-monitoring (falls back to ROOTTRACE_COLLECTOR_TOKEN). Unset means no self-monitoring.
ROOTTRACE_API_URLhttp://127.0.0.1:<listen port>/apiWhere that self-monitoring data flushes. It defaults to this server's own listener, so self-monitoring never leaves the deployment.

The supported Compose stack supplies these settings, runs MongoDB on an internal-only network, mounts the application-secret file, and terminates TLS at nginx. Set its required values in deploy/.env; do not copy a partial standalone docker run command into production.

Where settings come from

On-prem, there is one source: the container environment. Compose reads deploy/.env and maps selected values in; the application never opens that file itself.

An on-prem image does not contact AWS Systems Manager Parameter Store unless you explicitly set a prefix. Leave these unset; the supported Compose stack and every air-gapped deployment do:

VariableMeaning
ROOTTRACE_SSM_PARAMETER_PREFIXOpt in to Parameter Store and select the path, e.g. /roottrace/staging. Unset on-prem.
ROOTTRACE_SSM_REGIONRegion for that client, when the normal AWS SDK Region is not right.

If you do opt in: parameters live one per Standard SecureString under the prefix, names must begin with ROOTTRACE_, and an existing environment variable always wins over the same-named parameter, even when it is empty. Parameter Store only fills what the environment left missing. The workload role needs ssm:GetParametersByPath on that path and nothing more. scripts/import_env_to_parameter_store.py migrates an existing env file (--dry-run first; it prints names, never values).

Conventions

  • Booleans accept 1, true, yes, on (case-insensitive).
  • List values are comma-separated.
  • Integer variables are parsed strictly; a non-numeric value fails startup.
  • Published images have cloud or on_prem compiled into a root-owned, read-only native module. There is no runtime deployment-mode setting. Packaged startup fails if the marker is missing or invalid. A source checkout may use ROOTTRACE_DEPLOYMENT_MODE for local development; Docker uses the same name only as a build argument.

Core runtime

VariableDefaultMeaning
ROOTTRACE_ENVIRONMENTdevSet prod for real deployments. Flips defaults for allowed origins, rate limiting, strict Mongo sharding, and the security profile. A published on-prem image runs the production startup checks whatever this says, so the value selects those defaults and nothing more.
ROOTTRACE_SECURITY_PROFILEregulated in production; default otherwisedefault, regulated, or air_gapped. Regulated profiles fail startup on unsafe combinations. A platform admin can select a stored profile in Flutter; the API validates the running configuration and applies the selection immediately or rejects it.
ROOTTRACE_LOG_LEVELinfoRoot logger level; also the default floor for APM log shipping.
ROOTTRACE_LISTEN_HOST0.0.0.0Bind host.
ROOTTRACE_LISTEN_PORT8090Bind port (the image exposes 8090; /readyz is the health endpoint).
ROOTTRACE_API_WORKERS0 (auto)Worker count; 0 means CPU count minus ROOTTRACE_EMBEDDING_RESERVED_CPU_CORES, minimum 1.
ROOTTRACE_FORWARDED_ALLOW_IPS127.0.0.1,::1Exact upstreams allowed to set X-Forwarded-* (passed to uvicorn). The bundled Compose default is 10.233.1.10; change it together with ROOTTRACE_NGINX_IP.
ROOTTRACE_WEB_DIRbundled UIOverride the path of the bundled dashboard web build.
ROOTTRACE_INSTALLATION_IDemptyOn-prem licensing identifier. Use the exact id from a portal-issued license. Leave empty only when the license will be issued against the id generated after first boot.

Do not set ROOTTRACE_SKIP_STARTUP_BOOTSTRAP, ROOTTRACE_RUN_EMBEDDING_WORKER_IN_API, or ROOTTRACE_EMBEDDING_SERVICE_MODE: the server's own bootstrap process manages these for its worker and sidecar children.

Data stores

VariableDefaultMeaning
ROOTTRACE_MONGO_URImongodb://localhost:27017MongoDB connection string. Required in practice.
ROOTTRACE_MONGO_DATABASEroottraceDatabase name.
ROOTTRACE_MONGO_MIN_POOL_SIZE / MAX_POOL_SIZE0 / 100Connection pool bounds.
ROOTTRACE_MONGO_SERVER_SELECTION_TIMEOUT_MS5000Server selection timeout.
ROOTTRACE_ENABLE_MONGO_SHARDINGtrueAttempt sharded-cluster bootstrap. Set false for single-node Mongo (the compose file does).
ROOTTRACE_MONGO_SHARDING_STRICTtrue in prodFail hard versus warn when sharding setup fails.
ROOTTRACE_ELASTICSEARCH_HOSTempty on-premHTTPS Elasticsearch URL backing AI and semantic search. Empty cleanly disables those features. Regulated profiles reject plaintext HTTP.
ROOTTRACE_ELASTICSEARCH_ALLOW_INSECUREfalsePermit a plaintext Elasticsearch URL under a regulated profile. Use only when transport security is enforced elsewhere.

Security and auth

VariableDefaultMeaning
ROOTTRACE_APP_SECRETgeneratedMaster application secret. If unset and no file is given, one is generated and persisted in Mongo.
ROOTTRACE_APP_SECRET_FILEemptyPath to a mounted secret file (Kubernetes/Vault style). The inline variable wins when both are set.
ROOTTRACE_BOOTSTRAP_TOKENemptyOperator-held token required to claim the first local owner. It must be at least 32 characters on every on-prem installation: a published on-prem image refuses to start below that, and a source checkout outside production rejects the first-owner claim at sign-up instead. Generate it with openssl rand -hex 32. It cannot claim another account afterward; retain it as break-glass proof because local password recovery requires it together with TOTP or a recovery code.
ROOTTRACE_ADMIN_EMAILSemptyComma-separated platform-admin email allowlist. Set this before upgrading an email-first on-prem installation so its legacy platform admins retain access. Fresh local-username owners are platform admins automatically and do not need it.
ROOTTRACE_SSL_CERTFILE / ROOTTRACE_SSL_KEYFILEemptyIn-app TLS termination; both must be set to take effect. Leave empty behind the bundled nginx.
ROOTTRACE_JWT_ALGORITHMML-DSA-65 (RS256 when FIPS mode is enabled)Environment default for token signing. A platform admin can store ML-DSA-44, ML-DSA-65, ML-DSA-87, EdDSA, RS256, or ES256 in Flutter without restarting the API; the database selection wins and changing it immediately rotates to a newly generated key. Every API replica reads the selection and active keys from MongoDB. The ML-DSA choices are post-quantum. Current validated-provider FIPS mode requires RS256 or ES256.
ROOTTRACE_JWT_ISSUER / ROOTTRACE_JWT_AUDIENCEempty on-prem / roottrace-apiToken issuer and audience. The issuer is required on-prem and must equal the HTTPS origin of ROOTTRACE_PUBLIC_API_URL; startup fails otherwise.
ROOTTRACE_FIPS_MODEfalseFail startup unless the configured JWT primitive and active OpenSSL provider satisfy the enforced FIPS checks.
ROOTTRACE_ACCESS_TOKEN_MINUTES60 (cap 7200)Access token TTL.
ROOTTRACE_REFRESH_TOKEN_DAYS5 (cap 5)Refresh token TTL.
ROOTTRACE_PASSWORD_RESET_MINUTES30Password-reset token lifetime.
ROOTTRACE_EMAIL_CONFIRMATION_MINUTES60Email-confirmation token lifetime.
ROOTTRACE_EMAIL_MFA_CODE_MINUTES / _LENGTH10 / 6Email MFA code lifetime and digit count.
ROOTTRACE_SESSION_IDLE_TIMEOUT_MINUTES0 (off)Idle-session termination (STIG SRG-APP-000295).
ROOTTRACE_LOGIN_LOCKOUT_THRESHOLD / LOCKOUT_MINUTES10 / 15Failed-login lockout.
ROOTTRACE_REQUIRE_PRIVILEGED_MFAtrueRequire an enrolled MFA factor for admin and owner accounts. The local-owner setup flow guides operators to TOTP because it does not depend on email.
ROOTTRACE_PASSWORD_REQUIRE_COMPLEXITYtrue on-premRequire at least 12 characters with an uppercase letter, lowercase letter, digit, and symbol.
ROOTTRACE_PASSWORD_HISTORY_COUNT5Block reuse of the last N passwords.
ROOTTRACE_BREACHED_PASSWORD_CHECKtrue hosted; ignored on-premEnables HaveIBeenPwned screening for hosted-cloud password flows. On-prem code never makes this call, regardless of the value.
ROOTTRACE_ACCOUNT_INACTIVITY_DISABLE_DAYS0 (off)Auto-disable idle accounts (DoD baseline: 35).
ROOTTRACE_ALLOWED_ORIGINSroottrace.io origins in prodCSV CORS allowlist; set to your dashboard origin.
ROOTTRACE_ALLOWED_ORIGIN_REGEXemptyCORS origin regex.
ROOTTRACE_TRUSTED_PROXY_CIDRS127.0.0.1/32,::1/128CIDRs whose forwarded headers are trusted for client IP.
ROOTTRACE_TRUST_CDN_CLIENT_IP_HEADERSfalseTrust CF-Connecting-IP / True-Client-IP; enable only behind a CDN that sets them, otherwise IP allowlists become spoofable.
ROOTTRACE_WEBAUTHN_RP_IDpublic app hostPasskey relying-party domain. Set this when using a custom dashboard domain.
ROOTTRACE_WEBAUTHN_RP_NAMERootTracePasskey relying-party display name.
ROOTTRACE_WEBAUTHN_ORIGINSpublic app originExact comma-separated browser origins allowed for passkey ceremonies.
ROOTTRACE_WEBAUTHN_REQUIRE_USER_VERIFICATIONtrueRequire authenticator biometric/PIN verification for passkeys.

The API exposes WebAuthn enrollment and assertion endpoints, but the current Flutter client does not yet manage passkeys. Use TOTP for accounts operated through the shipped client. A passkey-only account can use one of its saved single-use recovery codes at login.

Workspace security administration

Workspace owners and admins configure tenant-applicable controls in Flutter under Settings → Security & Compliance:

  • security_profile: default, regulated, or air_gapped
  • privileged MFA
  • idle-session timeout
  • failed-login threshold and lockout duration
  • concurrent-session cap
  • inactive-account disable period
  • logon consent banner and text

Blank numeric values inherit the deployment defaults. For users in several workspaces, RootTrace applies the strictest applicable session/account value.

The same screen shows the effective deployment profile, FIPS/JWT and WebAuthn state, token lifetimes, password policy, rate limiting, audit chaining, external-secret and metrics authentication posture, request limits, embedding/email posture, Elasticsearch TLS, proxy/CDN trust, browser origins, private egress exceptions, collector-token lifetime, and direct TLS. Those values are read-only to workspace admins because they belong to the shared API process. Changing them per tenant would not reconfigure the proxy, OpenSSL provider, or server socket. Platform admins can select the deployment security profile and JWT signing algorithm in Flutter without restarting the API. The profile is accepted only when the current process controls satisfy it. JWT changes rotate the shared database signing key before the update returns.

Licensing

VariableDefaultMeaning
ROOTTRACE_LICENSE_ISSUER / AUDIENCEhttps://roottrace.io / roottrace-on-premExpected license claims.
ROOTTRACE_LICENSE_KMS_KEY_IDalias/roottrace-license-signingRootTrace Cloud only. AWS KMS key ARN, key id, or alias for the ECC_NIST_P256 SIGN_VERIFY license key.
ROOTTRACE_LICENSE_KMS_REGIONAWS_REGION, then AWS_DEFAULT_REGION, then us-east-1AWS region containing the license signing key.

The verification key is compiled into src/roottrace_license.py. The private key never leaves AWS KMS. The RootTrace Cloud runtime identity needs kms:Sign and kms:GetPublicKey on that key. Customer installs need no AWS credentials. ROOTTRACE_FIPS_MODE=true makes the KMS client use the regional AWS FIPS endpoint.

Grant the RootTrace Cloud runtime role only the operations it uses:

{
  "Version": "2012-10-17",
  "Statement": [{
    "Sid": "SignRootTraceLicenses",
    "Effect": "Allow",
    "Action": ["kms:Sign", "kms:GetPublicKey"],
    "Resource": "arn:aws:kms:us-east-1:123456789012:key/REPLACE_WITH_KEY_ID"
  }]
}

For local cloud development, configure a named AWS CLI profile, preferably through IAM Identity Center, and expose only its name and the non-secret configuration to the process:

aws configure sso --profile roottrace-license-signing
aws sso login --profile roottrace-license-signing
export AWS_PROFILE=roottrace-license-signing
export AWS_DEFAULT_REGION=us-east-1
export ROOTTRACE_LICENSE_KMS_KEY_ID=alias/roottrace-license-signing
export ROOTTRACE_LICENSE_KMS_REGION=us-east-1

Confirm the profile and then start the source checkout in cloud mode from the same shell:

aws sts get-caller-identity --profile roottrace-license-signing
export ROOTTRACE_DEPLOYMENT_MODE=cloud

RootTrace reads the process environment and does not load .env_dev or another dotenv file itself. The launcher must export these values before importing the application.

The profile belongs to that host user. A container does not inherit the host's AWS profile. Do not work around that by mounting credentials or passing access keys into the customer Compose stack: the published on-prem image cannot issue licenses. Run local cloud development as the configured host user, or attach a workload role to the cloud compute service.

Do not write AWS access or session keys to a dotenv file or Parameter Store. Production cloud deployments use their workload identity. Customer on-prem deployments do not receive these settings.

Email

Setting ROOTTRACE_SMTP_HOST switches all mail to direct SMTP through your relay, bypassing every cloud path. Leaving it empty with the relay disabled means email is simply not sent.

On an empty on-prem database, the first owner can register with a local username, the configured bootstrap token, and no email address. The account is confirmed locally, public registration locks automatically, and the account has no email password-reset path. Keep the bootstrap token in the deployment secret manager and enroll TOTP; password recovery requires both that token and a current authenticator or recovery code. Later password-based users need SMTP-backed invitations. Sites without SMTP must provision users and memberships with SCIM; SSO alone does not create an account.

VariableDefaultMeaning
ROOTTRACE_EMAIL_SENDING_ENABLEDfalse on-prem; true otherwiseGlobal outbound-email switch.
ROOTTRACE_SMTP_HOSTemptySMTP relay host; non-empty gates the SMTP path.
ROOTTRACE_SMTP_PORT587Relay port.
ROOTTRACE_SMTP_USERNAME / ROOTTRACE_SMTP_PASSWORDemptyRelay credentials.
ROOTTRACE_SMTP_STARTTLS / ROOTTRACE_SMTP_SSLtrue / falseSTARTTLS, or implicit TLS.
ROOTTRACE_SMTP_TIMEOUT_SECONDS15Send timeout.
ROOTTRACE_EMAIL_FROM_ADDRESS / FROM_NAME / REPLY_TORootTrace defaultsSender identity; OEM installs should override.
ROOTTRACE_ON_PREM_EMAIL_RELAY_ENABLEDfalseOpt-in relay through the vendor cloud; keep false when air-gapped.

AI, LLM, and embeddings

VariableDefaultMeaning
ROOTTRACE_LLM_PROVIDERanthropicanthropic, openai_compatible (self-hosted or any OpenAI-standard endpoint), or disabled (deterministic local fallback, no LLM calls).
ROOTTRACE_CLAUDE_API_KEYemptyAnthropic API key (ANTHROPIC_API_KEY also accepted); empty leaves the Anthropic path inert.
ROOTTRACE_CLAUDE_RECOMMENDATION_MODELclaude-sonnet-5Model id (also the default model for the OpenAI-compatible path).
ROOTTRACE_CLAUDE_BASE_URLemptyProxy or gateway base URL for the Anthropic path (in-network for air-gapped installs).
ROOTTRACE_LLM_OPENAI_BASE_URLemptyBase URL of an OpenAI-compatible server (Ollama, vLLM, llama.cpp, NVIDIA NIM); /chat/completions is appended. Required when the provider is openai_compatible.
ROOTTRACE_LLM_OPENAI_MODELemptyModel name sent to the OpenAI-compatible server.
ROOTTRACE_LLM_OPENAI_API_KEYemptyOptional bearer token for that server.
ROOTTRACE_OPENAI_TIMEOUT_SECONDS20LLM request timeout in seconds. Increase it for slower local models.
ROOTTRACE_EMBEDDING_OFFLINEtrue on-premNever download the embedding model at runtime; sets the HuggingFace offline flags.
ROOTTRACE_EMBEDDING_MODEL_PATHemptyOptional replacement model directory. The on-prem image already contains the default model; leave this unset unless mounting a tested replacement.
ROOTTRACE_EMBEDDING_MODELsentence-transformers/all-mpnet-base-v2Model id (baked into the on-prem image).
ROOTTRACE_EMBEDDING_DEVICEautoTorch device.
ROOTTRACE_EMBEDDING_CPU_THREADS / WORKER_THREADS1 / 1Embedding compute threads.
ROOTTRACE_EMBEDDING_RESERVED_CPU_CORES1Cores reserved for the managed local embedding process; also feeds the auto worker count.
ROOTTRACE_EMBEDDING_MODEL_SERVICE_ENABLEDtrueRun the managed embedding model service beside the API. This is a loopback-only internal process, not a supported remote-offload endpoint.
ROOTTRACE_EMBEDDING_MODEL_SERVICE_HOST / PORT127.0.0.1 / launcher-selectedLocal model-service listener. The host must remain loopback; the launcher assigns a port when zero.
ROOTTRACE_PRELOAD_EMBEDDING_MODELtrueLoad the model at startup.
ROOTTRACE_EMBEDDING_LIFECYCLE_ENABLEDfalse in Compose (true application default)Attach the current index-age ILM policy. Keep the shipped Compose default off until it is replaced with document-safe retention; see the sizing guide.
ROOTTRACE_EMBEDDING_LIFECYCLE_POLICYroottrace-vector-retentionBase name for generated Elasticsearch lifecycle policies.
ROOTTRACE_EMBEDDING_RETENTION_DAYS365Fallback vector-document and lifecycle age when no workspace retention is supplied.

The OpenAI-compatible base URL is resolved from inside the API container or pod. Use the model server's network hostname. localhost only works when the model server shares the API container's network namespace.

The image also disables all third-party telemetry unconditionally (DO_NOT_TRACK, HF_HUB_DISABLE_TELEMETRY, and related flags).

Self-monitoring (APM)

The server can monitor itself with the same APM pipeline your own services use.

VariableDefaultMeaning
ROOTTRACE_APM_TOKENunsetCollector token enabling self-monitoring (falls back to ROOTTRACE_COLLECTOR_TOKEN); unset leaves it off.
ROOTTRACE_API_URLhttp://127.0.0.1:<listen port>/apiWhere APM data flushes. The server passes this explicitly rather than inheriting the SDK's cloud default, so an unset value keeps self-monitoring on the loopback interface.
ROOTTRACE_APM_SERVICEroottrace-apiReported service name.
ROOTTRACE_APM_INTERVAL_SECONDS30Flush interval.
ROOTTRACE_APM_LOGSonSet false to disable log shipping.
ROOTTRACE_APM_LOG_LEVELROOTTRACE_LOG_LEVELMinimum level shipped.

The Compose template passes all six settings and defaults ROOTTRACE_API_URL to http://127.0.0.1:8090/api, keeping self-monitoring inside the API container. After first sign-in, create a collector token and set it as ROOTTRACE_APM_TOKEN; leave the token empty to keep self-monitoring disabled.

Rate limiting and ingest

VariableDefaultMeaning
ROOTTRACE_RATE_LIMIT_ENABLEDtrue in prodPer-client API rate limiting.
ROOTTRACE_RATE_LIMIT_REQUESTS_PER_MINUTE120The limit.
ROOTTRACE_RATE_LIMIT_BACKENDmemorymemory is per-process; use mongo when running multiple workers or replicas.
ROOTTRACE_COLLECTOR_INGEST_RATE_LIMIT_ENABLEDtruePer-collector ingest floor.
ROOTTRACE_COLLECTOR_INGEST_MIN_INTERVAL_SECONDS45Minimum interval between a collector's ingests.

Collectors and fleet

VariableDefaultMeaning
ROOTTRACE_COLLECTOR_HEARTBEAT_EXPECTED_SECONDS180Staleness threshold before a collector counts as missing.
ROOTTRACE_COLLECTOR_TOKEN_TTL_DAYS0 (never)Enrollment token expiry.
ROOTTRACE_COLLECTOR_TOKEN_ROTATION_OVERLAP_HOURS24Grace period in which a replaced collector token remains valid.
ROOTTRACE_COLLECTOR_IMAGEempty; required by ComposeImmutable agent index digest from the manifest inside the signature-verified deployment archive. The air_gapped profile also accepts the bundle's exact roottrace-airgap/agent:sha256-… offline tag.
ROOTTRACE_APM_ALERT_AUTO_RESOLVE_ENABLED / _SECONDStrue / 900Auto-resolve stale APM issues.

Retention and audit

VariableDefaultMeaning
ROOTTRACE_SERVER_RECORD_RETENTION_DAYS365Telemetry retention (license and plan can clamp it; on-prem 0 means unlimited via the license catalog).
ROOTTRACE_AUDIT_RETENTION_DAYS365 (floor 30)Security audit event retention, independent of plan retention.
ROOTTRACE_AUDIT_HASH_CHAIN_ENABLEDtrueTamper-evident audit hash chaining.
ROOTTRACE_AUDIT_SYSLOG_ENABLEDfalseRFC 5424 forwarding to a SIEM.
ROOTTRACE_AUDIT_SYSLOG_HOST / PORT / PROTOCOLempty / 514 / udpSyslog target (tcp supported).

Webhooks and notifications

VariableDefaultMeaning
ROOTTRACE_WEBHOOK_MAX_ATTEMPTS5Delivery attempts.
ROOTTRACE_WEBHOOK_RETRY_BASE_SECONDS30Backoff base.
ROOTTRACE_NOTIFICATION_ALLOW_INSECURE_WEBHOOKSfalseAllow plaintext or unverified-TLS webhook targets.
ROOTTRACE_NOTIFICATION_CA_BUNDLEemptyCustom CA bundle path (mount the file into the container) for webhook TLS.
ROOTTRACE_OUTBOUND_ALLOWED_PRIVATE_CIDRSemptyComma-separated private CIDRs that webhooks and repository SSH links may contact. Private destinations are blocked unless listed.

Webhook URLs must use HTTPS by default and cannot contain URL credentials. The HTTP client checks every DNS answer on every connection, does not cache DNS, and applies the same policy after redirects. Responses are bounded before parsing or recording.

ROOTTRACE_NOTIFICATION_ALLOW_INSECURE_WEBHOOKS=true permits HTTP webhook URLs and disables webhook TLS verification. It does not permit private destinations. For an internal receiver you must separately list its network in ROOTTRACE_OUTBOUND_ALLOWED_PRIVATE_CIDRS.

Example for two explicitly approved internal networks:

ROOTTRACE_OUTBOUND_ALLOWED_PRIVATE_CIDRS=10.40.8.0/24,fd00:40:8::/64

Use narrow service subnets. Do not allow metadata, loopback, or an entire VPC when a smaller range is available.

API request and metrics security

VariableDefaultMeaning
ROOTTRACE_API_MAX_REQUEST_BODY_BYTES16777216Maximum buffered request body before the API returns HTTP 413.
ROOTTRACE_API_MAX_STREAM_BODY_BYTES67108864Maximum body for the two NDJSON collector stream endpoints.
ROOTTRACE_METRICS_BEARER_TOKENemptyBearer token required by /metrics. Outside development mode, /metrics is disabled when this is empty.

The request limits are enforced while reading the ASGI body, before FastAPI, Pydantic, JSON, protobuf, or webhook-signature parsing. They apply to requests with Content-Length and to chunked transfer encoding. Endpoint-specific ceilings remain stricter for client errors, log ingest, OTLP, and Stripe webhooks. A reverse proxy can impose a lower limit; keep its tested body limit at least as large as the largest enabled ingest request.

Configure a high-entropy metrics token through the deployment's secret manager:

ROOTTRACE_METRICS_BEARER_TOKEN="$(openssl rand -hex 32)"
curl -fsS \
  -H "Authorization: Bearer $ROOTTRACE_METRICS_BEARER_TOKEN" \
  http://127.0.0.1:8090/metrics

/readyz and /healthz/ remain unauthenticated so orchestrator probes can use them. Keep both on an internal listener or restrict them at the proxy/firewall.

VariableDefaultMeaning
ROOTTRACE_VCS_CACHE_DIR/var/tmp/roottrace-vcsGit mirror cache directory (the compose file mounts a volume here).
ROOTTRACE_VCS_MIRROR_MAX_BYTES / CACHE_MAX_BYTES1 GiB / 2 GiBCache size bounds.
ROOTTRACE_VCS_MIRROR_MAX_AGE_DAYS30Mirror expiry.

There is no SSH identity to configure here. Each repository link carries its own deploy key, generated in the app when you create the link; you install the public half as a read-only deploy key on the repository host. Nothing else in the server opens an SSH connection.

Repository SSH destinations use the same private-network CIDR policy as webhooks. Before ls-remote, clone, or fetch, RootTrace resolves every address, rejects the destination if any answer is non-public and not explicitly allowed, and pins SSH to the validated address while retaining the original hostname for host-key verification.

Branding, OEM, and public URLs

VariableDefaultMeaning
ROOTTRACE_PRODUCT_NAMERootTraceProduct name in the UI and email.
ROOTTRACE_VENDOR_MARKETING_ENABLEDtrue (compose: false)Suppress vendor marketing surfaces on OEM installs.
ROOTTRACE_SUPPORT_EMAIL / TERMS_URL / PRIVACY_URLRootTrace defaultsSupport and legal links.
ROOTTRACE_PUBLIC_APP_URLempty on-premExternally visible dashboard URL. Required: an on-prem server refuses to start in production without an HTTPS value.
ROOTTRACE_PUBLIC_API_URLempty on-premExternally visible API base. Required, same rule.

Compose-level variables

These are read by deploy/docker-compose.yml itself (interpolation), not by the application:

VariableDefaultMeaning
MONGO_IMAGE / NGINX_IMAGEpinned in deploy/.env.exampleReviewed third-party image digest references.
ROOTTRACE_IMAGE / ROOTTRACE_COLLECTOR_IMAGErequiredRootTrace release image digest references.
ROOTTRACE_PULL_POLICYmissingCompose pull policy; the air-gapped bundle sets never.
MONGO_ROOT_USER / MONGO_ROOT_PASSWORDuser defaults; password requiredMongo bootstrap administrator credentials.
MONGO_APP_USER / MONGO_APP_PASSWORDuser defaults; password requiredLeast-privilege application credentials interpolated into the Mongo URI.
MONGO_CACHE_GB1WiredTiger cache size.
HTTPS_PORT443Host port for the nginx TLS listener.
ROOTTRACE_APP_SECRET_HOST_PATH./secrets/app_secretHost path mounted as the application secret.
ROOTTRACE_DATA_SUBNET / ROOTTRACE_APP_SUBNETprivate /24 networksOverride both if they overlap site networks.
ROOTTRACE_NGINX_IP / ROOTTRACE_API_IPaddresses in the app subnetStable proxy and API addresses. Keep proxy trust values aligned with the nginx address.
ROOTTRACE_APP_NETWORK_INTERNALfalseSet true to remove external routing from the application network.

Cloud-internal variables

These drive the hosted service and do nothing on an on-prem install. Leave them unset; they are listed only so you can recognize them in a settings dump.

Variable groupPurpose
ROOTTRACE_SENDGRID_*Cloud email transport. On-prem uses ROOTTRACE_SMTP_* instead.
ROOTTRACE_CLOUD_EMAIL_RELAY_URL, ROOTTRACE_ADMIN_EVENT_EMAILVendor-side relay and notification address.
ROOTTRACE_STRIPE_MODEsandbox or production billing.
ROOTTRACE_STRIPE_{SANDBOX,PRODUCTION}_{PUBLISHABLE_KEY,SECRET_KEY,WEBHOOK_SECRET}Stripe credentials.
ROOTTRACE_STRIPE_{STARTUP,GROWTH,SCALE}_{SANDBOX,PRODUCTION}_{PRICE_ID,PRODUCT_ID}Per-tier Stripe identifiers.
ROOTTRACE_STRIPE_SUCCESS_URL / CANCEL_URL / BILLING_PORTAL_RETURN_URLCheckout redirect overrides.