logoDeveloper Hub

Run Validator on AWS

This page demonstrates how to deploy Avalanche validators on AWS using just one Avalanche-CLI command.

This page demonstrates how to deploy Avalanche validators on AWS using just one Avalanche-CLI command.

Note

Currently, only Fuji network and Devnets are supported.

ALPHA WARNING: This command is currently in experimental mode. Proceed at your own risk.

Prerequisites

Before we begin, you will need to create an AWS account and have an AWS credentials file in home directory with [default] profile set. More info can be found here

Create Validators

To create Avalanche validators, run:

avalanche node create <clusterName>

The created nodes will be part of cluster clusterName and all avalanche node commands applied to cluster clusterName will apply to all nodes in the cluster.

Note

Please note that running a validator on AWS will incur costs.

Ava Labs is not responsible for the cost incurred from running an Avalanche validator on cloud services vian Avalanche-CLI.

Currently, we have set the following specs of the AWS cloud server to a fixed value, but we plan to enable customization in the near future:

  • OS Image: Ubuntu 20.04 LTS (HVM), SSD Volume Type
  • Storage: 1 TB

Instance type can be specified via --node-type parameter or via interactive menu. c5.2xlarge is the default(recommended) instance size.

The command will ask which region you want to set up your cloud server in:

 Which AWS region do you want to set up your node in?: 
 us-east-1
    us-east-2
    us-west-1
    us-west-2
    Choose custom region (list of regions available at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html)

The command will next ask whether you want to set up monitoring for your nodes.

  Do you want to set up a separate instance to host monitoring? (This enables you to monitor all your set up instances in one dashboard): 
 Yes
    No

Setting up monitoring on a separate AWS instance enables you to have a centralized Grafana logs and dashboard for all nodes in a cluster, as seen below:

Centralized Logs

Main Dashboard

The separate monitoring AWS instance will have similar specs to the default AWS cloud server, except for its storage, which will be set to 50 GB.

Please note that setting up monitoring on a separate AWS instance will incur additional cost of setting up an additional AWS cloud server.

The command will then ask which Avalanche Go version you would like to install in the cloud server. You can choose default (which will install the latest version) or you can enter the name of an Avalanche L1 created with CLI that you plan to be validated by this node (we will get the latest version that is compatible with the deployed Avalanche L1's RPC version).

Once the command has successfully completed, Avalanche-CLI outputs all the created cloud server node IDs as well as the public IP that each node can be reached at.

Avalanche-CLI also outputs the command that you can use to ssh into each cloud server node.

Finally, if monitoring is set up, Avalanche-CLI will also output the Grafana link where the centralized dashboards and logs can be accessed.

By the end of successful run of create command, Avalanche-CLI would have:

  • Installed Avalanche Go in cloud server
  • Installed Avalanche CLI in cloud server
  • Downloaded the .pem private key file to access the cloud server into your local .ssh directory. Back up this private key file as you will not be able to ssh into the cloud server node without it (unless ssh-agent is used).
  • Downloaded staker.crt and staker.key files to your local .avalanche-cli directory so that you can back up your node. More info about node backup can be found here
  • Started the process of bootstrapping your new Avalanche node to the Primary Network (for non-Devnet only).

Please note that Avalance CLI can be configured to use ssh-agent for ssh communication. In this case public key will be read from there and cloud server will be accessible using it. Yubikey hardware can be also used to store private ssh key. Please use official Yubikey documentation, for example [https://developers.yubico.com/PGP/SSH_authentication/] for more details.

Check Bootstrap Status

Note

Ignore for Devnet

Please note that you will have to wait until the nodes have finished bootstrapping before the nodes can be Primary Network or Avalanche L1 Validators. To check whether all the nodes in a cluster have finished bootstrapping, run avalanche node status <clusterName>.

Last updated on

On this page

Edit on Github