ENV Variables
Additional information related to certain variables is available on the ansible deployment page.
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:
1
$ export ETHEREUM_JSONRPC_VARIANT=parity
2
$ export COIN=POA
3
$ export NETWORK=POA
Copied!

Example ENV Variables Set

The following variables are set for the Gnosis Chain Blockscout Instance.
Gnosis-Chain-Variables.txt
6KB
Text

Full ENV Variables CSV file

Last updated 13 June, 2022.
blockscout-env-June-22.csv
20KB
Text

Available ENV Variables

This table is horizontally scrollable, version information is located in the last column.
Variable
Required
Description
Default
Version
Need recompile
ETHEREUM_JSONRPC_VARIANT
βœ…
Tells the application which RPC Client the node is using (i.e. geth, parity, besu, or ganache) (See Client Settings for more info)
ganache
all
​
ETHEREUM_JSONRPC_HTTP_URL
βœ…
The RPC endpoint used to fetch blocks, transactions, receipts, tokens.
localhost:8545
all
​
DATABASE_URL
βœ…
Variable to define the Database endpoint.
(empty)
all
​
ETHEREUM_JSONRPC_TRACE_URL
​
The RPC endpoint specifically for the Geth/Parity/Besu client used by trace_block and trace_replayTransaction. This can be used to designate a tracing node.
localhost:8545
all
​
NETWORK
​
Environment variable for the main EVM network such as Ethereum or POA
POA
all
​
SUBNETWORK
​
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
​
LOGO
​
Environment variable for the header logo image location. The logo files names for different chains can be found here​
/images/blockscout_logo.svg
all
​
LOGO_FOOTER
​
Environment variable for the footer logo image location. The logo files names for different chains can be found here​
/images/blockscout_logo.svg
​
​
ETHEREUM_JSONRPC_WS_URL
​
The WebSockets RPC endpoint used to subscribe to the newHeads subscription alerting the indexer to fetch new blocks.
ws://localhost:8546
all
​
ETHEREUM_JSONRPC_TRANSPORT
​
Specifies the transport for Blockscout to connect to the Ethereum Node. Available transports are http and ipc. If ipc is selected, also set IPC_PATH variable
http
v3.1.0+
​
IPC_PATH
​
Path to the IPC file of the running node if IPC transport is chosen
(empty)
v2.1.1+
​
NETWORK_PATH
​
Used to set a network path other than what is displayed in the root directory. An example would be to add /eth/mainnet/ to the root directory.
/
all
​
API_PATH
​
PATH in API endpoint URL at API docs page
/
v3.1.0+
​
SOCKET_ROOT
​
Custom websocket path
(empty)
v3.0.0+
​
BLOCKSCOUT_HOST
​
Host for API endpoint examples
localhost
v2.1.0+
​
BLOCKSCOUT_PROTOCOL
​
Url scheme for blockscout
in prod env https is used, in dev env http is used
v2.1.0+
​
SECRET_KEY_BASE
​
Use mix phx.gen.secret to generate a new Secret Key Base string to protect production assets.
(empty)
all
​
CHECK_ORIGIN
​
Used to check the origin of requests when the origin header is present. It defaults to false. In case of true, it will check against the host value.
false
all
​
PORT
​
Default port the application runs on is 4000
4000
all
​
COIN
​
The coin here is checked via the CoinGecko API to obtain USD prices on graphs and other areas of the UI
POA
all
​