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.1.1/lisk-core-v3.1.1-linux-x64.tar.gz

MacOS:

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

Linux:

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

MacOS:

curl -o lisk-core.tar.gz https://downloads.lisk.com/lisk/testnet/3.1.1/lisk-core-v3.1.1-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.

Check the guide Process management with pm2 for more information.

Enable IPC in the config

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

Example: Enable IPC via config.json
"rpc": {
    // enabled creates IPC or WS socket if true
    "enable": true,
    // enabled communication through 'ipc' or 'ws'
    "mode": "ipc",
    // In case of `mode` is set to `ws`, this port 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.

Check the guide Managing logs in the SDK docs for more information.