K2X Masternode Setup Guide on Ubuntu Server 16.04

Official Announcments
Post Reply
Ngiyup
Posts: 28
Joined: Thu Feb 08, 2018 3:42 am
Cash on hand: Locked
Bank: Locked

Mon Apr 09, 2018 12:46 pm

This guide is based on my experience.
Try this tool to run your masternode easy. EASYKATANA
Prepare server

If you don't have any, register on vultr https://www.vultr.com/?ref=7359494
use my referral to support my research, you will not lose any money and get bonus too.

Deploy new server. choose nearest location from you, server type must be Ubuntu 16.04 (this guide based on this platform). Server size you can choose whatever you need (I choose $5/mo). Additional feature as you like (I’m not using this), and go to Server Hostname & Label. Let hostname empty and fill Label with your like to make easy configuring multiple server if you want to set more masternodes.

After server prepared, you can ssh using putty/cmder (windows) or terminal (Unix/MacOS), for putty guide you can search on google, I am using terminal on mac.
On terminal, type :

Code: Select all

ssh root@<YOUR_SERVER_IP>
you will be asked for password. copy password already given by Vultr on your Vultr Server list and paste it on terminal. (do it once, password on terminal can not be shown, and press enter).
after you logged in on your server, for better performance you can add swapspace.

create and enabling swapspace :

Code: Select all

fallocate -l 1G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
Make the swap file permanent :

Code: Select all

cp /etc/fstab /etc/fstab.bak
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
for detailed instruction and tweaking swap file you can check this link :
https://www.digitalocean.com/community/ ... untu-16-04

don't forget to reboot your system.

Compile K2X daemon (katanad)

Install needed libraries :

Code: Select all

apt-get update

apt-get install git automake build-essential libtool autotools-dev autoconf pkg-config libssl-dev

apt-get install libboost-all-dev software-properties-common libgmp-dev unzip


add-apt-repository ppa:bitcoin/bitcoin
 && apt-get update 

apt-get install libdb4.8-dev libdb4.8++-dev libminiupnpc-dev
Compile K2X :

Code: Select all

git clone https://github.com/getdatcrypto/k2x-source.git k2x && cd k2x/src
make -f makefile.unix
while we wait compile process, get back to your desktop wallet (not on the server) create new address, and send exactly 70000 K2X (No more, No less after fee. Coin control feature can help you out for better calculation)
after 10 confirmations or status "confirmed", open debug window and go to console tab.
type :

Code: Select all

masternode genkey
masternode outputs
writedown genkey and outputs on text editor
genkey will be something like : asdasrwegdasghtnrysr124123546whahayarhySADVdgdsgds
outputs will be something like :
{
"asfasfabvrtuywiNCURY1234566" : 1
}
I suggest you encrypt your wallet. Don't forget to write down your encryption key or password. if you lose them, you lose all your coins.

Now, open your local wallet data directory
Windows simply type %appdata% on run and enter katana2x directory
MacOS on finder type cmd+shift+g and go to /Users/<your username>/Library/Application Support/katana2x
Linux go to ~/.katana2x
(for linux users, i think they have better understanding :-) )
open katana.conf
make sure on katana.conf, your configuration look like this :

Code: Select all

rpcuser=YOUR_RPC_USER
rpcpassword=STRONG_PASSWORD_YOU_LIKE
rpcport=31944
rpcallowip=YOUR_LOCAL_IP/127.0.0.1
listenonion=1
daemon=1
server=1
maxconnections=256
addnode=24.21.56.209
If you only create 1 MN on server, add this on the bottom of the line, you don't need to create masternode.conf :

Code: Select all

masternode=1
masternodeaddr=YOUR_SERVER_IP
masternodeprivkey=YOUR_MASTERNODE_GENKEY
Important : for many masternodes, never add lines above, because we don't need to load our masternodes from katana.conf file but from masternode.conf file.

create file masternode.conf and fill the first line with this format :

Code: Select all

<MN alias> <yur MN IP:port> <MN genkey> <collateral_output_txid/masternode_outputs> <collateral_output_index>
example :
MASTERNODE_01 123.45.67.89:31944 asdfghjklQWERTY1234567v asdfgqwertpoiuylkjh8901276476476gjhvcsaugiug 1

select all file in the katana2x directory including peer.dat, wallet.dat, etc. Don't worry, if you encrypt your wallet, we are safe. I'm already try the cold wallet but fail, so this is only option right now. :-)
zip all file and rename it using k2x.zip you can backup this zip file to your USB for backup. And close your local wallet.

