Manual Installation
Follow these step-by-step instructions to manually install and configure Republic AI node on your server. This guide covers all necessary dependencies, configuration, and service setup.
⚙️ Customize Your Installation
Fill in your custom values. Commands below will update automatically.
Chain ID
republic_77701-1 Binary
republicd Version
v1.0.0 Port
26 Install dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y Install go
cd $HOME
VER="1.22.10"
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 Set vars
echo "export WALLET=\"wallet\"" >> $HOME/.bash_profile
echo "export MONIKER=\"test\"" >> $HOME/.bash_profile
echo "export CHAIN_ID=\"republic_77701-1\"" >> $HOME/.bash_profile
echo "export PORT=\"26\"" >> $HOME/.bash_profile
source $HOME/.bash_profile Download binary
cd $HOME
git clone https://github.com/republicai/republic
cd republic ai
git checkout v1.0.0
make install Config and init app
republicd init test --chain-id republic_77701-1 Download genesis and addrbook
wget -O $HOME/.republic ai/config/genesis.json https://snapshots.winnode.xyz/republicai-test/genesis.json
wget -O $HOME/.republic ai/config/addrbook.json https://snapshots.winnode.xyz/republicai-test/addrbook.json Set seeds and peers
SEEDS="SEED_NODE_ID_HERE@seed.republicai.winnode.xyz:26656"
PEERS="PEER_NODE_ID_HERE@peer.republicai.winnode.xyz:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.republic ai/config/config.toml Set custom ports in app.toml
sed -i.bak -e "s%:1317%:26317%g;
s%:8080%:26080%g;
s%:9090%:26090%g;
s%:9091%:26091%g;
s%:8545%:26545%g;
s%:8546%:26546%g;
s%:6065%:26065%g" $HOME/.republic ai/config/app.toml Set custom ports in config.toml file
sed -i.bak -e "s%:26658%:26658%g;
s%:26657%:26657%g;
s%:6060%:26060%g;
s%:26656%:26656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):26656\"%;
s%:26660%:26660%g" $HOME/.republic ai/config/config.toml Config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.republic ai/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.republic ai/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.republic ai/config/app.toml Set minimum gas price, enable prometheus and disable indexing
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "10000000000arai"|g' $HOME/.republic ai/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.republic ai/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.republic ai/config/config.toml Create service file
sudo tee /etc/systemd/system/republicd.service > /dev/null <<EOF
[Unit]
Description=Republic AI node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.republic ai
ExecStart=$(which republicd) start --home $HOME/.republic ai
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF Reset and download snapshot
republicd tendermint unsafe-reset-all --home $HOME/.republic ai
if curl -s --head https://snapshots.winnode.xyz/republicai-test/snapshot_latest.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
curl https://snapshots.winnode.xyz/republicai-test/snapshot_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.republic ai
else
echo "Snapshot not found"
fi Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable republicd
sudo systemctl restart republicd && sudo journalctl -u republicd -f