☑️ENV Variables

Blockscout uses ENVs for setting hundreds of different parameters. Please see the various sections for ENV names, descriptions, default values and versioning.

See below for info on setting ENV variables, time formatting and other info.

You will find deprecated ENV vars on the Deprecated ENV Variables page.

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 Gnosis Chain Blockscout Instance. Note that some variables are not included as they contain private information which should not be exposed.

6KB
Gnosis-Chain-Variables.txt

Backend ENV spreadsheet

Link to a google sheet with active ENVs

Time format

Can be set in format 1h for 1 hour, 1m for 1 minute, 1s or 1 for 1 second, 1ms for 1 millisecond

Note: Before release 5.1.2, all environment variables of time format supported only integers in seconds (without dimensions) as values.

All chains must define the following minimum set of ENV variables:

Environment VariableDefault

BLOCKSCOUT_VERSION

unknown

COIN

POA

DB_HOST

-

DB_PASSWORD

-

DB_PORT

-

DB_USERNAME

-

ETHEREUM_JSONRPC_HTTP_URL

http://localhost:8545

ETHEREUM_JSONRPC_TRACE_URL

http://localhost:8545

ETHEREUM_JSONRPC_WS_URL

ws://localhost:8546

ETHEREUM_JSONRPC_VARIANT

nethermind

HEART_BEAT_TIMEOUT

30

HEART_COMMAND

sudo systemctl restart explorer.service

LOGO

/images/blockscout_logo.svg

NETWORK

POA Network

SUBNETWORK

Sokol Testnet

NETWORK_ICON

_test_network_icon.html

LINK_TO_OTHER_EXPLORERS

true

Changes not configurable with ENV variables:

**Update Validated/Validator to Mined/Miner or Signed/Signer ** https://github.com/poanetwork/blockscout/blob/12aa15671142af00b35ff05aeac107c2c686c4c8/apps/block_scout_web/priv/gettext/default.pot

Update Memory Usage: https://github.com/poanetwork/blockscout/blob/12aa15671142af00b35ff05aeac107c2c686c4c8/apps/indexer/config/config.exs#L36

Update Theme: https://github.com/poanetwork/blockscout/blob/12aa15671142af00b35ff05aeac107c2c686c4c8/apps/block_scout_web/assets/css/theme/_variables.scss#L1

Update Coin Name: https://github.com/poanetwork/blockscout/blob/5b5a0b3cfe47fcbb3631b82e58aeb2c7c9c48504/apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po#L398

Update other explorers (if-applicable) https://github.com/poanetwork/blockscout/blob/12aa15671142af00b35ff05aeac107c2c686c4c8/apps/block_scout_web/config/config.exs#L22-L26

Last updated

Logo

Copyright © Blockscout Limited 2023-2024