Welcome Zstake Service
0G Labs
Storage KV
Copy

0G Storage KV is a key-value store built on top of the 0G Storage system. This guide provides detailed steps to deploy and run a 0G Storage KV node.
Component | Storage KV |
|---|---|
Memory | 32 GB RAM |
CPU | 8 cores |
Disk | Size matches the KV streams it maintains |
Bandwidth | - |
1source <(curl -s https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/0g_kv_install.sh) # kv install
1source <(curl -s https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/0g_kv_update.sh) # kv update
1sudo apt update && sudo apt upgrade -y
1git clone -b v1.4.0 https://github.com/0glabs/0g-storage-kv.git
1cd $HOME/0g-storage-kv
2git stash
3git fetch --all --tags
4git checkout 1e7c207
5git submodule update --init
6cargo build --release
1rm -rf $HOME/0g-storage-kv/run/config.toml
2curl -o $HOME/0g-storage-kv/run/config.toml https://raw.githubusercontent.com/zstake-xyz/test/main/0g_kv_config.toml
1sudo tee /etc/systemd/system/0gkv.service > /dev/null <<EOF
2[Unit]
3Description=0G-KV Node
4After=network.target
5
6[Service]
7User=root
8WorkingDirectory=$HOME/0g-storage-kv/run
9ExecStart=$HOME/0g-storage-kv/target/release/zgs_kv --config $HOME/0g-storage-kv/run/config.toml
10Restart=always
11RestartSec=10
12LimitNOFILE=65535
13StandardOutput=journal
14StandardError=journal
15SyslogIdentifier=zgs_kv
16
17[Install]
18WantedBy=multi-user.target
19EOF
1sudo systemctl daemon-reload && sudo systemctl enable 0gkv && sudo systemctl start 0gkv
1sudo journalctl -u 0gkv -f -o cat
스크린샷 2024-08-27 오후 8.49.42.png