Make sure you have curl
, wget
, git
, and Docker installed on your machine. If not, install them using:
sudo apt update
sudo apt install curl wget git docker.io -y
First, clone the Avail node repository:
git clone <https://github.com/availproject/avail-node.git>
cd avail-node
Build the node using Docker. This isolates dependencies and makes the setup simpler:
docker build -t avail-node .
Alternatively, you can run the pre-built Docker image directly:
docker run -it availproject/avail-node:latest
To run a validator node, use the following command:
docker run -d --name avail-validator \\\\
-p 9933:9933 -p 9944:9944 -p 30333:30333 \\\\
availproject/avail-node:latest \\\\
--validator \\\\
--chain avail \\\\
--port 30333 \\\\
--rpc-port 9933 \\\\
--ws-port 9944
This command starts the node in validator mode and exposes the necessary ports for communication.
Before you can stake and start validating, you need to generate session keys:
docker exec -it avail-validator avail key generate-session-keys
Save the generated keys, as they will be required for staking and setting up your validator identity.