How to Run an Avail node
How to run an Avail node
There are four main ways of running an Avail node:
- By running a pre-built binary.
- By building from source
- By running a pre-built image using Docker
- By assisted deployment with an infrastructure provider
LOOKING TO BE AN RPC PROVIDER?
We welcome all community members who are looking to run an RPC node on Avail. While the exact config of your node will depend on your unique requirements, the following flags are required to make sure your node can be used to access all RPC methods:
--state-pruning archive
--blocks-pruning archive
--rpc-methods Safe
--rpc-cors all
--unsafe-rpc-external
--enable-kate-rpcDescription of the flags:
- 
—state-pruning archive: Specify the state pruning mode. This mode specifies when the block’s state (ie, storage) should be pruned (ie, removed) from the database. This setting can only be set on the first creation of the database. Every subsequent run will load the pruning mode from the database and will error if the stored mode doesn’t match this CLI value. It is fine to drop this CLI flag for subsequent runs. Possible values: - archive: Keep the state of all blocks. - archive-canonical: Keep only the state of finalized blocks. - number Keep the state of the last number of finalized blocks. [default: 256]
- 
—blocks-pruning archive: Specify the blocks pruning mode. This mode specifies when the block’s body (including justifications) should be pruned (ie, removed) from the database. Possible values: - archive: Keep all blocks. -archive-canonical: Keep only finalized blocks. - number Keep the lastnumberof finalized blocks.
- 
—rpc-methods Safe: RPC methods to expose. [default: auto] 
 Possible values:- auto:   Expose every RPC method only when RPC is listening on localhost, otherwise serve only safe RPC methods
- safe: Allow only a safe subset of RPC methods
- unsafe: Expose every RPC method (even potentially unsafe ones)
 
