Auto install
source <(curl -s <https://raw.githubusercontent.com/zstake-xyz/test/refs/heads/main/0g_kv_install.sh>) # kv install
Manual install
sudo apt update && sudo apt upgrade -y
git clone -b v1.4.0 <https://github.com/0glabs/0g-storage-kv.git>
cd $HOME/0g-storage-kv
git stash
git fetch --all --tags
git checkout 1e7c207
git submodule update --init
cargo build --release
rm -rf $HOME/0g-storage-kv/run/config.toml
curl -o $HOME/0g-storage-kv/run/config.toml <https://raw.githubusercontent.com/zstake-xyz/test/main/0g_kv_config.toml>
sudo tee /etc/systemd/system/0gkv.service > /dev/null <<EOF
[Unit]
Description=0G-KV Node
After=network.target
[Service]
User=root
WorkingDirectory=/root/0g-storage-kv/run
ExecStart=/root/0g-storage-kv/target/release/zgs_kv --config /root/0g-storage-kv/run/config.toml
Restart=always
RestartSec=10
LimitNOFILE=65535
StandardOutput=journal
StandardError=journal
SyslogIdentifier=zgs_kv
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload && sudo systemctl enable 0gkv && sudo systemctl start 0gkv
sudo journalctl -u 0gkv -f -o cat