# ⚙️  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>250GB </td></tr></tbody></table>

***Install dependencies***

```bash
# Update system and install build tools
sudo apt -q update 
sudo apt -qy install curl git jq lz4 build-essential 
sudo apt -qy upgrade
```

## ***Automatic Installation***

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

## ***Manual Installation***

```bash
# Install Node.js 20 LTS with Corepack support
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo bash -
sudo apt update
sudo apt install -y nodejs
```

```bash
# Enable Corepack and set Yarn to version 4.9.1
corepack enable
corepack prepare yarn@4.9.1 --activate
yarn --version
```

```bash
# Install Go
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.24.2.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
```

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

```bash
# Clone project repository
cd $HOME
rm -rf agoric-upgrade-20
git clone https://github.com/Agoric/agoric-sdk.git agoric-upgrade-21
cd agoric-upgrade-21
git checkout agoric-upgrade-21

# Install and build Agoric Javascript packages
yarn install && yarn build

# Install and build Agoric Cosmos SDK support
(cd packages/cosmic-swingset && make)
```

***Setup config***

```bash
# Set node configuration
agd config chain-id agoric-3
agd config keyring-backend file
agd config node tcp://localhost:26657

# Initialize the node
agd init $MONIKER --chain-id agoric-3

# Download genesis and addrbook
curl -Ls https://snapshots.kjnodes.com/agoric/genesis.json > $HOME/.agoric/config/genesis.json
curl -Ls https://snapshots.kjnodes.com/agoric/addrbook.json > $HOME/.agoric/config/addrbook.json

# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"400f3d9e30b69e78a7fb891f60d76fa3c73f0ecc@agoric.rpc.kjnodes.com:12759\"|" $HOME/.agoric/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.025ubld\"|" $HOME/.agoric/config/app.toml

# Set pruning
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/.agoric/config/app.toml
```

{% hint style="info" %}
For Agoric nodes, make sure you set `iavl-disable-fastnode = true` in `app.toml`.
{% endhint %}

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

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

```bash
CUSTOM_PORT=166
```

```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/.agoric/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:${CUSTOM_PORT}17\"%; s%^address = \":8080\"%address = \":${CUSTOM_PORT}80\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:${CUSTOM_PORT}90\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:${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/.agoric/config/app.toml
```

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

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

[Service]
Type=simple
User=${USER}
ExecStart=$(which agd) start --home ${HOME}/.agoric
Restart=on-failure
RestartSec=10
LimitNOFILE=65535

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

```bash
# Download latest chain snapshot
SOON
```

```bash
# Enable and start service
sudo systemctl daemon-reload
sudo systemctl enable agoricd
sudo systemctl start agoricd && sudo journalctl -u agoricd -f -o cat
```

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

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

***Wallets***

```bash
# Create wallet
agd 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
agd 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
agd tx staking create-validator \
--amount=1000000ubld \
--pubkey $(agd tendermint show-validator) \
--moniker "YOUR_MONIKER_NAME" \
--identity "YOUR_KEYBASE_ID" \
--details "YOUR_DETAILS" \
--website "YOUR_WEBSITE_URL" \
--chain-id=agoric-3 \
--commission-rate="0.1" \
--commission-max-rate="0.20" \
--commission-max-change-rate="0.1" \
--min-self-delegation="1" \
--from wallet \
--gas-adjustment=1.4 -y
```

**!!! Save priv\_validator\_key.json which is located in /root/.agoric/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/agoric/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.
