NHBCoin
NHBCoin

Running a Node

To gain direct, high-performance access to the network, run your own NHBCoin node. This guide covers installing Go 1.24.3, compiling the binaries, exporting secrets, and launching a long-lived process.

Follow the node setup guide on GitHub

Prerequisites

Go 1.24.3 (Linux amd64 tarball), Git, curl, and an Ubuntu 22.04 LTS server with at least 2 vCPU / 4 GB RAM are recommended.

Installation & Build

First, install the toolchain and clone the official repository. The commands below fetch the Go 1.24.3 toolchain directly from go.dev and build both binaries into ./bin.

1. Install Go 1.24.3 & tooling
sudo apt update
sudo apt install curl git build-essential -y
curl -LO https://go.dev/dl/go1.24.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.24.3.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.profile
source ~/.profile
go version
2. Clone & build nhbchain
git clone https://github.com/josephblackelite/nhbchain.git
cd nhbchain
go mod download
mkdir -p bin
go build -o bin/nhb-node ./cmd/nhb && echo "βœ… built nhb-node -> $(pwd)/bin/nhb-node"
go build -o bin/nhb-cli ./cmd/nhb-cli && echo "βœ… built nhb-cli -> $(pwd)/bin/nhb-cli"
3. Export required secrets
export NHB_VALIDATOR_PASS="choose-a-strong-passphrase"
export NHB_RPC_TOKEN="choose-a-strong-shared-secret"

Configuration

The node reads settings from config.toml. After the first boot, review the generated file and ensure these critical fields point to your keystore, exported secrets, and the bootstrap peers you want to trust.

config.toml essentials
# File: config.toml
ListenAddress = ":6001"
RPCAddress = "0.0.0.0:8080"
DataDir = "./nhb-data"
GenesisFile = "./config/genesis.json"
ValidatorKeystorePath = "./validator.keys"
ValidatorKMSEnv = "NHB_VALIDATOR_PASS"
NetworkName = "nhb-mainnet"
BootstrapPeers = [
  "34.67.8.77:6001",
  "34.118.12.55:6001"
]

Running the Node Persistently

Use a dedicated tmux session to keep the process alive after you disconnect. The snippet below creates a session named nhb-node and starts the binary with your configuration.

Start inside tmux
tmux new -s nhb-node
./bin/nhb-node --config ./config.toml

Pro Tip: To detach from a tmux session, press Ctrl+B, release, then press D. Re-attach with tmux attach -t node.

Connecting to the Network

Populate BootstrapPeers with known validator endpoints or NHB governance-published bootstrap nodes so your instance can join the public network quickly.

config.toml (BootstrapPeers)
# Bootstrap peers stay in config.toml
BootstrapPeers = [
  "34.67.8.77:6001",
  "34.118.12.55:6001"
]