Install Lisk through Docker

To install the latest version of Lisk as a docker container, please proceed with the following:

Create configuration (executed only once per installation)

You can use and as reference, e.g.:

mkdir mainnet/
cd mainnet/
# you can edit those files if you want
echo "*:*:*:*:$(shell grep POSTGRES_PASSWORD db.env |cut -d "=" -f 2 )" >.pgpass
docker-compose up -d

If you are using a postgresql container (as the reference docker-compose.yml does) you can restore the database like so:

curl -O
docker run --rm --interactive --network=mainnet_lisk-main --env-file db.env --volumes-from=mainnet_lisk-config_1 lisk/mainnet psql -w --dbname=lisk_restoring --command="\d" >/dev/null 2>&1 || sleep 10
gzip --decompress --to-stdout blockchain.db.gz |docker run --rm --interactive --network=mainnet_lisk-main --env-file db.env --volumes-from=mainnet_lisk-config_1 lisk/mainnet psql -w --dbname=lisk_restoring
docker run --rm --interactive --network=mainnet_lisk-main --env-file db.env --volumes-from=mainnet_lisk-config_1 lisk/mainnet psql -w --dbname=postgres --command="ALTER DATABASE lisk_restoring RENAME TO lisk_main;"

On Windows, these commands are issued from within the Docker Quickstart Terminal. Upon successful completion, you will have a running Lisk node with an up-to-date snapshot of the blockchain. The container is configured to automatically restart upon reboot of the server or any occurrence of an error.

To access the Lisk web client, open: http://localhost:8000/

The Lisk web client should launch successfully.

What's next?
Source - Main Network