Skip to main content

How to Run an Avail Light Client

This guide outlines how to set up an Avail light client. You can either:

  1. Run the light client on an existing network
  2. Run the light client locally

Latest release

You can find the latest release binary in the avail-light repository.

RepositoryLatest Release

Run on an Existing Network

In this example, you will download the light client and connect to an existing public network.

  1. Download the latest Avail light client release. The light client is available pre-built for different architectures.

  2. If you prefer building the light client yourself, see build the Avail light client from source.

  3. Run the light client with the following pre-defined configuration file:

./avail-light --network goldberg
  1. If you want to supply your own configuration file, use:
./avail-light --config config.yaml --network goldberg

That's it 🎉! You have successfully run the light client and connected to a public network. The light client should show output similar to the following:

Sample output

The client output should look like this:

2023-06-04T02:56:31.871284Z  INFO avail_light::telemetry: Metrics server on
2023-06-04T02:56:31.884271Z INFO avail_light::http: RPC running on
2023-06-04T02:56:31.884386Z INFO avail_light::network: Local peer id: PeerId("12D3KooWQ77VEayXfSPWcj6ucAGcjZRTL8ANmtjsuULoyToGSBoo"). Public key: Ed25519(PublicKey(compressed): d44de4113b372855a655f1675325379705aa7a273698194e8e6814dab7791a).
2023-06-04T02:56:31.884605Z INFO Server::run{addr=}: warp::server: listening on
2023-06-04T02:56:31.892181Z INFO avail_light::network::event_loop: Local node is listening on "/ip4/"
2023-06-04T02:56:31.892487Z INFO avail_light: Bootstraping the DHT with bootstrap nodes...
2023-06-04T02:56:31.892487Z INFO avail_light::network::event_loop: Local node is listening on "/ip4/"
2023-06-04T02:56:31.892540Z INFO avail_light::network::event_loop: Local node is listening on "/ip4/"
2023-06-04T02:56:31.892745Z INFO avail_light::network::event_loop: Local node is listening on "/ip4/"
2023-06-04T02:56:42.220179Z INFO avail_light::rpc: Connection established to the node: wss:// <v1.6.0-99b85257d6b/data-avail/9>
2023-06-04T02:56:42.444576Z INFO avail_light::light_client: Starting light client...
2023-06-04T02:56:43.453935Z INFO avail_light::subscriptions: Received finalized block header header.number=2074
2023-06-04T02:56:43.455236Z INFO avail_light::light_client: Processing finalized block block_number=2074 block_delay=0
2023-06-04T02:56:43.456055Z INFO avail_light::light_client: Random cells generated: 4 block_number=2074 cells_requested=4
2023-06-04T02:56:43.617885Z INFO avail_light::light_client: Number of cells fetched from DHT: 0 block_number=2074 cells_from_dht=0
2023-06-04T02:56:43.820098Z INFO avail_light::light_client: Number of cells fetched from RPC: 4 block_number=2074 cells_from_rpc=4
2023-06-04T02:56:43.889260Z INFO avail_light::light_client: Completed 4 verification rounds in 433.968ms block_number=2074
2023-06-04T02:56:43.889395Z INFO avail_light::light_client: Confidence factor: 93.75 block_number=2074 confidence=93.75
2023-06-04T02:56:43.889495Z INFO avail_light::light_client: Partition cells received. Time elapsed: 0ns block_number=2074 partition_retrieve_time_elapsed=0.0 partition_cells_fetched=4
2023-06-04T02:56:44.050133Z INFO avail_light::light_client: DHT PUT operation success rate: inf block_number=2074
2023-06-04T02:56:44.050211Z INFO avail_light::light_client: 4 cells inserted into DHT. Time elapsed: 160.697ms block_number=2074 partition_dht_insert_time_elapsed=0.160697

Run Locally

If you want to connect the Avail light client to a local network, you will need to run your own Avail node and your own Avail light client bootstrap node.

  1. Run the Avail node. For local set-up, run the node in dev mode:

    ./data-avail --dev
  2. Run a bootstrap node.

  3. Once the bootstrap node is running, use the following command to run your client:

    ./avail-light --network local
  4. If you want to supply your own configuration file, use:

    ./avail-light --config config.yaml --network local

Build From Source

You can build the light client directly from source.

git clone
cd avail-light
cargo build --release

Find the resulting avail-light binary in the target/release directory.

Next Steps

Run a Relay node

We provide an Avail light client relay node that can help you with running your light client from behing NAT and firewalls. Find more information on running a relay node here.

Run a Full Node

Consider running a full node by following the deployment guide here.