Smartnode Manual Setup


Raptoreum Manual Smartnode Setup #

Video Guide (text guide below) #

 

Getting Started With Your VPS #

For the following part of the guide you need to be root. depending on your VPS provider they may have only provided you with a “sudo” user. You can change to root by doing:

1. Update Server #

sudo su

 

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

2. Add 4GB of SWAP #

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

free -h

If no swap it will return:

Swap:            0B          0B          0B

Create SWAP and Activate:

dd if=/dev/zero of=/swapfile bs=1k count=4096k
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
echo "/swapfile       swap    swap    auto      0       0" | tee -a /etc/fstab
sysctl -w vm.swappiness=10
echo vm.swappiness = 10 | tee -a /etc/sysctl.conf

Note: swappiness = 10 tells system only to use swap if really needed.

3. Enable UFW & Open Ports #

apt install ufw -y
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow 10226/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:

reboot

Add a system user to run raptoreumd:

adduser <username_here>

Get Raptoreum daemon and powcache.dat (used for fast synchronization) #

Note: Adjust wget command to match your Ubuntu version, example below is for Ubuntu 20.

mkdir -p rtm_latest
cd rtm_latest
wget https://github.com/Raptor3um/raptoreum/releases/download/1.13.17.0/raptoreum-ubuntu20-1.3.17.00.tar.gz 
tar -xvf raptoreum-ubuntu20-1.3.17.00.tar.gz
cd ..
wget https://bootstrap.raptoreum.com/powcaches/powcache.dat
mkdir ~/.raptoreumcore && touch ~/.raptoreumcore/raptoreum.conf
cp powcache.dat ~/.raptoreumcore
echo "daemon=1" >> ~/.raptoreumcore/raptoreum.conf
~/rtm_latest/./raptoreumd
echo all done!

You should see Raptoreumd server starting. You can confirm it is running with:

top -c

It should be using a good amount of CPU. This shows you it is working, we will return to it later.

 

Local Wallet Setup #

This part of the guide is to get your local wallet or control wallet setup. If you already have Raptoreum core wallet running you can skip to next section.

 

1. Install and Sync Local Wallet: #

Download latest Raptoreum wallet at https://raptoreum.com/latest

Create new directory:

Windows - C:\Users\\AppData\Roaming\RaptoreumCore
Linux / MAC - ~/.raptoreumcore

Grab powcache.dat (greatly increases sync speed) from: https://bootstrap.raptoreum.com and put it in the raptoreumcore directory you just created.

If you already have a Raptoreum wallet remove the following folders before using the bootstrap (make sure wallet is closed before doing this):

blocks
chainstate
evodb
llmq
  • 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):
walletpassphrase password time (in seconds)
dumpprivkey "address" (address is the receiving address you sent the 1.8 million RTM to)
  • Send 1.8 million RTM to self (this is current collateral amount)
  • Wait for 1 confirmation

The private key only allows you to restore the matching receiving address. If you setup multiple nodes you should dump the private key for each collateral receiving address.

 

2. Build protx command for control wallet #

Here is an example protx quick_setup command:

protx quick_setup "c4bbcde9771668fa640c263d4b964f688b0f039f7b684e715d92e4012369fea6" "1" "194.113.73.87:10226" "RFbWv94ZfueciwVVpHLMdqFayaXAS4sBxP"

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.
  • 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 RTM to pay the fee (cannot be the address which you sent the 1 million RTM 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 an RTM is more than enough. In Debug console do “listaddressbalances” to show all addresses with a balance, choose one and replace address in example command.

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. See this part in the video guide.

Finish Smartnode Configuration (VPS): #

~./raptoreum-cli stop
nano ~/.raptoreumcore/raptoreum.conf

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

Start raptoreumd:

~/./raptoreumd

Wait two minutes and do:

~/./raptoreum-cli smartnode status

This should return:

Ready Ready