Lisk Core Docker Administration

This section details how to work with a Docker-based Lisk Core installation.
Listed below are available basic commands which can be used to manage your Docker-based Lisk node.
For more details, see each commands reference below.
A summary of all commands and associated flags has been provided for advanced users.

Configuration

Lisk Core normally gets configured by providing a suited configuration file.
But this isn't convenient in a Docker installation.
Instead, one can use environment variables to change values in the configuration.
To do so, open the .env file, that you created during docker installation, and adjust the values to your needs.
All names of the environment variables start with ENV_ prefix.

Advanced configuration

For advanced configuration, open docker/docker-compose.override.yml.
Configuration variables always start with LISK_ and are mapped to their path in config.json.
These can be changed directly in the file if needed.
For example, the value of redis.db.host can be changed by setting the LISK_REDIS_DB_HOST environment variable.
If you are unsure what variable name to use, refer to the list of command line options.

After editing the variables, reinitialize Lisk Core. It will read docker-compose.yml and your customized docker-compose.override.yml file:

docker-compose up -d

Examples

Use redis for caching

Caching using Redis can be enabled with the docker-compose.redis.yml file, e.g.:

When specifying additional docker-compose files like docker-compose.redis.yml, they need to be chained in the correct order by using the -f flag like below:

Sync from a snapshot

Syncing from the Genesis block can take a lot of time as the whole blockchain needs to be downloaded and validated.
To accelerate this process, it is recommended to sync your node from a snapshot.
Snapshots are database dumps of the Blockchain on a certain blockheight. While syncing from a snapshot, your node will only validate blocks with higher blockheight than the one of the used snapshot.

Lisk provides official snapshots that will be used during the automated synching process. If you want to use third-party snapshots make sure they come from a reliable source.

Automated

cd lisk/docker # navigate into docker directory
make coldstart # will download and restore a blockchain snapshot for you

Manually

The command block in the example below will perform the process. The URL can be substituted for another blockchain.db.gz snapshot file if desired.

Example

For this example we expect the environment variables equal the following values:

What's next?

When accessing our website, we obtain and process your personal data. We also use cookies to improve your experience on our site. To find out more about our use of your data, read our updated privacy policy To continue using our website, click „I accept“.