[Guide] Setup a GoByte Masternode

Introduction

This guide is for a single Masternode on a Linux VPS running Ubuntu + control wallet on your local PC (Windows/MacOS).

Prerequisites:

  • A remote server (Virtual Private Server, VPS) which will be our masternode wallet.
  • A local computer running under Windows 7, 8.1 or 10 (or MacOS) which will be our control wallet.
  • PuTTY (or other SSH tool), which will be used to setup the server (install the dependencies, the wallet itself, and configure everything) after the initial configuration.
  • 1001 GBX as collateral (1000 GBX + 1 GBX to cover the transaction fees)

Plan of action:

  • Update Windows 10 or MacOS (not mandatory).
  • Buy VPS service and setup Ubuntu on it. You’ll need to have one CPU and at least 2GB of RAM on it to be able to compile and run the wallet.
  • Download PuTTY here http://www.putty.org/, install it, run it and connect to your server.
  • Login as root, update Ubuntu and install all the dependencies.
  • Compile and install the wallet from sources.
  • Download GoByte Windows Wallet from http://gobyte.network/ and set up the installation.
  • Setup our masternode and our control wallet :)

Step #1

For the purpose of this guide I have used Windows 10. Everything was installed and configured on Windows 10. Other different versions of Windows might require some adjustments which won’t be covered in this guide. First of all, we need to update our Windows installation to make sure we are running a secured system. Install all the available updates.

Updating Windows 10

Step #2

Download and run the GoByte Core wallet on your Windows or MacOS machine. At the first run, it should be left to fully sync before moving further. The GoByte wallets can be found on the “Wallets” section on our website at: https://gobyte.network/#download

GoByte Core wallet sync

Step #3

After the wallet is fully sync, you might notice that you miss the “Masternodes” tab from the previous picture. To enable that you have to click on the top left corner on the Settings button then Options. A new window will pop up, and from there we select the “Wallet” tab. On the “Wallet” tab we will check the first two options, named “Enable coin control features” and “Show Masternodes tab”. Coin control features allow you to control the transaction’s fees (allowing 0 fees transactions when possible), priority, toggle the lock state of the coins and many more.

The Options of the GoByte Core wallet

Step #4

Download PuTTY here http://www.putty.org/, install it then run it. Fill the Host Name field with your server’s IP. Click on the open button to connect and access to the terminal. Use the default port (22). You don’t need to change any option. An error message may appear, ignore it.

Connecting to the VPS using Putty

Step #5

Use login details from your VPS provider to access the server, update Ubuntu then install all necessary libraries to either be able to compile the wallet or run it.

Important: in Linux to copy a text we use buttons Ctrl+Insert and to paste Shift+Insert — [Ctrl+C/V won’t work] please use these buttons from now on. Paste into the terminal window following commands and hit Enter to confirm. Commands are in blue font — copy and paste only these into your terminal window.

sudo apt-get update & sudo apt-get upgrade
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev
sudo apt-get install libboost-all-dev
sudo apt-get install libminiupnpc-dev
sudo apt-get install libevent-dev
sudo apt-get install libtool
sudo apt-get install libboost-all-dev

Important: Look for “error” messages in the window. Sometimes it fails.

Step #6

Once we have all dependencies we can download and compile the wallet:

sudo apt-get install git
git clone https://github.com/gobytecoin/gobyte
cd gobyte
sudo apt-get install automake
./autogen.sh
./configure
make (this can take awhile and some warning messages will be
shown it’s perfectly normal)

Important: Look for “error” messages in the window. Sometimes it fails. If one of the 3 commands (autogen,configure or make) fails, then you cannot continue to the next step. Look closely for “Error” messages. The “Warning” messages are ok. If the compile went good. Go to the “src” folder inside the gobyte folder and try to do the command “ls -a” and search for “gobyted, gobyte-tx and gobyte-cli” binaries.

Step #7

Download GoByte Windows wallet from http://gobyte.network/ (If you didn’t already downlaod it)

Create a folder on your windows desktop. Name it GoByte. Copy gobyted-qt.exe, gobyte-cli.exe, gobyted.exe and gobyte-tx.exe in C:\Users\your_username\Desktop\GoByte

Run the control wallet. Use gobyte-qt. It’ll ask for a data directory, use the default settings. Allow connections through windows firewall when prompted. (Important: Don’t delete the other files: gobyte-tx, gobyted and gobyte-cli)

Step #8

Now we will use the coins we have to fill the control wallet and generate the genkey we need. Go to the “Receive”tab, enter MN1 as label and click on request payment. Copy the address

Generating a new address on the GoByte Core wallet.
Copy the address

Go to the send tab, the address you copied, MN1 as label and 1000 GBX as the amount. Click Send.

Sending the 1000 GBX collateral

Important: You have to send from 1 address to the Masternode address exactly 1000 GBX. Not 999.999 not 1000.999 and make sure you send the full 1000 GBX from 1 address to 1 address, not from 2 or more addresses to 1.

Address 1 (Blue, with 1000.22 GBX) sent exactly 1000 GBX to address 2 (Red, with 1000.00 GBX) while the rest of the unspent GBX were left to a new address 3 inside the wallet (Yellow, 0.2199 GBX). After the transaction has more than 15 confirmations, you can proceed to the next step.

