Skip to content

Installation - V2

This guide will help you set up a Storage Node for OG Labs. For official documentation, check here.


  • Memory: 16 GB RAM
  • CPU: 4 Cores
  • Disk: 500GB / 1TB NVME SSD
  • Bandwidth: 100 Mbps (Download / Upload)

One Click Install Standard Config :

Terminal window
bash <(wget -qO- https://cdn.bangcode.id/0g/easy_install_zgs_standard.sh)

Version: v0.8.7

Terminal window
bash <(wget -qO- https://cdn.bangcode.id/0g/storage_node_update.sh)

Terminal window
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make gcc tar clang pkg-config libssl-dev ncdu cmake -y
Terminal window
cd $HOME && \
ver="1.22.0" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version
Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sh
. "$HOME/.cargo/env"

Download and Install 0G Storage Node [GITHUB]

Section titled “Download and Install 0G Storage Node [GITHUB]”
Terminal window
git clone -b v0.8.6 https://github.com/0glabs/0g-storage-node.git
cd $HOME/0g-storage-node
git stash
git fetch --all --tags
git checkout v0.8.7
git submodule update --init
cargo build --release

Terminal window
rm -rf $HOME/0g-storage-node/run/config.toml
curl -o $HOME/0g-storage-node/run/config.toml https://cdn.bangcode.id/0g/standar_config.toml

Edit config and input your private key in miner_key:

Terminal window
nano $HOME/0g-storage-node/run/config.toml

Terminal window
sudo tee /etc/systemd/system/zgs.service > /dev/null <<EOF
[Unit]
Description=ZGS Node
After=network.target
[Service]
User=$USER
WorkingDirectory=$HOME/0g-storage-node/run
ExecStart=$HOME/0g-storage-node/target/release/zgs_node --config $HOME/0g-storage-node/run/config.toml
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
Terminal window
sudo systemctl daemon-reload && sudo systemctl enable zgs && sudo systemctl start zgs


Terminal window
tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d)
Terminal window
source <(curl -s https://cdn.bangcode.id/0g/block_checker.sh)

Terminal window
sudo systemctl stop zgs
Terminal window
sudo systemctl disable zgs
sudo rm /etc/systemd/system/zgs.service
rm -rf $HOME/0g-storage-node