Installation
Minimum hardware requirement
4-8 Cores, 16G Ram, 500G NVME, Ubuntu 22.04 - 24.04
Installation of required packages
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
Installation GO
cd ~
VER="1.23.4" # Make sure that this version does not broke any other apps you run!
wget "https://golang.org/dl/go$VER.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$VER.linux-amd64.tar.gz"
rm "go$VER.linux-amd64.tar.gz"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version
Downloading and installing node
cd $HOME && git clone https://github.com/Bookings-cpu/nexarail && cd nexarail
git checkout v0.1.0-rc1-cli-hotfix
make build
cp ./build/nexaraild $HOME/go/bin/
nexaraild version
# ABCI: 1.0.0
# BlockProtocol: 11
# P2PProtocol: 8
# Tendermint: 0.37.16
Set node configuration
#NodeName
nexaraild init "Your_Node_Name" --chain-id nexarail-testnet-1
#chainid
sed -i.bak -e "s/^chain-id *=.*/chain-id = \"nexarail-testnet-1\"/;" ~/.nexarail/config/client.toml
sed -i.bak -e "s/^keyring-backend *=.*/keyring-backend = \"test\"/;" ~/.nexarail/config/client.toml
Downloading genesis and addressbook
wget -O $HOME/.nexarail/config/genesis.json "https://github.com/Bookings-cpu/nexarail/releases/download/testnet-genesis-nexarail-testnet-1/genesis.json"
sha256sum ~/.nexarail/config/genesis.json
# c9877720485c598da72579be98614059954fbe051f3fde29eea0a1a2a1057fe3
# Set seeds and peers and gas
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.025unxrl\"/;" ~/.nexarail/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.nexarail/config/config.toml
peers="2bb62d82b4dbf820fdafd843816f1e72a84ffa8f@nexarail-testnet-peer.nodesync.top:26656,[email protected]:60756"
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.nexarail/config/config.toml
seeds=""
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.nexarail/config/config.toml
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.nexarail/config/config.toml
# Set indexer
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.nexarail/config/config.toml
# Set pruning
pruning="custom"
pruning_keep_recent="1000"
pruning_interval="100"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.nexarail/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.nexarail/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.nexarail/config/app.toml
# Change ports
echo "export PORT="42"" >> $HOME/.bash_profile
source $HOME/.bash_profile
sed -i -e "s%:26657%:${PORT}57%" $HOME/.nexarail/config/client.toml
sed -i -e "s%:26658%:${PORT}58%; s%:26657%:${PORT}57%; s%:6060%:${PORT}60%; s%:26656%:${PORT}56%; s%:26660%:${PORT}60%" $HOME/.nexarail/config/config.toml
sed -i -e "s%:1317%:${PORT}17%; s%:9090%:${PORT}90%; s%:8545%:${PORT}45%; s%:8546%:${PORT}46%; s%:6065%:${PORT}65%" $HOME/.nexarail/config/app.toml
# Download latest chain data snapshot
curl -o - -L https://snapshots.nodesync.top/Testnet/NexaRail/nexarail_latest.tar.lz4 | lz4 -c -d - | tar -x -C $HOME/.nexarail
Creating service file
tee /etc/systemd/system/nexaraild.service > /dev/null <<EOF
[Unit]
Description=nexaraild
After=network-online.target
[Service]
User=$USER
ExecStart=$(which nexaraild) start --home $HOME/.nexarail
Restart=on-failure
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable nexaraild
Start node
sudo systemctl start nexaraild && journalctl -u nexaraild -f -o cat