# 🔌  Installation

Server preparation

```
apt update && apt upgrade -y
```

```
apt install curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev -y
```

Install GO

```
ver="1.20.3"
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" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
```

Node installation

```
git clone https://github.com/warden-protocol/wardenprotocol && cd wardenprotocol

wget https://github.com/warden-protocol/wardenprotocol/releases/download/v0.5.2/wardend_Linux_x86_64.zip
unzip wardend_Linux_x86_64.zip
rm -rf wardend_Linux_x86_64.zip
chmod +x wardend
mv $HOME/wardenprotocol/wardend $HOME/go/bin

wardend version --long | grep -e version -e commit
# version: 0.5.2
# commit: e9ba0b8a2aa05787360270df19480c33429843d4
```

We initialize the node to create the necessary configuration files

```
wardend init MONIKER-NAME --chain-id chiado_10010-1
```

Download Genesis & Addrbook

```
wget -O $HOME/.warden/config/genesis.json "https://noderuner.xyz/testnet/warden/genesis.json"
sha256sum ~/.warden/config/genesis.json
# 8d6bff68b3c709f4d29c1ddae0d4b8394498911efcfdae16350c400c0e54e686

wget -O $HOME/.warden/config/addrbook.json "https://noderuner.xyz/testnet/warden/addrbook.json"
```

Set up node configuration

```
wardend config set client chain-id chiado_10010-1
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"25000000award\"/;" ~/.warden/config/app.toml
external_address=$(wget -qO- eth0.me)
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.warden/config/config.toml
peers="2d2c7af1c2d28408f437aef3d034087f40b85401@52.51.132.79:26656,fcaffd41eb7e3647fa953607449ff5e371c236b8@195.26.245.67:31656,5461e7642520a1f8427ffaa57f9d39cf345fcd47@54.72.190.0:26656,e1ea15d3c460eb9ace279b0b7665015d3c5d2b9e@135.181.210.171:21406"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$peers\"|" $HOME/.warden/config/config.toml
seeds="8288657cb2ba075f600911685670517d18f54f3b@warden-testnet-seed.itrocket.net:18656"
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.warden/config/config.toml
```

Set up puring

```
pruning="custom"
pruning_keep_recent="1000"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.warden/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.warden/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.warden/config/app.toml
```

Set up indexer

```
indexer="null"
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.warden/config/config.toml
```

Enable/Disable Snapshot ( Optional)

```
snapshot_interval=1000
sed -i.bak -e "s/^snapshot-interval *=.*/snapshot-interval = \"$snapshot_interval\"/" ~/.warden/config/app.toml
```

Create servis file

```
tee /etc/systemd/system/wardend.service > /dev/null <<EOF
[Unit]
Description=wardend
After=network-online.target

[Service]
User=$USER
ExecStart=$(which wardend) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

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

```
systemctl daemon-reload
systemctl enable wardend
systemctl restart wardend && journalctl -u wardend -f -o cat
```

Creating a validator

Get your pub key

```
wardend tendermint show-validator
```

Creat validator.json

```
nano $HOME/.warden/validator.json
```

Insert  our config

```
{
  "pubkey": {#pubkey},
  "amount": "1000000000000000000award",
  "moniker": "MONIKER-NAME",
  "identity": "",
  "website": "",
  "security": "",
  "details": "",
  "commission-rate": "0.05",
  "commission-max-rate": "0.5",
  "commission-max-change-rate": "0.5",
  "min-self-delegation": "1"
}
```

Send the transaction

```
wardend tx staking create-validator $HOME/.warden/validator.json \
    --from=<key-name> \
    --chain-id=chiado_10010-1 \
    --fees 250000000000000award -y  --gas auto --gas-adjustment 1.6
```


---

# 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.noderuner.xyz/warden-chiado/installation.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.
