Skip to content
Validators
/
Support external chains
/
Avalanche

Avalanche

Set up your Avalanche Mainnet or Fuji Testnet node.

Prerequisites

Install AvalancheGo

In this guide we will be using a bash script created by the Avalanche team, which will automatically set up a running node with minimum user input required.

1. Download avalanchego-installer
wget -nd -m https://raw.githubusercontent.com/ava-labs/avalanche-docs/master/scripts/avalanchego-installer.sh
2. Set permission and run the script
chmod 755 avalanchego-installer.sh
./avalanchego-installer.sh

The script will start and prompt you for information about your server environment. Follow the required steps, enter your network information, and confirm the installation. The script will then automatically create and start the avalanchego.service. To check if the service is running or to follow the logs, use the following commands:

sudo systemctl status avalanchego
sudo journalctl -u avalanchego -f

Now you should be synchronizing on the Avalanche Mainnet network. Once the network is synced, you will see a message similar to:

health/service.go#130: "isBootstrapped" became healthy with: {"timestamp":"2021-12-27T21:35:36.879654389+01:00","duration":6943,"contiguousFailures":0,"timeOfFirstFailure":null}

⚠️

By default, the network will start synchronizing on the Mainnet network. If you are trying to set up a node on the testnet network (Avalanche Fuji), you need to stop the avalanchego.service, edit the node.json configuration file and restart the service.

sudo systemctl stop avalanchego
nano  /home/avax/.avalanchego/configs/node.json

Change "network-id" to "fuji", save the file and restart the service:

sudo systemctl start avalanchego

Test your Avalanche RPC connection

Once your node is fully synced, you can run a cURL request to see the status of your node:

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

If the node is successfully synced, the output from above will print {"jsonrpc":"2.0","result":{"isBootstrapped":true},"id":1}

EVM RPC endpoint URL

Axelar Network will be connecting to the C-Chain, which is the EVM compatible blockchain, so your rpc_addr should be exposed in this format:

http://IP:PORT/ext/bc/C/rpc

Example: http://192.168.192.168:9650/ext/bc/C/rpc