RISE — Complete Node Installation Guide + Server Preparations + Mainnet + Testnet (1.3.x)

ndoh20usn
rise-vision
Published in
7 min readJul 24, 2018

Install docs here if needed.

Introduction

This is a complete guide to get you up and running on the RISE network.

Contents:

  1. Get your VPS
  2. Log in to VPS + initial preparations
  3. Improving Security
  4. Creating a sudo user + disabling root login
  5. Installing RISE core

Follow each step carefully and if all goes well, you should have a VPS (Virtual Private Server) with good security running RISE core software. This tutorial covers MAINNET and TESTNET so make sure your using the right command!

If you are unsure of anything do not hesitate to ask questions regarding setup of your node, feel free to ask for help in our Telegram channel or #support in Slack.

1. Get your VPS

Deploying a cloud instance using Vultr.com

You can use any cloud service provider of your choice, some others could be Digital Ocean or Amazon Web Services (AWS)

Our recommended specifications:

Ubuntu 16.04+

2GB+ of RAM.

1 CPU+

If you are unable to acquire 2GB of RAM we recommend creating a swap file.

A swap file is a space on a hard disk used as the virtual memory extension of a computer’s real memory (RAM). Having a swap file allows your computer’s operating system to pretend that you have more RAM than you actually do.

2. Login to VPS + initial preparations

Using Putty to log into the server

Login with SSH. First of all, login as root on your server. Preferably using SSH so you can easily copy/paste the commands.

On Windows, use Putty. On MacOS, use Terminal. Your VPS will should provide you with the root credentials
ssh root@TheIpOfYourVps

Update the OS: Make sure your OS (Operating System) is up-to-date.
sudo apt update && sudo apt upgrade

Some helpful packages: To help you, install some basic packages first. Some might be installed already, but that depends on your VPS provider.
sudo apt install htop nano git ufw

Automatic Updates (optional):

Install the unattended-upgrades package:
sudo apt install unattended-upgrades

Now edit (or create if it does not exist) this file:
sudo nano /etc/apt/apt.conf.d/20auto-upgrades

Paste the part below into the file, save and close.

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "1";
APT::Periodic::AutocleanInterval "7";
APT::Periodic::Unattended-Upgrade "1";

Enabling automatic security updates is an important part in keeping your server up-to-date and safe. More information about automatic updates can be found here.

3. Improving Security (optional)

We will be changing the default SSH(22) port and configuring our firewall in this section.

Most hackers will do a port scan first to see which ports are open. Since it takes time and consumes a lot of bandwidth to check all 65,535 ports, most of them won’t waste time and just check the defaults or a small range. As a first line of defense, we will change the default SSH port.

Changing the SSH port:

Change the SSH port from 22 (default) to a number of your choosing. Since the range 49152–65535 contains dynamic or private ports that cannot be registered with IANA, it’s best to choose one within that range.
Source: Wikipedia

So choose a number between 49152–65535.

Open the SSH config file with your favourite text editor.
sudo nano /etc/ssh/sshd_config

Change the port from: #Port 22 to Port 65056 for example.

Restart SSH to apply the new config.
sudo service ssh restart

After the restart of SSH, no new connections can be made using the default SSH port (22). To check the ssh port changed, start an extra SSH connection in a new tab or window using the -p switch.
ssh -p 65056 root@TheIpOfYourVps

Or change the port number in Putty next to the ‘Host name’ field.

Now that you’re logged in using the new SSH port, it’s time to configure the firewall. We recommend that your VPS should be dedicated to run RISE software only so we will setup a simple and secure firewall on your VPS.

Configuring the firewall:

Allow the ports below for a VPS running on RISE MAINNET. Again, port 65056 should be the port you chose for SSH.

sudo ufw allow 65056/tcp
sudo ufw allow 5555/tcp
sudo ufw allow 5556/tcp

Allow the ports below for a VPS running on RISE TESTNET. Port 65056 is your new SSH port, remember? Change it to match the port number of your choosing.

sudo ufw allow 65056/tcp
sudo ufw allow 5566/tcp
sudo ufw allow 5567/tcp

Lastly, enable the firewall:
sudo ufw enable

4. Creating a sudo user + disabling root login

Now we need to create a “normal” user with sudo privileges on your system which you should use to run your RISE node with. After creating the user, we will edit the SSH config again to disable SSH for the root account as that can be a security issue.

Adding a new user. Add a new user to your server. Change CHANGEME to whatever username you like.
sudo adduser CHANGEME

Creating a user

Now add the new user to the sudo group so it can perform root tasks (don’t worry, it’s protected by the password of the new user).
sudo usermod yourusername -aG sudo

Edit your SSH config again to disable SSH for the root account.
sudo nano /etc/ssh/sshd_config

Change PermitRootLogin yes to PermitRootLogin no.

Now restart SSH again using sudo service ssh restart.You should no longer be able to login to your server as root.

Try to login with the new user you just created (don’t forget your new port number). That should work!

ssh -p 65056 rise1@TheIpOfYourVps

5. Installing RISE Core

Everything go smoothly above? Awesome, we’ll now install the latest version of RISE core onto your VPS. Exciting! Steps taken from the RISE Github.

  1. Go to your home directory.
cd ~

2. Download the installation script:

wget https://raw.githubusercontent.com/RiseVision/rise-build/master/scripts/install.sh

3. Install the RISE core.

MAINNET:

bash install.sh install -r mainnet -u https://downloads.rise.vision/core/mainnet/latest.tar.gz

TESTNET:

bash install.sh install -r testnet -u https://downloads.rise.vision/core/testnet/latest.tar.gz
Successful installation

The installer will start the node automatically if installation was successful.

4. Go to the RISE directory.

cd rise

5. Run the downloadSnapshot command to download an official snapshot of the blockchain to quickly get synced with the network.

./manager.sh downloadSnapshot

[ALTERNATIVELY]

5. Fast sync by downloading an official MAINNET blockchain snapshot manually (Make sure you are in the /rise/ directory)

wget https://downloads.rise.vision/snapshots/mainnet/latest -O latestsnap.gz

Fast sync by downloading an official TESTNET blockchain snapshot manually (Make sure you are in the /rise/ directory)

wget https://downloads.rise.vision/snapshots/testnet/latest -O latestsnap.gz

6. Restore the backup. (Only required if you used ALTERNATIVE method)

./manager.sh restoreBackup latestsnap.gz
Successful restore

7. Check the status of your node.

./manager.sh status
All looking good!

Check the height (H=) of your node with the height of the blockchain explorer: Mainnet Explorer, Testnet Explorer

8. You are fully synced with the network if the height of your node is equal to the height on the blockchain explorer.

Comparing height of node with explorer

9. Remove the backup file. (Only required if you used ALTERNATIVE method)

rm latestsnap.gz

10. Edit the config file located at(etc/node_config.json).

nano etc/node_config.json

11. Enter your secret inbetween the ‘[]’ and ensure your include the “”. It should look like:

"fileLogLevel": "error",
"forging": {
"secret": ["word1 word2 word3... word12"],
"access": {
"whiteList": [ "127.0.0.1" ]
}
}
}

CTRL+X , Y and then ENTER to Save and Quit.

12. Restart your node.

./manager.sh reload node

Congratulations!

You should now have a working forging enabled node on either the RISE mainnet or testnet.

6. Enable API access:

The general API allows for HTTP queries on the status of your node as well as the blockchain

Enabling API access requires some changes your nodes config file.

  1. Go to rise directory

cd rise

2. Edit the node_config.json

nano etc/node_config.json

3. Ensure the config looks like this:

There will be errors if the json is not formatted properly, you can check the json is correct using this.

4. Save and exit

5. Reload your node

./manager.sh reload node

6. Create awesome applications!

Note:

Get started with rise-js and see examples here.

You can get your public ip address using: curl ipinfo.io/ip

In your project, this is how you will reference your node:

//rise.nodeAddress = 'https://wallet.rise.vision'; Do not userise.nodeAddress = 'http://YOUR_NODE_IP:5555'; //Do use!

--

--