Skip to main content

Node Environment Variables

This is the consolidated reference for node environment variables used by node-core.

Prefix Configuration

The default environment variable prefix is TWIN_, so variables look like TWIN_PORT and TWIN_ENTITY_STORAGE_CONNECTOR_TYPE.

The prefix is configurable for custom node implementations:

  • Set envPrefix in node options when calling run(...).
  • Or pass the CLI option --env-prefix <PREFIX>.

When you change the prefix, all variables in this document use your custom prefix instead of TWIN_.

Core Runtime Variables

VariablePossible ValuesDefaultNotes
TWIN_DEBUGtrue, falsefalseEnables engine debug mode.
TWIN_SILENTtrue, falsefalseSuppresses console output.
TWIN_STRICT_ENVerror, warn, ignoreerrorerror throws on unrecognised TWIN_* variables; warn logs a warning; ignore skips validation. Any other value is rejected at startup.
TWIN_ENV_ALLOW_LISTComma-separated namesNoneEnv var names exempt from the unknown-key check. Supports wildcard patterns with a * suffix (e.g. TWIN_MY_EXTENSION_SECRET, TWIN_MY_EXT_*).
TWIN_STORAGE_FILE_ROOTFile system pathNoneRoot directory for file-based state and storage.
TWIN_STATE_FILENAMEFile name or pathengine-state.json (when storage root is set)State file used by node state storage.
TWIN_TENANT_ENABLEDtrue, falsefalseEnables tenant-scoped flow.
TWIN_SCHEMA_MIGRATION_ENABLEDtrue, falsetrueEnables automatic schema migration at startup. Set to false to disable schema version migration.
TWIN_EXTENSIONSComma-separated module listNoneExtension modules to load. Supports local, npm:, and https: entries.

Bootstrap Dev Variables

These variables are only read when running the bootstrap-dev CLI command. They are not used during normal server startup.

VariablePossible ValuesDefaultNotes
TWIN_FEATURESComma-separated listadmin-user,walletFeatures to enable during bootstrap (e.g. admin-user).
TWIN_NODE_IDENTITYDID stringGeneratedNode identity DID. Generated if not provided.
TWIN_NODE_MNEMONICMnemonic stringGeneratedNode identity mnemonic. Generated if not provided.
TWIN_TENANT_IDUUID stringGeneratedDefault tenant ID.
TWIN_TENANT_API_KEYStringGeneratedDefault tenant API key.
TWIN_ORGANIZATION_IDENTITYDID stringGeneratedOrganisation identity DID. Generated if not provided.
TWIN_ORGANIZATION_MNEMONICMnemonic stringGeneratedOrganisation identity mnemonic. Generated if not provided.
TWIN_ADMIN_USER_IDENTITYDID stringGeneratedAdmin user identity DID. Only used when admin-user feature is enabled.
TWIN_ADMIN_USER_MNEMONICMnemonic stringGeneratedAdmin user mnemonic. Only used when admin-user feature is enabled.
TWIN_ADMIN_USER_NAMEEmail or stringadmin@tenant (multi-tenant) or admin@node (single tenant)Admin user name. Only used when admin-user feature is enabled.
TWIN_ADMIN_USER_PASSWORDStringGeneratedAdmin user password. Only used when admin-user feature is enabled.
TWIN_ADMIN_USER_SCOPEComma-separated listtenant-admin,user-admin (multi-tenant) or user-admin (single-tenant)Admin user permission scopes. Only used when admin-user feature is enabled.

Server Variables

VariablePossible ValuesDefaultNotes
TWIN_PORTInteger3000 (web server fallback)API server port.
TWIN_HOSTHost name or IPlocalhost (web server fallback)API server host.
TWIN_PUBLIC_ORIGINURLNonePublic API origin, for example https://api.example.com:443.
TWIN_CORS_ORIGINSComma-separated origins* (if not set by runtime config)CORS allow list.
TWIN_HTTP_METHODSComma-separated HTTP methodsGET,POST,PUT,DELETE,OPTIONSCORS methods.
TWIN_HTTP_ALLOWED_HEADERSComma-separated headersRuntime dependentCORS allowed headers.
TWIN_HTTP_EXPOSED_HEADERSComma-separated headersRuntime dependentCORS exposed headers.
TWIN_HTTP_BODY_LIMITSComma-separated name=bytes pairsRuntime dependentNamed request body limits for REST routes, e.g. default=2097152,large=26214400. Unset keeps the 1 MiB default and the 25 MiB large built-in.

Connector and Component Selection Variables

