Docker

Note

Test Network Installation! For installing Lisk Node on the Main Network, see Docker - Main Network.

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 https://github.com/LiskHQ/lisk-docker/blob/master/testnet/docker-compose.yml and https://github.com/LiskHQ/lisk-docker/blob/master/testnet/db.env as reference, e.g.:

mkdir testnet/
cd testnet/
wget https://raw.githubusercontent.com/LiskHQ/lisk-docker/master/testnet/docker-compose.yml
wget https://raw.githubusercontent.com/LiskHQ/lisk-docker/master/testnet/db.env
# 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 https://downloads.lisk.io/lisk/test/blockchain.db.gz
docker run --rm --interactive --network=testnet_lisk-test --env-file db.env --volumes-from=testnet_lisk-config_1 lisk/testnet 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=testnet_lisk-test --env-file db.env --volumes-from=testnet_lisk-config_1 lisk/testnet psql -w --dbname=lisk_restoring
docker run --rm --interactive --network=testnet_lisk-test --env-file db.env --volumes-from=testnet_lisk-config_1 lisk/testnet psql -w --dbname=postgres --command="ALTER DATABASE lisk_restoring RENAME TO lisk_test;"
Note

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 Lisk 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:7000/.

The Lisk web client should launch successfully.


What's next?
Source - Test Network