0G System is composed of multiple components, each with its own functionalities. Detailed steps are provided as a guideline to deploy the storage node.
# Download the Go installerwgethttps://go.dev/dl/go1.22.0.linux-amd64.tar.gz# Extract the archivesudorm-rf/usr/local/go&&sudotar-C/usr/local-xzfgo1.22.0.linux-amd64.tar.gz# Add /usr/local/go/bin to the PATH environment variable by adding the following line to your ~/.profile.export PATH=$PATH:/usr/local/go/bin
cd0g-storage-nodegitsubmoduleupdate--init# Build in release modecargobuild--release
Update the run/config.toml
# enr address, must fill your instance's public ip to support peer discoverynetwork_enr_address# p2p portnetwork_libp2p_port# rpc endpointrpc_listen_address# peer nodes, we provided two nodes, you can also modify to your own ipsnetwork_boot_nodes = ["/ip4/54.219.26.22/udp/1234/p2p/16Uiu2HAmTVDGNhkHD98zDnJxQWu3i1FL1aFYeh9wiQTNu4pDCgps","/ip4/52.52.127.117/udp/1234/p2p/16Uiu2HAkzRjxK2gorngB1Xq84qDrT4hSVznYDHj6BkbaE4SGx9oS"]
# flow contract addresslog_contract_address# mine contract addressmine_contract_address# layer one blockchain rpc endpointblockchain_rpc_endpoint# block number to start the synclog_sync_start_block_number# location for db, network logsdb_dirnetwork_dir# your private key with 64 length# do not include leading 0x# do not omit leading 0# must fill if you want to participate in the pora and get mining rewardminer_key
Run the storage service
cdrun# consider using tmux in order to run in background../target/release/zgs_node --configconfig.toml