Skip to main content

Environment variables

All of the following environment variables are required to operate the system.

keytypecomment
CADDY__D2E__PUBLIC_FQDNstringPublic FQDN
DOCKER_TAG_NAMEstringDefault tag
ENV_TYPEstringLocal or remote; also refers to .env.${ENV_TYPE}
LOGTO__D2E_APP__CLIENT_IDstringLogto Data2Evidence app client ID
LOGTO__D2E_APP__CLIENT_SECRETpasswordLogto Data2Evidence app client secret
LOGTO__D2E_DATA__CLIENT_IDstringLogto Data2Evidence data client ID
LOGTO__D2E_DATA__CLIENT_SECRETpasswordLogto Data2Evidence data client secret
LOGTO__D2E_SVC__CLIENT_IDstringLogto Data2Evidence svc client ID
LOGTO__D2E_SVC__CLIENT_SECRETpasswordLogto Data2Evidence svc client secret
LOGTO_API_M2M_CLIENT_IDstringLogto API M2M client ID
LOGTO_API_M2M_CLIENT_SECRETpasswordLogto API M2M client secret
D2E_IDPstringIdentity provider the services and setup scripts authenticate against. trex from v0.19
D2E_IDP_MODEstringtrex (new installations) or logto-federated (upgraded installations whose users are in Logto). See Identity provider
D2E__SEED_USERjsonInitial admin account created in trex on a new installation: {"username":"admin","initialPassword":"..."}. Not added to upgraded installations
TREX_ROOT_KEYbase64Root encryption key for trex. Random 32 bytes, base64-encoded (at least 40 characters)
TREX__OIDC__WEBAPI_CLIENT_IDstringClient ID WebAPI uses with the trex OIDC provider. Default d2e-webapi
TREX__OIDC__WEBAPI_CLIENT_SECRETpasswordClient secret WebAPI uses with the trex OIDC provider. Required: services do not start without it
TREX__SERVICE_ROLE_KEYpasswordCreated by trex on first start and written to the env file by d2e start. Do not set it by hand
MINIO__SECRET_KEYpasswordMeilisearch Secret_Key
PG_ADMIN_PASSWORDpasswordAdmin permissions
PG_SUPER_PASSWORDpasswordAll permissions
PG_WRITE_PASSWORDpasswordWrite permissions only
PG_STUDY_RESULTS_ADMIN_PASSWORDpasswordStudy results admin permissions
PG_STUDY_RESULTS_READ_PASSWORDpasswordStudy results read permissions
DEMO__DB_PASSWORDstringGenerated password
TLS__CADDY_DIRECTIVEstringGenerate self-signed or public x509 certificate
PROJECT_NAMEstringDefault project name
USER_MGMT__ROLE_SOURCEstringWhere user management reads role assignments from. trex from v0.19 (previously logto)
LOGTO__CLIENTID_PASSWORD__BASIC_AUTHbase64 encodedFrom LOGTO_API_M2M_CLIENT_ID & LOGTO_API_M2M_CLIENT_SECRET
PG__LOGTO_MANAGER_PASSWORDpasswordLogto manager password
DB_CREDENTIALS__INTERNAL__DECRYPT_PRIVATE_KEYrsaPrivateKeyTo encrypt DB credentials entered in Admin>Setup>Databases>Configure (no passphrase)
DB_CREDENTIALS__INTERNAL__PUBLIC_KEYx509publicKeyTo encrypt DB credentials string
D2E_CPU_LIMITstringDynamically calculated limit
D2E_MEMORY_LIMITstringDynamically calculated limit
D2E_SWAP_LIMITstringDynamically calculated limit

Identity provider settings​

The following variables are optional. They change how sign-in works from v0.19 onwards. See Identity provider for background.

keytypecomment
IDP__GROUP_ROLE_MAPPINGjsonMaps groups from an upstream identity provider to Data2Evidence roles, keyed by the provider: {"<provider>":{"<d2e scope>":"<upstream group id>"}}, for example {"entra":{"role.systemadmin":"1f0e...","role.researcher.demo":"9ab3..."}}. Valid scopes are role.systemadmin, role.useradmin, role.dashboardviewer and role.researcher.<dataset_code>. If unset, empty or malformed, no group maps to a role
TREX_NATIVE_PASSWORD_LOGIN_ENABLEDboollogto-federated mode only. Shows the Data2Evidence password form on the sign-in page next to Sign in with Logto. Default false
TREX_OIDC__EXTRA_REDIRECT_URIScsvAdditional sign-in callback URLs, for example when the Researcher Portal is reached under another hostname or port. A callback URL that is not registered is refused
TREX__AUTH_RATE_LIMIT_MAXnumberMaximum number of sign-in requests per client address before trex rate-limits them. Default 2000
LOGTO__ENABLE_REGISTRATIONboolShows the self-service Register button on the Logto sign-in screen. Default false
LOGTO__SOCIAL_SIGNIN_TARGETScsvLogto social connectors to show on the sign-in screen. Defaults to the target of LOGTO__CONNECTOR_CONFIG

The following variables were removed in v0.19 and can be deleted from your env file: REDIS_PASSWORD, REDIS_HOST, REDIS_PORT, DICOM__HEALTH_CHECK_PASSWORD and SQL_RETURN_ON.