PREPARE YOUR VPS FOR MASTERNODE

We will begin by connecting to your newly provisioned server. On Windows, we will first download PuTTY to connect to the server. Go to the PuTTY Download Page and select the appropriate MSI installer for your system. On Mac or Linux you can ssh directly from the terminal – simply type ssh [email protected]<server_ip> and enter your password when prompted.

PuTTY will be used to connect via SSH to systems.

Double-click the downloaded file to install PuTTY, then run the app from your Start menu.
Enter your VPS IP in the Host Name field and click Open. (copy/paste from email)

Suggestion : In ‘Saved Sessions’ type in the name of your MNx and…
CLICK : Save – so you can easily reopen the session with your VPS later
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.

At the prompt, type: “root” and press Enter

Copy the password VULTR sent you in email and right-click inside the PuTTY window and
press Enter
TIP : Right-clicking is how you paste into a PuTTY console window.
When you right-click paste, your password won’t be visible in the window.
Just trust that it pasted and hit enter.
Next, you will be prompted to change your password.
Right-click / Enter (to paste the default password again)
Now type in a new root password (one you choose) for your VPS and hit enter. Do this twice.

 

*** SYSTEM PREPARATION ***

Some generic instructions how to compile coins based on Dash. However, not all of the listed dependencies are necessary for all coins. If you don’t want to install what is not needed for your specific coin I do recommend to check their GitHub to check what is really needed. If you don’t want to bother with it, you can just move one and install everything.

Additional dependencies are marked as “#OPTIONAL”

sudo apt-get update -y

sudo apt-get upgrade -y

sudo apt-get dist-upgrade -y

sudo apt-get install nano htop git -y

sudo apt-get install build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils software-properties-common -y

sudo apt-get install libboost-all-dev -y

sudo apt-get install libzmq3-dev libminiupnpc-dev libssl-dev libevent-dev -y #OPTIONAL

sudo add-apt-repository ppa:bitcoin/bitcoin

sudo apt-get update

sudo apt-get install libdb4.8-dev libdb4.8++-dev -y

upgrade depends on your system but usually takes around 5-10 minutes.

Now your VPS is ready to setup. Search your Masternode Guide for further steps.

 

*** CONFIG SWAP ***

In order to save some bucks, you might have chosen a VPS with less than 2GB of RAM which will result in a failed attempt to build the binaries. No worries, we can work this out. We will create a SWAP file that extends the size of RAM using a flat file on the servers HDD. Let’s go.

*** CREATE ***
cd /var

sudo touch swap.img

sudo chmod 600 swap.img

 

*** SIZING ***

In general, I recommend 1-2x the available system RAM. So, if you have 512MB RAM, use 512mb-1gb swap. In our case, we need to get at least 2GB, so I recommend to set it to 2GB. Keep in mind that your disk is slower than your RAM. The performance won’t be the same as on a system that really has 2GB of RAM.

sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=2000

This process may take a while.

 

*** ENABLE ***
mkswap /var/swap.img

sudo swapon /var/swap.img
Check if swap is listed by using:

sudo free

We now need to ensure that swap will be enabled during boot as swapon will just do it for your current boot.

sudo echo "/var/swap.img none swap sw 0 0" >> /etc/fstab

If you type it, make sure there are two > symbols, using one will overwrite the file instead of appending a line at the end.

That’s it. For our purpose that’s all we need to do. You could do more with swap like spanning across multiple devices etc. If you are interested to do so i suggest you check well-known resources.