How to setup a Masternode (Command line)

A better cryptocurrency for everyone

Requirements

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.

  • A fully synced local wallet – download from https://snowgem.org/#wallet
  • 10,000 XSG + 1 XSG for transaction fees (I recommend having the funds in your wallet from the beginning)
  • A Virtual Private Server (VPS). Any VPS should work. Ubuntu 16.04 or 17.10 is good – I recommend to purchase from: https://www.vultr.com/ or https://billing.time4vps.eu/
    An XS VPS (from time4vps.eu) or 5 USD (from vultr) server is enough for 1 masternode.

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

  • Download and install Putty from: www.putty.org
  • Desktop Notepad for record keeping
  • An ability to follow instructions 🙂

Create a MasterNode Address (ALIAS) & send collateral

Run the 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

Run the following command:

wget https://snowgem.org/downloads/snowgemparams.zip -N

unzip -o snowgemparams.zip -d ~/

Build the binary (I 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 finish

Run the command:

./snowgem-cli getnewaddress

./snowgem-cli masternode genkey

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

Send exactly 10000 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

Stop the wallet

./snowgem-cli stop

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

Add a line below the text containing this information: 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: (change the text in bold)

rpcallowip=127.0.0.1

rpcuser=ANY_LONG_USERNAME

rpcpassword=ANY_LONG_PASSWORD

server=1

listen=1

txindex=1

Run the wallet again

VPS Set-up

Login with VPS credential.

Run the 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

mkdir ~/.snowgem

touch ~/.snowgem/snowgem.conf

nano ~/.snowgem/snowgem.conf

Add the following: (change the text in bold)

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

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

Next, 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

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

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

Run the following command:

wget https://snowgem.org/downloads/snowgemparams.zip -N

unzip -o snowgemparams.zip -d ~/

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 (I 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

Wait for syncing finish.


Start MasterNode

In your local wallet, run the 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

DONE!!!

As an ADDITIONAL service, you can look to setup monitoring for on your Masternode VPS. See our Masternode Monitoring page or start on boot guide for details.