0G Storage Node

TLanderon
1 min readFeb 19, 2024

--

Github | Twitter | Keybase

Validator Information

  • Moniker: TLanderon
  • Specs: 24 vCPU, 128 GB RAM, 5 TB NVMe, 950 Mb/s bandwidth

Install Dependencies

  • Linux:
sudo apt-get update
sudo apt-get install clang cmake build-essential
  • Mac:
brew install llvm cmake

Install rustup

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install Go

  • Linux
wget https://go.dev/dl/go1.22.0.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.0.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
  • Mac
brew install go

Download and Build Source Code

git clone -b v0.3.3 https://github.com/0glabs/0g-storage-node.git
cd 0g-storage-node
git submodule update --init
cargo build --release

Configure Node

Edit run/config.toml:

network_enr_address = "195.201.175.107"
network_boot_nodes = ["/ip4/54.219.26.22/udp/1234/p2p/16Uiu2HAmTVDGNhkHD98zDnJxQWu3i1FL1aFYeh9wiQTNu4pDCgps","/ip4/52.52.127.117/udp/1234/p2p/16Uiu2HAkzRjxK2gorngB1Xq84qDrT4hSVznYDHj6BkbaE4SGx9oS","/ip4/18.167.69.68/udp/1234/p2p/16Uiu2HAm2k6ua2mGgvZ8rTMV8GhpW71aVzkQWy7D37TTDuLCpgmX"]
blockchain_rpc_endpoint = "http://195.201.175.107:28345"
miner_key = "1BC3F18B025B60D87D19B535D8005484939570FB"

Run the Storage Node

cd run
../target/release/zgs_node --config config-testnet.toml --miner-key 1BC3F18B025B60D87D19B535D8005484939570FB --blockchain-rpc-endpoint http://195.201.175.107:28345 --db-max-num-chunks 1000000

Monitoring and Maintenance

  • Check node status:
curl -s http://localhost:5678/status
  • View logs:
tail -f logs/storage_node.log

--

--