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 regarding the docker-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 Config reference. The network specific configurations can be found under config/<network>/config.json, whereby <network> can be any of these values listed below:

  • devnet

  • betanet

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 .json file and pass it as command line option.

Custom config file

Only the values required to be overwritten are necessary. For all other options the pre-defined values will be used as described in the Config Load Order section.

The Application and Commander application 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:

  • Application

  • Commander application

  • Source code

The Lisk Core application provides a custom config.json which is stored in the root folder of your Lisk Core installation by default.

For example, if Lisk Core is installed under ~/lisk-beta, then the config is stored directly in ~/lisk-beta/config.json.

The updated 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, if Lisk Core is installed under ~/.lisk/instances/lisk-betanet, then the config is stored directly in ~/.lisk/instances/lisk-beta/config.json.

The config.json will be used automatically when reloading the node with the following command:

lisk core:restart lisk-betanet
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:

  1. Default configuration values of modules and components. See Lisk Framework.

  2. Network specific configuration file.

  3. A custom configuration file, (if specified by the user).

  4. 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.

Further management guides