Skip to content
NodesRun a Beam nodeSetting up an Avalanchego node via Docker

Method 2: Setting up an AvalancheGo node via Docker

The fastest way to set up your node:

curl -fsSL https://docs.onbeam.com/scripts/docker-setup-beam-validator.sh -o docker-setup-beam-validator.sh && chmod +x docker-setup-beam-validator.sh && ./docker-setup-beam-validator.sh

The script assumes that you have Docker and Docker Compose installed. You can re-run this anytime to apply future updates (new image tags, upgrade configs, etc.). If you’re using this script, you can skip the manual steps below.

Make sure you have Docker and curl installed and running on your system

Apply network upgrades

Create the config directory for Beam and download the upgrade.json file from GitHub. Place it in the appropriate directory.

You might need to use sudo to elevate your privileges if mkdir fails. If you don’t have wget on your particular Linux distribution, you can use the curl -O command instead.

mkdir -p ~/.avalanchego/configs/chains/2tmrrBo1Lgt1mzzvPSFt73kkQKFas5d1AP88tv9cicwoFp8BSn
cd ~/.avalanchego/configs/chains/2tmrrBo1Lgt1mzzvPSFt73kkQKFas5d1AP88tv9cicwoFp8BSn
 
wget -O upgrade.json https://raw.githubusercontent.com/BuildOnBeam/beam-subnet/main/subnets/beam-mainnet/upgrade.json

Set up VM alias mapping

mkdir -p ~/.avalanchego/configs/vms
 
cat > ~/.avalanchego/configs/vms/aliases.json <<EOF
{
  "kLPs8zGsTVZ28DhP1VefPCFbCgS7o5bDNez8JUxPVw9E6Ubbz": ["srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy"]
}
EOF

Run Docker image

docker run -it -d \
    --name avago \
    -p 127.0.0.1:9650:9650 -p 9651:9651 \
    -v ~/.avalanchego:/root/.avalanchego \
    -e AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK=true \
    -e AVAGO_PUBLIC_IP_RESOLUTION_SERVICE=opendns \
    -e AVAGO_HTTP_HOST=0.0.0.0 \
    -e AVAGO_TRACK_SUBNETS=eYwmVU67LmSfZb1RwqCMhBYkFyG8ftxn6jAwqzFmxC9STBWLC \
    -e VM_ID=kLPs8zGsTVZ28DhP1VefPCFbCgS7o5bDNez8JUxPVw9E6Ubbz \
    avaplatform/subnet-evm:v0.7.3

Once your Beam Node is properly set up and has completed bootstrapping, head over to register a validator.