Image for post
Image for post

Prerequisites

2. 40,000 NIX

3. A Virtual Private Server (VPS): A VPS is recommended (Ubuntu 16 64x) as a Ghostnode requires dedicated resources and 24–7 availability for proper operation. The VPS must have:

i. At least 2 GB of RAM

ii. At least 20 GB of storage space

iii. A static public IP address

Generating a Ghostnode Key

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 Ghostnode key. Be sure to save it to a safe location.

ghostnode genkey

Next, enter the following command to generate a Ghostnode deposit address for the 40,000 NIX collateral. GN1 will be the label assigned to the new deposit address and can be changed if desired.

getnewaddress GN1 legacy

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

Once you have sent the 40,000 NIX 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:

ghostnode 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 ghostnode.conf and place it in the appropriate directory:

· Windows: %APPDATA%

· OS X: ~/Library/Application Support/nix

· Linux: $HOME/.nix

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

LABEL IP:6214 GHOSTNODEKEY TXID INDEX

Where:

· LABEL: The label of the node used for getaccountaddress command above.

· IP: Your VPS public IP address.

· GHOSTNODEKEY: Ghostnode key previously generated with the ghostnode genkey command.

· TXID: The Transaction ID obtained using the ghostnode outputs command above.

· INDEX: The Index obtained using the ghostnode 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 Ghostnode and next we will setup and link the Ghostnode 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 root@IP). 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

sudo apt-get install ufw

ufw allow ssh/tcp

ufw limit ssh/tcp

ufw allow 6214/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 NIX Wallet

First, download the latest version of the NIX wallet into your home directory,

cd ~

wget https://github.com/NixPlatform/NixCore/releases/download/v3.0.7/nix-3.0.7-x86_64-linux-gnu.tar.gz (Change link with latest wallet version)

tar xzf nix-3.0.X-x86_64-linux-gnu.tar.gz && chmod -R +x nix-3.0.X (Change “X” for latest wallet version)

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

mkdir ~/.nix

nano ~/.nix/nix.conf

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

· <username>: For example, nixuser

· <password>: Any secure password, although the rpcallow=127.0.0.1 configuration prevents access outside the server itself.

· <ghostnode-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.

· <ghostnode -key>: The key of the wallet address that will be associated with your Ghostnode as documented above.

rpcuser=<username>

rpcpassword=<password>

rpcallowip=127.0.0.1

port=6214

rpcport=8822

listen=1

server=1

daemon=1

logtimestamps=1

maxconnections=64

txindex=1

ghostnode=1

externalip=<ghostnode-ip-address>:6214

ghostnodeprivkey=<ghostnode-key>

Press Ctrl+X to save and y to confirm.

Next, start nixd daemon and let it sync:

./nix-3.0.X/bin/nixd

You can check the status of syncing by typing:

./nix-3.0.X/bin/nix-cli getblockchaininfo

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

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

Click My Ghostnodes in the bottom right to see the list of your Ghostnodes that you added to ghostnode.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.

Ghostnode Payments

A single Ghostnode gets paid for every block, so if there are 150 active nodes you will receive your payment once every 150 blocks, or roughly every 300 min (5 hours) to your Ghostnode address (the one containing 40,000 NIX). Note that every time your Ghostnode 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.

Written by

Total Privacy For All. https://nixplatform.io

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store