Smartnode Setup

1: Switch to root user, update your server and install Unzip and fail2ban.

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

2: Add a swap file

See if there's already a swap file:

swapon --show

If there's no output, it means there is no active swap file. Let's create a swap file:

sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

3: Secure server: Enable UFW, open ports

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

4: Secure server: Enable UFW, open ports

Open the fail2ban configuration file

sudo nano /etc/fail2ban/jail.local

Copy and paste the following:

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

With these settings, Fail2Ban will be active for SSH, monitoring the specified log file for failed login attempts, and after three unsuccessful attempts from the same IP address, it will take appropriate action to block that IP. Next, you will reboot your server:

reboot

5: Add a system user, create a Neoxa Directory and download the latest daemon

Create a system user:

sudo adduser new_username
sudo su new_username

Download and unzip the latest Neoxa daemon:

mkdir neoxa
cd neoxa
wget https://github.com/NeoxaChain/Neoxa/releases/download/v5.1.1.4/neoxad-5.1.1.4-linux64.zip
unzip neoxad-5.1.1.4-linux64.zip
sudo chmod +x neoxad neoxa-cli
mkdir ~/.neoxacore && touch ~/.neoxacore/neoxa.conf

6: Setup wallet locally

This section of the guide is dedicated to setting up your local wallet or control wallet for Neoxa. If you already have the Neoxa core wallet running, you may proceed to the next section.

  • Download the latest Neoxa wallet on Github: https://github.com/NeoxaChain/Neoxa/releases

  • Begin by opening the wallet and allowing it to complete the syncing process.

  • Next, secure your wallet by encrypting it through the "Settings" menu and selecting "Encrypt Wallet."

  • Generate a new receiving address within the wallet.

  • It is crucial to create a backup of your wallet.dat file. To do this, navigate to "File" and choose "Backup Wallet." Make sure to store this backup in multiple secure locations.

  • Send 1 million Neoxa to self (this is the current collateral amount for Neox masternodes).

  • Wait for 1 confirmation to complete the transaction.

7: Build protx command within your wallet

Below is an example of what the protx quick_setup command should look like. You can copy the example below into a Notepad and edit it with your values.

protx quick_setup "cfc14de1e1cbe2bf619a6d152a0ade2e4841b6df8817327bbdf8f69e868a553c" "0" "192.168.10.1:8788" "GJ4XMMYGem8AV36yyojdiMfVAp9kEueTmq"

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 the example.

Collateral index: Go to "Tools" > "Debug console." Type "smartnode outputs" to check if it's 1 or 0. Adjust the example command if needed.

Your smartnode server IP and port: Replace the example IP with your Smartnode server. Keep the port as 8788.

Fee address: This should be any address in your wallet that contains enough Neox to pay the fee (cannot be the address to which you sent the 1 million Neox). When you enter the "protx quick_setup" command, it is considered a transaction and requires a small fee. 0.005 Neox is enough. In the Debug console, use "listaddressbalances" to display all addresses with a balance, choose one, and replace the address in the example command.

  • Execute the "protx quick_setup" command within the Debug console. This action will generate a .conf file for that specific node in the directory where the wallet is currently located. Open the file and copy its contents for further use.

8: Complete Smartnode configuration on VPS

Now we will move our configuration over to our server.

~/.neoxa-cli stop
nano ~/.neoxacore/neoxa.conf

Paste the contents you copied from the .conf file generated during the execution of the "protx" command. After pasting, save the changes and proceed to exit the file.

Start your daemon:

~/./neoxad  

To see if your Smartnode is running successfully, run:

~/./neoxa-cli smartnode status

Last updated