Cover photo

Nesa Node Guide

Prerequisites

Before you begin, ensure that you have the following:

  1. A VPS or Dedicated Server:

    • Minimum Requirements:

      • CPU: 4 cores

      • RAM: 8 GB

      • Storage: 200 GB SSD

      • Bandwidth: 1 Gbps

    • Recommended:

      • CPU: 8 cores

      • RAM: 16 GB

      • Storage: 500 GB NVMe SSD

  2. Operating System:

    • Ubuntu 20.04 LTS or later.

  3. Basic Knowledge of Linux Command Line.

  4. Nesa Wallet:

    • Ensure you have a Nesa wallet with some initial funds for staking.

  5. SSH Access:

    • Secure and reliable SSH access to your server.


Step 1: Update and Prepare Your Server

  1. Update your system:

    sudo apt update && sudo apt upgrade -y
    
  2. Install essential packages:

    sudo apt install build-essential curl wget git -y
    
  3. Set up a firewall (optional but recommended):

    sudo apt install ufw -y
    sudo ufw allow ssh
    sudo ufw allow 26656/tcp
    sudo ufw enable
    

Step 2: Install Dependencies

  1. Install Go (version 1.20 or later):

    wget <https://golang.org/dl/go1.20.5.linux-amd64.tar.gz>
    sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz
    export PATH=$PATH:/usr/local/go/bin
    
  2. Verify Go installation:

    go version
    
  3. Install other dependencies:

    sudo apt install jq -y
    

Step 3: Install Nesa Node

  1. Clone the Nesa repository:

    git clone <https://github.com/nesa-network/nesa.git>
    cd nesa
    
  2. Build the Nesa binary:

    make install
    
  3. Verify installation:


Step 4: Configure the Node

  1. Initialize the node:

    nesa init <YourNodeName> --chain-id nesa-mainnet
    
  2. Download the genesis file:

    wget -O ~/.nesa/config/genesis.json <https://raw.githubusercontent.com/nesa-network/mainnet/master/genesis.json>
    
  3. Configure persistent peers:

    PEERS="node1@<ip>:26656,node2@<ip>:26656"
    sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \\"$PEERS\\"/" ~/.nesa/config/config.toml
    
  4. Set minimum gas prices:

    sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \\"0.025unesa\\"/" ~/.nesa/config/app.toml
    
  5. Pruning options (optional):

    sed -i.bak -e "s/^pruning *=.*/pruning = \\"custom\\"/" ~/.nesa/config/app.toml
    sed -i.bak -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \\"100\\"/" ~/.nesa/config/app.toml
    sed -i.bak -e "s/^pruning-interval *=.*/pruning-interval = \\"10\\"/" ~/.nesa/config/app.toml
    

Step 5: Start the Node

  1. Start the Nesa service:

    nesa start
    
  2. Check logs to ensure everything is running smoothly:

    journalctl -u nesa -f
    

Step 6: Create and Fund Your Validator

  1. Create a new wallet (if you don't have one):

    nesa keys add <wallet-name>
    
  2. Fund your wallet with the necessary amount of Nesa tokens.

  3. Create the validator:

    nesa tx staking create-validator \\
    --amount=1000000unesa \\
    --pubkey=$(nesa tendermint show-validator) \\
    --moniker="<YourNodeName>" \\
    --chain-id=nesa-mainnet \\
    --commission-rate="0.10" \\
    --commission-max-rate="0.20" \\
    --commission-max-change-rate="0.01" \\
    --min-self-delegation="1" \\
    --gas=auto \\
    --from=<wallet-name> \\
    --yes
    
  4. Verify your validator status:

    nesa query staking validator $(nesa tendermint show-validator)
    

Step 7: Monitor and Maintain Your Validator

  1. Set up alerts for node downtime using tools like Prometheus or Grafana.

  2. Regularly update your node by pulling the latest changes from the Nesa repository.

  3. Participate in governance by voting on proposals.