Binary setup

The binary installation offers an easy and automated approach to set up Lisk Core.

Pre-Installation

Supported Platforms

  • Ubuntu 18.04 (LTS) x86_64

  • Ubuntu 20.04 (LTS) x86_64

  • MacOS x86_64

Create a new user

To run and manage a Lisk Core node in the future, please create a separate lisk user as described below:

  • Ubuntu

  • MacOS

The lisk user itself does not need any sudo rights to run the Lisk Core.

sudo adduser lisk (1)
1 Create a new user.

It is not necessarily required to set up a lisk user, especially when you are running a local instance for development purposes.

However, if it is required then it is recommended to create the user using the MacOS GUI.

Installation

This section details how to install Lisk Core using pre-built application packages. Once completed, you will have a functioning node on the Lisk Network.

Download and execute the installation script

Download Lisk Core:

  • Mainnet

  • Testnet

Linux:

curl -o lisk-core.tar.gz https://downloads.lisk.com/lisk/mainnet/3.0.4/lisk-core-v3.0.4-linux-x64.tar.gz

MacOS:

curl -o lisk-core.tar.gz https://downloads.lisk.com/lisk/mainnet/3.0.4/lisk-core-v3.0.4-darwin-x64.tar.gz

Linux:

curl -o lisk-core.tar.gz https://downloads.lisk.com/lisk/testnet/3.0.4/lisk-core-v3.0.4-linux-x64.tar.gz

MacOS:

curl -o lisk-core.tar.gz https://downloads.lisk.com/lisk/testnet/3.0.4/lisk-core-v3.0.4-darwin-x64.tar.gz

Unpack it, and add it to the system path, in order to use it in the terminal:

tar -xf ./lisk-core.tar.gz
cd lisk-core
./bin/lisk-core

You can make the lisk-core command available in the PATH, e.g. by executing the following:

export PATH="$PATH:$HOME/lisk-core/bin"

To make lisk-core permanently available in the CLI, add the above snippet to ~/.bashrc.

To reload .bashrc, run the following command:

source ~/.bashrc

Verify successful installation

To verify that your Lisk node is up and running, execute the following command:

  • Mainnet

  • Testnet

lisk-core start --network mainnet

The default log levels for Mainnet are:

"logger": {
    "fileLogLevel": "error",
    "consoleLogLevel": "none"
},

So if you start the node, it won’t show any logs in the console. This is the recommended setting for reducing the number of logs for a running node. However, to verify that the node started correctly, update the log levels in the config to info or lower.

Alternatively, start the node with the following flag:

lisk-core start --network mainnet --console-log=info

See the Managing logs guide for more information about logging.

lisk-core start --network testnet

Post-installation (optional)

Use pm2 to run Lisk Core in the background

It is recommended to use a process manager such as PM2 to run Lisk Core in the background.

Enable IPC & WS in the config

To make use of all the Lisk Core commands, enable IPC in the config.

Example: Enable IPC & WS via config.json
"rpc": {
    // enabled communication through 'ipc' or 'ws'
    "modes": ["ipc", "ws"]
    // In case `modes` include `ws` then, the following port is used
    "port": 8080,
    // Change to 0.0.0.0 to connect from a remote server
    "host": "127.0.0.1"
},

Alternatively, start Lisk Core with the flag --api-ipc to enable ipc:

Example: Enable IPC via flag
lisk-core start --api-ipc

Log rotation

It is recommended to set up a log rotation, as the log of the Lisk Core files can grow very large over time.