VariablePossible ValuesDefaultNotes
TWIN_ENTITY_STORAGE_CONNECTOR_TYPEfile, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresqlNoneComma-separated list allowed.
TWIN_ENTITY_STORAGE_CONNECTOR_DEFAULTAny configured entity storage typeFirst configured typeDefault entity storage connector.
TWIN_BLOB_STORAGE_CONNECTOR_TYPEmemory, file, ipfs, aws-s3, azure-storage, gcp-storageNoneComma-separated list allowed.
TWIN_BLOB_STORAGE_CONNECTOR_DEFAULTAny configured blob storage typeFirst configured typeDefault blob storage connector.
TWIN_VAULT_CONNECTORentity-storage, hashicorpNoneSelects vault backend.
TWIN_LOGGING_CONNECTORconsole, entity-storage, otel, fileNoneComma-separated list allowed.
TWIN_LOGGING_BATCH_SIZEIntegerNoneLogging batch size. Set to 1 to disable batching.
TWIN_LOGGING_SILENT_COMPONENTSComma-separated list of component class namesNoneA list of components to exclude from logging.
TWIN_LOGGING_BATCH_FLUSH_INTERVALInteger seconds5Logging batch flush interval.
TWIN_LOGGING_RETAIN_FORInteger minutes2880Age-based retention window for entity-storage logging. Set to 0 to disable age-based retention.
TWIN_LOGGING_MAX_ENTRIESInteger10000Count-based retention limit for entity-storage logging. Set to 0 to disable count-based retention.
TWIN_LOGGING_RETENTION_INTERVALInteger minutes5How often retention cleanup runs for entity-storage logging. Set to 0 to disable periodic cleanup.
TWIN_LOGGING_RETENTION_BATCH_SIZEInteger1000Maximum entries deleted per retention cleanup batch for entity-storage logging.
TWIN_LOGGING_FILE_DIRECTORYDirectory pathNoneDirectory to write log files into. Required when TWIN_LOGGING_CONNECTOR includes file.
TWIN_LOGGING_FILE_FILENAMEStringapp.logLog filename. Only used when TWIN_LOGGING_CONNECTOR includes file.
TWIN_LOGGING_FILE_MAX_FILE_SIZE_BYTESInteger bytes10485760Max log file size before rotation. Set to 0 to disable rotation. Only used when TWIN_LOGGING_CONNECTOR includes file.
TWIN_LOGGING_FILE_MAX_RETAINED_FILESInteger5Number of rotated log files to retain. Set to 0 to keep all. Only used when TWIN_LOGGING_CONNECTOR includes file.
TWIN_EVENT_BUS_CONNECTORlocalNoneSelects event bus connector.
TWIN_EVENT_BUS_COMPONENTserviceNoneSelects event bus component implementation.
TWIN_MESSAGING_EMAIL_CONNECTORentity-storage, awsNoneMessaging email connector type.
TWIN_MESSAGING_SMS_CONNECTORentity-storage, awsNoneMessaging SMS connector type.
TWIN_MESSAGING_PUSH_NOTIFICATION_CONNECTORentity-storage, awsNoneMessaging push connector type.
TWIN_TELEMETRY_CONNECTORentity-storage, open-telemetry, silent (comma-separated for multiple)NoneTelemetry connector type. When multiple values are provided, a multi-connector is created automatically as the default.
TWIN_TELEMETRY_METRICS_PRODUCERSsystem, process (comma-separated)system,processMetrics producer types to enable.
TWIN_TELEMETRY_SILENT_COMPONENTSComma-separated list of component class namesNoneA list of components to exclude from telemetry.
TWIN_TRACING_CONNECTORentity-storage, open-telemetry, silent (comma-separated for multiple)NoneTracing connector type. When multiple values are provided, a multi-connector is created automatically as the default.
TWIN_TRACING_SILENT_COMPONENTSComma-separated list of component class namesNoneA list of components to exclude from tracing.
TWIN_FAUCET_CONNECTORentity-storage, iotaNoneFaucet connector type.
TWIN_WALLET_CONNECTORentity-storage, iotaNoneWallet connector type.
TWIN_NFT_CONNECTORentity-storage, iotaNoneNFT connector type.
TWIN_NFT_PACKAGE_IDStringNoneCustom deployed package id for the NFT contract.
TWIN_NOTARIZATION_CONNECTORentity-storage, iotaNoneNotarization connector type.
TWIN_IDENTITY_CONNECTORentity-storage, iotaNoneIdentity connector type.
TWIN_IDENTITY_RESOLVER_CONNECTORentity-storage, iota, universalNoneIdentity resolver connector type.
TWIN_IDENTITY_PROFILE_CONNECTORentity-storageNoneIdentity profile connector type.
TWIN_ATTESTATION_CONNECTORnftNoneAttestation connector type.
TWIN_DATA_CONVERTER_CONNECTORSjson, xmlNoneComma-separated list allowed.
TWIN_DATA_EXTRACTOR_CONNECTORSjson-pathNoneComma-separated list allowed.
TWIN_AUTOMATION_ACTION_TYPESfetchNoneAutomation action types to register.
TWIN_FEDERATED_CATALOGUE_FILTERSfilter-by-metadataNoneFederated catalogue filters.
TWIN_TRUST_GENERATORSjwt-verifiable-credentialNoneTrust generator registrations.
TWIN_TRUST_VERIFIERSjwt-verifiable-credentialNoneTrust verifier registrations.
TWIN_RIGHTS_MANAGEMENT_POLICY_ARBITERSpass-through, defaultNoneRights policy arbiter registrations.
TWIN_RIGHTS_MANAGEMENT_POLICY_ENFORCEMENT_PROCESSORSpass-through, defaultNoneRights policy enforcement processor registrations.
TWIN_RIGHTS_MANAGEMENT_POLICY_EXECUTION_ACTIONSloggingNoneRights policy execution action registrations.
TWIN_RIGHTS_MANAGEMENT_POLICY_INFORMATION_SOURCESidentity, static, identity-profileNoneRights policy information source registrations.
TWIN_RIGHTS_MANAGEMENT_POLICY_NEGOTIATORSpass-throughNoneRights policy negotiator registrations.
TWIN_RIGHTS_MANAGEMENT_POLICY_OBLIGATION_ENFORCERSpass-throughNoneRights policy obligation enforcer registrations.
TWIN_RIGHTS_MANAGEMENT_POLICY_REQUESTERSpass-throughNoneRights policy requester registrations.

