Skip to main content

Environment variables

Environment variables configure the behavior of the application. This page documents all available environment variables, their default values, and version history.

Configuration Files

The root folder contains several example .env files for different deployment scenarios:

Standard Deployments:

  • .env.docker-compose - Standard docker compose setup for mainnet (copy and adjust for your needs)
  • .env.docker-compose-preprod - Pre-configured for preprod network
  • .env.h2 - Local development with H2 in-memory database
  • .env.h2-testdata - H2 database with test data

Hardware Performance Profiles:

  • .env.docker-compose-profile-entry-level - Minimal hardware requirements
  • .env.docker-compose-profile-mid-level - Moderate hardware (recommended baseline)
  • .env.docker-compose-profile-advanced-level - High-performance hardware

Testing:

  • .env.IntegrationTest - Integration tests with yaci devkit
note

Hardware profile files should be used in combination with a base .env.docker-compose file to apply performance tuning settings. See the Hardware Profile Variables section below.

Main Environment Variables

VariableDescriptionDefaultNotes
LOGLog levelINFOadded in release 1.0.0
NETWORKNetworkmainnetadded in release 1.0.0
MITHRIL_SYNCSync from Mithril snapshottrueadded in release 1.0.0
PROTOCOL_MAGICCardano protocol magic764824073added in release 1.0.0
PG_VERSION_TAGPostgres version tag for building from sourceREL_14_11added in release 1.2.9
DB_NAMEPostgres databaserosetta-javaadded in release 1.0.0
DB_USERPostgres admin userrosetta_db_adminadded in release 1.0.0
DB_SECRETPostgres admin secretweakpwd#123_dadded in release 1.0.0
DB_HOSTPostgres hostdbadded in release 1.0.0
DB_PORTPostgres port5432added in release 1.0.0
DB_SCHEMADatabase schemamainnetadded in release 1.0.0
DB_PATHDatabase pathdataadded in release 1.0.0
CARDANO_NODE_HOSTCardano node hostcardano-nodeadded in release 1.0.0
CARDANO_NODE_PORTCardano node port3001added in release 1.0.0
CARDANO_NODE_VERSIONCardano node version10.5.1added in release 1.0.0
CARDANO_NODE_SUBMIT_HOSTCardano node submit API hostcardano-submit-apiadded in release 1.0.0
NODE_SUBMIT_API_PORTCardano node submit API port8090added in release 1.0.0
CARDANO_NODE_DIRCardano node base directory/nodeadded in release 1.0.0
CARDANO_NODE_SOCKET_PATHCardano node socket file path/node/node.socketadded in release 1.0.0
CARDANO_NODE_DBCardano node db path/node/dbadded in release 1.0.0
CARDANO_CONFIGCardano node config path./config/node/mainnetadded in release 1.0.0
MITHRIL_VERSIONMithril client version2524.0added in release 1.2.9
SNAPSHOT_DIGESTMithril snapshot digestlatestadded in release 1.0.0
AGGREGATOR_ENDPOINTMithril aggregator endpoint (uses default if not set)(empty)added in release 1.0.0
GENESIS_VERIFICATION_KEYMithril genesis verification key (uses default if not set)(empty)added in release 1.0.0
ANCILLARY_VERIFICATION_KEYMithril ancillary verification key (uses default if not set)(empty)added in release 1.2.9
API_DOCKER_IMAGE_TAGDocker Tag for API Imagemainadded in release 1.0.0
API_SPRING_PROFILES_ACTIVEAPI spring profilestagingadded in release 1.0.0
API_PORTRosetta API exposed port8082added in release 1.0.0
PRINT_EXCEPTIONPrint stack traces in error responsestrueadded in release 1.0.0
ROSETTA_VERSIONRosetta version1.4.13added in release 1.0.0
TOPOLOGY_FILEPATHTopology file path/config/topology.jsonadded in release 1.0.0
GENESIS_SHELLEY_PATHGenesis file path/config/shelley-genesis.jsonadded in release 1.0.0
GENESIS_BYRON_PATHGenesis file path/config/byron-genesis.jsonadded in release 1.0.0
GENESIS_ALONZO_PATHGenesis file path/config/alonzo-genesis.jsonadded in release 1.0.0
GENESIS_CONWAY_PATHGenesis file path/config/conway-genesis.jsonadded in release 1.0.0
SEARCH_LIMITSearch limit used in search100added in release 1.3.2
INDEXER_DOCKER_IMAGE_TAGYaci indexer Docker versionmainadded in release 1.0.0
REMOVE_SPENT_UTXOSIf pruning should be enabledtrueadded in release 1.0.0
REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNTNumber of safe blocks to keep in the store (~30 days)129600added in release 1.2.4
REMOVE_SPENT_UTXOS_BATCH_SIZEBatch size for UTXO removal operations3000added in release 1.4.0
BLOCK_TRANSACTION_API_TIMEOUT_SECSTimeout for fetching blocks in seconds5added in release 1.2.11
YACI_SPRING_PROFILESYaci indexer spring profile (postgres, n2c-socket)postgres,n2c-socketadded in release 1.0.0
MEMPOOL_ENABLEDEnable mempool functionalityfalseadded in release 1.0.0
DEVKIT_ENABLEDDevkit enabledfalseadded in release 1.0.0
DEVKIT_URLDevkit URLyaci-cliadded in release 1.0.0
DEVKIT_PORTDevkit port3333added in release 1.0.0
LOG_FILE_PATHLog file directory path/var/log/rosetta-javaadded in release 1.0.0
LOG_FILE_NAMELog file name with path/var/log/rosetta-java/rosetta-java.logadded in release 1.0.0
LOG_FILE_MAX_SIZEMaximum size per log file10MBadded in release 1.0.0
LOG_FILE_MAX_HISTORYNumber of log files to retain10added in release 1.0.0
SYNCEnable online mode (DB/indexer start after node reaches tip)trueadded in release 1.2.0
SYNC_GRACE_SLOTS_COUNTGrace period in slots for sync status100added in release 1.2.9
YACI_HTTP_BASE_URLYaci Indexer's URLhttp://yaci-indexer:9095/api/v1added in release 1.2.1
YACI_INDEXER_PORTYaci Indexer's port9095added in release 1.2.1
HTTP_CONNECT_TIMEOUT_SECONDSYaci connection timeout in seconds5added in release 1.2.1
HTTP_REQUEST_TIMEOUT_SECONDSYaci request timeout in seconds5added in release 1.2.1
API_DB_POOL_MAX_LIFETIME_MSMaximum lifetime of connection in pool (milliseconds)2000000added in release 1.2.5
API_DB_POOL_CONNECTION_TIMEOUT_MSConnection timeout in milliseconds100000added in release 1.2.5
API_DB_KEEP_ALIVE_MSKeep alive in milliseconds60000added in release 1.2.5
API_DB_LEAK_CONNECTIONS_WARNING_MSLeak connection warning threshold (ms)60000added in release 1.2.5
API_DB_MONITOR_PERFORMANCEMonitor performance enable?falseadded in release 1.2.5
API_DB_SHOW_SQLShow formatted SQL queries in logs for debuggingfalseadded in release 1.2.5
CONTINUE_PARSING_ON_ERRORContinue processing failed to parse blockstrueadded in release 1.3.0
PROMETHEUS_PORTPrometheus metrics port9090added in release 1.3.0
GRAFANA_PORTGrafana dashboard port3000added in release 1.3.0
POSTGRESQL_EXPORTER_PORTPostgreSQL exporter port for Prometheus9187added in release 1.3.0
PEER_DISCOVERYEnable peer discovery job for automatic peer refreshingfalseadded in release 1.3.2
TOKEN_REGISTRY_ENABLEDEnable token registry integration for native token metadatafalseadded in release 1.4.0
TOKEN_REGISTRY_BASE_URLBase URL for the token registry API(empty)added in release 1.4.0
TOKEN_REGISTRY_CACHE_TTL_HOURSCache TTL for token metadata in hours12added in release 1.4.0
TOKEN_REGISTRY_LOGO_FETCHEnable fetching token logos from registry (increases response size)falseadded in release 1.4.0
TOKEN_REGISTRY_REQUEST_TIMEOUT_SECONDSToken registry request timeout in seconds2added in release 1.4.0

