Setup Masternode




Single Masternodes Setup Guide


Step-by-step guide for starting local masternodes

Windows:


Requirements

- AndCoinV2 Qt wallet running on your local computer with at least 20000 AND for every masternode

- White static IP with open ports for masternodes


STEP 1 : Preparing Masternode Conf
1 - Open your wallet

2 - Go to File >> Receiving Addresses

3 - Press button "New" and enter "masternode" in Label, followed by “OK”.


4 - Send exactly 20000 AND no more or less to this address

5 - Wait for 1 confirmation of the transaction and go to Tools >> Debug Console

6 - Run command "masternode genkey" and copy down generated key (this is your masternode private key)


7 - Run command "masternode outputs" and copy down txhash and outputindex("txhash" : "outputindex") *if does not give txhash output see note below

8 - Go to Masternodes -> My Master Nodes tab -> Click Create -> Fill the fields with your data and save with OK button.
8 – As "Alias", enter "anything" (do not use spaces and special characters)

9 – As "Address", enter "YOUREXTERNALIP:PORT" (your external white IP and port for masternode), such as 123.456.789:35555

10 – As "Privkey", enter the masternode private key you generated with "masternode genkey" (See Step 2.6 above)

11 – As "TxHash", enter the masternode txhash from "masternode outputs" (See Step 2.7 above)

12 – As "OutputIndex", enter the tx index "masternode outputs" (See Step 2.7 above)

13 – As "Donation address”, Donation address optional

14 - As "Donation %”, 0 – 100 % optional

15 – click “Ok button”

16 - Close your wallet.

Note: steps 8-16 is to create the masternode.conf

STEP 2 : Configuring Wallet andcoin.conf
1 - Go to "C:\Users\YourUser\AppData\Roaming\AndCoinV2" folder

2 - Open "andcoin.conf" in Notepad

3 - Type there:

rpcuser=yourusername

rpcpassword=yourstrongpassword

port=35555

masternode=1

masternodeaddr=IP:35555

masternodeprivkey=PRIVKEY

mnconflock=0


4 - Replace PORT with the port used for your Masternode, IP:PORT with your external white IP and the same port for your Masternode

5 - Replace PRIVKEY with the masternode private key you generated with "masternode genkey"

6 - Save it.


STEP 3 : Starting Masternode


1 - Now you can start your masternode
2 - Open your wallet
check that your transactions in Masternode addresses have at least 15 confirmations.
Go to Masternodes -> My Master Nodes tab.
Press "Start button"

Your Masternode is now Online!





 

Linux ubuntu 16.04.2 lts:


Requirements

- AndCoind daemon running on your vps with at least 30000 AND for every masternode

- White static IP vps with open ports for masternodes

STEP 1 : Preparing Vps For Daemon

Login your vps as user than type command:

sudo apt-get update
sudo apt-get -y dist-upgrade
sudo apt-get -y install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update

sudo apt-get -y install build-essential libtool autotools-dev autoconf automake git nano curl wget

sudo apt-get -y install libssl-dev libdb4.8++-dev libgmp-dev libminiupnpc-dev libboost-all-dev libprotobuf-dev libqrencode-dev



STEP 2 : Preparing AndCoind And AndCoin Conf

wget https://github.com/androidcoin-project/AndCoinV2/releases/download/AndCoinV2-1.5.7.9/Linuxv1579.tar.gz
tar -xvzf Linuxv1579.tar.gz
(run andcoin daemon)

./andcoind -daemon

(And now you get Error about config file)

(edit andcoin.conf)

nano /home/youruser/.AndCoinV2/andcoin.conf

daemon=1
listen=1
server=1
port=35555
rpcuser=yourusername
rpcpassword=putyourpasswordhere
rpcallowip=127.0.0.1


(ctrl+x and press y than enter)

(run andcoin daemon)

./andcoind
(generate new address and send exactly 20.000 AND to your new address) 
./andcoind getnewaddress
 (Get masternode privkey)

./andcoind masternode genkey

(copy it to somewhere else, now edit again andcoin.conf and put your privkey)
 nano /home/youruser/.AndCoinV2/andcoin.conf

daemon=1
listen=1
server=1
port=35555
rpcuser=yourusername
rpcpassword=putyourpasswordhere
rpcallowip=127.0.0.1
masternode=1
masternodeaddr=vpsIp:35555
masternodeprivkey=xxxxxxxputhereyourmasternodeprivkeyxxxxxxxx

(ctrl+x and press y than enter)

STEP 3 : Preparing Masternode Conf

(get masternode txhash and txindex) 

 ./andcoind masternode outputs

 (copy down txhash and outputindex "txhash" : "outputindex"  *if does not give txhash output see note below)




  nano /home/youruser/.AndCoinV2/masternode.conf

Alias VpsIp:35555 Privkey Txhash Txindex

(example: node1 129.322.33.25:35555 xxxxxxxxxxPrivkeyxxxxxxxxxxx xxxxxxxxTxhashxxxxxxxxx 0)
(ctrl+x and press y than enter)

 STEP 4 : Starting Masternode

 ./andcoind masternode start

(Done)

Your Masternode is now Online!

*Notes:

"masternode outputs" command does not give txhash output or "Could not allocate vin" error message.
Solution: You need to send a transaction to yourself by generating a new address (Click Receive tab and create new address and send exactly 20000 AND to your new address)
For linux ubuntu error messanges about port
type there command:
 sudo iptables -t nat -I OUTPUT -d your.vps.ip.address -p tcp --dport 35555 -j REDIRECT --to-ports 35555