# ⚙️  Installation

Recommended Hardware:

<table><thead><tr><th>Node Type</th><th width="184">CPU</th><th>RAM</th><th>Storage</th></tr></thead><tbody><tr><td>Mainnet</td><td>8</td><td>16GB</td><td>500GB </td></tr></tbody></table>

&#x20;***Install dependencies***

<pre class="language-bash"><code class="lang-bash"># Update the repositories
<strong>sudo apt update &#x26;&#x26; apt upgrade -y
</strong></code></pre>

```bash
# Install developer packages
sudo apt install -y curl git jq lz4 build-essential
```

```bash
# Install Go
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.23.8.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
echo "export PATH=$PATH:/usr/local/go/bin:/usr/local/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
```

## ***Automatic Installation***

```bash
source <(curl -s https://raw.githubusercontent.com/validexisinfra/Zetachain/main/installmain.sh)
```

## ***Manual Installation***

```bash
# Come up with the name of your node and replace it instead <your_moniker>
MONIKER=<your_moniker>
```

```bash
# Download binary files
cd $HOME
wget -O $HOME/zetacored https://github.com/zeta-chain/node/releases/download/v32.0.0/zetacored-linux-amd64
chmod +x $HOME/zetacored 
mv $HOME/zetacored $HOME/go/bin
```

```bash
# Initialize the node
zetacored config set client chain-id zetachain_7000-1
zetacored config set client keyring-backend file
zetacored init $MONIKER --chain-id=zetachain_7000-1
```

<pre class="language-bash"><code class="lang-bash"># Download genesis and addrbook
<strong>curl -L https://snapshots.nodejumper.io/zetachain/genesis.json > $HOME/.zetacored/config/genesis.json
</strong>curl -L https://snapshots.nodejumper.io/zetachain/addrbook.json > $HOME/.zetacored/config/addrbook.json
</code></pre>

***Setup config***

```bash
# Set seeds and peers
sed -i -e 's|^seeds *=.*|seeds = "20e1000e88125698264454a884812746c2eb4807@seeds.lavenderfive.com:22556,1d41d344d3370d2ba54332de4967baa5cbd70a06@rpc.zetachain.nodestake.org:666,ade4d8bc8cbe014af6ebdf3cb7b1e9ad36f412c0@seeds.polkachu.com:22556,8d93468c6022fb3b263963bdea46b0a131d247cd@34.28.196.79:26656,637077d431f618181597706810a65c826524fd74@zetachain.rpc.nodeshub.online:22556,11b86546b092e0645a91b32ca78e40c8bec54546@zetachain-m.peer.stavr.tech:17656"|' $HOME/.zetacored/config/config.toml

# Set minimum gas price, enable prometheus and disable indexing
sed -i -e 's|^minimum-gas-prices *=.*|minimum-gas-prices = "20000000000azeta"|' $HOME/.zetacored/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.zetacored/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.zetacored/config/config.toml

# Config pruning
sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.zetacored/config/app.toml 
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.zetacored/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.zetacored/config/app.toml

```

#### ***Set custom ports***

You can change value CUSTOM\_PORT=161 To any other ports

```bash
CUSTOM_PORT=161
```

```bash
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:${CUSTOM_PORT}58\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:${CUSTOM_PORT}57\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:${CUSTOM_PORT}60\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:${CUSTOM_PORT}56\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":${CUSTOM_PORT}66\"%" $HOME/.zetacored/config/config.toml
sed -i -e "s%^address = \"tcp://localhost:1317\"%address = \"tcp://localhost:${CUSTOM_PORT}17\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}80\"%; s%^address = \"localhost:9090\"%address = \"localhost:${CUSTOM_PORT}90\"%; s%^address = \"localhost:9091\"%address = \"localhost:${CUSTOM_PORT}91\"%; s%^address = \"0.0.0.0:8545\"%address = \"0.0.0.0:${CUSTOM_PORT}45\"%; s%^ws-address = \"0.0.0.0:8546\"%ws-address = \"0.0.0.0:${CUSTOM_PORT}46\"%" $HOME/.zetacored/config/app.toml
```

```bash
#Set config with new custom port
zetacored config set client node tcp://localhost:${CUSTOM_PORT}57
```

```bash
# Create service file
sudo tee /etc/systemd/system/zetacored.service > /dev/null <<EOF
[Unit]
Description=Zetachain node
After=network-online.target

[Service]
User=$USER
WorkingDirectory=$HOME/.zetacored
ExecStart=$(which zetacored) start --home $HOME/.zetacored
Restart=on-failure
RestartSec=5
LimitNOFILE=65535

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

```bash
# Download latest chain snapshot
curl "https://snapshots.nodejumper.io/zetachain/zetachain_latest.tar.lz4" | lz4 -dc - | tar -xf - -C "$HOME/.zetacored"
```

```bash
# Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable zetacored
sudo systemctl restart zetacored && sudo journalctl -u zetacored -fo cat
```

```bash
# Check status
zetacored status 2>&1 | jq .SyncInfo

#"catching_up": false means that the node is synchronized, we are waiting for complete synchronization
```

***Wallets***

```bash
# Create wallet
zetacored keys add wallet
```

The wallet has been created. In the last line there will be a phrase that must be written down

```bash
# If the wallet was already there, restore it
zetacored keys add wallet --recover

# Insert the seed phrase from your wallet
# If everything is correct, you will see your wallet data
```

***Validator***

Do not forget to create a profile on <https://keybase.io/> and set a profile photo there that will be imported by key and used for your validators.

```bash
# Change <identity> to your key from keybase
zetacored tx staking create-validator \
--amount 1000000azeta \
--from=wallet \
--commission-rate 0.1 \
--commission-max-rate 0.2 \
--commission-max-change-rate 0.01 \
--min-self-delegation 1 \
--pubkey $(zetacored tendermint show-validator) \
--moniker=$MONIKER \
--identity=<identity> \
--website "" \
--details "" \
--chain-id zetachain_7000-1 \
--gas-prices=20000000000azeta \
--gas-adjustment=1.5 \
--gas=auto \
-y 
```

**!!! Save priv\_validator\_key.json which is located in /root/.zetacored/config**


---

# 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.validexis.com/mainnets/zetachain/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.
