Developers
Run a Full Node

Running a full node

How to become a Validator on Allora

This guide provides instructions on how to run a full node for the Allora network. There are two primary methods for running an Allora node: using docker compose (preferred) or using a script (opens in a new tab). It's important to choose the method that best suits your environment and needs.


Prerequisites

  • Git
  • Docker with docker compose
  • Basic command-line knowledge

Method 1: Using docker compose (Recommended)

Running the Allora node with docker compose simplifies the setup and ensures consistency across different environments.

Step 1: Clone the Allora Chain Repository

If you haven't already, clone the latest release of the allora-chain repository (opens in a new tab):

git clone https://github.com/allora-network/allora-chain.git

Step 2: Run the Node with Docker Compose

Navigate to the root directory of the cloned repository and start the node using docker compose:

cd allora-chain
docker compose pull
docker compose up

run docker compose up -d to run the container in detached mode, allowing it to run in the background.

Info: Don't forget to pull the images first, to ensure that you're using the latest images.

⚠️

Make sure that any previous containers you launched are killed, before launching a new container that uses the same port.

You can run the following command to kill any containers running on the same port:

docker container ls
docker rm -f <container-name>

Run Only a Node with Docker Compose

In this case, you will use Allora's heads.

Run
docker compose pull
docker compose up node

To run only a head: docker compose up head

NOTE: You also can comment the head service in the Dockerfile.

Monitoring Logs

To view the node's logs, use the following command:

docker compose logs -f

Executing RPC Calls

You can interact with the running node through RPC calls. For example, to check the node's status:

curl -s http://localhost:26657/status | jq .

This command uses curl to send a request to the node's RPC interface and jq to format the JSON response.

Once your node has finished syncing and is caught up with the network, this command will return false:

curl -so- http\://localhost:26657/status | jq .result.sync_info.catching_up

Info: The time required to sync depends on the chain's size and height.

  • For newly launched chains, syncing will take minutes.
  • Established chains like Ethereum can take around a day to sync using Nethermind or similar clients.
  • Some chains may take several days to sync.
  • Syncing an archival node will take significantly more time.
⚠️

Warning: Network participants will not be able to connect to your node until it is finished syncing and the command above returns false.

Syncing from Snapshot

Users can also opt to sync their nodes from our latest snapshot script (opens in a new tab) following the instructions below:

  1. Install rclone (opens in a new tab), a command-line program to manage files on cloud storage
brew install rclone
  1. Follow the instructions to configure rclone after running rclone config in the command line

  2. Uncomment the following lines (opens in a new tab) from your Allora Chain repository:

# uncomment this block if you want to restore from a snapshot
# SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# "${SCRIPT_DIR}/restore_snapshot.sh"
  1. Run the node using Docker:
docker compose pull
docker compose up -d