# Node Installation

### Hardware requirements The following requirements are recommended for running ATOMONE:

* **6 or more physical CPU cores**
* **At least 1TB of SSD disk storage**
* **At least 16GB of memory (RAM)**
* **At least 500mbps network bandwidth**

## Manual Installation

```bash
# Update & install dependencies
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 htop tmux chrony liblz4-tool -y

# Install Go
cd $HOME
VER="1.21.13"
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"
[ ! -f ~/.bash_profile ] && touch ~/.bash_profile
echo "export PATH=$PATH:/usr/local/go/bin:~/go/bin" >> ~/.bash_profile
source $HOME/.bash_profile
[ ! -d ~/go/bin ] && mkdir -p ~/go/bin
go version


# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export ATOMONE_CHAIN_ID="atomone-1"" >> $HOME/.bash_profile
echo "export ATOMONE_PORT="109"" >> $HOME/.bash_profile
source $HOME/.bash_profile


# Download Binary
cd $HOME
rm -rf atomone
git clone https://github.com/atomone-hub/atomone.git
cd atomone
git checkout v1.1.2
make install 


# Config and Init App
atomoned config node tcp://localhost:${ATOMONE_PORT}57
atomoned config chain-id $ATOMONE_CHAIN_ID
atomoned init $MONIKER --chain-id $ATOMONE_CHAIN_ID


# Add Genesis File and Addrbook
wget -O $HOME/.atomone/config/genesis.json https://snapshot.syanodes.my.id/mainnets/atomone/genesis.json
wget -O $HOME/.atomone/config/addrbook.json https://snapshot.syanodes.my.id/mainnes/atomone/addrbook.json


#Configure Seeds and Peers
SEEDS=""
PEERS="883d672fad793dd87764cd578aa07f390ab500e3@169.155.46.203:26656,622c89060ed88ac4c9d29f0e18ad8fb72fa07104@159.65.101.79:26656,302b2277a5936c5cf9225fa54b6b627df960b43c@212.56.47.197:26656,ca6b5e45924deaba86616d1d7dad29182d83aa0f@5.78.119.101:26656,66dd543dac0f7fdf865190dc904bc46caedcdd07@2001:bc8:702:16d0::5:26656,51ebff95bd1ecfde3eff1dc8b16b5c497d87b0b5@88.99.252.213:26656,af89f2273ff313b143d49376eca165ecd9673393@5.9.94.151:26706,2c02f0e92e00a7fdacdfafb1919b3424047b1701@45.87.107.24:27656,752bb5f1c914c5294e0844ddc908548115c1052c@65.108.236.5:14556,dc92e7b8ed2aafc34c400405916569aad0d990f3@169.155.44.68:26656,706a835221dcc171afa14429fac536d6b5a3736d@63.250.54.71:26656,af9595a740be37ddf8aac7eedc4699786f2e98a9@65.109.78.7:29956,ca1d8ab2fdc1cbff4c8283ddbcc8fd53a7d9a254@65.21.215.167:26656,522826623d65d27ef3f7db8a5259d003be5a93d3@65.108.229.19:26666,1edb42a4ee4526f80882ef6821b0bb231d320447@135.181.61.200:27656,9e6916423eaa4302127a0b7cb518ead4f8b98fd8@89.109.112.42:30656,b1cd93aaa6ce46e536893c3d0ae064134e70849f@65.21.79.120:26656,61b7861a468dfa84532526afd98bea81bf41a874@121.78.247.244:16656,d3adcf9eee8665ee2d3108f721b3613cdd18c3a3@23.227.223.49:26656,6219193bd3b127e980686b745b97bdcd2ff429ef@95.217.107.137:11656,e28ee47043a193f67fa9598a47a32494c5382a12@164.92.105.245:26656,9aceed722f09a3b0de202bbdd98dc345e2b84731@65.108.109.48:26656,e1b058e5cfa2b836ddaa496b10911da62dcf182e@164.152.161.227:26656,a05191b9ec3023be00e9584d5255f7dfcd3a167e@135.181.138.95:2110,da165aaeac3adbc9845879e06f336c2668c5d915@65.21.214.84:9756,a9d606f503566650d39e8c7e381c78918218f0fe@95.217.204.58:29956"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.atomone/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.001uatone\"/" $HOME/.atomone/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "kv"|' $HOME/.atomone/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.atomone/config/config.toml


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


# Set Custom Port
sed -i -e "s%:1317%:${ATOMONE_PORT}17%; s%:8080%:${ATOMONE_PORT}80%; s%:9090%:${ATOMONE_PORT}90%; s%:9091%:${ATOMONE_PORT}91%; s%:8545%:${ATOMONE_PORT}45%; s%:8546%:${ATOMONE_PORT}46%; s%:6065%:${ATOMONE_PORT}65%" $HOME/.atomone/config/app.toml
sed -i -e "s%:26658%:${ATOMONE_PORT}58%; s%:26657%:${ATOMONE_PORT}57%; s%:6060%:${ATOMONE_PORT}60%; s%:26656%:${ATOMONE_PORT}56%; s%:26660%:${ATOMONE_PORT}61%" $HOME/.atomone/config/config.toml


# Set Service File
sudo tee /etc/systemd/system/atomoned.service > /dev/null <<EOF
[Unit]
Description=atomone-mainnet
After=network-online.target

[Service]
User=$USER
ExecStart=$(which atomoned) start --home $HOME/.atomone
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF


# Enable and Start Service
sudo systemctl daemon-reload
sudo systemctl enable atomoned
sudo systemctl start atomoned && sudo journalctl -fu atomoned -o cat
```

## Auto Installation

```bash
wget https://snapshot.syanodes.my.id/auto/mainnet/atomone_auto && chmod +x atomone_auto && ./atomone_auto 
```
