Skip to content

ctzoki/neoxa-mn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neoxa Masternode Setup

This is a guide to setup a server for neoxa masternodes, it sets up a reasonably secure server with cockpit for management and podman for running containers

Requirements for this setup

  • Server running Rocky Linux 9.2 or Alma Linux 9.2 ( Tested on Rocky Linux )
  • Whenever you see something like {parameter} in the commands you need to substitute it with an actual value for your case

Official requirements per node

  • 2 vCPU
  • 4GB Ram
  • 80GB SSD

Trust me bro estimate:

  • 1 Thread
  • 2GB Ram
  • 20GB SSD

1. After server is provisioned

Login with SSH or any other means, and switch to root user using

sudo su

Download and execute the install.sh script, Make sure to substitute {username} and {password} with real values, this user will be the one you use, make sure the password is very strong and preferably generated with a password manager

curl -sSL https://raw.githubusercontent.com/ctzoki/neoxa-mn/main/install.sh | bash -s {username} {password}

Server will reboot after installation is complete

command

2. Welcome to your new server

Open the cockpit web ui using a browser, don't forget to substitute {ip-of-your-server} with your actual IP

https://{ip-of-your-server}:9090

login

Click on Limited Access button on the top bar and enter your password again to enable administrative access for your session

switch

2.1. Accounts setup

Head over to the Accounts menu

  • There should be only 2 accounts, the username you provided to the installation script and root user
  • If there are additional accounts, sometimes created by server providers, delete them
  • Change the root password to a strong secure password generated by you

Before accounts-1

After accounts-2

2.2. Enable metrics collection

Head over to the Overview menu, on the Usage Panel press "View metrics and history", enable the monitoring and collection services, do not enable "Export to network"

Before metrics-1

Next Step metrics-2

It will take some time for data to start showing, check it again later

2.3. Enable automatic updates

Head over to the Software Updates menu, install and enable the "Automatic updates" and "Kernel live patching"

Automatic Updates software-updates-1

Enable automatic updates software-updates-2

Enable kernel live patch software-updates-3

Final state software-updates-4

2.4. Add additional IPs

Head over to the Networking menu, click on the main interface that is online, usually named eno1/eth1, click edit on the IPV4 settings, now a new popup will appear where you can enter all the additional IPs that you have for running masternodes

network

2.5. Enable Podman

Head over to the Podman menu, enable the podman service, here we will be starting all the nodes as described in the next section.

podman

3 Running MN Containers in Podman

3.1 Preparing your collateral and registering your masternode

Head over to your neoxa-qt wallet and open the debug console, 4 commands need to be executed to register the masternode

getnewaddress

It will output a new address with 0 balance, use it for the next command

sendtoaddress "{your-new-address-here}" {number-of-coins}

You are sending coins to the new address, for testnet use 60000.0 for mainnet use 1000000.0, the output will be the transaction id, take note of it

smartnode outputs

This will list the transactions which outputs match MN requirements, find the one that matches the previoulsy noted, and take note of the sequecence appearing next to it, i.e. 0 or 1 image

listaddressgroupings

This command will output all your wallet addresses, find one with a few neox balance to be used as fee for the next transaction, !DO NOT USE THE ONE WHERE YOU DEPOSITED COLLATERAL AMOUNT! image

protx quick_setup {your-tx-id} {output-sequence} {your-ip}:{your-port} {your-fee-address}

Substitute all the parameters here with your actual values image

Thats all of the commands, the last one outputs the path to your configuration file, the file it generates should look similar to the image below, copy the file contents we will need it on the server. image

3.2 Setting up the config on the server

Open the Navigator and navigate to the /opt folder, here we will create the directories for our containers, i suggest creating first folders "testnet" and "mainnet" to have nice structure on your server, then in the testnet or mainnet folder create folders for your nodes, i.e. node-1, node-2, node-x image

Inside of your node-x folder we will need to create the neoxa.conf file image

Then edit it by double clicking it to enter your generated neoxa.conf, ADD testnet=1 AT THE END OF THE CONFIG IF YOU WANT TESTNET image

As a last step we need to setup correct permissions for the container to use the directory, the following commands need to run

sudo chmod 755 {your-directory-path}

sudo chown -R 5196:5196 {your-directory-path}

sudo chcon -R -t container_file_t {your-directory-path}

image

Now all the files and permissions are in place to run the containers

3.3 Creating your pod and your container

Head over to the podman menu and click on create pod, enter your details taking care to enter your correct host path volume, i.e. /opt/testnet/node-x and map it to /var/lib/neoxa, also make sure to enter your correct IP and Port, for mainnet use port 8788 for both host and container. image

Then click on "Create container in pod" in the pod that you just created, use image ctzoki/neoxa-full-node to run your node with, the other parameters are not mandatory but its recommended to set up like in the image below image image

Double check the integrations tab that everything is mapped as needed image

Check the logs are printing ok, if there is a problem in the config you will notice it in the logs image

4 Optional

4.1 Smartnode Status Page

A status page is available and can be installed by running the following command in the terminal

sudo curl -sSL https://raw.githubusercontent.com/ctzoki/neoxa-mn/main/install-smartnode-status.sh | sudo bash

The smartnode status will appear as Red if there is penalty to your node, Gray if other issue is found and Green if all ok, image below for demonstration

image

4.2 NAT Reflection

If you are running your nodes behind a NAT, i.e. port forwarding from your home router you probably don't have NAT reflection, its the ability to connect to your public IP from within your network, you can install the following tool to help with that

sudo curl -sSL https://raw.githubusercontent.com/ctzoki/neoxa-mn/main/install-nat-reflection.sh | sudo bash

the tool supports 4 commands, add, list, reload, delete, add and delete take in two parameters public ip and private ip, run the add command to enable reflection for an ip

sudo nat-reflection add {your-public-ip} {your-local-ip}

Add a reflection

sudo nat-reflection list

List all reflections

sudo nat-reflection reload

Reload, mostly used by the service on startup

sudo nat-reflection delete {your-public-ip} {your-local-ip}

Delete a reflection, if you made a mistake or don't need it anymore image

About

neoxa masternode tools & scripts

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •