Masternode Server Setup

A step by step guide howto create own SnowGem Masternode Server

(Linux wallet + Linux VPS)

There are many different ways to set-up a masternode. This method requires a Virtual Private Server, eliminating the need to run your own computer 24/7. Your funds are also safely stored on your local wallet, not the VPS. The following requirements are needed to set-up a Masternode using this guide.

Requirements

1 Masternode will work on 1024 RAM or more, 1 Core CPU, 20 GB or more HDD.

Image
1

A fully synced local wallet

You need to download wallet from Downloads section and wait for sync.
2

10,000 XSG + 1 XSG for transaction fees

We recommend to have the funds in your wallet from the beginning
3

A Virtual Private Server (VPS)

We recommend to purchase from Vultr or Time4VPS.eu
There are 2 ways how to setup Masternode server. First option is to use our automated script, which can be downloaded here. Second option is configure it manually. Both options are designed for Ubuntu OS.
#1 Install and sync local wallet

Run the following commands on your local Linux machine:

sudo apt-get update
sudo apt-get -y install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget bsdmainutils automake curl unzip nano

And this commands:

wget https://snowgem.org/downloads/snowgemparams.zip -N
unzip -o snowgemparams.zip -d ~/

Build the binary (We suggest to build the binary to get the most compatible wallet version with your system)

git clone https://github.com/Snowgem/Snowgem.git snowgem-wallet
cd snowgem-wallet
chmod +x zcutil/build.sh depends/config.guess depends/config.sub autogen.sh share/genbuild.sh src/leveldb/build_detect_platform
./zcutil/build.sh --disable-rust

Run the wallet:

./src/snowgemd -daemon

Wait for syncing to finish

#2 Get Masternode Private Key

Run the following commands:

./snowgem-cli getnewaddress
./snowgem-cli masternode genkey

Copy the wallet address and masternode private key (PRIVATE_KEY) to notepad.

#3 Send collateral

Send exactly 10.000 XSG to the address above. If you have “bad-txns-oversize” error when sending the coin, please following the guide from https://snowgem.org/faq


Wait for 15 confirmations and run the command:

./snowgem-cli masternode outputs

To get TRANSACTION_ID  and INDEX_ID and then stop the wallet:

./snowgem-cli stop

#4 Create Alias

Open file “masternode.conf” in ~/.snowgem/masternode.conf

Add a line below the text containing information above: make sure to include the port after the IP address (:16113) – Alias name must not contain white space

ALIAS VPS_IP:16113 PRIVATE_KEY TRANSACTION_ID INDEX_ID

Next, open “snowgem.conf” with Notepad and add the following:

rpcallowip=127.0.0.1
rpcuser=ANY_LONG_USERNAME
rpcpassword=ANY_LONG_PASSWORD
server=1
listen=1
txindex=1

Start the wallet again.

Excellent, you’ve just done the local setup.
First stage done!
#5 Prepare VPS

Login to your VPS with your credentials

Run following commands:

sudo apt-get update
sudo apt-get -y install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget bsdmainutils automake curl unzip nano vim
mkdir ~/.snowgem
touch ~/.snowgem/snowgem.conf
nano ~/.snowgem/snowgem.conf

#6 Copy snowgem.conf data

Paste config to Putty window:

addnode=dnsseed1.snowgem.org
addnode=dnsseed2.snowgem.org
addnode=dnsseed3.snowgem.org
addnode=explorer.snowgem.org
addnode=insight.snowgem.org
rpcallowip=127.0.0.1
rpcuser=ANY_LONG_USERNAME
rpcpassword=ANY_LONG_PASSWORD
server=1
listen=1
txindex=1
port=16113
masternode=1
masternodeaddr=VPS_IP:16113
externalip=VPS_IP:16113
masternodeprivkey=PRIVATE_KEY

Example:

conf 1


Then use combo Ctr + X, then type Y then Enter

#6 Create alias data

Go to putty (shell) and run the following commands:

touch ~/.snowgem/masternode.conf
nano ~/.snowgem/masternode.conf

Back to local machine, copy data from: ~/.snowgem/masternode.conf file

Paste it to putty window

masternode


Then use combo Ctr + X, then type Y then Enter


Almost done the configuration, let’s move to the next part.

#6 Compile wallet

Go to putty (shell) and run the following commands:

wget https://github.com/Snowgem/SimpleWallet/releases/download/2.0.0f/snowgemparams.zip -N
unzip -o snowgemparams.zip -d ~/

Setup virtual memory:

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Making Swap file permanent (optional): We have our swap file enabled, but when we reboot, the server will not automatically enable the file. We can change that by modifying the fstab file:

sudo nano /etc/fstab

At the bottom of the file, you need to add a line that will tell the operating system to automatically use the file you created:

/swapfile none swap sw 0

Build the binary (We suggest to build the binary to get the most compatible wallet version with your system):

git clone https://github.com/Snowgem/Snowgem.git snowgem-wallet
cd snowgem-wallet
chmod +x zcutil/build.sh depends/config.guess depends/config.sub autogen.sh share/genbuild.sh src/leveldb/build_detect_platform
./zcutil/build.sh --disable-rust

Take a coffee then waiting for the build, it takes 10-20 mins, depends on your VPS

Run the following command to start the wallet:

./src/snowgemd -daemon

Wait for the sync finish.

Run the following command to check masternode syncing process:

./src/snowgem-cli masternodedebug

If the response is: “Not capable masternode: Hot node, waiting for remote activation.” you can move to next step.

#7 Start Masternode

In you local wallet run following command:

./snowgem-cli startmasternode alias false ALIAS_NAME

You will get the success message

Then run:

./snowgem-cli startalias ALIAS_NAME

You will get another success message.

Your masternode is up and runs.


Wait for some minutes, you can get all available masternodes in the network by the command
:

./snowgem-cli masternode list

If the response is: “Masternode successfully started“, you’re finished.
DONE! :)

As an additional service, you can look to setup monitoring of your Masternode VPS. See our other guides for details.

snowgem footersm2

SnowGem maintains that there is no central authority, the system’s decisions will be controlled by nodes in the network. The network is open to anyone, anywhere in the world. We are looking forward to a future where transferring money is no longer complicated and troublesome. 

Recent Posts

Sep 06, 2018 Modern Wallet released!
Jul 10, 2018 We are on CMC!
Jul 07, 2018 Security update