Manual Installation

Follow these step-by-step instructions to manually install and configure AtomOne Testnet node on your server. This guide covers all necessary dependencies, configuration, and service setup.

⚙️ Customize Your Installation

Fill in your custom values. Commands below will update automatically.

Chain ID atomone-testnet-1
Binary repod
Version v1.0.0
Port 26

Install dependencies

sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y

Install go

cd $HOME
VER="1.22.10"
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

Set vars

echo "export WALLET=\"wallet\"" >> $HOME/.bash_profile
echo "export MONIKER=\"test\"" >> $HOME/.bash_profile
echo "export CHAIN_ID=\"atomone-testnet-1\"" >> $HOME/.bash_profile
echo "export PORT=\"26\"" >> $HOME/.bash_profile
source $HOME/.bash_profile

Download binary

cd $HOME
git clone https://github.com/example/repo
cd atomone testnet
git checkout v1.0.0
make install

Config and init app

repod init test --chain-id atomone-testnet-1

Download genesis and addrbook

wget -O $HOME/.atomone testnet/config/genesis.json https://snapshots.winnode.xyz/atomone-testnet/genesis.json
wget -O $HOME/.atomone testnet/config/addrbook.json https://snapshots.winnode.xyz/atomone-testnet/addrbook.json

Set seeds and peers

SEEDS="SEED_NODE_ID_HERE@seed.atomonenet.winnode.xyz:26656"
PEERS="PEER_NODE_ID_HERE@peer.atomonenet.winnode.xyz:26656"
sed -i -e "s/^seeds *=.*/seeds = \"$SEEDS\"/; s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.atomone testnet/config/config.toml

Set custom ports in app.toml

sed -i.bak -e "s%:1317%:26317%g;
s%:8080%:26080%g;
s%:9090%:26090%g;
s%:9091%:26091%g;
s%:8545%:26545%g;
s%:8546%:26546%g;
s%:6065%:26065%g" $HOME/.atomone testnet/config/app.toml

Set custom ports in config.toml file

sed -i.bak -e "s%:26658%:26658%g;
s%:26657%:26657%g;
s%:6060%:26060%g;
s%:26656%:26656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):26656\"%;
s%:26660%:26660%g" $HOME/.atomone testnet/config/config.toml

Config pruning

sed -i -e "s/^pruning *=.*/pruning = \"custom\"/" $HOME/.atomone testnet/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/" $HOME/.atomone testnet/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"19\"/" $HOME/.atomone testnet/config/app.toml

Set minimum gas price, enable prometheus and disable indexing

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

Create service file

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

Reset and download snapshot

repod tendermint unsafe-reset-all --home $HOME/.atomone testnet
if curl -s --head https://snapshots.winnode.xyz/atomone-testnet/snapshot_latest.tar.lz4 | head -n 1 | grep "200" > /dev/null; then
  curl https://snapshots.winnode.xyz/atomone-testnet/snapshot_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.atomone testnet
else
  echo "Snapshot not found"
fi

Enable and start service

sudo systemctl daemon-reload
sudo systemctl enable repod
sudo systemctl restart repod && sudo journalctl -u repod -f