Skip to content

Installation

0G banner”

Install dependencies
Terminal window
sudo apt-get update
sudo apt-get install cmake build-essential protobuf-compiler
Install Rust
Terminal window
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Download the source code
Terminal window
git clone https://github.com/0glabs/0g-da-retriever.git
cd 0g-da-retriever
Terminal window
cargo build --release
Configuration
Terminal window
nano $HOME/0g-da-retriever/run/config.toml

Sample:

Terminal window
log_level = "info"
grpc_listen_address = "0.0.0.0:34005"
#YOUR_RPC_ENDPOINT:
eth_rpc_endpoint = "https://evmrpc-testnet.0g.ai"
Create service file
Terminal window
sudo tee /etc/systemd/system/0gdar.service > /dev/null <<EOF
[Unit]
Description=0G-DA Retriever
After=network.target
[Service]
User=root
WorkingDirectory=/root/0g-da-retriever
ExecStart=/root/0g-da-retriever/target/release/retriever --config /root/0g-da-retriever/run/config.toml
Restart=always
RestartSec=10
LimitNOFILE=65535
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
Start service
Terminal window
sudo systemctl daemon-reload && \
sudo systemctl enable 0gdar && \
sudo systemctl start 0gdar && \
sudo systemctl status 0gdar && sudo journalctl -u 0gdar -f -o cat