Auto Update

source <(curl -s <https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/0g_storage_update.sh>)

Manual Update

  1. Stop service && backup config.toml
sudo systemctl stop zgs
cp $HOME/0g-storage-node/run/config.toml $HOME/0g-storage-node/run/config.toml.backup
  1. Update
cd $HOME/0g-storage-node
git stash
git fetch --all --tags
git checkout 910b5af 
git submodule update --init
cargo build --release
  1. restore config.toml
cp $HOME/0g-storage-node/run/config.toml.backup $HOME/0g-storage-node/run/config.toml
sed -i 's|^network_boot_nodes = .*|network_boot_nodes = ["/ip4/47.251.117.133/udp/1234/p2p/16Uiu2HAmTVDGNhkHD98zDnJxQWu3i1FL1aFYeh9wiQTNu4pDCgps","/ip4/47.76.61.226/udp/1234/p2p/16Uiu2HAm2k6ua2mGgvZ8rTMV8GhpW71aVzkQWy7D37TTDuLCpgmX"]|g' ~/0g-storage-node/run/config.toml
  1. ZGS Service Restart
sudo systemctl daemon-reload && sudo systemctl enable zgs && sudo systemctl start zgs
  1. Log Check
tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d)
  1. Block Sync Check
source <(curl -s <https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/zgs_test.sh>)

EX) Config.toml

1000004083.png