# 0G DA Node

## **System updates, installation of required dependencies**

```
sudo apt-get update
sudo apt install make clang pkg-config libssl-dev
sudo apt-get install libssl-dev
apt-get install protobuf-compiler
sudo apt install build-essential curl
```

**Install rust**

```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
```

Installation

```
cd $HOME
git clone https://github.com/0glabs/0g-da-node.git
cd $HOME/0g-da-node
cargo build --release
./dev_support/download_params.sh
```

**Setup your variable settings**

```
sudo cp $HOME/0g-da-node/config_example.toml $HOME/0g-da-node/config.toml
```

On the first run of DA node, it will register the signer information in DA contract. To generate a BLS private key if don't have:

```
cargo run --bin key-gen
```

## **Create** zgda **service  for your node to run in the background**

```
sudo tee /etc/systemd/system/zgda.service > /dev/null <<EOF
[Unit]
Description=DA Node
After=network.target

[Service]
User=$USER
WorkingDirectory=$HOME/0g-da-node
ExecStart=$HOME/0g-da-node/target/release/server --config $HOME/0g-da-node/config.toml
Restart=on-failure
RestartSec=10
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
```

**Start DA node**

```
sudo systemctl daemon-reload && \
sudo systemctl enable zgda && \
sudo systemctl restart zgda
```

#### Check log

```
sudo journalctl -u zgda -f -o cat
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://services.dongqn.com/0g-da-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
