Environment variables
All of the following environment variables are required to operate the system.
| key | type | comment |
|---|---|---|
CADDY__D2E__PUBLIC_FQDN | string | Public FQDN |
DOCKER_TAG_NAME | string | Default tag |
ENV_TYPE | string | Local or remote; also refers to .env.${ENV_TYPE} |
LOGTO__D2E_APP__CLIENT_ID | string | Logto Data2Evidence app client ID |
LOGTO__D2E_APP__CLIENT_SECRET | password | Logto Data2Evidence app client secret |
LOGTO__D2E_DATA__CLIENT_ID | string | Logto Data2Evidence data client ID |
LOGTO__D2E_DATA__CLIENT_SECRET | password | Logto Data2Evidence data client secret |
LOGTO__D2E_SVC__CLIENT_ID | string | Logto Data2Evidence svc client ID |
LOGTO__D2E_SVC__CLIENT_SECRET | password | Logto Data2Evidence svc client secret |
LOGTO_API_M2M_CLIENT_ID | string | Logto API M2M client ID |
LOGTO_API_M2M_CLIENT_SECRET | password | Logto API M2M client secret |
D2E_IDP | string | Identity provider the services and setup scripts authenticate against. trex from v0.19 |
D2E_IDP_MODE | string | trex (new installations) or logto-federated (upgraded installations whose users are in Logto). See Identity provider |
D2E__SEED_USER | json | Initial admin account created in trex on a new installation: {"username":"admin","initialPassword":"..."}. Not added to upgraded installations |
TREX_ROOT_KEY | base64 | Root encryption key for trex. Random 32 bytes, base64-encoded (at least 40 characters) |
TREX__OIDC__WEBAPI_CLIENT_ID | string | Client ID WebAPI uses with the trex OIDC provider. Default d2e-webapi |
TREX__OIDC__WEBAPI_CLIENT_SECRET | password | Client secret WebAPI uses with the trex OIDC provider. Required: services do not start without it |
TREX__SERVICE_ROLE_KEY | password | Created by trex on first start and written to the env file by d2e start. Do not set it by hand |
MINIO__SECRET_KEY | password | Meilisearch Secret_Key |
PG_ADMIN_PASSWORD | password | Admin permissions |
PG_SUPER_PASSWORD | password | All permissions |
PG_WRITE_PASSWORD | password | Write permissions only |
PG_STUDY_RESULTS_ADMIN_PASSWORD | password | Study results admin permissions |
PG_STUDY_RESULTS_READ_PASSWORD | password | Study results read permissions |
DEMO__DB_PASSWORD | string | Generated password |
TLS__CADDY_DIRECTIVE | string | Generate self-signed or public x509 certificate |
PROJECT_NAME | string | Default project name |
USER_MGMT__ROLE_SOURCE | string | Where user management reads role assignments from. trex from v0.19 (previously logto) |
LOGTO__CLIENTID_PASSWORD__BASIC_AUTH | base64 encoded | From LOGTO_API_M2M_CLIENT_ID & LOGTO_API_M2M_CLIENT_SECRET |
PG__LOGTO_MANAGER_PASSWORD | password | Logto manager password |
DB_CREDENTIALS__INTERNAL__DECRYPT_PRIVATE_KEY | rsaPrivateKey | To encrypt DB credentials entered in Admin>Setup>Databases>Configure (no passphrase) |
DB_CREDENTIALS__INTERNAL__PUBLIC_KEY | x509publicKey | To encrypt DB credentials string |
D2E_CPU_LIMIT | string | Dynamically calculated limit |
D2E_MEMORY_LIMIT | string | Dynamically calculated limit |
D2E_SWAP_LIMIT | string | Dynamically 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.
| key | type | comment |
|---|---|---|
IDP__GROUP_ROLE_MAPPING | json | Maps 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_ENABLED | bool | logto-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_URIS | csv | Additional 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_MAX | number | Maximum number of sign-in requests per client address before trex rate-limits them. Default 2000 |
LOGTO__ENABLE_REGISTRATION | bool | Shows the self-service Register button on the Logto sign-in screen. Default false |
LOGTO__SOCIAL_SIGNIN_TARGETS | csv | Logto 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.