Feature Toggle and Behaviour Variables

VariablePossible ValuesDefaultNotes
TWIN_ATTESTATION_VERIFICATION_METHOD_IDMethod id stringattestation-assertionDefault injected by node defaults.
TWIN_AUDITABLE_ITEM_GRAPH_ENABLEDtrue, falsefalseEnables auditable item graph. Also enabled automatically when notarization is configured.
TWIN_AUDITABLE_ITEM_STREAM_ENABLEDtrue, falsefalseEnables auditable item stream. Also enabled automatically when notarization is configured.
TWIN_BLOB_STORAGE_ENABLE_ENCRYPTIONtrue, falsefalseEnables blob encryption in blob storage component flow.
TWIN_DATA_PROCESSING_ENABLEDtrue, falsefalseEnables data processing.
TWIN_DATASPACE_ACTIVITY_LOGS_CLEANUP_INTERVALInteger seconds3600Dataspace clean-up interval.
TWIN_DATASPACE_AGREEMENT_CACHE_TTLInteger msConnector defaultTTL for caching dataspace agreements in the control plane service.
TWIN_DATASPACE_AGREEMENT_CACHE_MUTEX_TIMEOUTInteger msConnector defaultMutex timeout for the dataspace agreement cache in the control plane service.
TWIN_DATASPACE_AGREEMENT_SWEEP_INTERVALInteger msConnector defaultInterval between agreement sweep runs in the data plane service.
TWIN_DATASPACE_AGREEMENT_UNUSED_THRESHOLDInteger msConnector defaultTime after which an unused agreement is eligible for removal in the data plane service.
TWIN_DATASPACE_PUSH_RETRY_COUNTIntegerConnector defaultMaximum HTTP retry attempts per push delivery task execution in the data plane service.
TWIN_DATASPACE_PUSH_RETRY_BASE_DELAYInteger msConnector defaultBase delay for exponential backoff between push HTTP retries in the data plane service.
TWIN_DATASPACE_PUSH_SUBSCRIPTION_CLEANUP_INTERVALInteger msConnector defaultInterval between orphaned push subscription cleanup scans in the data plane service.
TWIN_DATASPACE_PUSH_TIMEOUTInteger msConnector defaultTimeout for each push delivery HTTP POST request in the data plane service.
TWIN_DATASPACE_RETRY_COUNTIntegerConnector defaultNumber of times to retry failed data plane tasks.
TWIN_DATASPACE_AUTO_START_TRANSFERStrue, falsefalseProvider auto-starts transfers on request; when false the provider must call transferStarted explicitly.
TWIN_DATASPACE_CALLBACK_PATHPathdataspace-control-planePath under which the dataspace control plane is mounted; combined with the public origin to build the consumer's advertised callback address.
TWIN_DATASPACE_DATA_PLANE_PATHPathNoneBase route path for the data plane service (mount-point prefix only, not full URL). Combined with public origin for PULL/PUSH transfers. Do not append sub-paths such as /entities or /inbox. Required for PULL or PUSH transfers.
TWIN_DATASPACE_ENABLEDtrue, falsefalseEnables dataspace features.
TWIN_DATASPACE_RETAIN_ACTIVITY_LOGS_FORInteger seconds, -1600Dataspace activity retention period.
TWIN_DATASPACE_STALLED_NEGOTIATION_TIMEOUTInteger seconds30Time before a stalled negotiation is timed out.
TWIN_DATASPACE_STALLED_TRANSFER_TIMEOUTInteger seconds30Time before a stalled consumer-initiated transfer is timed out.
TWIN_DATASPACE_PROVIDER_TRANSFER_IDLE_TIMEOUTInteger secondsNoneIdle window for provider-managed transfers before the idle policy marks the transfer as stalled.
TWIN_DATASPACE_PROVIDER_TRANSFER_POLICY_SWEEP_INTERVALInteger secondsNoneSweep interval for the provider idle transfer policy.
TWIN_DOCUMENT_MANAGEMENT_ENABLEDtrue, falsefalseEnables document management.
TWIN_FEDERATED_CATALOGUE_ENABLEDtrue, falsefalseEnables federated catalogue features.
TWIN_FEDERATED_CATALOGUE_REMOTE_ENDPOINTURLNoneUses a remote federated catalogue REST client.
TWIN_FEDERATED_CATALOGUE_REST_CLIENT_PATH_PREFIXStringcatalogPath prefix used by the REST client when forwarding requests to the remote endpoint. Only used when TWIN_FEDERATED_CATALOGUE_REMOTE_ENDPOINT is set.
TWIN_HEALTH_ENABLEDtrue, falsefalseEnables health components.
TWIN_HEALTH_INTERVALInteger seconds60Interval between health checks.
TWIN_HEALTH_STARTUP_INTERVALInteger seconds2Initial delay before the first health check runs.
TWIN_HEALTH_APPLICATION_INTERVALInteger seconds300Interval between application health lifecycle runs (init, application, teardown).
TWIN_IDENTITY_WALLET_ADDRESS_INDEXInteger0Wallet address index used by identity workflows.
TWIN_IDENTITY_DID_RESOLUTION_CACHE_TTLInteger msConnector defaultTTL for caching resolved DIDs. Only used when TWIN_IDENTITY_CONNECTOR=iota.
TWIN_IDENTITY_DID_RESOLUTION_CACHE_CAPACITYIntegerConnector defaultMaximum number of DID documents to hold in the resolution cache. Only used when TWIN_IDENTITY_CONNECTOR=iota and caching is enabled.
TWIN_IDENTITY_DID_RESOLUTION_CACHE_MUTEX_TIMEOUTInteger msConnector defaultMutex timeout for the DID resolution cache. Only used when TWIN_IDENTITY_CONNECTOR=iota and caching is enabled.
TWIN_IDENTITY_DID_RESOLUTION_RETRIESInteger10Number of times to retry resolving a DID after a write operation (create, update, or delete) to confirm propagation. Only used when TWIN_IDENTITY_CONNECTOR=iota.
TWIN_IDENTITY_DID_RESOLUTION_RETRY_DELAYInteger ms500Delay between DID resolution retries after a write operation. Only used when TWIN_IDENTITY_CONNECTOR=iota.
TWIN_IMMUTABLE_PROOF_VERIFICATION_METHOD_IDMethod id stringimmutable-proof-assertionDefault injected by node defaults.
TWIN_IMMUTABLE_PROOF_TASK_RETRY_COUNTInteger5Number of times to retry a proof task before abandoning it. Set to 0 to disable retries.
TWIN_IMMUTABLE_PROOF_TASK_RETRY_INTERVALInteger seconds5Interval in seconds between proof task retries.
TWIN_IMMUTABLE_PROOF_TASK_FAILURE_RETAIN_FORInteger minutes10080How long to retain the record of a failed proof task. Set to -1 to retain failures forever. Default is 7 days.
TWIN_IMMUTABLE_PROOF_SWEEP_INTERVALInteger minutes30How often the immutable proof reconciliation sweep runs. Minimum 1.
TWIN_IMMUTABLE_PROOF_SWEEP_STALE_THRESHOLDInteger minutes180Minimum age before a proof with no notarization is considered stale and eligible for sweep. Minimum 1.
TWIN_IMMUTABLE_PROOF_SWEEP_MAX_ATTEMPTSInteger5Maximum sweep attempts before parking a proof. Minimum 1.
TWIN_IMMUTABLE_PROOF_SWEEP_BATCH_LIMITInteger10Maximum number of proofs re-enqueued per tenant per sweep cycle. Minimum 1.
TWIN_IMMUTABLE_PROOF_SWEEP_BACKOFFInteger minutes60Minimum delay between sweep attempts for the same proof, with exponential backoff up to 24 hours. Minimum 1.
TWIN_IMMUTABLE_PROOF_SWEEP_ASSUME_RETRYABLE_BEFOREISO 8601 date or date-timeNoneProofs created before this timestamp with no interpretable task record are treated as retryable instead of parked. Date-only values are interpreted as midnight UTC.
TWIN_MESSAGING_ENABLEDtrue, falsefalseEnables messaging components.
TWIN_RIGHTS_MANAGEMENT_CALLBACK_PATHPathNoneCallback path used by rights management.
TWIN_TASK_SCHEDULER_ENABLEDtrue, falsefalseForces the task scheduler on regardless of which other features require it.
TWIN_TELEMETRY_BATCH_FLUSH_INTERVALInteger seconds5How often the telemetry connector flushes its write-ahead cache to storage. Set to 0 to disable timer-based flushing.
TWIN_TELEMETRY_BATCH_SIZEInteger10Number of metric values to accumulate before flushing to storage. Set to 1 to disable size-based flushing.
TWIN_TELEMETRY_MAX_CACHE_SIZEInteger1000Maximum number of metric values held in the write-ahead cache. When the limit is reached the oldest entries are evicted. Set to 0 for unlimited.
TWIN_TELEMETRY_METRIC_DEFINITION_CACHE_CAPACITYInteger100Maximum number of metric definitions held in the in-memory definition cache for the entity-storage telemetry connector.
TWIN_TELEMETRY_METRIC_DEFINITION_CACHE_TTI_MSInteger ms3600000Time-to-idle in milliseconds for cached metric definitions in the entity-storage telemetry connector.
TWIN_TELEMETRY_METRICS_COLLECTOR_INTERVALInteger seconds60Polling interval between metrics collection runs.
TWIN_TELEMETRY_METRICS_PRODUCER_MAX_HISTORYInteger1440Maximum number of values retained per metric.
TWIN_TRUST_IDENTITIES_ALLOWComma-separated listNoneAllow list for trust identity verification.
TWIN_TRUST_IDENTITIES_DENYComma-separated listNoneDeny list for trust identity verification.
TWIN_TRUST_JWT_TTLInteger secondsNoneLeave unset for non-expiring JWT generation.
TWIN_TRUST_VERIFICATION_METHOD_IDMethod id stringtrust-assertionDefault injected by node defaults.

