Skip to main content

Installation

Minimum hardware requirement

4-8 Cores, 16G Ram, 500G NVME, Ubuntu 22.04 - 24.04

Installation of required packages

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

Installation GO

cd ~
VER="1.23.4" # Make sure that this version does not broke any other apps you run!
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

Downloading and installing node

git clone https://github.com/althea-net/althea-chain althea
cd althea
git checkout v1.6.0
make install

Set node configuration

althea init NodeName --chain-id althea_258432-1

Downloading genesis and addressbook

curl -Ls https://snapshots.nodesync.top/Mainnet/Althea/genesis.json> $HOME/.althea/config/genesis.json
# Set seeds and peers

sed -i 's/seeds = ""/seeds = "[email protected]:12456"/' ~/.althea/config/config.toml

[email protected]:26556,[email protected]:37656,[email protected]:26616,[email protected]:12456,[email protected]:26656
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" $HOME/.althea/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0aalthea\"|" $HOME/.althea/config/app.toml

# Set indexer
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.althea/config/config.toml

# Set pruning
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/.althea/config/app.toml



# Download latest chain data snapshot
curl -L https://snapshots.nodesync.top/Mainnet/Althea/althea_latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.althea

Creating service file

sudo tee /etc/systemd/system/althead.service .service > /dev/null <<EOF
[Unit]
Description=althead Node
After=network-online.target

[Service]
User=$USER
ExecStart=$(which althea) start
Restart=always
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable althead

Start node

sudo systemctl start althead && sudo journalctl -u althead -f --no-hostname -o cat