Primary Network Node Setup with Docker
Configure Node Settings
Choose your network, node type, and configure settings. The configuration preview updates in real-time.
Pruning reduces disk usage by ~44x (13TB → 300GB) by removing old state data. Recommended for validators.
Fast bootstrap by syncing from a state summary instead of replaying all blocks. Recommended for validators to speed up initial sync.
Configuration Preview
Storage Requirements
Set up Instance
Provision a server with the following specifications.
Use local NVMe, not cloud block storage (EBS, Persistent Disk). Details →
Docker Installation
Make sure you have Docker installed on your system. You can use the following commands to install it:
# Install Docker using convenience scriptcurl -fsSL https://get.docker.com -o get-docker.shsudo sh get-docker.shsudo usermod -aG docker $USERnewgrp docker# Test installationdocker run -it --rm hello-world# Install Dockersudo yum update -ysudo yum install -y dockersudo systemctl start dockersudo systemctl enable dockersudo usermod -aG docker $USERnewgrp docker# Test installationdocker run -it --rm hello-world# Install Docker using convenience scriptcurl -fsSL https://get.docker.com -o get-docker.shsudo sh get-docker.shsudo usermod -aG docker $USERnewgrp docker# Test installationdocker run -it --rm hello-world# Install Docker Desktop for Mac# Download from: https://www.docker.com/products/docker-desktop/echo "Please download and install Docker Desktop for Mac from the official Docker website."# After installation, you can test it by running:docker run -it --rm hello-worldIf you do not want to use Docker, you can follow the manual installation instructions.
Create Configuration Files
Run these commands to create the config files. AvalancheGo reads from these default locations on startup.
Create config directories
mkdir -p ~/.avalanchego/configs/chains/CNode config ~/.avalanchego/configs/node.json
cat > ~/.avalanchego/configs/node.json << 'EOF'{ "network-id": "mainnet", "public-ip-resolution-service": "opendns", "http-host": "0.0.0.0", "http-port": 9650, "staking-port": 9651}EOFC-Chain config ~/.avalanchego/configs/chains/C...
# Error generating chain configConfigure Firewall
Open the required ports for your node to communicate with the network.
# Open P2P port only (validators don't expose RPC)sudo ufw allow 9651/tcp comment 'AvalancheGo P2P'sudo ufw --force enablesudo ufw statusValidators only need the P2P port. The RPC port is bound to localhost for security.
Run Docker
Start the node. Config is read from the mounted volume — no env vars needed.
docker run -it -d \ --name avago \ -p 127.0.0.1:9650:9650 -p 9651:9651 \ -v ~/.avalanchego:/root/.avalanchego \ -e AVAGO_CONFIG_FILE=/root/.avalanchego/configs/node.json \ avaplatform/avalanchego:v1.14.2Restart anytime with docker restart avago — config changes are picked up automatically.
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 avagoBackup Validator Credentials
Your validator identity is defined by these files in ~/.avalanchego/staking/
# Backup your validator credentialsmkdir -p ~/avalanche-backupcp -r ~/.avalanchego/staking ~/avalanche-backup/# Verify backupls -la ~/avalanche-backup/staking/⚠Lost keys = missed staking rewards (validator can't sign). NVMe drives can fail without warning.
🔒Never share private keys — anyone with them can impersonate your validator.