ENV Variables
ENV Variables
Set ENV Variables with CLI
Use the export command to set variables. For example:$ export ETHEREUM_JSONRPC_VARIANT=nethermind$ export COIN=POA$ export NETWORK=POA
Example ENV Variables Set
The following variables are set for the Gauss Induction Labs Instance. Note that some variables are not included as they contain private information which should not be exposed.
Available ENV Variables
This table is horizontally scrollable, version information is located in the last column. ENVs are listed by category:
General
Variable | Required | Description | Default | Version | Need recompile |
| ✅ | Variable to define the Postgres Database endpoint. | (empty) | all | |
| ✅ | Tells the application which RPC Client the node is using (i.e. | ganache | all | |
| ✅ | The RPC endpoint used to fetch blocks, transactions, receipts, tokens. | localhost:8545 | all | |
| | The RPC endpoint specifically for the Erigon/Geth/Nethermind/Besu client used by trace_block and trace_replayTransaction. This can be used to designate a tracing node. | localhost:8545 | all | |
| | The WebSockets RPC endpoint used to subscribe to the | ws://localhost:8546 | all | |
| | Specifies the transport for Blockscout to connect to the Ethereum Node. Available transports are | http | v3.1.0+ | |
| | If | (empty) | v5.0.0+ | |
| | Environment variable for the main EVM network such as Ethereum or POA. | POA | all | |
| | Environment variable for the subnetwork such as Core or Sokol Network. This will be displayed as selected in the chains list dropdown. | POA Sokol | all | |
| | Path to the IPC file of the running node if IPC transport is chosen. | (empty) | v2.1.1+ | |
| | Used to set a network path other than what is displayed in the root directory. An example would be to add | / | all | |
| | PATH in API endpoint URL at API docs page. | / | v3.1.0+ | |
| | Custom websocket path. | (empty) | v3.0.0+ | |
| | Host for API endpoint examples. | localhost | v2.1.0+ | |
| | Url scheme for blockscout. | in prod env | v2.1.0+ | |
| | Use mix phx.gen.secret to generate a new Secret Key Base string to protect production assets. | (empty) | all | |
| | Used to check the origin of requests when the origin header is present. It defaults to | false | all | |
| | Default port the application runs on is 4000. | 4000 | all | |
| | The coin here is checked via the CoinGecko API to obtain USD prices on graphs and other areas of the UI. | POA | all | |
| | Displayed name of the coin. Also used for "Add chain to MetaMask" button and for Account functionality as native coin name in the email letters for watch list. | (empty) | v4.1.2+ | |
| | Should be set to |
| v2.0.4+ | |
| | Chain specification path (absolute file system path or URL) to import block emission reward ranges and genesis account balances from. Geth- and OpenEthereum-style specs are supported. | (empty) | v2.0.4+ | |
| | This environment variable is used by the xDai Chain/RSK in order to tell the application how to calculate the total supply of the chain. Available values are | (empty) | all | |
| | Variable to define the number of database connections allowed excluding read-only API endpoints requests. | 50 | all | |
| | Variable to define the number of database connections allowed for read-only API endpoints requests. | 50 | v4.1.0+ | |
| | Production environment variable to use SSL on Ecto queries. | true | all | |
| | Production environment variable to restart the application in the event of a crash. | 30 | all | |
| | Production environment variable to restart the application in the event of a crash. | (empty) | all | |
| | Elixir version to install on the node before Blockscout deploy. It is used in bash script in Terraform / Ansible deployment script | (empty) | all | |
| | Default transaction hash in a sample query to GraphiQL. | (empty) | v1.2.0+ | ✅ |
| | If |
| v2.0.3+ | ✅ |
| | If |
| v2.0.3+ | ✅ |
| | If |
| v2.0.3+ | ✅ |
| | Link to web application instance, e.g. | (empty) | v2.0.3+ | |
| | Link to API instance, e.g. | (empty) | v2.0.3+ | |
| | If | (empty) | v3.3.2+ | ✅ |
| | If set to | true | v3.1.0+ | |
| | Defines checksum address function. 2 available values: | eth | v2.0.1+ | |
| | A comma-separated list of addresses to enable restricted access to them. | (empty) | v3.3.3+ | |
| | A key to access addresses listed in | (empty) | v3.3.3+ | |
| | List of test tokens addresses: test label will be applied and those tokens will be excluded from omni bridge market cap calculation. | (empty) | v3.6.0+ | |
| | Chain ID of the network. For instance, 100 in the case of xDai chain. | (empty) | v3.7.0+ | |
| | JSON RPC endpoint of the chain for the WalletConnect integration. Implemented in #4931 | (empty) | v4.1.0+ | |
| | New blocks indexed max delay in /health API endpoint. Implemented in #2294 | 5 mins | v2.0.2+ | |
| | Add public tag labels. More info in #6316 | (empty) | v5.0.0+ | |
| | Specify addresses for some label. More info in #6316 | (empty) | v5.0.0+ | |
| | Enable API V2. Implemented in #6361 | (empty) | v5.0.0+ | |
| | Bottom block for token id migration. Implemented in #6391 | 0 | v5.0.0+ | |
| | Number of workers performing the token id migration. Implemented in #6391 | 1 | v5.0.0+ | |
| | Interval of token transfer block numbers processed by a token id migration worker at a time. Implemented in #6391 | 500 | v5.0.0+ | |
| | Value of this env will be added to domain of session cookie. Implemented in #6544 | (empty) | v5.0.0+ | |
Indexer management
Variable | Required | Description | Default | Version |
| | Transformer for blocks: base or clique. | base | v1.3.4+ |
| | If |
| v2.0.3+ |
| | If |
| v4.1.2+ |
| | If |
| v4.1.2+ |
| | if |
| v4.1.3+ |
| | If |
| v4.1.3+ |
| | If |
| v4.1.3+ |
| | Memory soft limit for the indexer. | 1Gb | v4.1.3+ |
| | Batch size for empty block sanitizer (re-fetcher). | 100 | v4.1.3+ |
| | Batch size for blocks catchup fetcher. Implemented in #6196. | 10 | v5.0.0+ |
| | Concurrency for blocks catchup fetcher. Implemented in #6196. | 10 | v5.0.0+ |
| | Empty blocks sanitizer is disabled if | false | v4.1.3+ |
| | If |
| v4.1.6+ |
| | Disables or enables token symbol for known contract. | false | v3.4.0+ |
| | The block number, where import of blocks by catchup fetcher begins from. | 0 | v1.3.8+ |
| | The block number, where import of blocks by catchup fetcher stops. | (empty) | v2.0.3+ |
| | The block number, where indexing of internal transactions begins from. | 0 | v4.1.0+ |
| | The block number, where indexing of internal transactions stops. | (empty) | v4.1.0+ |
| | Block ranges to import by catchup fetcher. Implemented in #5783 | | v4.1.7+ |
| | Tells the application how to calculate block rewards, by fetching via json_rpc ( | trace_block | v4.1.4+ |
| | Timeout for | 5s | v4.1.3+ |
| | If |
| v5.0.0+ |
| | Defines which method will be used for fetching pending transactions: |
| v5.0.0+ |
| | If |
| v5.0.0+ |
| | Batch size for internal transactions fetcher. Implemented in #6450. | 10 | v5.0.0+ |
| | Concurrency for internal transactions fetcher. Implemented in #6450. | 4 | v5.0.0+ |
| | Batch size for transaction receipts fetcher. Implemented in #6454. | 250 | v5.0.0+ |
| | Concurrency for transaction receipts fetcher. Implemented in #6454. | 10 | v5.0.0+ |
| | Batch size for coin balances fetcher. Implemented in #6454. | 500 | v5.0.0+ |
| | Concurrency for coin balances fetcher. Implemented in #6454. | 4 | v5.0.0+ |
| | Batch size for missing ranges collector. Implemented in #6583. | 100000 | v5.0.0+ |
| | Batch size for min missing block number updater. Implemented in #6583. | 100000 | v5.0.0+ |
| | Tracer type for |
| master |
Exchange rates management
Variable | Required | Description | Default | Version |
| | Disables or enables fetching of coin price from Coingecko API. | false | v3.1.2+ |
| | This environment variable is used to calculate the exchange rates. Available value is | (empty) | v4.1.4+ |
| | Explicitly set CoinGecko coin ID. | (empty) | v4.1.4+ |
| | CoinGecko API key. | (empty) | v4.1.4+ |
| | CoinMarketCap API key. | (empty) | v4.1.4+ |
| | if | (empty) | v4.1.5+ |
Cache management
Variable | Required | Description | Default | Version |
| | Interval in seconds to restart the task, which calculates the total txs count. | 2 hours | v4.1.3+ |
| | time to live of cache in seconds. This var was introduced in #2822 | 2 hours | v4.1.3+ |
| | time to live of addresses sum (except burn address) cache in seconds. This var was introduced in #2862 | 1 hour | v4.1.3+ |
| | Interval in seconds to restart the task, which calculates the total gas usage. | 2 hours | v4.1.3+ |
| | Interval in seconds to restart the task, which calculates gas usage at the address. | 30 minutes | v4.1.3+ |
| | Interval in seconds to restart the task, which calculates holders count of the token. | 1 hour | v4.1.3+ |
| | Interval in seconds to restart the task, which calculates transfers count of the token. | 1 hour | v4.1.3+ |
| | Interval in seconds to restart the task, which calculates addresses with balances. | 30 minutes | v4.1.3+ |
| | Interval in seconds to restart the task which updates token metadata. | 60 * 60 * 24 * 2 | v2.0.1+ |
| | Update of average block period cache, in seconds. | 30 minutes | v4.1.3+ |
| | Update of market history cache, in seconds. | 6 hours | v4.1.3+ |
| | time to live of address' transactions counter in seconds. This var was introduced in #3330 | 1 hour | v3.4.0+ |
| | Managing cache invalidation for token's exchange rate. | 1 hour | v3.5.0+ |
| | Managing of cache invalidation period for the sum of USD value of tokens per tokens' holder address. | (empty) | v3.5.0+ |
| | value in seconds which is to tune the time to live of exchange rates. Implemented in #5671 | 10 minutes | v4.1.5+ |
| | A threshold to invalidate token balance cache. Implemented in #3870 | 60 minutes | v3.7.1+ |
| | A threshold to invalidate coin balance cache. Implemented in #5240 | 60 minutes | v4.1.2+ |
| | Interval in seconds to restart the task, which calculates the number of token transfers at the address. Implemented in #4699 | (empty) | v4.0.0+ |
| | time to live of blocks with consensus count cache in seconds. This var was introduced in #1876 | 2 hours | v4.1.3+ |
Gas price oracle management
Variable | Required | Description | Default | Version |
| | Gas price oracle: number of blocks to calculate average gas price from | 200 | v4.1.4+ |
| | Gas price oracle: safelow percentile | 35 | v4.1.4+ |
| | Gas price oracle: average percentile | 60 | v4.1.4+ |
| | Gas price oracle: fast percentile | 90 | v4.1.4+ |
| | Gas price oracle: period of gas prices update | 30 sec | v4.1.4+ |
Main page dashboard management
Variable | Required | Description | Default | Version |
| | Gas price in Gwei. If the variable is present, gas price displays on the main page. | (empty) | v3.3.2+ |
| | Disables or enables txs per day stats gathering. | true | v3.1.2+ |
| | Disables or enables price and market cap of coin charts on the main page. | false | v3.1.2+ |
| | Disables or enables txs count per day chart on the main page. | true | v3.1.2+ |
| | Interval in minutes how often to request count of txs per current day in order to display txs count per day chart on the main page. | 60 | v3.1.2+ |
| | The initial delay in minutes in txs count history fetching in order to display txs count per day history chart on the main page. | 0 | v3.1.2+ |
| | Number of days for fetching of history of txs count per day in order to display it in txs count per day history chart on the main page. | 365 | v3.1.2+ |
Header management
Variable | Required | Description | Default | Version |
| | Environment variable for the header logo image location. The logo files names for different chains can be found here. | /images/blockscout_logo.svg | all |
| | Enables testnet label right after logo in the navigation panel. Implemented in #5732 | (empty) | v4.1.6+ |
| | The text inside the test label. Implemented in #5732 | Testnet | v4.1.6+ |
| | An array of supported chains that display in the footer and in the chains dropdown. This var was introduced in this PR #1900 and looks like an array of JSON objects. | [ { title: "POA", url: "https://blockscout.com/poa/core" }, { title: "Sokol", url: "https://blockscout.com/poa/sokol", test_net?: true }, { title: "Gnosis Chain", url: "https://blockscout.com/xdai/mainnet" }, { title: "Ethereum Classic", url: "https://blockscout.com/etc/mainnet", other?: true }, { title: "RSK", url: "https://blockscout.com/rsk/mainnet", other?: true } ] | v2.0.0+ |
| | true/false. If true, the Apps navigation menu item appears. | false | v3.3.1+ |
| | (empty) | v5.0.0+ |
Footer management
Variable | Required | Description | Default | Version |
| | Environment variable for the footer logo image location. The logo files names for different chains can be found here. | /images/blockscout_logo.svg | |
| | The link to Blockscout release notes in the footer. | https: //github.com/poanetwork/ blockscout/releases/ tag/${BLOCKSCOUT_VERSION} | v1.3.5+ |
| | Added to the footer to signify the current BlockScout version. | (empty) | v1.3.4+ |
| | Link in Chat menu item in the footer. Implemented in #5719 | https://discord.gg/3CtNAqVMRV | v4.1.6+ |
| | Enable forum menu item in the footer. Implemented in #6351 | false | v5.0.0+ |
| | Link in Forum menu item in the footer. Implemented in #5719 | https://forum.poa.network/c/blockscout | v4.1.6+ |
| | Github repository. Implemented in #5719 | https://github.com/blockscout/blockscout | v4.1.6+ |
| | true/false. If true, links to other explorers are added in the footer. | (empty) | v1.3.0+ |
| | The list of alternative explorers. This env var was introduced in PR #3414. | (empty) | v3.4.0+ |
Misc UI management
Variable | Required | Description | Default | Version |
| | Configures market cap percentage column on the top accounts page. |
| v2.1.1+ |
| | Disables/enables announcement at the top of the explorer. | false | v3.6.0+ |
| | Message text of the announcement at the top of the explorer. | (empty) | v3.6.0+ |
| | Hide long arrays in smart-contracts. To get more details: #4218 | 50 | v3.7.1+ |
| | Hide long contract method data. For more details: #4667 | 2040 | v4.0.0+ |
| | Hides miner/validator/sequencer on block page and tiles if the value is `true` Implemented in #4611 | (empty) | v4.0.0+ |
| | Displays token icons from TrustWallet assets repository if | (empty) | v4.0.0+ |
| | the comma-separated list of allowed EVM versions for contract verification. This var was introduced in #1964 | "homestead, tangerineWhistle, spuriousDragon, byzantium, constantinople, petersburg,istanbul" | v2.0.0+ |
| | Include or exclude non-consensus blocks in avg block time calculation. Exclude if | false | v2.0.1+ |
| | Number of days to consider at coin balance history chart. | 10 | v3.1.3+ |
| | if | (empty) | v4.1.2+ |
| | Max amount of libraries to consider in smart-contract verification from flat/multi-part file(s). Implemented in #6204 | (empty) | v5.0.0+ |
| | If | (empty) | master |
CSV export
Variable | Required | Description | Default | Version |
| | Google reCAPTCHA sectret key. Used by advanced CSV export. Implemented in #4747 | (empty) | v4.0.0+ |
| | Google reCAPTCHA client key. Used by advanced CSV export. Implemented in #4747 | (empty) | v4.0.0+ |
API rate limit management
Variable | Required | Description | Default | Version |
| | A global API rate limit: number or requests per second for all users. Implemented in #5030 | 50 | v4.1.1+ |
| | A dedicated API rate limit for a static API key. Implemented in #5080 | 50 | v4.1.1+ |
| | A dedicated API rate limit for whitelisted IPs. Implemented in #5090 | 50 | v4.1.1+ |
| | Comma-separated whitelisted IPs list with dedicated rate limit. Implemented in #5090 | (empty) | v4.1.1+ |
| | Static API key with dedicated API rate limit. Implemented in #5080 | (empty) | v4.1.1+ |
Specific smart-contracts
Variable | Required | Description | Default | Version |
| | This environment variable is specifically used by POA Network to obtain Validators information to display in the UI. | (empty) | all |
| | This environment variable is specifically used by POA Network to obtain the list of current validators. | (empty) | all |
| | This environment variable is specifically used by POA Network to set KeysManager proxy contract in order to obtain payout key by mining key. This needs to identify distributed reward to the validator. | (empty) | v3.1.2+ |
| | Emission rewards contract address. This env var is used only if |
| v2.0.4+ |
| | Token bridge proxy contract. For `TokenBridge` supply module. |
| v1.3.2+ |
Account-related ENV variables
Variable | Required | Description | Default | Version |
| | Turn on/off account functionality. If value is | (empty) | 5.0.0 |
| | Account DB connection string | value from | 5.0.0 |
| | Account Redis connection string (for session storing configuration) | (empty) | 5.0.0 |
| | Account DB | 50 | 5.0.0 |
| | Domain for Ueberauth Auth0 | (empty) | 5.0.0 |
| | Auth0 client ID Ueberauth Auth0 | (empty) | 5.0.0 |
| | Auth0 client secret Ueberauth Auth0 | (empty) | 5.0.0 |
| | Auth0 logout URL Ueberauth Auth0 | (empty) | 5.0.0 |
| | Auth0 logout return URL Ueberauth Auth0 | (empty) | 5.0.0 |
| | Airtable URL for public tag requests functionality | (empty) | 5.0.0 |
| | Airtable API key for public tag requests functionality | (empty) | 5.0.0 |
| | Sendgrid API key for watchlist notifications functionality | (empty) | 5.0.0 |
| | Sendgrid sender email for watchlist notifications functionality | (empty) | 5.0.0 |
| | Sendgrid email template for watchlist notifications functionality | (empty) | 5.0.0 |
| | Account DB encryption key. Instruction how to generate) | (empty) | 5.0.0 |
Integrations
Smart-contract verifier
Variable | Required | Description | Default | Version |
| | If | (empty) | v4.1.8+ |
| | URL of Rust smart-contract verifier. Implemented in #5860 | (empty) | v4.1.8+ |
Sol2Uml
Variable | Required | Description | Default | Version |
| | If | (empty) | v5.0.0+ |
| | URL of Rust visualizer. Implemented in #6401 | (empty) | v5.0.0+ |
Sourcify
Variable | Required | Description | Default | Version |
| | Enables or disables verification of contracts through Sourcify. | false | v3.7.0+ |
| | URL to Sourcify backend. | v3.7.0+ | |
| | URL to Sourcify repository with fully verified contracts. | v3.7.0+ |
Tenderly
Variable | Required | Description | Default | Version |
| | if | (empty) | v4.0.0+ |
| | Chain path to the transaction in Tenderly. For instance, for transactions in xDai, Tenderly link looks like this https://dashboard.tenderly.co/tx/xdai/0x..., then | (empty) | v4.0.0+ |
Datadog
Variable | Required | Description | Default | Version |
| | Host configuration setting for Datadog integration. | (empty) | all |
| | Port configuration setting for Datadog integration. | (empty} | all |
Spandex
Variable | Required | Description | Default | Version |
| | Spandex and Datadog configuration setting. | (empty) | all |
| | Spandex and Datadog configuration setting. | (empty) | all |
Analytics
Variable | Required | Description | Default | Version |
| | Mixpanel project token. | (empty) | v5.0.0+ |
| | Url to use Mixpanel with proxy (Collection via Proxy). | (empty) | v5.0.0+ |
| | Amplitude API key. | (empty) | v5.0.0+ |
| | Url to use Amplitude with proxy (Use Domain Proxy to Relay Events). | (empty) | v5.0.0+ |
Last updated