Back to server, create katana2x directory
mkdir ~/.katana2x

Upload your local k2x.zip file
windows using winscp or putty
Linux and MacOS using terminal
extract uploaded k2x.zip to ~/.katana2x directory

this is i am using to upload k2x.zip with terminal, cmder for windows maybe the same.
open new terminal tab, type :

Code: Select all

scp /path/to/k2x.zip root@YOUR_SERVER_IP:~/.katana2x
to extract, go to server tab (logged in via ssh):

Code: Select all

cd ~/.katana2x
unzip k2x.zip
if compile process already done, give a first shot to katana daemon

Code: Select all

./katanad
I think katana daemon now running. :D
now, open your wallet (unlock it)

Code: Select all

./katanad walletpassphrase <your wallet password> 9999999999 true
command above let your wallet open for long time to enable staking, if you dont want to stake, you can change 99999999 with 1000. this is timer to let wallet open.

Run masternode
for single MN, type :

Code: Select all

./katanad masternode start
for more than 1 MN, type :

Code: Select all

./katanad masternode start-many
or

Code: Select all

./katanad masternode start-alias <MN_ALIAS>
To check your masternode status, type :

Code: Select all

./katanad masternode list full | grep <your MN IP address>
If you success, the output will be like this :

Code: Select all

"txhashabcdefg1234567-1" : "   ENABLED 60010 <your masternode privkey> <your MN IP address>:31944 1523217013    13354 1523217049",
Congratulations, your masternode running.
exit terminal and wait your reward.

after a few hours, you can open your local wallet to check the reward. if you go to masternode tab, maybe it says your masternode not in the list, but dont worry, your masternode still running. all you need to do is wait for full sync.
To make sure your MN still running, log in to your vps and type :

Code: Select all

~/k2x/src/katanad masternode list full | grep <your MN IP address>
this is based on my experience, if you found this tutorial helpful, you can donate

K2X : xNLf1W43hhP8zXBH8WK474u9n5AenMbvr1
INFO : iK2ZCYoR7PfxFQNCsPRgCYDsL29BKaz28y
or tip me on the discord with anything coins you like. hope i can serve more better or maybe build something useful for the community.

otherwise, if you need help to set up your masternode, DM me on discord.
user : mad345
Last edited by Ngiyup on Wed Apr 18, 2018 2:35 am, edited 4 times in total.


Ngiyup
Posts: 28
Joined: Thu Feb 08, 2018 3:42 am
Cash on hand: Locked
Bank: Locked

Mon Apr 09, 2018 11:00 pm

I have tried cold wallet on ubuntu vps, but after i shutdown my local wallet, i dont know how, masternode off too. Maybe someone with better knowledge can complete this.

User avatar
Prochef_bill
Posts: 19
Joined: Sun May 28, 2017 5:40 pm
Cash on hand: Locked
Bank: Locked

Tue Apr 10, 2018 11:15 pm

ty

@prochefbill .. Twitter Handler for

$GSAVE
$RBL
$CHEESE
$GYM
$STC
@FlapXfm
@Coin_Builders
@camelcitycrypto

#NETcoin a #POS/#POW coin with #PIR and #OWI and has "FAIR WEIGHT" meaning if you have 100K NET you have the same weight as a whale with 10Million NET. #DontFeedTheWhales

joserh
Posts: 1
Joined: Mon Apr 16, 2018 10:13 am
Cash on hand: Locked

Mon Apr 16, 2018 4:13 pm

Boa noite amigo me ajuda a configurar um masternode por favor ZAP 61982555207

Phash
Posts: 13
Joined: Fri Feb 16, 2018 8:41 am
Cash on hand: Locked
Bank: Locked

Thu Apr 19, 2018 4:28 pm

I used your tutorial.
I had some coins in my wallet. Send 70k to the MN address.
then I copied the whole wallet on the Server. Do I need to keep my local wallet open for staking?

and what does this line mean:
"txhashabcdefg1234567-1" : " ENABLED 60010 <your masternode privkey> <your MN IP address>:31944 1523217013 13354 1523217049",

expecially the numbers at the end

Phash
Posts: 13
Joined: Fri Feb 16, 2018 8:41 am
Cash on hand: Locked
Bank: Locked

Sat Apr 21, 2018 1:04 pm

how to do this with multiple masternodes?

Phash
Posts: 13
Joined: Fri Feb 16, 2018 8:41 am
Cash on hand: Locked
Bank: Locked

Tue May 15, 2018 4:30 pm

nvm just got it working


Post Reply
  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 4 guests