Step #9

Open notepad and save a temporary .txt file we are going to use for storing the data we will need to configure our masternode. Name it tempMN1.txt

Go to the debug console and execute the commands:

(Debug console can be accessed by clicking on Tools then Debug Console in the upper part of the wallet.)

masternode genkey
masternode outputs

Copy the private key and outputs in tempMN1.txt

Important: Don’t copy paste everything and format your data into tempMN1.txt file like this:

<MN ALIAS> <IP:PORT> <masternode genkey> <masternode output>

Example: MN1 127.0.0.1:12455 7eADAvaddasFASFr134rFsdada 2asdasvAFSFVad14r23csd 1

Generating the Masternode outputs and the private key

Go to C:\Users\your_username\appdata\Roaming\ GoByteCore and open masternode.conf. This file is telling our control wallet how to communicate with our masternode. Copy the content of tempMN1.txt into this configuration file. Then save it and close it.

macOS: Press Shift + Control + G, type ~/Library/Application Support, then open GoByteCore
Windows: Press Windows Key + R and type %APPDATA%, then open GoByteCore

Tip: Hit the WindowsKey + R on your keyboard. On the RUN windows write %AppData% and hit enter. You should now be inside the AppData folder.

I used MNTEST as the Masternode name.

Now we have all the data needed from our control wallet, we need to configure our masternode. (On the VPS)

First, we go to the /gobyte/src/ folder and we run the daemon for the first time. We do this in order for it to sync and create the folders for the first time.

To run the daemon we use “./gobyted -daemon” and we leave it there until it fully syncs. To check the sync status we can use “./gobyte-cli getinfo” and we will compare the “blocks” number with the current block from the explorer.

After the wallet is fully sync, we will have to stop the daemon.(We stop the daemon every time we modify a file so it can reload). To do that, we use “./gobyte-cli stop” and we should see “GoByte core shuting down”.

Now we will use the command “cd ..” twice. 1st time to leave the “src” folder and return to “gobyte” folder, and the 2nd time to leave the “gobyte” folder and return to HOME. (cd .. = Back).

Now that we are in the Root/Home folder we will do “ls -a” to see the list of all the directories. We should notice a hidden folder named “.gobytecore” which we have to enter using “cd .gobytecore

Now that we are inside the “.gobytecore” folder we will do “ls -a” again to see a list of files and directories. We should there notice “gobyte.conf and masternode.conf” files which we will edit in the following steps.

Step #10

Now, the first document we will edit is “gobyte.conf” which we will edit with the “nano” software (Unbuntu’s Notepad how I like to call it).

To do so, simply do “nano gobyte.conf” and it should open the file, which is blank, don’t panic.

Inside the gobyte.conf file we write the following:

rpcuser=YOUR_LONG_AND_RANDOM_USERNAME
rpcpassword=YOUR_VERY_LONG_AND_RANDOM_PASSWORD
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
externalip=YOUR_UNIQUE_VPS_IP_ADDRESS
masternodeprivkey=YOUR_UNIQUE_PRIVATE_KEY (genkey)

Here is an example:

rpcuser=randomname
rpcpassword=superpassword
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
externalip=82.223.18.239
masternodeprivkey=8KqvTqddyt3Mn6Nfysstx

After we did all the above, we will save and exit. To “Save and Exit” we simply hit the CTRL+X keys, it will prompt you confirm the “Save and Exit” command by writing Y or N. you type Y and hit Enter. Then it will prompt you to name the files. Just hit enter, no need to rename it.

Your gobyte.conf should look like this. (ofc, with your own details)

Extra: You can also add more nodes here to help you to sync. Just add below the masternodeprivkey the following https://explorer.gobyte.network:5002/network, just click on “Addnode” then click “Copy All Nodes” and paste them inside your gobyte.conf

Step #11

Now we return to our local wallet inside the “AppData” folder we enter the “gobytecore” folder and open with Notepad the file named “gobyte.conf

macOS: Press Shift + Control + G, type ~/Library/Application Support, then open GoByteCore
Windows: Press Windows Key + R and type %APPDATA%, then open GoByteCore

Inside this file, we can add the same nodes as above, then add the following lines:

rpcuser=YOUR_LONG_AND_RANDOM_USERNAME (same as on VPS)
rpcpassword=YOUR_VERY_LONG_AND_RANDOM_PASSWORD (same as on VPS)
rpcallowip=127.0.0.1
Editing gobyte.conf on Windows

Step #12

Close our control wallet then reopen it. Go to the masternode tab and click Start all to start our masternode :)

An ENABLED Masternode

And/or start your masternode through the terminal on your VPS with: ./gobyte-cli masternode start-alias <alias>

Masternode Statuses:

ENABLED: Congrats, your Masternode works and it’s healthy.

NEW_START_REQUIRED: Your Masternode requires a STOP and START from the VPS. ./gobyte-cli stop and ./gobyted -daemon should do the trick.

EXPIRED: Your Masternode failed to respond the “pings” in time and got placed out of queue. Try to delete mncache.dat and mnpayments.dat files from both your VPS and local wallet, then reindex them both. For VPS, ./gobyte-cli stop, delete the files, the ./gobyted -reindex

Like what you read? Give GoByte Network a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.