Step-By-Step: How to setup multiple masternodes on multiple Linux VPS



  • The following is a guide on how to setup multiple masternodes on multiple Linux VPSs

    Preparation for your home PC:

    • Bitrad wallet is installed & synched up to the latest block.
    • You have enough BRO balance. (2500 BRO per masternode + transaction fee)
    • Coin Control Feature is turned on.
      (Settings > Options > Display > "Display coin control features")

    Preparation for your VPSs:

    • OS: Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-93-generic x86_64)
    • Server Spec: 1 CPU, 1GB RAM, 10GB SSD, 1000GB Bandwidth
      (Note: you can try with 512MB RAM server, however, you may run into memory issue during compilation.)
    • Linux OS is up & running. Firewall is enabled.
    • SSH server is setup on Linux, and you can SSH into it using Putty or similar.

    Overview of the setup:

    1. From home PC wallet, reserve BRO for all the masternodes.
    2. On each VPS, setup wallet, synch & do masternode configuration.
    3. From home PC wallet, do masternode configuration & start masternodes.

    In this guide, you will setup 2 masternodes (MN1, MN2).
    The italic characters below are the Linux commands, you can copy & paste.

    1. From home PC wallet, reserve BRO for all the masternodes.

    1. 1 Reserve 2500 BRO per masternode
    Generate public address for each masternode by going to Receive > New Address.
    Label as MN1, MN2.

    Send 2500 (It must be exactly 2500!) to MN1 & write down the Transaction ID.
    (Go to Transactions & click on the transaction to see ID. )
    Wait for it to be confirmed.

    Now before you send another 2500 to 2nd masternode, you need to ensure that
    it does not take BRO out of credit reserved for MN1 by using coin control feature.

    Go to Send and click on the Inputs under coin control feature.
    Browse and find 2500.00 for MN1 and unclick.
    (Click all the rest except the 2500 for MN1.)

    Send 2500 (It must be exactly 2500!) to MN2 & write down the Transaction ID.
    (Go to Transactions & click on the transaction to see ID. )
    Wait for it to be confirmed.

    Write down the masternode transaction index number for masternode:
    To do this, open the console ( Help > Debug Window > Console) and enter the command:
    masternode outputs

    You should see two transactions for MN1, MN2 matched by the Transaction IDs written above.
    Write down the transaction index number ("1" or "0") for MN1 and MN2.

    1.2 Generate masternode private keys
    Next, you will generate masternode private keys for MN1, MN2.
    Open the console, console ( Help > Debug Window > Console) and enter the command:
    masternode genkey

    Repeat for MN2.
    Write down the masternode private keys for MN1, MN2.
    (Note: This randomly generates private master key. This key is used to identify the masternode. You can generate multiple masternode private keys and use any one of them. You need to ensure that the same key is both set at the home PC and remote VPS.)

    In summary, you now have reserved credit for MN1 & MN2 and have following information:
    MN1: masternode transaction ID, transaction index, masternode private key
    MN2: masternode transaction ID, transaction index, masternode private key

    Go to the next step.

    2. On each VPS, setup wallet, synch & do masternode configuration.

    2.1. From Putty, login as user with Sudo right & download necessary library files
    sudo apt-get install build-essential libtool automake autotools-dev autoconf pkg-config libssl-dev libgmp3-dev libevent-dev bsdmainutils

    sudo apt-get install libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev

    sudo add-apt-repository ppa:bitcoin/bitcoin
    (If add-apt-repository does not work, do sudo apt-get install software-properties-common)

    sudo apt-get update
    sudo apt-get install libdb4.8-dev libdb4.8++-dev
    sudo apt-get install libminiupnpc-dev

    2.2 Compile Bitradod wallet
    git clone https://github.com/theBitradio/Bitradio
    (If git does not work, apt-get install git )

    cd Bitradio/src
    make -f makefile.unix # Headless
    (If it fails, check your VPS spec. It is recommended to have 1GB RAM.
    I have failed at this step at some VPS provider using 512MB RAM
    while I had success at other VSP provider using 512MB RAM
    after increasing the virtual memory size. Wait till compilation finishes.
    If you want to increase virtual memory, try following:
    free
    sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
    sudo mkswap /var/swap.img
    sudo swapon /var/swap.img
    free

    )

    strip Bitradiod
    sudo cp Bitradiod /usr/local/bin

    2.3. Run Bitradiod
    cd ~/Bitradio/src
    Bitradiod &

    It will give an error when you run it for the first time.
    You need to configure rpcuser info on Bitradio.conf file under ~/.Bitradio/Bitradio.conf

    cd ~/.Bitradio
    nano Bitradio.conf

    and add following lines where you need to put random long password:

    rpcuser=Bitradiorpc
    rpcpassword=RANDOM LONG PASSWORD
    rpcallowip=127.0.0.1
    daemon=1
    server=1
    listen=1

    Launch Bitradio wallet again,
    Bitradiod &

    To check if it is running,
    ps aux | grep Bitrad

    Wait for block to synch.
    Check the block #s info time to time and make sure it goes up.
    Get blocks info by,

    Bitradiod getinfo

    Let it sync completely. (It may take an hour)

    2.4. Perform masternode configuration
    Stop the masternode by

    Bitradiod stop

    Find Bitradio.conf file (~/.Bitradio/Bitradio.conf) and add following lines:
    nano ~/.Bitradio/Bitradio.conf

    masternode=1
    masternodeprivkey=5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    externalip=xxx.xxx.xxx.xxx

    where masternodeprivkey is the masternode private key written down previously &
    externalip is the public IP address for masternode VPS

    Restart the masternode by

    Bitradiod &

    In summary, you should now have masternode 1 (MN1) & 2 (MN2) fully synched
    and configured as masternodes.

    Go to next step.

    3. From home PC wallet, do masternode configuration & start masternodes.

    Open the Bitradio wallet and go to Masternodes menu.
    Click Create under My Master Nodes.

    Fill in where
    Alias: MN1
    Address: External IP address and port of the MN1
    (xxx.xxx.xxx.xxx:32454)
    PrivKey: masternode private key written down previously
    (5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
    TxHash: The transaction number
    (dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
    Output Index: The transaction index number written down previously
    (1 or 0)

    Alias: MN2
    Address: External IP address and port of the MN2
    (xxx.xxx.xxx.xxx:32454)
    PrivKey: masternode private key written down previously
    (5xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
    TxHash: The transaction number
    (dxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)
    Output Index: The transaction index number written down previously
    (1 or 0)

    Now you are ready to start masternodes.
    Unlock wallet from Settings > Unlock Wallet

    Go to Masternodes > click Start All to start the masternodes.
    You should see message saying that it has started successfully.
    (Note: If you don't unlock wallet, you get an error.)

    After few minutes, go to My Master Nodes tab and you should see MN1 & MN2.

    Wait for a while and confirm that you get rewards.

    That's it.

    Enjoy the golden eggs!


Log in to reply
 

Looks like your connection to Bitrad.io was lost, please wait while we try to reconnect.