# Node Installation

<figure><img src="https://pbs.twimg.com/profile_images/1655541754274119680/jPwIFpXf_400x400.png" alt="" width="188"><figcaption></figcaption></figure>

***

| Version | Chain-id             |
| ------- | -------------------- |
| v1.2.0  | entrypoint-pubtest-2 |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.20"
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

# Install Cosmovisor (OPTIONAL If you are using Cosmovisor)
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@v1.5.0
```

### Node Installation

```sh
# Download and install binary
cd $HOME
wget https://github.com/entrypoint-zone/testnets/releases/download/v1.2.0/entrypointd-1.2.0-linux-amd64 -O entrypointd
sudo chmod +x entrypointd
sudo mv entrypointd /usr/local/bin


# Set Configuration for your node
entrypointd config chain-id entrypoint-pubtest-2
entrypointd config keyring-backend test


# Init your node
# You can change "MyNode" to anything you like
entrypointd init MyNode --chain-in entrypoint-pubtest-2


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/entrypoint/genesis.json > $HOME/.entrypoint/config/genesis.json
curl -Ls https://snapshots.indonode.net/entrypoint/addrbook.json > $HOME/.entrypoint/config/addrbook.json

#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.entrypoint-t.indonode.net/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.entrypoint/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.entrypoint/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.entrypoint/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.entrypoint/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.entrypoint/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.entrypoint/config/config.toml
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0.01ibc/8A138BC76D0FB2665F8937EC2BF01B9F6A714F6127221A0E155106A45E09BCC5\"|" $HOME/.entrypoint/config/app.toml


# Set Service file
sudo tee /etc/systemd/system/entrypointd.service > /dev/null <<EOF
[Unit]
Description=entrypointd testnet node
After=network-online.target
[Service]
User=$USER
ExecStart=$(which entrypointd) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable entrypointd

# Download Snapshot for fast sync
curl -L https://snapshots.indonode.net/entrypoint/entrypoint-latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.entrypoint
[[ -f $HOME/.entrypoint/data/upgrade-info.json ]] && cp $HOME/.entrypoint/data/upgrade-info.json $HOME/.entrypoint/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart entrypointd
sudo journalctl -fu entrypointd -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://docs.indonode.net/testnet/entrypoint/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.
