This guide will show you how to setup a cold node. This means the masternode itself doesn't hold any coins, they are all in your local wallet.

Things you might need to follow this guide.

Local Stuff:

  1. Putty: http://www.putty.org/
  2.  Putty Gen: See link above

Part of the Putty installer, allows you to create key files to switch from password based auth to key based auth. Recommended!

ServerStuff:

  1. Linux VPS. I recommend vultr 1GB VS for 5$ a month. https://www.vultr.com/?ref=7225181 
  2.  Firewall setup and fail2ban setup. For security.
  3. In case you need help setting up VPS, see this guide. Linux Setup Quick Guide

Steps for VPS.  SIngle MN.

  1. Login to VPS
  2. Install dependencies using the following command

        ‘sudo apt-get -y update && sudo apt-get -y install build-essential libssl-dev libdb++-dev libboost-all-dev libcrypto++-dev libqrencode-dev libminiupnpc-dev libgmp-dev libgmp3-dev autoconf autogen automake libtool git’

‘sudo apt-get install libdb5.3++’

`sudo add-apt-repository ppa:bitcoin/bitcoin`

`sudo apt-get update`

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

  1. You can compile the binary from source or Get the linux exe from here ( Ubuntu 16)
  1. To Compile follow the following steps listed at the end of this guide.
  2. To download the pre-comiled binary
  1. create a xios folder. ‘mkdir xios’  
  2. Go to this folder ‘ cd Xios’  
  3. Use the command to get the binary ‘wget https://github.com/XIOSPROJECT/XIOS/releases/download/2.1.1/XIOSd-linux-cli.tgz`  
  4.  
  5. extract the binary, `tar -xvf XIOSd-linux-cli.tgz`
  6. Give executable permissions. ‘chmod +x XIOSd’
  1. At this point, you will have a working binary, either from your compiled version or from my repository.
  2. Run the exe. ‘./XIOSd -daemon’
  3. It will fail by giving error that no XIOS.conf found.
  4. Open the conf file using the path from the error or ‘ vi $HOME/.XIOS/XIOS.conf’
  5. Add the following line

rpcuser=<ANY user>

rpcpassword=<ANY password>

  1. Start the daemon again. ‘./XIOSd -daemon’
  2. Wait for it to sync the blockchain. You can check ‘./XIOSd getinfo’    
  3. Once synced, generate the private key. ‘./XIOSd masternode genkey’ save this key. We will need it later.  
  4. Stop the daemon.  ‘./XIOSd stop’  
  5. Update the XIOS.conf as

rpcuser=<ANY user>

rpcpassword=<ANY password>

rpcallowip=127.0.0.1

listen=1

server=1

daemon=1

staking=0

logtimestamps=1

port=<select any unused port>

masternode=1

masternodeaddr=<VPS public IP>:<VPS port from above>

masternodeprivkey=<private key generated above>

  1. Start the daemon again.‘./XIOSd -daemon’
  2. In case you have a firewall setup, add the above port to exception list. ‘ sudo ufw allow <port>’

Steps for VPS.  Multiple MN.

  1. Follow all the steps for single MN first. This continues from here.
  2. Go to home folder. ‘cd’
  3. Create folders for each of the additonal MN’s you want. Eg ‘ mkdir .XIOS1’ , ‘ mkdir .XIOS2’ , ‘mkdir .XIOS3’ and so on.  
  4. For each of these folders, create a XIOS.conf file  
  1. Add the following details

rpcuser=<ANY user>

rpcpassword=<ANY password>

rpcallowip=127.0.0.1

rpcport=<port> another unused port.

listen=1

server=1

daemon=1

staking=0

logtimestamps=1

port=<select any unused port> here you will need to assign different port for each instance of MN.

  1. Now we will bring up each of these nodes separately. Use the following command. Replace the XIOS1 folder with the name of the instance for your Masternode.

./XIOSd -datadir=/home/xios/.XIOS1 -config=/home/xios/.XIOS1/XIOS.conf -daemon

  1. Once the daemons are up, and are synced. We will need to generate the private key.
  2. Use the following command to generate private key for each of the instaces, using XIOS1,XIOS2 etc
  1. ./XIOSd -datadir=/home/xios/.XIOS1 -config=/home/xios/.XIOS1/XIOS.conf masternode genkey
  1. Add this key to the relevant XIOS.conf. For XIOS1, add to /home/xios/.XIOS1/XIOS.conf as follows. These are new lines to be added.

masternode=1

masternodeaddr=<VPS public IP>:<VPS port from above>

masternodeprivkey=<private key generated above>

  1. Stop the daemon. ./XIOSd -datadir=/home/xios/.XIOS1 -config=/home/xios/.XIOS1/XIOS.conf stop
  2. Restart the daemon. ./XIOSd -datadir=/home/xios/.XIOS1 -config=/home/xios/.XIOS1/XIOS.conf -daemon

Steps on windows wallet

  1. Generate a new address in wallet.
  2. Send exactly 1000.1 coins, after fee(0.1) you should have exact 1000. You can send multiple transactions for each of the MN you want to setup.
  3. Meanwhile edit the XIOS.conf on windows and add the following. To get to conf file
  1. - Press the Windows Key
  2. - type: %appdata% and press enter
  3. - Navigate to your xiosfolder and open it
  4. - You will find the XIOS.conf in it, open it.

rpcuser=<any user>

rpcpassword=<any user>

rpcallowip=127.0.0.1

listen=1

server=1

daemon=1

staking=0

logtimestamps=1

  1. Restart the Xios wallet on windows.
  2. Once the above trx’s has 15 confirmation or more, go to debug console and type ‘masternode outputs’
  3. You will get trx hash like this

“aa7c6c173f7b691e5a070a37aeazd23557636ad1b4b43680ace39d522e1d4493” “1” . The first part is your transaction hash, the “1” is the index. In case you did multiple transactions, you will get a list.

  1. Save these values in a text file
  2. We are now ready to start our MN.
  3. On the xios wallet, go to MN tab. And click create.
  4. Fill the following values
  1. Alias - <any name eg MN1>
  2. Address - <VPS IP and PORT >
  3. Privkey - < private key generated on VPS>
  4. TX hash - <the hash generated on windows wallet>
  5. Txid -< the second part generated on windows wallet, either 0 or 1>
  1. Press Ok to save this..
  2. Unlock the wallet and press start all.
  3. The master node should be up and running.

If this guide helped you, please feel free to throw some XIOS at me : 2QZ6dzbBNSWf2eNLAAMNPpFbqA5eY5Wgeq

Compile the executable.

  1. Login to VPS .
  2. Install dependencies using the following command

        ‘sudo apt-get -y update && sudo apt-get -y install build-essential libssl-dev libdb++-dev libboost-all-dev libcrypto++-dev libqrencode-dev libminiupnpc-dev libgmp-dev libgmp3-dev autoconf autogen automake libtool git’

  1. Clone the repo from dev.’git clone https://github.com/XIOSPROJECT/XIOS
  2. Go to xios source folder. ‘cd xios/src’
  3. Start compiling. ‘sudo make -f makefile.unix’
  4. It will take some time. Wait for this to finish.
  5. Once done. Check for the binary. ‘ls XIOSd’. You should see it.
  6. Strip the binary to reduce size. ‘strip XIOSd’
  7. Now you are all set. You can use this binary to setup your mastenode.