For the best viewing experience, please turn your phone to portrait mode.

Lisk Core Source Pre-Install

This document details the prerequisites to install Lisk Core 1.0.0 from a Source installation using tagged releases on Github.
To complete the installation there are prerequisites that need to be fulfilled. If you have already performed these, please proceed to the Installation page.


  1. Open necessary ports
  2. Create a new user
  3. Install Tool chain components
  4. Git Installation
  5. Node.js Installation
    1. Recommended: Install NVM
    2. Recommended: Install PM2
  6. Postgres Installation
  7. Redis Installation

Firstly, please determine if your platform can install Lisk Core from source.

Supported Platforms
  • Ubuntu 14.04 (LTS) x86_64
  • Ubuntu 16.04 (LTS) x86_64
  • Ubuntu 18.04 (LTS) x86_64
  • MacOS 10.12 (Sierra)
  • MacOS 10.13 (High Sierra)

1. Open necessary ports

In order to connect to the desired network with Lisk Core , please ensure that the corresponding ports are open:

Network httpPort(HTTP) wsPort(TCP)
Mainnet 8000 8001
Testnet 7000 7001
Betanet 5000 5001
Devnet 4000 5000

These are the default ports for connecting with the network, they can be altered later in config.json.

2. Create a new user

In order to install the required prerequisites, it is necessary to have a user with sudo rights on the server.
In order to run and manage a Lisk Core node in the future, please create a separate 'Lisk' user like so:


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

sudo adduser lisk

3. Tool chain components

Used for compiling dependencies.


sudo apt-get update
sudo apt-get install -y python build-essential curl automake autoconf libtool ntp


Ensure that both XCode and Homebrew are installed.

Update homebrew and install dependencies:

brew update
brew doctor
brew install curl automake autoconf libtool

4. Git

Git is used for cloning and updating Lisk.


sudo apt-get install -y git


brew install git

5. Node.js (

Node.js serves as the underlying engine for code execution.

Install System wide via package manager, like so:


curl -sL | sudo -E bash -
sudo apt-get install -y nodejs


brew install node@8.12.0
  1. Login as lisk user, that has been created in the first step:
    su - lisk
  2. Install nvm following these instructions
  3. Install the correct version of Node.js using nvm:
    nvm install 8.12.0

For the following steps, logout from the 'lisk' user again with CTRL+D, and continue with your user with sudo rights.

PM2 manages the node process for Lisk

sudo npm install -g pm2

6. PostgreSQL (version 10)


Firstly, install postgreSQL on your machine:

sudo apt-get purge -y postgres* # remove all already installed postgres versions
sudo sh -c 'echo "deb $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
sudo apt install wget ca-certificates
wget --quiet -O - | sudo apt-key add -
sudo apt update
sudo apt install postgresql-10

After installation, you should see the postgres database cluster, by running


Drop the existing database cluster, and replace it with a cluster with the locale en_US.UTF-8:

  sudo pg_dropcluster --stop 10 main
  sudo pg_createcluster --locale en_US.UTF-8 --start 10 main

Create a new database user called lisk and grant it rights to create databases:

  sudo -u postgres createuser --createdb lisk

Switch to the lisk user and create the databases, where {network} is the network you want to connect your Lisk Core node to:

  su - lisk
  createdb lisk_{network}

For the following steps, logout from the lisk user again with CTRL+D, and continue with your user with sudo rights.
Change 'password' to a secure password of your choice.

 sudo -u postgres psql -d lisk_{network} -c "alter user lisk with password 'password';"


brew install postgresql@10
initdb /usr/local/var/postgres -E utf8 --locale=en_US.UTF-8
brew services start postgresql@10
createdb lisk_{network}

{network} is the network you want to connect your Lisk Core node to.

7. Installing Redis


sudo apt-get install redis-server

Start redis:

sudo service redis-server start

Stop redis:

sudo service redis-server stop


brew install redis

Start redis:

brew services start redis

Stop redis:

brew services stop redis

Lisk does not run on the redis default port of 6379. Instead it is configured to run on port: 6380.
Due to this, in order to run Lisk, you have one of two options:

  1. Change the Lisk configuration

In the next installation phase, remember to update the Redis port configuration in both config.json and test/data/config.json.

  1. Change the Redis launch configuration

Update the launch configuration file on your system. Note that there are a number of ways to do this.

The following is one example:

  1. Stop redis-server
  2. Edit the file redis.conf and change: port 6379 to port 6380
    • Ubuntu/Debian: /etc/redis/redis.conf
    • MacOS: /usr/local/etc/redis.conf
  3. Start redis-server

Now confirm that redis is running on port 6380:

redis-cli -p 6380

And you should get the result PONG.

If you have finished all above steps successfully, your system is ready for installation of Lisk Core.

What's next?