Hardware Profile Variables

The following variables are available only in hardware profile configuration files (.env.docker-compose-profile-*-level).

VariableDescriptionDefault (mid-level profile)Notes
API_DB_POOL_MIN_COUNTMinimum number of connections API↔DB150added in release 1.2.5
API_DB_POOL_MAX_COUNTMaximum number of connections API↔DB150added in release 1.2.5
DB_POSTGRES_MAX_CONNECTIONSMaximum concurrent database connections300added in release 1.2.5
DB_POSTGRES_SHARED_BUFFERSMemory for caching4GBadded in release 1.2.6
DB_POSTGRES_EFFECTIVE_CACHE_SIZEDisk cache size8GBadded in release 1.2.6
DB_POSTGRES_WORK_MEMMemory per operation for query processing64MBadded in release 1.2.6
DB_POSTGRES_MAINTENANCE_WORK_MEMMemory for maintenance tasks like index creation512MBadded in release 1.2.6
DB_POSTGRES_WAL_BUFFERSWrite-ahead log buffer memory512MBadded in release 1.2.6
DB_POSTGRES_CHECKPOINT_COMPLETION_TARGETTarget checkpoint completion0.7added in release 1.2.6
DB_POSTGRES_RANDOM_PAGE_COSTCost estimate for random disk page access1.3added in release 1.2.6
DB_POSTGRES_EFFECTIVE_IO_CONCURRENCYConcurrent I/O for table scans2added in release 1.2.6
DB_POSTGRES_PARALLEL_TUPLE_COSTCost per tuple in parallel queries0.05added in release 1.2.6
DB_POSTGRES_PARALLEL_SETUP_COSTCost for initiating parallel query workers500added in release 1.2.6
DB_POSTGRES_MAX_PARALLEL_WORKERS_PER_GATHERParallel workers per query4added in release 1.2.6
DB_POSTGRES_MAX_PARALLEL_WORKERSTotal parallel workers across all queries8added in release 1.2.6
DB_POSTGRES_SEQ_PAGE_COSTCost estimate for sequential disk page access1.0added in release 1.2.6
DB_POSTGRES_JITJust-In-Time compilation settingoffadded in release 1.2.6
DB_POSTGRES_BGWRITER_LRU_MAXPAGESMax pages for background writer per cycle200added in release 1.2.5
DB_POSTGRES_BGWRITER_DELAYDelay between background writer cycles200msadded in release 1.2.5
DB_POSTGRES_AUTOVACUUM_MAX_WORKERSMaximum number of autovacuum workers5added in release 1.4.0

Deprecated Environment Variables (Previous Versions)

The following environment variables were available in previous versions but are no longer supported:

VariableDescriptionDefaultNotes
DB_IMAGE_NAMEPostgres docker image namepostgresavailable in releases 1.0.0 - 1.2.8, replaced by PG_VERSION_TAG in 1.2.9
DB_IMAGE_TAGPostgres docker image tag14.11-bullseyeavailable in releases 1.0.0 - 1.2.8, replaced by PG_VERSION_TAG in 1.2.9
PRUNING_ENABLEDEnable spent UTXO pruning to reduce storage requirementsfalseavailable in releases 1.0.0 - 1.2.8, replaced by REMOVE_SPENT_UTXOS
PRUNING_SAFE_BLOCKSNumber of recent blocks to keep spent UTXOs for (safety margin)2160available in releases 1.2.4 - 1.2.8, replaced by REMOVE_SPENT_UTXOS_LAST_BLOCKS_GRACE_COUNT
PRUNING_INTERVALInterval in seconds between pruning cleanup jobs600available in releases 1.2.4 - 1.2.8, no longer configurable
LIMITSearch limit100available in releases 1.0.0 - 1.3.1, replaced by SEARCH_LIMIT in 1.3.2