logoDeveloper Hub
Using Install Script

Installing AvalancheGo

Learn how to install AvalancheGo on your system.

Running the Script

So, now that you prepared your system and have the info ready, let's get to it.

To download and run the script, enter the following in the terminal:

wget -nd -m https://raw.githubusercontent.com/ava-labs/avalanche-docs/master/scripts/avalanchego-installer.sh;\
chmod 755 avalanchego-installer.sh;\
./avalanchego-installer.sh

And we're off! The output should look something like this:

And then the script will prompt you for information about the network environment:

To complete the setup some networking information is needed.
Where is the node installed:
1) residential network (dynamic IP)
2) cloud provider (static IP)
Enter your connection type [1,2]:

Enter 1 if you have dynamic IP, and 2 if you have a static IP. If you are on a static IP, it will try to auto-detect the IP and ask for confirmation.

Detected '3.15.152.14' as your public IP. Is this correct? [y,n]:

Confirm with y, or n if the detected IP is wrong (or empty), and then enter the correct IP at the next prompt.

Next, you have to set up RPC port access for your node. Those are used to query the node for its internal state, to send commands to the node, or to interact with the platform and its chains (sending transactions, for example). You will be prompted:

RPC port should be public (this is a public API node) or private (this is a validator)? [public, private]:
  • private: this setting only allows RPC requests from the node machine itself.
  • public: this setting exposes the RPC port to all network interfaces.

As this is a sensitive setting you will be asked to confirm if choosing public. Please read the following note carefully:

Note

If you choose to allow RPC requests on any network interface you will need to set up a firewall to only let through RPC requests from known IP addresses, otherwise your node will be accessible to anyone and might be overwhelmed by RPC calls from malicious actors! If you do not plan to use your node to send RPC calls remotely, enter private.

The script will then prompt you to choose whether to enable state sync setting or not:

Do you want state sync bootstrapping to be turned on or off? [on, off]:

Turning state sync on will greatly increase the speed of bootstrapping, but will sync only the current network state. If you intend to use your node for accessing historical data (archival node) you should select off. Otherwise, select on. Validators can be bootstrapped with state sync turned on.

The script will then continue with system service creation and finish with starting the service.

The script is finished, and you should see the system prompt again.

Post Installation

AvalancheGo should be running in the background as a service. You can check that it's running with:

sudo systemctl status avalanchego

Below is an example of what the node's latest logs should look like:

Note the active (running) which indicates the service is running OK. You may need to press q to return to the command prompt.

To find out your NodeID, which is used to identify your node to the network, run the following command:

sudo journalctl -u avalanchego | grep "NodeID"

It will produce output like:

Jan 05 10:38:38 ip-172-31-30-64 avalanchego[2142]: INFO [01-05|10:38:38] avalanchego/node/node.go#428: Set node's ID to 6seStrauyCnVV7NEVwRbfaT9B6EnXEzfY

Prepend NodeID- to the value to get, for example, NodeID-6seStrauyCnVV7NEVwRbfaT9B6EnXEzfY. Store that; it will be needed for staking or looking up your node.

Your node should be in the process of bootstrapping now. You can monitor the progress by issuing the following command:

sudo journalctl -u avalanchego -f

Press ctrl+C when you wish to stop reading node output.

Last updated on

On this page

Edit on Github