Handle config files
If you are using the Docker image, Lisk Core is configured in a slightly different manner. Please go to the Docker image commands page to find out more about the Docker image specific configuration of the Lisk Core. |
Network-specific config files
The root folder for all configurations is config/
.
The default network is devnet
.
To connect to another network, specify the network
when starting the Lisk Core, as described in the Configuration reference.
The network specific configurations can be found under config/<network>/config.json
, whereby <network>
can be any of these values listed below:
-
devnet
-
alphanet
-
betanet
-
testnet
-
mainnet
Do not override any value in the files mentioned above, as the changes will be overwritten everytime the Lisk Core is upgraded.
If a custom configuration is required, use the environment variables or alternatively create your own |
Custom config file
To use a custom config, firstly create a .json
-file.
Further information can be found in the Config structure section.
Only the values required to be updated are needed, as for all other options the pre-defined values will be used as described in the Config load order section.
Application and Commander application distributions both provide a config.json, which can be customized as desired. For the Source code, the config file needs to be created separately and needs to be passed as described below: |
The application script provides a custom config.json
which is stored in the root folder of your Lisk Core installation by default.
For example, Lisk Core for Mainnet is installed under ~/lisk-main
, and the config is stored directly in ~/lisk-main/config.json
The config.json will be used automatically when reloading the node with the following command:
bash lisk.sh reload
Lisk Commander provides a custom config.json
which is stored in the root folder of your Lisk Core instance by default.
For example, Lisk Core for Mainnet is installed under ~/.lisk/instances/lisk-mainnet
, and the config is stored directly in ~/.lisk/instances/lisk-main/config.json
The config.json will be used automatically when reloading the node with the following command:
pm2 stop lisk (1)
LISK_CONFIG_FILE=<CONFIG_PATH> pm2 start lisk (2)
1 | Stop Lisk Core in the case whereby it is running. |
2 | Replace <CONFIG_PATH> with the path to your custom config file. |
Config load order
Configurations will be loaded in the following order listed below. Each configuration will override the previous one:
-
Default configuration values of modules and components of the Lisk Framework.
-
A custom configuration file, (if specified by the user).
-
Command line configurations, specified as command-line flags or
ENV
variables.
For development purposes, use devnet
as the network option.
Other networks are specific to public Lisk networks.