# 🔌  Installation

#### Install dependencies Required <a href="#install-dependencies-required" id="install-dependencies-required"></a>

```plaintext
sudo apt update && sudo apt upgrade -y && sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
```

#### Install go <a href="#install-go" id="install-go"></a>

We are gonna use GO Version 1.21.13 If you already have GO installed you can skip this

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

#### Install binary <a href="#install-binary" id="install-binary"></a>

```plaintext
cd $HOME
git clone https://github.com/atomone-hub/atomone
cd atomone
git checkout v3.0.1
make install
```

#### Init `Change MONIKER Name` <a href="#init-change-moniker-with-ur-name" id="init-change-moniker-with-ur-name"></a>

```plaintext
atomoned init <MONIKER> --chain-id atomone-1
atomoned config chain-id atomone-testnet-1
atomoned config keyring-backend file
```

Download genesis and addrbook

```bash
wget -O $HOME/.atomone/config/genesis.json https://noderuner.xyz/testnet/atomone/genesis.json
wget -O $HOME/.atomone/config/addrbook.json  https://noderuner.xyz/testnet/atomone/addrbook.json
```

#### Configure Seeds and Peers <a href="#configure-seeds-and-peers" id="configure-seeds-and-peers"></a>

```plaintext
peers="$(curl -sS https://atomone-testnet-rpc.noderuner.xyz:443/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.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.atomone/config/config.toml
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0uatone\"|" $HOME/.atomone/conf
```

#### Config pruning <a href="#config-pruning" id="config-pruning"></a>

```plaintext
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/.atomone/config/app.toml
```

#### Indexer Off <a href="#indexer-off" id="indexer-off"></a>

```plaintext
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.atomone/config/config.toml
```

Set minimum gas price

```
sed -i 's|minimum-gas-prices =.*|minimum-gas-prices = "0.001uatone"|g' $HOME/.atomone/config/app.toml
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.atomone/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.atomone/config/config.toml
```

#### create service file and start node <a href="#create-service-file-and-start-node" id="create-service-file-and-start-node"></a>

```plaintext
sudo tee /etc/systemd/system/atomoned.service > /dev/null <<EOF
[Unit]
Description=Atomone node
After=network-online.target
[Service]
User=$USER
WorkingDirectory=$HOME/.atomone
ExecStart=$(which atomoned) start --home $HOME/.atomone
Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
```

* Start Node

```plaintext
sudo systemctl daemon-reload
sudo systemctl enable atomoned
sudo systemctl restart atomoned 
sudo journalctl -u atomoned -fo 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://services.noderuner.xyz/atomone-testnet/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.