- auto:   Expose every RPC method only when RPC is listening on 
- 
—rpc-cors all: Specify browser origins allowed to access the HTTP & WS RPC servers. A comma-separated list of origins (protocol://domain or special nullvalue). Value ofallwill disable origin validation.
- 
—unsafe-rpc-external: Listen to all RPC interfaces. 
- 
—enable-kate-rpc: Enable the Kate pallet. 
- Looking for a list of all available config flags? Check out the last section of this page.
Run a pre-built binary
- 
Go to the Avail node GitHub releases page . There you will see a lot of pre-built binaries for each version of the Avail node. 
- 
Please download the binary suitable from your system, of the latestversion. You can do this using the GUI or by running the following command in your terminal:
curl -L -O https://github.com/availproject/avail/releases/download/<LATEST-AVAIL-NODE-VERSION>/<YOUR-SYSTEM-SPECIFIC-BINARY>.tar.gz- Extract the downloaded file by opening a terminal in the location of the downloaded file and using the following command:
tar -xzvf <YOUR-SYSTEM-SPECIFIC-BINARY>.tar.gzYour terminal should now look something like this:

- The file in red is what we downloaded to our system.
- The file in green is the extracted binary.
- Once extracted, you will see a pre-built, executable binary named avail-nodein the same directory. You can run this binary using the following command:
./avail-node --name a-random-name --chain mainnet -d ./output- Your terminal output should look something like this:
2024-04-29 07:48:22 Avail Node    
2024-04-29 07:48:22 ✌️  version 2.1.1-8608dc47f00    
2024-04-29 07:48:22 ❤️  by Avail Project <info@availproject.org>, 2017-2024    
2024-04-29 07:48:22 📋 Chain specification: Avail Turing Network    
2024-04-29 07:48:22 🏷  Node name: possible-point-3102    
2024-04-29 07:48:22 👤 Role: FULL    
2024-04-29 07:48:22 💾 Database: ParityDb at ./output/chains/avail_turing_network/paritydb/full    
2024-04-29 07:48:27 🔨 Initializing Genesis block/state (state: 0x5603…9c01, header-hash: 0xd3d2…8b70)    
2024-04-29 07:48:27 👴 Loading GRANDPA authority set from genesis on what appears to be first startup.    
2024-04-29 07:48:29 👶 Creating empty BABE epoch changes on what appears to be first startup.    
2024-04-29 07:48:29 🏷  Local node identity is: 12D3KooWELgzaRZqsHNyUodhZZF7A1ydsRpgLsY7fojDegKni4YF    
2024-04-29 07:48:29 Prometheus metrics extended with avail metrics    
2024-04-29 07:48:29 💻 Operating system: linux    
2024-04-29 07:48:29 💻 CPU architecture: x86_64    
2024-04-29 07:48:29 💻 Target environment: gnu    
2024-04-29 07:48:29 💻 CPU: DO-Premium-Intel    
2024-04-29 07:48:29 💻 CPU cores: 4    
2024-04-29 07:48:29 💻 Memory: 7937MB    
2024-04-29 07:48:29 💻 Kernel: 5.15.0-105-generic    
2024-04-29 07:48:29 💻 Linux distribution: Ubuntu 22.04.4 LTS    
2024-04-29 07:48:29 💻 Virtual machine: yes    
2024-04-29 07:48:29 📦 Highest known block at #0    
2024-04-29 07:48:29 Running JSON-RPC server: addr=127.0.0.1:9944, allowed origins=["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"]    
2024-04-29 07:48:29 🏁 CPU score: 950.72 MiBs    
2024-04-29 07:48:29 🏁 Memory score: 4.02 GiBs    
2024-04-29 07:48:29 🏁 Disk score (seq. writes): 845.72 MiBs    
2024-04-29 07:48:29 🏁 Disk score (rand. writes): 338.52 MiBs    
2024-04-29 07:48:29 〽️ Prometheus exporter started at 127.0.0.1:9615    
2024-04-29 07:48:30 🔍 Discovered new external address for our node: /ip4/139.59.94.121/tcp/30333/ws/p2p/12D3KooWELgzaRZqsHNyUodhZZF7A1ydsRpgLsY7fojDegKni4YF    
2024-04-29 07:48:34 ⚙️  Syncing, target=#137399 (9 peers), best: #1000 (0x9e8f…55ab), finalized #512 (0x0a9a…875a), ⬇ 316.3kiB/s ⬆ 14.2kiB/s    
2024-04-29 07:48:39 ⚙️  Syncing 235.4 bps, target=#137399 (9 peers), best: #2177 (0x5828…e9da), finalized #2048 (0x2f65…3b2e), ⬇ 113.3kiB/s ⬆ 5.5kiB/s    
2024-04-29 07:48:43 [3097] 💸 generated 8 npos targets    
2024-04-29 07:48:43 [3097] 💸 generated 8 npos voters, 8 from validators and 0 nominators    
2024-04-29 07:48:43 [#3097] 🗳  creating a snapshot with metadata SolutionOrSnapshotSize { voters: 8, targets: 8 }    
2024-04-29 07:48:43 [#3097] 🗳  Starting phase Signed, round 1.    
2024-04-29 07:48:44 [#3277] 🗳  Starting phase Unsigned((true, 3277)), round 1.    
2024-04-29 07:48:44 [#3278] 🗳  queued unsigned solution with score ElectionScore { minimal_stake: 184467440819699, sum_stake: 184467440819699, sum_stake_squared: 34028236722569152873026450601 }    
2024-04-29 07:48:44 ⚙️  Syncing 236.0 bps, target=#137400 (10 peers), best: #3357 (0x0c50…7d21), finalized #3072 (0x2803…c15b), ⬇ 244.0kiB/s ⬆ 20.2kiB/s    
2024-04-29 07:48:44 [#3457] 🗳  Starting phase Off, round 2.    
2024-04-29 07:48:44 [3457] 💸 new validator set of size 1 has been processed for era 1    
2024-04-29 07:48:49 ⚙️  Syncing 206.2 bps, target=#137400 (10 peers), best: #4388 (0x2d3d…6b93), finalized #4177 (0x58f8…9518), ⬇ 261.5kiB/s ⬆ 11.6kiB/s    
2024-04-29 07:48:54 ⚙️  Syncing 232.0 bps, target=#137400 (10 peers), best: #5548 (0x1aef…1c46), finalized #5120 (0x274f…e5d7), ⬇ 122.7kiB/s ⬆ 6.9kiB/s    
2024-04-29 07:48:59 ⚙️  Syncing 118.2 bps, target=#137400 (10 peers), best: #6139 (0x9e52…af00), finalized #5632 (0x5297…a001), ⬇ 66.5kiB/s ⬆ 4.9kiB/s    
2024-04-29 07:49:04 ⚙️  Syncing 185.7 bps, target=#137401 (10 peers), best: #7068 (0x911d…666a), finalized #6656 (0xdd79…2e5e), ⬇ 80.7kiB/s ⬆ 1.5kiB/s    
2024-04-29 07:49:05 [7417] 💸 generated 9 npos targets    
2024-04-29 07:49:05 [7417] 💸 generated 9 npos voters, 9 from validators and 0 nominators    
2024-04-29 07:49:05 [#7417] 🗳  creating a snapshot with metadata SolutionOrSnapshotSize { voters: 9, targets: 9 }    
2024-04-29 07:49:05 [#7417] 🗳  Starting phase Signed, round 2.    
2024-04-29 07:49:06 [#7597] 🗳  Starting phase Unsigned((true, 7597)), round 2.    
2024-04-29 07:49:06 [#7598] 🗳  queued unsigned solution with score ElectionScore { minimal_stake: 184447246591607, sum_stake: 1475577972732856, sum_stake_squared: 272166294201800640629142739592 }    
2024-04-29 07:49:07 [#7777] 🗳  Finalized election round with compute Unsigned.    
2024-04-29 07:49:07 [#7777] 🗳  Starting phase Off, round 3.    
2024-04-29 07:49:07 [7777] 💸 new validator set of size 8 has been processed for era 2    
2024-04-29 07:49:09 ⚙️  Syncing 206.2 bps, target=#137401 (10 peers), best: #8099 (0x559a…9c2e), finalized #7680 (0x84b6…abc0), ⬇ 103.9kiB/s ⬆ 0.9kiB/s    
2024-04-29 07:49:14 ⚙️  Syncing 204.4 bps, target=#137401 (10 peers), best: #9121 (0xf95e…5a17), finalized #8704 (0x6e49…33cd), ⬇ 98.0kiB/s ⬆ 1.5kiB/sYour node will also appear on the Avail Telemetry site , listed under the “Node name” from the node command output. Be sure to select the appropriate network tab at the top to view your node’s status.
Additional configs
The Avail node is a highly customizable piece of software. You can fetch a list of supported commands and flags using:
./avail-node --helpAlternatively, you can check out this notion page .
Please note that the notion page may not always be updated.
The best way to reliably get the latest config options will be ./avail-node --help.




