Source

This section details how to manage a Source installation of Lisk Node. Source installations for use in production are recommended to use a process manager. PM2 is included in the installation document and will be used in this reference.

Command Description
pm2 start app.js Starts Lisk using app.js
pm2 stop app.js Stop Lisk using app.js
pm2 restart app.js Restarts Lisk using app.js
pm2 delete app.js Stops Lisk processes and cleans up pm2 entries for Lisk
pm2 logs Displays the logs of the Lisk process

Start Source Install with PM2

pm2 start app.js

Stop Source Install with PM2

pm2 stop app.js

Restart Source Install with PM2 (useful for reloading changes to config.json)

pm2 restart app.js

Delete Source Installation with PM2 (useful if removing Lisk Node or rebuilding the source installation entirely)

pm2 delete app.js

View Realtime Logs (useful for troubleshooting issues)

pm2 logs

Rebuild source installation from a snapshot

In some scenarios its recommended to restore the blockchain from a snapshot. The command blocks below will perform this process. The url can be substituted for another blockchain.db.gz host if desired.

Mainnet

pm2 stop app.js
dropdb lisk_main
wget https://downloads.lisk.io/lisk/main/blockchain.db.gz
createdb lisk_main
gunzip -fcq blockchain.db.gz | psql -d lisk_main
pm2 start app.js

Testnet

pm2 stop app.js
dropdb lisk_test
wget https://downloads.lisk.io/lisk/test/blockchain.db.gz
createdb lisk_test
gunzip -fcq blockchain.db.gz | psql -d lisk_test
pm2 start app.js

What's next?
General - Configuration