Zoinode Setup Guide

Disclaimer

Zoin team is not in any way responsible if you don't provide a necessary hardening level to your VPS/Servers. We try to make everything simple and super easy, but if you fail to implement some basic and/or Advanced Security Level in your Zoinodes we are not responsible if disasters happen.

If you not feel confident in setting up, running and mantain your Zoinodes, you can contact a Trusted 3rd-party service as Zednodes and let them do everything for you.

Note: If your Zoinode is set to PRE_ENABLED before the hard fork that will enable Zoinodes at block 261500, you will need to manually set it to ENABLED after the fork occurs in order for your Zoinode to properly start.

Prerequisites

  1. Zoin Core Wallet v0.13.1.5 or later: See Github for the latest release and release notes.

  2. 25,000 Zoin

  3. A Virtual Private Server (VPS): A VPS is recommend as a Zoinode requires dedicated resources and 24x7 availability for proper operation. Although it is possible, in theory, to run a Zoinode from your desktop, this guide will not walk through those steps. The VPS must have:

    1. At least 2 GB of RAM
    2. At least 20 GB of storage space
    3. A static public IP address
  4. Secure the Wallet: This is optional but highly recommended. See Wallet / Securing the Zoin Wallet for details.

  5. Review the Release Notes: See the Release Notes in the Documentation or on Github that corresponds with the version of the wallet you are using.

Generating a Zoinode Key

This section describes how to generate a Zoinode key from a desktop wallet. You can associate a desktop wallet address with a Zoinode on a separate server, which this section describes.

First, launch your desktop wallet and navigate to Help --> Debug Window --> Console as shown in the screenshot below:

In the console, enter the following command. This generates the Zoinode key. Be sure to save it to a safe location.

zoinode genkey

Next, enter the following command to generate a Zoinode deposit address for the 25,000 Zoin collateral. ZN1 will be the label assigned to the new deposit address and can be changed if desired.

getaccountaddress ZN1

After generating the Zoinode key and Zoinode wallet address, transfer the collateral deposit of 25,000 Zoin. Be aware that you must send exactly 25,000 Zoin in a single transaction. Also consider that a transaction fee will be deducted.

Once you have sent the 25,000 Zoin to the address generated from getaccountaddress, you will need to obtain the transaction ID and index.

Do this by navigating to Help --> Debug Window --> Console as shown in the screenshot above.

Type the following into the Console to obtain your Transaction ID and Index:

zoinode outputs

You should see the something similar to the example below:

{ "d8ff88888bb6d9998d22c5155437f009c72dfd55dd2222f87fd55e22c0f89ddc" : "1", }

From the example, we get the Transaction ID and Index:

  • Transaction ID: d8ff88888bb6d9998d22c5155437f009c72dfd55dd2222f87fd55e22c0f89ddc
  • Index: 1

Next, you will need to create a text file on the computer with the desktop wallet. Depending on your operating system, create a file called zoinode.confand place it in the appropriate directory:

  • Windows:%APPDATA%
  • OS X: ~/Library/Application Support/zoin
  • Linux: $HOME/.zoin

In the file, add a line that matches the following syntax. If you are running multiple Zoinodes, you will add one line for each node with the appropriate values:

LABEL IP:8255 ZOINODEKEY TXID INDEX

Where:

  • LABEL: The label of the node used for getaccountaddress command above.
  • IP: Your VPS public IP address.
  • ZOINODEKEY: Zoinode key previously generated with the zoinode genkeycommand.
  • TXID: The Transaction ID obtained using the zoinode outputs command above.
  • INDEX: The Index obtained using the zoinode outputs command above.

Your file should look like this, except the first line which is there for visual reference. The file will only have one line.

Save the file and restart your wallet. The wallet is now configured for Zoinode and next we will setup and link the Zoinode server.

For the next steps, we'll be using Ubuntu Server 16.04 64-bit. You must use SSH to connect to your VPS. You can use PuTTY for Windows or Terminal on Mac OS X (ssh [email protected]). So, let's login to our VPS with root user and create an extra user that we will later add to sudoers group. Login as root and create a new user: adduser username

Server Configuration

Install Necessary Packages

The following packages are mandatory to successfully setup a Zoinode:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential libtool autotools-dev automake pkg-config
sudo apt-get install libssl-dev libevent-dev bsdmainutils libboost-all-dev
sudo apt-get install software-properties-common
sudo apt-get install dirmngr --install-recommends
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 libzmq3-dev
sudo apt-get install libqt5gui5 libqt5core5a libqt5dbus5
sudo apt-get install qttools5-dev qttools5-dev-tools libprotobuf-dev protobuf-compiler libqrencode-dev

Next, we will install and configure UFW, a firewall for Linux:

sudo apt-get install ufw
ufw allow ssh/tcp
ufw limit ssh/tcp
ufw allow 8255/tcp
ufw logging on
ufw enable

It is also recommended that you further harden your server with AppArmor or SELinux, Fail2Ban, and other common best practices as suggested here.

Download, Build & Configure the Zoin Wallet

First, download the latest version of the Zoin wallet into your home directory, extract, and rename for clarity:

cd ~
wget https://github.com/zoinofficial/zoin/archive/v0.13.1.5.tar.gz
tar -xzvf v0.13.1.5.tar.gz

Next, we will build the wallet. These steps will take some time to complete, so please be patient:

cd zoin-0.13.1.5
./autogen.sh
./configure --without-gui --enable-wallet
make

Once the installation is complete, we need to set up the Zoin configuration files:

mkdir ~/.zoin
nano ~/.zoin/zoin.conf

Next, enter the following configuration. Be sure to update the following fields in <brackets>:

  • <username>: For example, zoinuser
  • <password>: Any secure password, although the rpcallow=127.0.0.1 configuration prevents access outside the server itself.
  • <zoinode-ip-address>: The public IP address assigned to your server. Refer to your VPS provider documentation for details on how to assign and obtain your public IP address.
  • <zoinode-key>: The key of the wallet address that will be associated with your Zoinode as documented above.
rpcuser=<username>
rpcpassword=<password>
rpcallowip=127.0.0.1
port=8255
rpcport=8822
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=64
txindex=1
zoinode=1
externalip=<zoinode-ip-address>:8255
zoinodeprivkey=<zoinode-key>

Press Ctrl+X to save and y to confirm.

Next, start zoind daemon and let it sync:

cd src
./zoind

You can check the status of syncing by typing:

./zoin-cli getinfo

Check the current block and compare it with the latest block of your synced core wallet, mining pool or Zoin blockchain explorer. Finally, when it is fully synced, you can start your node from the desktop wallet. First, double check that your Zoinode addresses confirmed their 25,000 ZOI balance and that you restarted the Zoin wallet after creating the zoinode.conf file.

Next, in the wallet, go to the Masternodes tab and you should see a list of all Zoinodes on the network.

Click My Zoinodes in the bottom right to see the list of your Zoinodes that you added to zoinode.conf.

Click the Start missing button to start all of your nodes.

Your nodes should show PRE_ENABLED in status and after a few minutes change to ENABLED.

If the status changes to EXPIRED, there is something wrong in your configuration and you will need to go back and double check every step you've made.

Zoinode Payments

A single Zoinode gets paid for every block, so if there are 150 active nodes you will receive your payment once every 150 blocks, or roughly every 375 min (6.25 hours) to your Zoinode address (the one containing 25,000 ZOI). Note that every time your Zoinode goes offline or if it is restarted, it resets to the last place in the payout queue. Therefore it is critical that your VPS is stable with a decent network connection to ensure consistent payments.

results matching ""

    No results matching ""