Setup BitenX Masternode on Ubuntu

in #bitenx6 years ago (edited)

Bitenx ANN: https://bitcointalk.org/index.php?topic=4412676.0

This guide is for a single masternode, on a Ubuntu 14 64bit server (2GB RAM minimum) that will be controlled from the wallet on your local computer.

If you don't have enough RAM, create 2–4GB of swap memory using this guide:
https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

After you've got your server running, I would recommend you to go through the initial setup guide here before doing anything masternode related, for security purposes.

Basic requirements:

  • 5,000 BTENX
  • A main computer (containing the main wallet BitenX your coins will be stored)
  • Masternode Server (The VPS that will be on 24/7)
  • A unique IP address for EACH masternode
    (For security reasons, you’re gonna need a different IP for each masternode you plan to host)

For this guide we are creating masternode on Ubuntu VPS

First, you'll have to install the required packages:

sudo apt-get install build-essential libtool automake autoconf
sudo apt-get install autotools-dev autoconf pkg-config libssl-dev
sudo apt-get install libgmp3-dev libevent-dev bsdmainutils libboost-all-dev
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 libminiupnpc-dev

Now we have to build the wallet. Clone the Github BitenX repository.

sudo apt-get install git
git clone https://github.com/BitenCoin/bitenx

Then navigate to the newly created BitenX folder and execute the following lines :

cd bitenx
chmod 755 autogen.sh
./autogen.sh
./configure
chmod 755 share/genbuild.sh
make

Now start the BitenX wallet

cd src
cp bitenxd /usr/bin
cp bitenx-cli /usr/bin
bitenxd

You should get an error about the .conf file, that's normal.

After wallet in synced, type :

getnewaddress MN1

Then copy the returned address and send exactly 5000 BTENX to this address. Wait for 1 confirmation, then type in console :

masternode outputs

You should see one line corresponding to the transaction id (tx_id) of your 5000 coins with a digit identifier (digit).
Save BitenX two strings in a text file.

Note that if you get more than 1 line, it's because you made multiple 5000 coins transactions, with the tx_id and digit associated.

Now we have to create the masternode private key to link the main wallet and the VPS masternode.
Type in the console :

masternode genkey

Copy this key somewhere. It will be referred as masternodeprivkey.

Next, you have to go to the data directory of your wallet (in Linux it's located at /root/.bitenx).
Open the masternode.conf file and type :

MN1 IP:44445 masternodeprivkey tx_id digit

You need to change IP to your VPS IP address
Save it and close it. Restart your wallet.

Now open bitenx.conf

Copy paste the following configuration :

rpcuser=yourrpcuser
rpcpassword=yourrpcpass
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
maxconnections=24
externalip=IP
port=44445
masternode=1
masternodeprivkey=masternodeprivkey

You need to change IP to your VPS IP address, the masternodeprivkey is the one that you got from the main wallet.
Choose whatever you like for user and password. Note that the port should be 44445 for all BitenX masternodes.
Save it and close it. Restart your wallet.

If you have a firewall (with this guide), you need to open the 44445 port :

sudo ufw allow 44445/tcp

Encrypt your wallet and now wait for your wallet to sync

Install sentinel

sudo apt-get update
sudo apt-get install -y git python-virtualenv
cd .bitenx
git clone https://github.com/BitenCoin/bitenx-sentinel.git
cd sentinel
virtualenv venv
sudo apt-get install -y virtualenv
venv/bin/pip install -r requirements.txt
venv/bin/python bin/sentinel.py

You should see: "bitenxd not synced with network! Awaiting full sync before running Sentinel."
This is exactly what we want to see at this stage

Type:

bitenx-cli mnsync status

You should see - AssetId 999, all trues, one false, and a FINISHED.

Starting the Masternode

You need to wait for 15 confirmations in order to start the masternode.
Select the line corresponding to the masternode.

bitenx-cli walletpassphrase YOURPASSPHRASE 120
masternode start-alias LABEL

venv/bin/python bin/sentinel.py
If it don't show anything you did a good job.

Create a crontab entry to wake sentinel every minute

crontab -e

          • cd /root/.bitenx/sentinel && ./venv/bin/python bin/sentinel.py 2>&1 >> sentinel-cron.log

Checking the Masternode status

You can check the masternode status by going to the masternode wallet and typing:

bitenx-cli masternode status

If your masternode is running it should print "Masternode successfully started".

NOTE: You must encrypt your wallet

Sort:  

Congratulations @tzman! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 2 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

New japanese speaking community Steem Meetup badge
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Coin Marketplace

STEEM 0.15
TRX 0.16
JST 0.028
BTC 68067.18
ETH 2441.90
USDT 1.00
SBD 2.41