Republic AI Node Installation Guide
Prerequisites
Section titled “Prerequisites”Before beginning the installation, ensure your environment meets the following requirements:
- Operating System: Ubuntu 22.04 LTS or newer.
- Resources: 4+ CPU cores, 8GB+ RAM, and 200GB+ SSD storage.
- Network: Open ports
30656(P2P) and30657(RPC) if using the custom port configuration in this guide.
System Preparation
Section titled “System Preparation”Update the local package index and install the necessary build tools and dependencies.
sudo apt update && sudo apt upgrade -ysudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -yInstall Go Environment
Section titled “Install Go Environment”Republic AI requires Go. This block installs version 1.25.5 and configures the environment paths.
cd $HOMEsudo rm -rf /usr/local/goVER="1.25.5"curl -Ls https://go.dev/dl/go$VER.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/localecho "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profilesource $HOME/.bash_profilemkdir -p ~/go/bingo versionBinary Installation
Section titled “Binary Installation”Download the pre-compiled Republic AI binary and move it to your executable path.
cd $HOMEwget https://github.com/RepublicAI/networks/raw/refs/heads/main/testnet/releases/v0.3.0/republicd-linux-amd64 -O republicdchmod +x republicdmv republicd ~/go/bin/Node Initialization
Section titled “Node Initialization”Initialize the node configuration files. Replace "Your_Nodes_Name" with your preferred moniker.
republicd init "Your_Nodes_Name" --chain-id raitestnet_77701-1Network Configuration
Section titled “Network Configuration”Download the genesis file and the address book to ensure connectivity to the testnet peers.
wget -O $HOME/.republic/config/genesis.json http://45.76.1.67/republic/genesis.jsonwget -O $HOME/.republic/config/addrbook.json http://45.76.1.67/republic/addrbook.jsonNode Optimization
Section titled “Node Optimization”Custom Port Configuration
Section titled “Custom Port Configuration”The following commands modify app.toml and config.toml to use custom ports (prefix 30), preventing conflicts with other Cosmos-based nodes on the same machine.
sed -i -e "s%:1317%:30317%; s%:8080%:30080%; s%:9090%:30090%; s%:9091%:30091%; s%:8545%:30545%; s%:8546%:30546%; s%:6065%:30065%" $HOME/.republic/config/app.tomlsed -i -e "s%:26658%:30658%; s%:26657%:30657%; s%:6060%:30060%; s%:26656%:30656%; s%:26660%:30660%" $HOME/.republic/config/config.tomlsed -i -e "s|^node *=.*|node = \"tcp://localhost:30657\"|" $HOME/.republic/config/client.tomlPruning and Indexing
Section titled “Pruning and Indexing”To minimize disk usage, we recommend setting custom pruning and disabling the indexer unless you are running an RPC/Archive node.
# Configure Pruningsed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.republic/config/app.tomlsed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.republic/config/app.tomlsed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"0\"/" $HOME/.republic/config/app.tomlsed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.republic/config/app.toml
# Set minimum gas pricesed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "2500000000arai"|g' $HOME/.republic/config/app.toml
# Disable Indexersed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.republic/config/config.tomlService Management
Section titled “Service Management”Choose one of the following methods to manage your node process.
Option 1: Cosmovisor (Recommended)
Section titled “Option 1: Cosmovisor (Recommended)”Cosmovisor automates binary upgrades by monitoring the chain for upgrade proposals.
# Setup directory structuremkdir -p $HOME/.republic/cosmovisor/genesis/binmv $HOME/go/bin/republicd $HOME/.republic/cosmovisor/genesis/bin/
# Create symlinkssudo ln -s $HOME/.republic/cosmovisor/genesis $HOME/.republic/cosmovisor/current -fsudo ln -s $HOME/.republic/cosmovisor/current/bin/republicd /usr/local/bin/republicd -f
# Install Cosmovisor binarygo install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.7.0
# Create systemd servicesudo tee /etc/systemd/system/republicd.service > /dev/null << EOF[Unit]Description=Republic Node (Cosmovisor)After=network-online.target
[Service]User=$USERExecStart=$(which cosmovisor) run startRestart=on-failureRestartSec=10LimitNOFILE=65535Environment="DAEMON_HOME=$HOME/.republic"Environment="DAEMON_NAME=republicd"Environment="UNSAFE_SKIP_BACKUP=true"
[Install]WantedBy=multi-user.targetEOFOption 2: Standard Systemd Service
Section titled “Option 2: Standard Systemd Service”Use this for a simpler setup without automated upgrade handling.
sudo tee /etc/systemd/system/republicd.service > /dev/null <<EOF[Unit]Description=Republic NodeAfter=network-online.target
[Service]User=$USERWorkingDirectory=$HOME/.republicExecStart=$(which republicd) start --home $HOME/.republicRestart=on-failureRestartSec=5LimitNOFILE=65535
[Install]WantedBy=multi-user.targetEOFLaunch and Verification
Section titled “Launch and Verification”Reload the systemd daemon, enable the service, and monitor the logs to ensure the node is syncing.
sudo systemctl daemon-reloadsudo systemctl enable republicdsudo systemctl restart republicd && sudo journalctl -u republicd -f -o catVerification Commands
Section titled “Verification Commands”Check sync status:
republicd status 2>&1 | jq .SyncInfo