Hosting Variables

VariablePossible ValuesDefaultNotes
TWIN_AUTH_ADMIN_PROCESSOR_TYPEentity-storageNoneAuthentication admin processor type.
TWIN_AUTH_PROCESSOR_TYPEentity-storageNoneAuthentication processor type.
TWIN_AUTH_SIGNING_KEY_IDVault key identifierauth-signingKey used for auth signing operations.
TWIN_AUTH_API_KEY_HEADERHeader name stringx-api-keyHTTP header name for the API key on requests.
TWIN_MIME_TYPE_PROCESSORSComma-separated processor typesNoneAdditional MIME processor registrations.
TWIN_ROUTE_LOGGING_INCLUDE_BODYtrue, falseUses debug valueIncludes body in route logging.
TWIN_ROUTE_LOGGING_FULL_BASE64true, falsefalseIncludes full base64 payloads in route logging.
TWIN_ROUTE_LOGGING_OBFUSCATE_PROPERTIESComma-separated property namesNoneProperties to obfuscate in route logs.
TWIN_ROUTE_METRICS_EXCLUDE_PATHSComma-separated path prefixesNoneURL path prefixes excluded from metrics recording. Useful for suppressing health-check or scrape endpoints. Only applies when telemetry is enabled.
TWIN_ROUTE_TRACING_EXCLUDE_PATHSComma-separated path prefixesNoneURL path prefixes excluded from tracing. Useful for suppressing health-check or scrape endpoints. Only applies when tracing is enabled.

