Run Validator Nodes

Learn how to run validators nodes by starting AvalancheGo in a Docker container.

Now that the P-Chain records are set up, you can start the nodes tracking the Subnet.

Generate the Docker Command

There are many flags for the docker image. The tool below will help you navigate the configuration options and generates the docker command for you based on the subnetID. Copy the docker command and run in the terminal of your node.

Logo

Node Setup with Docker

This will start a Docker container running an RPC or validator node that tracks your L1.

Set up Instance

Set up a linux server with any cloud provider, like AWS, GCP, Azure, or Digital Ocean. Low specs (e.g. 2 vCPUs, 4GB RAM, 20GB storage) are sufficient for basic tests. For more extensive test and production L1s use a larger instance with appropriate resources (e.g. 8 vCPUs, 16GB RAM, 1 TB storage).

If you do not have access to a server, you can also run a node for educational purposes locally. Where are you running your node?

Docker Installation

Make sure you have Docker installed on your system. You can use the following commands to install it:

sudo apt-get update && \
    sudo apt-get install -y docker.io && \
    sudo usermod -aG docker $USER && \
    newgrp docker
 
# Test docker installation
docker run -it --rm hello-world
 

If you do not want to use Docker, you can follow the instructions here.

Select L1

Enter the Avalanche Blockchain ID (not EVM chain ID) of the L1 you want to run a node for.

Suggestions:
Avalanche Mainnet (2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5)
From your chain list

Follow Node Logs

To check the logs of AvalancheGo, you can use the following command:

docker logs -f avago

After the node has been started it will take a few minutes to sync the P-Chain.

Stop Node

To stop the node, you can use the following command:

docker stop avago

The node credentials and the blockchain state is persisted in the ~/.avalanchego directory. When you restart the node it will pick up where it left off.

Remove Node

docker rm avago

This will not remove the state and credentials of the node. To remove these you need to delete the ~/.avalanchego directory.

Is this guide helpful?

On this page