Smartnode Setup Instructions

banner image

To build your Smartnode, follow these simple steps

Ubuntu 20.04

1. Update Server

sudo apt update && apt upgrade -y
sudo apt install unzip fail2ban -y

2. Add 4GB of SWAP

First check to make sure there is not already swap active:

free -h

note
If no swap it will return:
Swap: 0B 0B 0B
Create SWAP and Activate:

sudo bash \
sudo dd if=/dev/zero of=/swapfile bs=1M count=4000 \
sudo mkswap /swapfile && sudo chmod 600 /swapfile && sudo swapon /swapfile
exit

3. Enable UFW & Open Ports

apt install ufw -y
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow 15420/tcp
ufw enable

4. Configure Fail2Ban

Setup jail for bad guys hitting SSH, and set it to ban after three failed logins to SSH

nano /etc/fail2ban/jail.local

Copy and paste the following into the file

[sshd]
enabled = true
port = 22
filter = sshd
logpath = /var/log/auth.log
maxretry = 3

Reboot the server

sudo reboot

Add a system user to run yerbasd

adduser username
adduser username sudo
su username

Get Yerbas wallet and daemon:

wget https://github.com/The-Yerbas-Endeavor/yerbas/releases/download/v3.1.2.7/yerbas-ubuntu20-v3.1.2.7.tar.gz
tar -xf yerbas-ubuntu20-3.1.2.8.tar.gz
mkdir ~/.yerbascore && touch ~/.yerbascore/yerbas.conf
echo daemon=1 >> ~/.yerbascore/yerbas.conf
cd .yerbascore
wget https://github.com/The-Yerbas-Endeavor/yerbas/releases/download/v3.1.2.7/powcache.dat
cd ~/yerbas-build
./yerbasd

Note
You should see Yerbasd server starting. You can confirm it is running top -c it will be using 100% CPU (1 core). This shows you it is working, we will return to it later

5. Sync local wallet and send collateral

  • Start wallet and let it finish syncing.
  • Encrypt wallet (Settings > Encrypt Wallet)
  • Create new receiving address Backup wallet.dat (File > Backup Wallet).
  • Store in multiple locations. Dump private key for receiving address (this should be printed and stored offline in multiple locations):
  • Send 28,000 YERB to self
  • Wait for 2 confirmations
  • walletpassphrase yourpasswordhere 600 from the debug console to unlock the wallet before running the protx setup script.

6. Build protx command for control wallet

An example protx quick_setup command

protx quick_setup d7898f44c6bdc39a49b0917d5c6bcb61455270ddb9e7eb1168a6b745434daf26 1 194.113.73.87:15420 yaDfcdCupB1T5YoVRjYr8fXCvB8U5AuNX8

The structure from left to right is:
  • Transaction ID: In your wallet go to “Transactions” right click the one you sent yourself earlier and “Copy Transaction ID”. Replace the Transaction ID in example.
  • Encrypt wallet (Settings > Encrypt Wallet)
  • Collateral index: Tools > Debug console. Type smartnode outputs to check if 1 or 0. Adjust example command if needed.
  • Your smartnode server IP and port. Replace example IP with your Smartnode server IP, leave port as is.
  • Fee address: This is any address in your wallet which contains enough YERB to pay the fee (cannot be the address which you sent the 10 thousand YERB to). When you enter the protx quick_setup command it is a transaction and needs to be paid for. It is a very small amount 1/2 a YERB is more than enough. In Debug console do “listaddressbalances” to show all addresses with a balance, choose one and replace address in example command.!

Note
Enter the protx quick_setup command in Debug console. This will create a .conf file for that node in the same directory you ran the wallet from. Open it and copy the contents

Back to the smartnode server

~./yerbas-cli stop
nano ~/.yerbascore/yerbas.conf

Paste in what you copied from the .conf file made during the protx command, save and exit.

Start yerbasd

~./yerbasd

Wait two minutes and do:Wait two minutes and do:

~./yerbas-cli smartnode status

This should return:

Ready Ready

Congratulations: Your smartnode is now running. Time for a break


Extras:

Check the node’s current height with:

/yerbas-cli getblockcount

./yerbas-cli -getinfo

To update a node that has been PoSe Banded:

protx update_service “protxhash” “ip”:15420 “BLSKEY”

You can get the proTxHash by right clicking your Smartnode in the QT wallet Smartnode list
BLS private key. This is stored on your Smartnode in ~/.yerbascore/yerbas.conf

ie: protx update_service 7d62ce3bcf71825te84y5ca4b93a53583a8f1c9c70989e351c0f470088729a83 yoursmartnodeip:15420 3808471d6e52fe3b683474075cdf50192babe3b38203187ec0cg18fg54e439a4