# Nillion Validator Node

### Installation <a href="#installation" id="installation"></a>

Install dependencies, if needed

```bash
sudo apt update && \
sudo apt install curl git jq build-essential gcc unzip wget lz4 -y
```

Install go, if needed

```bash
cd $HOME
VER="1.21.6"
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"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
```

Build 0gchaind binary from source

```bash
cd $HOME
wget -O nilchaind https://explorer.dongqn.com/guidenode/nillion/nilchaind
chmod +x nilchaind
mv nilchaind $HOME/go/bin/
nilchaind version
```

Setup your variable settings

```bash
nilchaind config set client chain-id nillion-chain-testnet-1
nilchaind config set client keyring-backend test
nilchaind config set client node tcp://localhost:18057
```

Initialize node & create home directory&#x20;

```bash
cd $HOME
nilchaind init dongqn --chain-id nillion-chain-testnet-1 --home=$HOME/.nillionapp
```

Download genesis file

```
curl -Ls https://explorer.dongqn.com/guidenode/nillion/genesis.json > $HOME/.nillionapp/config/genesis.json
curl -Ls https://explorer.dongqn.com/guidenode/nillion/addrbook.json > $HOME/.nillionapp/config/addrbook.json
```

Set nillion chain seeds

```
SEEDS="3f472746f46493309650e5a033076689996c8881@nillion-testnet.rpc.kjnodes.com:18059" && \
sed -i.bak -e "s/^seeds *=.*/seeds = \"${SEEDS}\"/" $HOME/.nillionapp/config/config.toml
```

Set min gas price

```
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0unil\"|" $HOME/.nillionapp/config/app.toml
```

Pruning (Optional to save storage space)

```
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.nillionapp/config/app.toml
```

Create nillion service for your node to run in the background

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

[Service]
User=$USER
Type=simple
ExecStart=$(which nilchaind) start --home $HOME/.nillionapp
Restart=on-failure
LimitNOFILE=65535

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

Start node

```
sudo systemctl daemon-reload && \
sudo systemctl enable nillion && \
sudo systemctl restart nillion && \
sudo journalctl -u nillion -f -o cat
```

**Check for your syncing progress**

```
nilchaind status --node tcp://127.0.0.1:26657 2>&1 | jq
```

## Create wallet

```
nilchaind keys add $WALLET_NAME

# DO NOT FORGET TO SAVE THE SEED PHRASE & YOUR PASSPHRASE YOU SET FOR THIS WALLET
# You can add --recover flag to restore existing key instead of creating
```

Check your wallet balance (node must be synced in order to see the current balance)

```
nilchaind q bank balances $(nilchaind keys show $WALLET_NAME -a) 
```


---

# 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/nillion-validator-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.
