Running a NEM Node on a VPS Debian

@28e6d94f
2 min readJan 29, 2018

Introduction

Running a NEM node on the network does not require a huge amount of computational power. Because NEM uses POI rather than POW we can run a node on some of the most basic of hardware.

Setting up the Debian

Create a Swap File

Run the following command as root on your Debian droplet:

allocate -l 4G /swapfilechmod 600 /swapfilemkswap /swapfileswapon /swapfile

Check the new amount of total memory:

free -m

Make the Swap File permanent

Edit the file with root privileges in your text editor:

nano /etc/fstab

At the bottom of the file, you need to add a line that will tell the operating system to automatically use the file you created:

swapfile none swap sw 0 0

Java Installation

The first thing we will need is Java. If you have the noobs os preloaded you will have this and can skip ahead, if not you will need to run the following commands into terminal:

echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.listecho "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.listapt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886apt-get updateapt-get install oracle-java8-installer

Download and configure NIS

wget https://bob.nem.ninja/nis-0.6.95.tgztar -xvzf nis-0.6.95.tgzrm nis-0.6.95.tgzmkdir nis-nccmv package nis-ncc/package

Edit : config.properties

cd nis-ncc/package/nisnano config.properties

nis.bootName: name of the NIS node (you can use anything you like)
nis.bootKey = XXX

Start boot service on VPS :

cd /etc/init.dnano startbootnode.sh 

#!/bin/bash

### BEGIN INIT INFO
# Provides: firewall
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Démarre les règles iptables
# Description: Charge la configuration du pare-feu iptables
### END INIT INFO#!/bin/sh

cd ~/nis-ncc/package

./nix.runNis.sh

chmod +x startbootnode.shupdate-rc.d startbootnode.sh defaults 

Restart Debian, ready !

Make sure you are in the list : https://nemnodes.org/nodes/

Check progress : http://XXX.XXX.XXX.XXX:7890/chain/height

Thank you for your support :

NEM : NBF7I7-QCWF2E-JIHRO5-POYVA4-ZSWDDE-5X4S4G-DCVM

--

--