Documentation

Using Docker

Learn how to run an Avalanche node using Docker.

Prerequisites

Before beginning, you must ensure that:

  • Docker is installed on your system
  • You have access to the AvalancheGo repository
  • Docker daemon is running on your machine

You can verify your Docker installation by running:

docker --version

Building the Docker Image

To build the Docker image for the latest avalanchego branch:

  1. Navigate to the project directory
  2. Execute the build script:
    ./scripts/build_image.sh

This script will create a Docker image containing the latest version of AvalancheGo.

Verifying the Build

After the build completes, verify the image was created successfully:

docker image ls

You should see an image with:

  • Repository: avaplatform/avalanchego
  • Tag: xxxxxxxx (where xxxxxxxx is the shortened commit hash of the source code used for the build)

Running AvalancheGo Node

To start an AvalancheGo node, run the following command:

docker run -ti -p 9650:9650 -p 9651:9651 avaplatform/avalanchego:xxxxxxxx /avalanchego/build/avalanchego

This command:

  • Creates an interactive container (-ti)
  • Maps the following ports:
    • 9650: HTTP API port
    • 9651: P2P networking port
  • Uses the built AvalancheGo image
  • Executes the AvalancheGo binary inside the container

Port Configuration

The default ports used by AvalancheGo are:

  • 9650: HTTP API
  • 9651: P2P networking

Ensure these ports are available on your host machine and not blocked by firewalls.

Last updated on 3/10/2025

On this page

Privacy Policy

We respect your privacy and are committed to protecting your personal data. This privacy policy will inform you about how we look after your personal data and tell you about your privacy rights.

Read full policy