Current BTC price : $ 8,130.081301

AzartPay (AZART) AzartPay - Masternode Setup Guide


Contents



Introduction

This guide is for a single masternode, on a Ubuntu 16.04 server (VPS) and will be controlled from the wallet on your local computer. (Cold Wallet)
The wallet on the the VPS will be referred as the Remote wallet.

First the basic requirements:
  • 10,000 AZART
  • A local computer – This will run the cold wallet, hold your collateral of 10,000 AZART and can be turned on and off without affecting the masternode.
  • A masternode Server (VPS – The server that will be on 24/7)

We are going to use some variables in this guide, you will find them in red and bold. You have to replace this variables with your own information

  • Name of Masternode
  • IP Address
  • Masternode Address
  • Masternode Private Key
  • Collateral Output TXID
  • Collateral Output Index
  • RPC Username
  • RPC Password



Choose a VPS

We will use OVH (OVH VPS) as an example of a VPS, but you can use any provider you prefer, you can check Vultr, Amazon AWS, Google Cloud.

1) Choose a VPS type, VPS SSD 1 can be use to run a masternode


2) Configure your VPS, with operating system only, and choose Ubuntu 16.04 Server


3) Skip the optional option


4) Review and order the VPS




Cold Wallet - installation

1) From Github, download the latest QT wallet, on your local computer.

2) Run the cold wallet and wait for a full sync, you can check the sync status on the bottom right corner


3) Configure the cold wallet to have the Masternode Tab and then restart the wallet
(Settings -> Options -> Wallet) check: Show Masternode Tab




Cold Wallet - configuration

1) Using the cold wallet, enter the debug console (Tools > Debug console) and type the following command
masternode genkey 
In output, you get the variable Masternode Private Key


2) Using the cold wallet still, enter the following command
getaccountaddress Name of Masternode
In output, you get the variable Masternode Address


3) Send 10,000 AZART to Masternode Address


4) Still in the cold wallet, enter this command into the console
masternode outputs
In output, you get the variables Collateral Output TXID and Collateral Output Index


5) Open masternode.conf file and add the following line to it
(Tools -> Open Masternode Configuration File)
"Name of Masternode" "IP address":9779 "Masternode Private Key" "Collateral Output TXID" "Collateral Output Index"
Example:
MN1 1.2.3.4:9779 892WPpkqbr7sr6Si4fdsfssjjapuFzAXwETCrpPJubnrmU6aKzh c8f4965ea57a68d0e6dd384324dfd28cfbe0c801015b973e7331db8ce018716999 1


VPS Remote/Hot wallet - installation

1) Download PuTTY to establish a SSH connection to the server.
Go to the PuTTY Download Page and select the appropriate MSI installer for your system.


2) With putty, connect to your VPS using IP Address, and use your credential, provide by OVH


3) Update your VPS with the following command
apt-get update -y
apt-get upgrade -y
4) Install some software needed for running your masternode
apt-get install wget nano python python-virtualenv virtualenv git -y
5) add a new user, we are using the coin name for our user
adduser azartpay
6) Configure server memory swap
fallocate -l 1500M /mnt/1500MB.swap
dd if=/dev/zero of=/mnt/1500MB.swap bs=1024 count=1572864
mkswap /mnt/1500MB.swap
swapon /mnt/1500MB.swap
chmod 600 /mnt/1500MB.swap
echo '/mnt/1500MB.swap  none  swap  sw 0  0' >> /etc/fstab
7) Configure the firewall for allowing masternode connection
ufw allow ssh/tcp
ufw limit ssh/tcp
ufw allow 9779/tcp
ufw logging on
ufw --force enable


VPS Remote/Hot wallet - configuration

Install the latest version of azartpay wallet onto your masternode. The latest version can be found here: https://github.com/azartpay/azart/releases

1) Now, log in to the VPS with your new user "azartpay"
su - azartpay
2) From your home directory, download the latest version from the azartpay GitHub repository
[ -f /home/azartpay/sources.tar.gz ] && rm -f /home/azartpay/sources.tar.gz
wget -q -O /home/azartpay/sources.tar.gz https://github.com/azartpay/azart/archive/0.13.1.7.tar.gz
[ -d /home/azartpay/temp_sources ] && rm -fr /home/azartpay/temp_sources
3) We can now extract the latest version and place the files in your home folder
mkdir /home/azartpay/temp_sources
cd /home/azartpay/temp_sources
tar zxf /home/azartpay/sources.tar.gz --strip-components=1 -C /home/azartpay/temp_sources
4) launch the compilation with
cd /home/azartpay/temp_sources
./autogen.sh
./configure
make

mkdir /home/azartpay/bin > /dev/null 2>&1
mv /home/azartpay/temp_sources/src/azartd /home/azartpay/bin
mv /home/azartpay/temp_sources/src/azart-cli /home/azartpay/bin
5) Edit the azartpay.conf by typing
mkdir /home/azartpay/.azartpay > /dev/null 2>&1
cd /home/azartpay/.azartpay 
nano azartpay.conf
rpcuser="RPC Username"
rpcpassword="RPC Password"
rpcallowip=127.0.0.1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
externalip=IP Address
masternodeprivkey=Masternode Private Key


Press Ctrl + X to close the editor and Y and Enter to save the file.

6) You can create a service for automatic startup of daemon
sudo nano /etc/systemd/system/azartpay.service
Add the following lines in this file
[Unit]
Description=AZART_MN
After=network.target

[Service]
User=azartpay
ExecStart=/home/azartpay/bin/azartd -daemon -datadir=/home/azartpay/.azartpay -conf=/home/azartpay/.azartpay/azartpay.conf
ExecStop=/home/azartpay/bin/azart-cli -datadir=/home/azartpay/.azartpay -conf=/home/azartpay/.azartpay/azartpay.conf stop
TimeoutSec=10min
Type=forking
Restart=on-failure

PrivateTmp=true
ProtectSystem=full
NoNewPrivileges=true
PrivateDevices=true

[Install]
WantedBy=default.target
Press Ctrl + X to close the editor and Y and Enter to save the file.

7) Now, you need to finally start the wallet service with the following command
systemctl enable azartpay
systemctl start azartpay
8) You have now waiting for the blockchain synchronization, you can check the status with
/home/azartpay/bin/azart-cli mnsync status


Start your masternode

1) From the cold wallet debug console (Tools > Debug console)
startmasternode alias false Name of Masternode
The following should appear
“overall” : “Successfully started 1 masternodes, failed to start 0, total 1”,
“detail” : [
	{
		“alias” : “Name of Masternode”,
		“result” : “successful”,
		“error” : “”
	}
2) Back in the Remote Wallet, start the masternode
/home/azartpay/bin/azart-cli startmasternode local false
A message “masternode successfully started” should appear

3) Use the following command to check status
/home/azartpay/bin/azart-cli masternode status
You should see something like
{
	“txhash” : “Collateral Output TXID”,
	“outputidx” : Collateral Output Index,
	“netaddr” : “IP Address:9779,
	“addr” : “Masternode Address”,
	“status” : 4,
	“message” : “Masternode successfully started”
}
Congratulations! You have successfully created your masternode!
You can now check the status of the node and monitoring it on AZART  AzartPay (AZART)