0G
Installation Guide for Storage Node OG and Storage KV
The 0G Labs project offers the opportunity to deploy a Storage Node and a Key-Value Store (Storage KV), which are part of the ZeroGravity data availability system. In this guide, we will walk through the steps to install the 0G Storage Node and the Key-Value Store.
Hardware Requirements
Before starting the installation, ensure that your hardware meets the following requirements:
RAM
16 GB RAM
CPU
4 cores
Disk
500 GB / 1 TB NVMe SSD
Bandwidth
500 MB/s for upload/download
Installing Storage Node OG
Install Dependencies:
sudo apt-get update
sudo apt-get install clang cmake build-essential
Install Rust and Go:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
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
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
source ~/.profile
Clone and Build the 0G Storage Node:
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 the Settings in
run/config.toml
:
network_enr_address = "YOUR_PUBLIC_IP"
network_libp2p_port = 1234
rpc_listen_address = "0.0.0.0:8080"
network_boot_nodes = [
"/ip4/54.219.26.22/udp/1234/p2p/16Uiu2HAmTVDGNhkHD98zDnJxQWu3i1FL1aFYeh9wiQTNu4pDCgps",
"/ip4/52.52.127.117/udp/1234/p2p/16Uiu2HAkzRjxK2gorngB1Xq84qDrT4hSVznYDHj6BkbaE4SGx9oS"
]
Run the Storage Node:
cd run
../target/release/zgs_node --config config.toml
Installing Storage KV
Clone the Storage KV Repository:
git clone https://github.com/0glabs/0g-storage-kv.git
cd 0g-storage-kv
Build Storage KV:
cargo build --release
Configure the Settings in
config.toml
:
network_enr_address = "YOUR_PUBLIC_IP"
network_libp2p_port = 1235
rpc_listen_address = "0.0.0.0:8081"
network_boot_nodes = [
"/ip4/54.219.26.22/udp/1234/p2p/16Uiu2HAmTVDGNhkHD98zDnJxQWu3i1FL1aFYeh9wiQTNu4pDCgps",
"/ip4/52.52.127.117/udp/1234/p2p/16Uiu2HAkzRjxK2gorngB1Xq84qDrT4hSVznYDHj6BkbaE4SGx9oS"
]
Run Storage KV:
./target/release/zgs_kv --config config.toml
Additional Configuration and Optimization
After successfully installing the Storage Node and Storage KV, consider the following additional steps to optimize your setup:
Monitoring and Logging: Implement logging to monitor the performance of your nodes. You can use tools like Prometheus and Grafana for real-time monitoring.
Backup Configuration: Regularly back up your configuration files and data to prevent data loss.
Security Measures: Ensure that your nodes are secured against unauthorized access. Use firewalls and consider setting up VPNs for added security.
Community Engagement: Join the 0G community forums or Discord channels to stay updated on best practices, troubleshooting tips, and upcoming features.
Scaling: As your usage grows, consider scaling your infrastructure by adding more nodes or increasing your hardware specifications to handle increased traffic and data storage needs.
Last updated