Primary Network Node Setup with Docker

Set up a Docker container running a validator or RPC node for the Avalanche Primary Network (P-Chain, X-Chain, and C-Chain).

Set up Instance

Set up a linux server with any cloud provider, like AWS, GCP, Azure, or Digital Ocean. For Primary Network nodes, we recommend:

  • Minimum specs: 8 vCPUs, 16GB RAM, 1TB storage
  • Recommended specs: 16 vCPUs, 32GB RAM, 2TB NVMe SSD

If you do not have access to a server, you can also run a node for educational purposes locally. Simply select the "RPC Node (Local)" option in the next step.

Docker Installation

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

# Install Docker using convenience script
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
newgrp docker
 
# Test installation
docker run -it --rm hello-world
 

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

Configure Node Type

What type of node do you want to run?

Required Ports

Make sure the following port is open on your server:

  • 9651 - Node-to-node communication

Start AvalancheGo Node

Run the following Docker command to start your Primary Network node:

 

Wait for the Node to Bootstrap

Your node will now bootstrap and sync the Primary Network (P-Chain, X-Chain, and C-Chain). This process can take several hours to days depending on your hardware and network connection.

You can follow the process by checking the logs with the following command:

docker logs -f avago

During the bootstrapping process, the following command will return a 404 page not found error:

curl -X POST --data '{ 
  "jsonrpc":"2.0", "method":"eth_chainId", "params":[], "id":1 
}' -H 'content-type:application/json;' \
http://127.0.0.1:9650/ext/bc/C/rpc

Once bootstrapping is complete, it will return a response like {"jsonrpc":"2.0","id":1,"result":"..."}.