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.
--networkflag determines the blockchain network Lisk Core connects to.
--api-wsenables the WebSocket API of the node, if not already enabled within the config.json file.
--api-ws-host=0.0.0.0allows remote servers to connect to the Lisk Core WS API. If this option is not set, it defaults to
--api-ws-port=8080the port for the WebSocket API.
lisk-core start --network mainnet --api-ws --api-ws-host=0.0.0.0 --api-ws-port=8080
To connect to a different network, replace
mainnet with either
It is strongly recommended to synchronize your Lisk Core node with the network before starting the Lisk Service.
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
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.6.4
Build Lisk Service from local files:
Lisk Service is now ready to use on your machine.
If you skipped the step to configure Docker to run without
Before running the application copy the default docker-compose environment file:
cp docker/example.env .env
In the next step, open
.env and set the required environment variables.
# Lisk ecosystem configuration LISK_CORE_WS=ws://host.docker.internal:8080 (1)
|1||The example assumes that the Lisk Core node is running on the host machine, and not inside of a Docker container.
When running Lisk Core inside of a Docker container, the variable needs to refer to the container:
|For a complete list of supported environment variables check the Lisk Service Configuration Reference.|