Documentation

Using Pre-Built Binary

Learn how to run an Avalanche node from a pre-built binary program.

Download Binary

To download a pre-built binary instead of building from source code, go to the official AvalancheGo releases page, and select the desired version.

Scroll down to the Assets section, and select the appropriate file. You can follow below rules to find out the right binary.

For MacOS

Download the avalanchego-macos-<VERSION>.zip file and unzip using the below command:

unzip avalanchego-macos-<VERSION>.zip

The resulting folder, avalanchego-<VERSION>, contains the binaries.

Linux (PCs or Cloud Providers)

Download the avalanchego-linux-amd64-<VERSION>.tar.gz file and unzip using the below command:

tar -xvf avalanchego-linux-amd64-<VERSION>.tar.gz

The resulting folder, avalanchego-<VERSION>-linux, contains the binaries.

Linux (Arm64)

Download the avalanchego-linux-arm64-<VERSION>.tar.gz file and unzip using the below command:

tar -xvf avalanchego-linux-arm64-<VERSION>.tar.gz

The resulting folder, avalanchego-<VERSION>-linux, contains the binaries.

Start the Node

Note

To be able to make API calls to your node from other machines, include the argument --http-host= when starting the node.

MacOS

For running a node on the Avalanche Mainnet:

./avalanchego-<VERSION>/build/avalanchego

For running a node on the Fuji Testnet:

./avalanchego-<VERSION>/build/avalanchego --network-id=fuji

Linux

For running a node on the Avalanche Mainnet:

./avalanchego-<VERSION>-linux/avalanchego

For running a node on the Fuji Testnet:

./avalanchego-<VERSION>-linux/avalanchego --network-id=fuji

Bootstrapping

A new node needs to catch up to the latest network state before it can participate in consensus and serve API calls. This process (called bootstrapping) currently takes several days for a new node connected to Mainnet, and a day or so for a new node connected to Fuji Testnet. When a given chain is done bootstrapping, it will print logs like this:

[09-09|17:01:45.295] INFO <C Chain> snowman/transitive.go:392 consensus starting {"lastAcceptedBlock": "2qaFwDJtmCCbMKP4jRpJwH8EFws82Q2yC1HhWgAiy3tGrpGFeb"}
[09-09|17:01:46.199] INFO <P Chain> snowman/transitive.go:392 consensus starting {"lastAcceptedBlock": "2ofmPJuWZbdroCPEMv6aHGvZ45oa8SBp2reEm9gNxvFjnfSGFP"}
[09-09|17:01:51.628] INFO <X Chain> snowman/transitive.go:334 consensus starting {"lenFrontier": 1}

Check Bootstrapping Progress​

To check if a given chain is done bootstrapping, in another terminal window call info.isBootstrapped by copying and pasting the following command:

curl -X POST --data '{
    "jsonrpc":"2.0",
    "id"     :1,
    "method" :"info.isBootstrapped",
    "params": {
        "chain":"X"
    }
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

If this returns true, the chain is bootstrapped; otherwise, it returns false. If you make other API calls to a chain that is not done bootstrapping, it will return API call rejected because chain is not done bootstrapping. If you are still experiencing issues please contact us on Discord.

Note

The 3 chains will bootstrap in the following order: P-chain, X-chain, C-chain.

Learn more about bootstrapping here.

RPC

When finished bootstrapping, the X, P, and C-Chain RPC endpoints will be:

localhost:9650/ext/bc/P
localhost:9650/ext/bc/X
localhost:9650/ext/bc/C/rpc

if run locally, or

XXX.XX.XX.XXX:9650/ext/bc/P
XXX.XX.XX.XXX:9650/ext/bc/X
XXX.XX.XX.XXX:9650/ext/bc/C/rpc

if run on a cloud provider. The “XXX.XX.XX.XXX" should be replaced with the public IP of your EC2 instance.

For more information on the requests available at these endpoints, please see the AvalancheGo API Reference documentation.

Going Further

Your Avalanche node will perform consensus on its own, but it is not yet a validator on the network. This means that the rest of the network will not query your node when sampling the network during consensus. If you want to add your node as a validator, check out Add a Validator to take it a step further.

Also check out the Maintain section to learn about how to maintain and customize your node to fit your needs.

To track an Avalanche L1 with your node, head to the Avalanche L1 Node tutorial.

Edit on GitHub

Last updated on

On this page