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 betanet --api-ws --api-ws-port=8080 --overwrite-config
To connect to a different network, replace
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.3.0
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://localhost:8080 #export ENABLE_HTTP_API=http-status,http-version2 #export ENABLE_WS_API=blockchain,rpc-v2 # Command to start Lisk Service make up
It’s possible to configure Lisk Service by exporting environment variables which override the default option which are located under
The three available environment variables are:
LISK_CORE_WS: Path to the Lisk Core WS port.
ENABLE_HTTP_API: List of HTTP APIs that will be enabled in Lisk Service.
ENABLE_WS_API: List of WebSocket APIs that will be enabled in Lisk Service.