Running a NEM Node on a VPS Debian


#1

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 /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /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.list

echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886

apt-get update

apt-get install oracle-java8-installer

Download and configure NIS

wget https://bob.nem.ninja/nis-0.6.95.tgz

tar -xvzf nis-0.6.95.tgz
rm nis-0.6.95.tgz
mkdir nis-ncc
mv package nis-ncc/package

Edit : config.properties

cd nis-ncc/package/nis
nano 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.d

nano 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

Then run at startup :

chmod +x startbootnode.sh
update-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


#2

(removed duplicate post)


#3

Thx :blush: