Masternode VPS Setup

John Syscoin
May 1, 2018 · 5 min read

( Thanks to user strophy for some of the content)

We will use Vultr hosting as an example of a VPS, although Hetzner, Contabo, DigitalOcean, Amazon EC2, Google Cloud, Choopa and OVH etc are also popular choices.

To enable for higher throughput once people start using z-dag it is requested to use a multi-core (4 core ) VPS if possible.

First create an account and add credit. Then go to the Servers menu item on the left and click + to add a new server. Select a location for your new server on the following screen:

Image for post
Image for post

Vultr server location selection screen

You can select any Country the more spread out the better for the network.

Select Ubuntu 18.04 x64 as the server type.

Image for post
Image for post

Vultr server type selection screen

Select a server size offering at least 2GB of memory.

Image for post
Image for post

Vultr server size selection screen

Enter a hostname and label for your server. In this example we will use syscoin1 as the hostname.

Vultr will now install your server. This process may take a few minutes.

Click Manage when installation is complete and take note of the IP address, username and password.

Image for post
Image for post

Vultr server management screen

System setup

We will begin by connecting to your newly provisioned server. On Windows, we will first download an app called PuTTY to connect to the server. Go to the PuTTY download page here and select the appropriate MSI installer for your system. On Mac or Linux you can ssh directly from the terminal — simply type ssh root@<server_ip> and enter your password when prompted.

Image for post
Image for post

PuTTY download page

Double-click the downloaded file to install PuTTY, then run the app from your Start menu. Enter the IP address of the server in the Host Name field and click Open. You may see a certificate warning, since this is the first time you are connecting to this server. You can safely click Yes to trust this server in the future.

Image for post
Image for post

PuTTY security alert when connecting to a new server

You are now connected to your server and should see a terminal window. Begin by logging in to your server with the user root and password supplied by your hosting provider.

Image for post
Image for post

Password challenge when connecting to your VPS for the first time

You should immediately change the root password and store it in a safe place for security. You can copy and paste any of the following commands by selecting them in your browser, pressing Ctrl + C, then switching to the PuTTY window and right-clicking in the window. The text will paste at the current cursor location.

passwd root

When entering passwords in Linux you will not see anything happen but it is.

Enter and confirm a new password (preferably long and randomly generated).

Now, while still as root, we will update the system from the Ubuntu package repository.

apt update
apt upgrade

The system will show a list of upgradable packages. Press Y and Enter to install the packages.

sudo apt-get install git
sudo apt-get install nano



Next we will create a new user with the following command, replacing <username> with a username of your choice.

adduser <username>

You will be prompted for a password. Enter and confirm using a new password (different to your root password) and store it in a safe place. You will also see prompts for user information, but this can be left blank.

Once the user has been created, we will add them to the sudo group so they can perform commands as root.

usermod -aG sudo <username>

We will now install a firewall (and some other packages we will use later), add swap memory and reboot the server to apply any necessary kernel updates, and then login to our newly secured environment as the new user.

apt install ufw python virtualenv git unzip pv

(press Y and Enter to confirm)

ufw allow ssh/tcp
ufw limit ssh/tcp
ufw allow 8369/tcp
ufw logging on
ufw enable

(press Y and Enter to confirm)

fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
nano /etc/fstab

Add the following line at the end of the file, then press Ctrl + X to close the editor, then Y and Enter save the file.

/swapfile none swap sw 0 0

Then reboot the server:

reboot now

PuTTY will disconnect when the server reboots.

While this setup includes basic steps to protect your server against attacks, much more can be done. In particular, authenticating with a public key instead of a username/password combination, installing fail2ban to block login brute force attacks, disabling root login and enabling automatic security updates is advisable. More tips are available here. However, since the masternode does not actually store the keys to any Syscoin, these steps are considered beyond the scope of this guide.

Return to main guide.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store