Installation with Docker
How to set up Lisk Service and connect it to a local Lisk Core node.
Lisk Service is installed in addition to a Lisk blockchain application such as Lisk Core, in order to provide enriched network data for third-party services.
The first step is therefore to install Lisk Core.
It is recommended to use NPM to conveniently install Lisk Core through the command line:
npm install --global --production lisk-core
Check out the Lisk Core NPM setup guide for more information on how to install Lisk Core on your machine.
Use the Lisk Core CLI to start Lisk Core with the desired configurations.
--network flag defines which blockchain network Lisk Core will connect to.
--api-ws enables the WebSocket API of the node.
--api-ws-port allows the user to define the port for the WebSocket connection.
lisk-core start --network testnet --api-ws --api-ws-port=8080 --overwrite-config
To connect to a different network, replace
testnet with either
It is strongly recommended that you synchronize your Lisk Core node with the network before starting the Lisk Service.
If you followed the Binary setup of Lisk Core, it is also necessary to add the following option to the
The following dependencies are required to install and run Lisk Service with Docker.
build-essential package alongside with several development tools.
For example, use
apt if running Ubuntu as shown in the following command below:
apt install build-essential git
Please refer to docker installation for ubuntu.
To install Docker Compose, please refer to install docker compose.
To configure Docker so it can be run without
Clone the lisk-service GitHub repository and then navigate into the project folder.
git clone https://github.com/LiskHQ/lisk-service.git cd lisk-service git checkout v0.4.5
Build Lisk Service from local files:
Lisk Service is now ready to use on your machine.
To connect Lisk Service to a local Lisk Core node, set the environment variable
LISK_CORE_WS before starting Lisk Service as shown below:
export LISK_CORE_WS=ws://host.docker.internal:8080 (1) make up (2)
|2||Command to start Lisk Service.|
Export environment variables to override the default config options which are located under
|For a complete list of supported environment variables check the Lisk Service Configuration Reference.|
Alternatively, it is possible to define a file with all the desired environment variables and use it to start Lisk Service as shown below:
cd docker/network vim my-env.env
Define key-value pairs of all desired environment variables, for example:
|Press i to enter the insert mode in vim.|
|Save and quit vim again by first leaving the insert mode with Esc and then by typing :wq and Enter.|
Now start Lisk Service with the following command:
This will start Lisk Service with all the environment variables previously defined in