Live Peers

Easy script for fetching fresh 0G peers from our node and set to your config.toml

Update peers - powered by NodeCattel

# download script from gist.github and run 0gpeers.sh
curl -o $HOME/.0gchain/0gpeers.sh https://gist.githubusercontent.com/nodecattel/8d28377a323a23d874d8bc64006ab2fc/raw/9a44bead876e6539efe0fd1b80050b837572d6d9/0gpeers.sh
chmod +x $HOME/.0gchain/0gpeers.sh

# Execute the script
$HOME/.0gchain/0gpeers.sh

(Optional) - Live peers update script with auto update every 6 hours

# download update_peers.sh
curl -o $HOME/.0gchain/update_peers.sh https://gist.githubusercontent.com/nodecattel/1fe8caf9412dd076d1ee267cc91f7472/raw/705f9cc706f0693a38d9c10b3f0fea02d29b6add/update_peers.sh
chmod +x $HOME/.0gchain/update_peers.sh

# run script for the first time
$HOME/.0gchain/update_peers.sh

(Optional) - Setup crontab for auto-run and logging

# open crontab editor
crontab -e

add the following line to the crontab file

0 */6 * * * /bin/bash $HOME/.0gchain/update_peers.sh >> $HOME/.0gchain/update_peers.log 2>&1

Last updated