Masternode VPS Setup
( Thanks to user strophy for some of the content)
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:
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.
Vultr server type selection screen
Select a server size offering at least 2GB of memory.
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.
Vultr server management screen
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.
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.
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.
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.
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.
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
ONLY CARRY OUT THE REMAINDER IF YOU ARE NOT USING THE AUTOMATED SCRIPT CREATED BY DOUBLESHARP. IF YOU ARE USING HIS SCRIPT JUST CONTINUE WITH HIS COMMANDS IN HIS SCRIPT.
**THE REMAINDER OF THIS GUIDE IS FOR MANUAL INSTALL ONLY.**
Next we will create a new user with the following command, replacing
<username> with a username of your choice.
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
(press Y and Enter to confirm)
fallocate -l 4G /swapfile
chmod 600 /swapfile
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:
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.