⚒️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
  1. 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
  1. Install npm

sudo apt-get install nodejs
sudo apt install npm --yes
  1. Build the binary from source.

git clone https://github.com/althea-net/althea-chain
cd althea-chain
git checkout v0.5.5
make install
althea version
  1. Initialize your node.

althea init <node_name> --chain-id althea_7357-1
  1. Download genesis.

wget -O $HOME/.althea/config/genesis.json "https://raw.githubusercontent.com/obajay/nodes-Guides/main/Projects/Althea/genesis.json"
  1. Add persistent peers to config.toml.

seeds="9aa8a73ea9364aa3cf7806d4dd25b6aed88d8152@althea-testnet.seed.mzonder.com:11356"
peers="733e9d5f995c2866df9f2e1254551940f060a70c@51.159.159.112:26656,11e8f38e3c5601e4ab2333d5a5bbb108a39b8e1c@159.69.110.238:26656,a81cf8f7f330e2e09bec93c866214f7b3b336849@65.109.87.88:26356,83147260a704b75283ca6da218516ee0eaa82956@170.64.156.36:26656,617433cdf5411fc9241d0f77239f751a14669368@146.190.156.221:26656,856ac01afa0163c27b69e1b25464427310120924@85.25.134.23:26656,d320b861277a338daefec6e620daafe07fc5ee19@65.108.199.36:20036,8203297aacaea1d889fcf36240484c9efc217bbd@116.202.156.106:26656,c6e1ed7117cd56036cc51835945d155e9c474c01@167.235.144.3:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$seeds\"/; s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.althea/config/config.toml
  1. Set up minimum gas price.

sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0ualthea\"/;" $HOME/.althea/config/app.toml
  1. 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/.althea/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.althea/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.althea/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.althea/config/app.toml
  1. Create service file.

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

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

[Install]
WantedBy=multi-user.target
EOF
  1. Enable and start service.

systemctl daemon-reload
systemctl enable althea
systemctl restart althea
journalctl -u althea -f -o cat

If you would like to speed up the sync process, you may try using State Sync.

Last updated