# Installation

1. **Update packages and install useful tools.**

```
sudo apt update && sudo apt upgrade --yes && \
sudo apt install git build-essential ufw curl jq snapd screen ncdu nano fuse ufw --yes
```

2. **Install `go` using `snap`**.

```
sudo snap install go --classic && \
echo 'export GOPATH="$HOME/go"' >> ~/.profile && \
echo 'export GOBIN="$GOPATH/bin"' >> ~/.profile && \
echo 'export PATH="$GOBIN:$PATH"' >> ~/.profile && \
source ~/.profile && \
go version
```

3. **Build the binary from source.**

```
git clone https://github.com/AssetMantle/node
cd node
git checkout v1.0.1
make install
mantleNode version
```

4. **Initialize your node.**

```
mantleNode init <node_name> --chain-id mantle-1
```

5. **Download genesis.**

```
curl https://raw.githubusercontent.com/AssetMantle/genesisTransactions/main/mantle-1/final_genesis.json > $HOME/.mantleNode/config/genesis.json
```

6. **Add seeds and persistent peers to `config.toml`.**

```
SEEDS="10de5165a61dd83c768781d438748c14e11f4397@seed.assetmantle.one:26656"
PEERS="efcdd119e9a0f1ac5718c225e425aa1c0121b020@65.20.97.129:26656,880a8fc1a21d2908bd109dab1a2a074ebddec18a@65.108.192.170:26656,88873cf28bc552d39d4cb10523167aa24c3a4e85@95.217.118.96:26876,f96b29b7df3fe6a59fc11bde6936d7109e66515b@65.21.237.29:26656,5d3d2807baa4cd191205749a63cc30aab6a3caa1@65.108.7.28:26656,615e815366defb4c194233ea03c9879f183d49b9@65.108.199.26:26656,4654c8bed4349e4800238cff1f88e97c1f880080@207.244.245.125:26656,9c97f6143d3fae032af5f155d472bbc52f4d90b3@194.34.232.225:26656,f073d57107004268a7c0f1e24433401f892eff94@sentry-1.asset-mantle.ezstaking.io:26229,68692140af51d0c41163340f6f1222eec914c18f@sentry-2.asset-mantle.ezstaking.io:26746,01e2e8547bd17890a7af54d236ae19d16cb1b224@65.108.201.154:2050,ac4512cf8969a9602b6c046be6fd24b9b3ecc2d7@142.132.202.10:26656,fd096224f9c918089410ac7ab6d42d21ec87db60@65.21.230.230:26656,cc938d4354c61e4f59b9626737c2aa1e448f4d57@5.161.80.214:26656,f33b2125c3b3a7c4838e22a060e38d2cefd66e78@65.108.140.109:26656,c64d745a479936d0b482c28239effd2e9fe24bf5@45.77.144.250:26656,af80c95f95301fab1778a722a0d8596ca10006cc@136.243.105.182:26656,e0deea2d5c15e77c9d5934305bb23148ce836709@185.252.232.79:26656,1f28c7cd884a76a022038f22923eea8101d3538f@168.119.89.31:26656,7eeb595f1205c2c7230b3812badb1844185b3727@65.108.99.224:46656,adfcaf7a4d5b388aff901136a9d64423ef2215f9@88.99.216.14:26456,201aa01ed819a3544c77b8e12343c832a20f8136@49.12.189.127:26656,169a3e12d45903d961ace560a384d3bcb55092e2@3.137.211.131:26656,38f4504f74a9fd70f158270751c31a4d146f987c@65.21.226.249:26616,aa4cbf8284512c7d10dbc0542604f1fb89e1646b@95.165.150.165:26956,20dbc8f0c0fe5aeadde86976149b70e20fb2e87d@95.217.73.93:24656,5b3c90e6c07e03ffddc5dc3aae786a2990bc5bd3@148.251.81.179:26656,b5c9a4607fc0494b25b703d08c4601ce44027215@162.55.246.236:26656,f61e5c1d7897dd445508a873248e57ae553ac258@91.230.111.86:26656,d0dc9234db7b9e5bb853afbd96055c46990aa55f@65.21.131.144:29656,681ffbadff88c900660d2bc6bce0920929b529f7@62.171.153.122:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.mantleNode/config/config.toml
```

7. #### Set up minimum gas price.

```
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0umntl"|g' $HOME/.mantleNode/config/app.toml
```

7. **Set up pruning (optional).**

```
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.mantleNode/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.mantleNode/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.mantleNode/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.mantleNode/config/app.toml
```

9. **Create service file.**

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

[Service]
User=$USER
ExecStart=$(which mantleNode) start --x-crisis-skip-assert-invariants
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

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

10. **Enable and start service.**

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

{% hint style="info" %}
If you would like to speed up the sync process, you may try using State Sync.
{% endhint %}


---

# 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.stakeangle.com/mainnets/assetmantle/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.
