Setting up your SubiNode

Subi Platform
4 min readDec 20, 2018

--

SubiNode Setup Guide

Disclaimer

The Subi team is not responsible if you fail to implement some basic and/or advanced security level to your VPS/Servers.

Prerequisites

SubiCore Wallet v1.0.0.1 or later: See Github for the latest release and release notes.

10000 SUBI

A Virtual Private Server (VPS): A VPS is recommended as a SubiNode requires dedicated resources and 24–7 availability for proper operation. Although it is possible, to run a SubiNode from your desktop, this guide will not walk through those steps.

The VPS must have:
1. At least 2 GB of RAM.
2. At least 20 GB of storage space.
3. A static public IP address.

Generating a SubiNode Key

This section describes how to generate a SubiNode key from a desktop wallet. You can associate a desktop wallet address with a SubiNode on a separate server, which this section describes.

First, launch your desktop wallet and navigate to Help → Debug Window → Console as shown in the screenshot below:

In the console, enter the following command. This generates the SubiNode key. Be sure to save it to a safe location.

subinode genkey

Next, enter the following command to generate a SubiNode deposit address for the 10,000 SUBI collateral. SN1 will be the label assigned to the new deposit address and can be changed if desired.

getnewaddress SN1

After generating the SubiNode key and SubiNode wallet address, transfer the collateral deposit of 10,000 SUBI, Be aware that you must send exactly 10,000 SUBI in a single transaction. Also consider that a transaction fee will be deducted.

Once you have sent the 10,000 SUBI to the address generated from getnewaddress, you will need to obtain the Transaction ID and Index

Do this by navigating to Help → Debug Window → Console

Type the following into the Console to obtain your Transaction ID and Index:

subinode outputs

You should see the something similar to the example below:

{ “d8ff88888bb6d9998d22c5155437f009c72dfd55dd2222f87fd55e22c0f89ddc” : “1”, }

From the example, we get the Transaction ID and Index:

Transaction ID: d8ff88888bb6d9998d22c5155437f009c72dfd55dd2222f87fd55e22c0f89ddc

Index: 1

Next, you will need to create a text file on the computer with the desktop wallet. Depending on your operating system, create a file called subinode.conf and place it in the appropriate directory:

Windows: %APPDATA%
OS X: ~/Library/Application Support/subi
Linux: $HOME/.subi

In the file, add a line that matches the following syntax. If you are running multiple SubiNode, you will add one line for each node with the appropriate values:

LABEL IP:5335 SUBINODEKEY TXID INDEX

Where:

LABEL: The label of the node used for getnewaddress command above.

IP: Your VPS Public IP address.

SUBINODEKEY: SubiNode key previously generated with the subinode genkey command.

TXID: The Transaction ID obtained using the subinode outputs command above.

INDEX: The Index obtained using the subinode outputs command above.

Save the file and restart your wallet. The wallet is now configured for SubiNode and next we will setup and link the SubiNode server.

Server Configuration

For the next steps, we’ll be using Ubuntu Server 16.04 64-bit. You must use SSH to connect to your VPS.
You can use PuTTY for Windows or Terminal on Mac OS X (ssh root@IP )

So, let’s login to our VPS ,

Install Necessary Packages

The following packages are mandatory to successfully setup a SubiNode:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libtool autotools-dev automake pkg-config
sudo apt-get install libssl-dev libevent-dev bsdmainutils libboost-all-dev
sudo apt-get install software-properties-common
sudo apt-get install dirmngr — install-recommends
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
sudo apt-get install libminiupnpc-dev libzmq3-dev
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5
sudo apt-get install qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev

Next, we will install and configure UFW, a firewall for Linux:

sudo apt-get install ufw
ufw allow ssh/tcp
ufw limit ssh/tcp
ufw allow 6214/tcp
ufw logging on
ufw enable


Download, Build & Configure the SubiCore Wallet

First, download the latest version of the SubiCore wallet into your home directory, extract, and rename for clarity:

git clone https://github.com/SubiPlatform/SubiCore

Next, we will build the wallet. These steps will take some time to complete, so please be patient:

cd SubiCore
./autogen.sh
./configure — without-gui — enable-wallet
make install CFLAGS=-fPIC


Once the installation is complete, we need to set up the SubiCore Configuration files:

mkdir ~/.subi
nano ~/.subi/subi.conf

Next, enter the following configuration. Be sure to update the following fields below:

rpcuser=username
rpcpassword=password
rpcallowip=127.0.0.1
port=5335
rpcport=5336
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=64
txindex=1
subinode=1
externalip=subinode-ip-address:5335
subinodeprivkey=subinode-key


Next, start subid daemon and let it sync:

You can check the status of syncing by typing:

Check you have connections:
subi-cli getinfo

Check the status of your SubiNode:
subi-cli subinode status

Next, in the Windows wallet, go to the SubiNodes tab and you should see a list of all SubiNodes on the network.

Click the Start all button to start all of your SubiNodes.

Your nodes should show PRE_ENABLED in status and after a few minutes change to ENABLED.

If the status changes to EXPIRED, there is something wrong in your configuration and you will need to go back and double check every step you’ve made.

--

--

Subi Platform

Subi is an open source, ASIC resistant, decentralized, multi-layered and privacy focused crypto-currency.