Skip to content

06.5 · Guide

Run a storage node

Hardware, the Rust build, Galileo turbo config, and where Windows has to use WSL.

01

Hardware before you compile

The storage-node guide on docs.0g.ai asks for 32 GB of memory, 8 CPU cores, a 500 GB to 1 TB SSD, and 100 Mbps up and down. A key-value node wants the same CPU and memory, and a disk sized to the streams it actually keeps. An HDD will store bytes and still fail the latency the network expects.

Windows

Build and run the node inside Ubuntu on WSL2, not in native PowerShell. The install below is the Linux install, done in that Ubuntu shell. wsl --install -d Ubuntu from an elevated PowerShell is the Windows prerequisite. Reboot if Windows asks.
02

Build the node

The node is Rust. Clone the 0G storage-node repository and check out the release tag you intend to operate. The docs refer to the latest tag on purpose, because testnet builds move. cargo build --release takes a long time the first time. That is the compiler, not a hang, as long as the CPU is busy.

03

Point it at Galileo

Each release ships a turbo testnet sample, named config-testnet-turbo.toml, at the repo root or under run/. Copy that file to the config path the release README names. Then set the RPC and the start block. Contract addresses are published on the Galileo overview and can change during testnet. Confirm them at docs.0g.ai/developer-hub/testnet/testnet-overview the day you start the node.

The overview has published Flow 0x22E03a6A89B950F1c82ec5e74F8eCa321a105296, Mine 0x00A9E9604b0538e06b268Fb297Df333337f9593b, and Reward 0xA97B57b4BdFEA2D0a25e535bd849ad4e6C440A69. If the overview disagrees, the overview wins.

Fields that have to be yours
blockchain_rpc_endpoint = "https://evmrpc-testnet.0g.ai"
log_sync_start_block_number = 1
log_contract_address = "<flow from the Galileo overview>"
mine_contract_address = "<mine from the Galileo overview>"
reward_contract_address = "<reward from the Galileo overview>"
Start mining without writing the key into the repo
# From the repo root, after the release build:
export MINER_KEY="your-key"
./target/release/zgs_node --config config.toml --miner-key "$MINER_KEY"
# If the release expects you to launch from run/, the binary is ../target/release/zgs_node.
  • The miner key spends gas and identifies your node. Keep it out of git. A config.toml that contains the key should be gitignored if you ever put the key in the file instead of the flag.
  • The operator wallet needs testnet 0G for gas while you are on Galileo, and real 0G on mainnet. The faucet desk is the testnet path.
  • Watch logs for sync height moving toward the chain head. A node that builds and then sits on block 1 is usually the wrong RPC or the wrong start block.
  • The full field list, including prune and shard settings, stays on docs.0g.ai/run-a-node/storage-node. This page is the path in. That page is the operator manual.