REST Path Overrides

The URL path for any REST component can be overridden at startup using variables in the form:

TWIN_REST_PATH_<COMPONENT>=<path>

<COMPONENT> is the UPPER_SNAKE_CASE component type name with the Component suffix removed.

VariableExample ValueNotes
TWIN_REST_PATH_LOGGING/my-logsOverrides the logging component REST path.
TWIN_REST_PATH_DATASPACE_CONTROL_PLANE/dsp-ctrlOverrides the dataspace control plane path.
TWIN_REST_PATH_DATASPACE_DATA_PLANE/dsp-dataOverrides the dataspace data plane path.
TWIN_REST_PATH_TENANT_ADMIN/my-tenantsOverrides the tenant admin component path.

The pattern extends to any component that has a default REST path configured. The variable name is derived by taking the component type identifier, removing the Component suffix, converting to UPPER*SNAKE_CASE, and prepending TWIN_REST_PATH*.

Because the set of components is open-ended, these variables are validated as a prefix group. To allow custom TWIN_REST_PATH_* variables when using TWIN_ENV_ALLOW_LIST, include the wildcard entry:

TWIN_ENV_ALLOW_LIST=restPath*

Mutex Timeout Variables

VariablePossible ValuesDefaultNotes
TWIN_MUTEX_TIMEOUT_DEFAULTInteger ms5000Global default mutex timeout. Used when no component-specific value is set.
TWIN_AUDITABLE_ITEM_GRAPH_MUTEX_TIMEOUTInteger msNoneMutex timeout for the auditable item graph component.
TWIN_AUDITABLE_ITEM_STREAM_MUTEX_TIMEOUTInteger msNoneMutex timeout for the auditable item stream component.
TWIN_FEDERATED_CATALOGUE_MUTEX_TIMEOUTInteger msNoneMutex timeout for the federated catalogue component.
TWIN_DOCUMENT_MANAGEMENT_MUTEX_TIMEOUTInteger msNoneMutex timeout for the document management component.
TWIN_LOGGING_MUTEX_TIMEOUTInteger msNoneMutex timeout for the logging component.
TWIN_ENTITY_STORAGE_MUTEX_TIMEOUTInteger msNoneShared mutex timeout for the memory and file entity storage connectors.
TWIN_RIGHTS_MANAGEMENT_MUTEX_TIMEOUTInteger msNoneMutex timeout for the rights management component.
TWIN_TELEMETRY_MUTEX_TIMEOUTInteger msNoneMutex timeout for the telemetry connector.
TWIN_TRACING_MUTEX_TIMEOUTInteger msNoneMutex timeout for the tracing connector.

