Before you begin, make sure you have the following:
- A Linux-based server (Ubuntu 20.04 or later is recommended).
- Basic knowledge of the command line and server management.
- A registered account with Airchains and some initial tokens to stake.
-
Update your system to ensure all dependencies are up to date:
sudo apt-get update && sudo apt-get upgrade -y
-
Install necessary dependencies like
git
,curl
, andbuild-essential
:sudo apt-get install git curl build-essential -y
Airchains is built with Go, so you need to install it on your server.
-
Download and install Go:
wget https://dl.google.com/go/go1.20.5.linux-amd64.tar.gz sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz
-
Add Go to your PATH:
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc source ~/.bashrc
-
Verify the installation:
go version
-
Clone the Airchains repository to your server:
git clone https://github.com/airchains/airchains-node cd airchains-node
-
Checkout the latest stable release:
git checkout main
-
Compile the node software:
make build
This will create the necessary binaries to run the node.
-
Install the binaries:
sudo make install
-
Initialize the node:
airchaind init <your-node-name> --chain-id airchains-testnet
-
Configure the node to connect to the network by editing the
config.toml
file:nano ~/.airchains/config/config.toml
Ensure you set the following parameters:
- Persistent peers: Add a list of peer nodes to connect to.
- Moniker: Your node’s name.
- Chain ID: Set to
airchains-testnet
.
-
Set up pruning options to reduce disk usage:
pruning = "custom" pruning-keep-recent = "100" pruning-interval = "10"
-
Start the node using systemd for stability:
sudo tee /etc/systemd/system/airchaind.service > /dev/null <<EOF [Unit] Description=Airchains Validator Node After=network-online.target [Service] User=$USER ExecStart=$(which airchaind) start Restart=always RestartSec=3 LimitNOFILE=4096 [Install] WantedBy=multi-user.target EOF
-
Enable and start the service:
sudo systemctl enable airchaind sudo systemctl start airchaind
-
Check the status of your node:
sudo systemctl status airchaind
-
Create a new wallet or import an existing one:
airchaind keys add <wallet-name>
-
Fund your wallet with enough tokens to stake as a validator.
-
Create the validator:
airchaind tx staking create-validator \ --amount <amount-of-tokens> \ --pubkey $(airchaind tendermint show-validator) \ --moniker <your-validator-name> \ --chain-id airchains-testnet \ --commission-rate "0.10" \ --commission-max-rate "0.20" \ --commission-max-change-rate "0.01" \ --min-self-delegation "1" \ --from <wallet-name> \ --gas auto \ --fees <fees> \ --yes
-
Verify your validator status:
airchaind query staking validator $(airchaind keys show <wallet-name> --bech val -a)