Extension Module Loading Variables

VariablePossible ValuesDefaultNotes
TWIN_EXTENSIONS_MAX_SIZE_MBInteger MB10Maximum HTTPS extension download size.
TWIN_EXTENSIONS_CLEAR_CACHEtrue, falsefalseClears extension cache on startup.
TWIN_EXTENSIONS_CACHE_DIRECTORYRelative or absolute path.tmpRoot cache directory for extension modules.
TWIN_EXTENSIONS_CACHE_TTL_HOURSInteger hours24HTTPS extension cache TTL.
TWIN_EXTENSIONS_FORCE_REFRESHtrue, falsefalseForces extension cache refresh.

Provider and Backend Variables

VariablePossible ValuesDefaultNotes
TWIN_ENTITY_STORAGE_TABLE_PREFIXStringNonePrefix for entity-storage tables.
TWIN_BLOB_STORAGE_PREFIXStringNonePrefix for blob paths/keys.
TWIN_BLOB_STORAGE_ENCRYPTION_KEY_IDVault key identifierblob-encryptionBlob encryption key identifier.
TWIN_VAULT_PREFIXStringNonePrefix prepended to vault entries.
TWIN_HASHICORP_VAULT_TOKENToken stringNoneHashiCorp Vault token.
TWIN_HASHICORP_VAULT_ENDPOINTURLNoneHashiCorp Vault endpoint.
TWIN_AWS_DYNAMODB_AUTH_MODEcredentials, podNoneDynamoDB auth mode.
TWIN_AWS_DYNAMODB_ACCESS_KEY_IDStringNoneDynamoDB access key id.
TWIN_AWS_DYNAMODB_SECRET_ACCESS_KEYStringNoneDynamoDB secret key.
TWIN_AWS_DYNAMODB_REGIONRegion stringNoneDynamoDB region.
TWIN_AWS_DYNAMODB_ENDPOINTURLNoneDynamoDB endpoint.
TWIN_AWS_DYNAMODB_CONNECTION_TIMEOUTInteger msNoneDynamoDB timeout.
TWIN_AZURE_COSMOSDB_ENDPOINTURLNoneCosmos DB endpoint.
TWIN_AZURE_COSMOSDB_KEYStringNoneCosmos DB key.
TWIN_AZURE_COSMOSDB_DATABASE_IDStringNoneCosmos DB database id.
TWIN_AZURE_COSMOSDB_CONTAINER_IDStringNoneCosmos DB container id.
TWIN_GCP_FIRESTORE_PROJECT_IDStringNoneFirestore project id.
TWIN_GCP_FIRESTORE_CREDENTIALSString or @json: file expansionNoneFirestore credentials.
TWIN_GCP_FIRESTORE_DATABASE_IDStringNoneFirestore database id.
TWIN_GCP_FIRESTORE_COLLECTION_NAMEStringNoneFirestore collection name.
TWIN_GCP_FIRESTORE_ENDPOINTURLNoneFirestore API endpoint.
TWIN_SCYLLADB_HOSTSComma-separated hostsNoneScylla hosts list.
TWIN_SCYLLADB_LOCAL_DATA_CENTERStringNoneScylla local data centre.
TWIN_SCYLLADB_KEYSPACEStringNoneScylla keyspace.
TWIN_SCYLLADB_PORTIntegerNoneScylla port.
TWIN_SCYLLADB_POOL_CORE_CONNECTIONS_PER_HOSTInteger1Scylla pool: connections per local host.
TWIN_SCYLLADB_POOL_MAX_REQUESTS_PER_CONNECTIONInteger1024Scylla pool: maximum requests per connection.
TWIN_MY_SQL_HOSTStringNoneMySQL host.
TWIN_MY_SQL_PORTIntegerNoneMySQL port.
TWIN_MY_SQL_USERStringNoneMySQL user.
TWIN_MY_SQL_PASSWORDStringNoneMySQL password.
TWIN_MY_SQL_DATABASEStringNoneMySQL database.
TWIN_MY_SQL_POOL_CONNECTION_LIMITInteger10MySQL pool: maximum connections.
TWIN_MY_SQL_POOL_MAX_IDLEInteger10MySQL pool: maximum idle connections.
TWIN_MY_SQL_POOL_IDLE_TIMEOUTInteger ms60000MySQL pool: milliseconds before an idle connection is removed.
TWIN_MY_SQL_POOL_ENABLE_KEEP_ALIVEtrue, falsetrueMySQL pool: enable TCP keep-alive.
TWIN_MY_SQL_POOL_WAIT_FOR_CONNECTIONStrue, falsetrueMySQL pool: queue requests when pool is full instead of failing immediately.
TWIN_MY_SQL_POOL_QUEUE_LIMITInteger0MySQL pool: maximum queued requests. 0 means unlimited.
TWIN_MONGO_DB_HOSTStringNoneMongoDB host.
TWIN_MONGO_DB_PORTIntegerNoneMongoDB port.
TWIN_MONGO_DB_USERStringNoneMongoDB user.
TWIN_MONGO_DB_PASSWORDStringNoneMongoDB password.
TWIN_MONGO_DB_DATABASEStringNoneMongoDB database.
TWIN_MONGO_DB_POOL_MAX_POOL_SIZEInteger100MongoDB pool: maximum connections.
TWIN_MONGO_DB_POOL_MIN_POOL_SIZEInteger0MongoDB pool: minimum connections to maintain.
TWIN_MONGO_DB_POOL_MAX_IDLE_TIMEInteger msNoneMongoDB pool: milliseconds a connection can remain idle before removal.
TWIN_MONGO_DB_POOL_WAIT_QUEUE_TIMEOUTInteger msNoneMongoDB pool: milliseconds to wait for a connection before throwing.
TWIN_POSTGRE_SQL_HOSTStringNonePostgreSQL host.
TWIN_POSTGRE_SQL_PORTIntegerNonePostgreSQL port.
TWIN_POSTGRE_SQL_USERStringNonePostgreSQL user.
TWIN_POSTGRE_SQL_PASSWORDStringNonePostgreSQL password.
TWIN_POSTGRE_SQL_DATABASEStringNonePostgreSQL database.
TWIN_POSTGRE_SQL_POOL_MAXInteger10PostgreSQL pool: maximum connections.
TWIN_POSTGRE_SQL_POOL_IDLE_TIMEOUTInteger secondsNonePostgreSQL pool: seconds a connection can remain idle before being closed.
TWIN_POSTGRE_SQL_POOL_CONNECT_TIMEOUTInteger seconds30PostgreSQL pool: seconds to wait when establishing a connection.
TWIN_POSTGRE_SQL_POOL_MAX_LIFETIMEInteger secondsNonePostgreSQL pool: maximum seconds a connection can remain open.
TWIN_IPFS_API_URLURLNoneIPFS API URL.
TWIN_IPFS_BEARER_TOKENStringNoneIPFS bearer token.
TWIN_AWS_S3_AUTH_MODEcredentials, podcredentialsAWS S3 auth mode.
TWIN_AWS_S3_ACCESS_KEY_IDStringNoneAWS S3 access key id.
TWIN_AWS_S3_SECRET_ACCESS_KEYStringNoneAWS S3 secret key.
TWIN_AWS_S3_REGIONRegion stringNoneAWS S3 region.
TWIN_AWS_S3_BUCKET_NAMEStringNoneAWS S3 bucket name.
TWIN_AWS_S3_ENDPOINTURLNoneAWS S3 endpoint.
TWIN_AZURE_STORAGE_ACCOUNT_NAMEStringNoneAzure Storage account name.
TWIN_AZURE_STORAGE_ACCOUNT_KEYStringNoneAzure Storage account key.
TWIN_AZURE_STORAGE_CONTAINER_NAMEStringNoneAzure Storage container name.
TWIN_AZURE_STORAGE_ENDPOINTURLNoneAzure Storage endpoint.
TWIN_GCP_STORAGE_PROJECT_IDStringNoneGCP Storage project id.
TWIN_GCP_STORAGE_CREDENTIALSString or @json: file expansionNoneGCP Storage credentials.
TWIN_GCP_STORAGE_BUCKET_NAMEStringNoneGCP Storage bucket name.
TWIN_GCP_STORAGE_ENDPOINTURLNoneGCP Storage endpoint.
TWIN_AWS_SES_AUTH_MODEcredentials, podcredentialsAWS SES auth mode.
TWIN_AWS_SES_ACCESS_KEY_IDStringNoneAWS SES access key id.
TWIN_AWS_SES_SECRET_ACCESS_KEYStringNoneAWS SES secret key.
TWIN_AWS_SES_REGIONRegion stringNoneAWS SES region.
TWIN_AWS_SES_ENDPOINTURLNoneAWS SES endpoint.
TWIN_AWS_MESSAGING_PUSH_NOTIFICATION_APPLICATIONSJSON string or @json: file expansionNonePush notification application definitions.
TWIN_IOTA_NODE_ENDPOINTURLNoneIOTA node endpoint.
TWIN_IOTA_FAUCET_ENDPOINTURLNoneIOTA faucet endpoint.
TWIN_IOTA_NETWORKNetwork nameNoneIOTA network identifier.
TWIN_IOTA_COIN_TYPEIntegerNoneIOTA coin type.
TWIN_IOTA_EXPLORER_ENDPOINTURLNoneIOTA explorer endpoint.
TWIN_IOTA_GAS_STATION_ENDPOINTURLNoneIOTA gas station endpoint.
TWIN_IOTA_GAS_STATION_AUTH_TOKENStringNoneIOTA gas station auth token.
TWIN_IOTA_GAS_BUDGETIntegerNoneIOTA gas budget, in nanos.
TWIN_IOTA_GAS_RESERVATION_DURATIONIntegerNoneIOTA gas reservation duration, in seconds.
TWIN_IOTA_IDENTITY_PACKAGE_IDStringNoneCustom deployed package id for the IOTA identity contract.
TWIN_UNIVERSAL_RESOLVER_ENDPOINTURLNoneUniversal resolver endpoint.
TWIN_OPEN_TELEMETRY_METER_NAMEStringtwin-nodeOpenTelemetry meter name. Only used when TWIN_TELEMETRY_CONNECTOR=open-telemetry.
TWIN_OPEN_TELEMETRY_METER_VERSIONString1.0.0OpenTelemetry metrics specification version. Only used when TWIN_TELEMETRY_CONNECTOR=open-telemetry.
TWIN_OPEN_TELEMETRY_READERprometheusNoneOpenTelemetry metric reader type. Only used when TWIN_TELEMETRY_CONNECTOR=open-telemetry.
TWIN_OPEN_TELEMETRY_PROMETHEUS_PORTInteger9464Port for the Prometheus metrics server. Only used when reader is prometheus.
TWIN_OPEN_TELEMETRY_LOGGING_LOGGER_NAMEStringtwin-loggingLogger name reported in emitted OTLP log records. Only used when TWIN_LOGGING_CONNECTOR=otel.
TWIN_OPEN_TELEMETRY_LOGGING_LOGGER_VERSIONString1.0.0Logger version reported in emitted OTLP log records. Only used when TWIN_LOGGING_CONNECTOR=otel.
TWIN_OPEN_TELEMETRY_LOGGING_PROMETHEUS_ENDPOINTURLNoneOTLP HTTP endpoint to push log records to, for example http://localhost:4318/v1/logs. Required when TWIN_LOGGING_CONNECTOR=otel.
TWIN_OPEN_TELEMETRY_LOGGING_PROCESSORbatch, simplebatchLog record processor. Use simple for local development; batch for production. Only used when TWIN_LOGGING_CONNECTOR=otel.
TWIN_OPEN_TELEMETRY_TRACING_TRACER_NAMEStringtwin-nodeOpenTelemetry tracer name. Only used when TWIN_TRACING_CONNECTOR=open-telemetry.
TWIN_OPEN_TELEMETRY_TRACING_TRACER_VERSIONString1.0.0OpenTelemetry tracing specification version. Only used when TWIN_TRACING_CONNECTOR=open-telemetry.
TWIN_OPEN_TELEMETRY_TRACING_ENDPOINTURLNoneOTLP HTTP endpoint to push spans to, for example http://localhost:4318/v1/traces. Required when TWIN_TRACING_CONNECTOR=open-telemetry.
TWIN_OPEN_TELEMETRY_TRACING_PROCESSORbatch, simplebatchSpan processor. Use simple for local development; batch for production. Only used when TWIN_TRACING_CONNECTOR=open-telemetry.