LogoLogo
  • WELCOME TO ALEPH ZERO
  • EXPLORE
    • About Aleph Zero
    • AlephBFT Consensus
    • The Economy of Aleph Zero
    • Where to Buy AZERO
    • Decentralized Governance on Aleph Zero
    • Ecosystem
    • Aleph Zero Foundation Treasury Management
    • Community
    • Glossary
    • Audit & Research Papers
  • USE
    • Wallets
    • Explorer
    • Ledger
    • Telegram Notifications
    • Aleph Zero Signer
      • General introduction
      • What does Signer do?
      • What are Sub-accounts and Sub-account paths?
      • Why is it critical to store your Secret Phrase in a safe place?
      • How to forget and restore accounts?
      • What are Networks?
      • What are Trusted apps?
    • Dashboard
      • Dashboard basics
      • Overview
    • Stake
      • Staking Basics
      • Staking Menu Overview
      • How to Start Staking with the Aleph Zero Dashboard
      • How to Start Staking With the Developer Wallet
      • How to start staking using Ledger hardware wallet
      • How to Change Nominations
      • How to Stop Staking
      • Staking Rewards
      • Validators
      • Commission and Foundation Nodes
      • Proxy Accounts
    • Validate
      • Validating Overview
      • Hardware requirements
      • Running an Aleph Node on Testnet
        • Downloading and running the node
        • Verifying your setup
        • Customizing your setup
        • Building and running from source [advanced]
          • Building from source
          • Set environment variables
          • Download DB snapshot
          • Running the binary
        • Appendix: Ports, addresses, validators, and archivists
      • Running an Aleph Node on Mainnet
        • Running the node
        • Building and running from source [advanced]
      • Setting your identity
      • Making the node validate
      • Securing your validator
      • Troubleshooting
      • Elections and Rewards Math
      • Testnet Validator Airdrop
      • Foundation Nomination Program
    • Using the EVM-layer
    • Governance
      • Token
      • Multisig Accounts
  • BUILD
    • Aleph Zero smart contracts basics
      • Setting up a Testnet account
      • Installing required tools
      • Creating your first contract
      • Deploying your contract to Aleph Zero Testnet
      • Extending your contract
    • Cross contract calls
      • Using references
      • Using dynamic calls
    • Migrating from Solidity
    • Writing e2e tests with ink-wrapper
    • Aleph Zero Signer integration
    • Front-end app: smart contract interaction
    • Security Course by Kudelski Security
      • ink! Developers Security Guideline
      • Lesson 1 - Getting started with ink!
      • Lesson 2 - Threat Assessment
      • Lesson 3 - Integer Overflow
      • Lesson 4 - Signed-integer
      • Lesson 5 - Role-Based Access Control
      • Lesson 6 - Address Validation
      • Lesson 7 - Smart Contract Control
    • Development on EVM-layer
  • PROTOCOL DETAILS
    • Shielder
      • Overview
      • Design against Bad Actors
      • Preliminaries - ZK-relations
      • Notes and Accounts
      • ZK-ID and Registrars
      • Anonymity Revokers
      • PoW Anonymity Revoking
      • Relayers
      • Deterministic Secret Management
      • SNARK-friendly Symmetric Encryption
      • SNARK-friendly Asymmetric Encryption
      • Cryptography
      • Token shortlist
      • User Wallet
      • Versioning
      • PoC
      • Version 0.1.0
      • Version 0.2.0
    • Common DEX
      • Common Whitepaper - Differences
      • Dutch Auctions
  • FAQ
  • Tutorials
    • Withdrawing coins from exchanges
      • How to withdraw your AZERO coins from KuCoin
      • How to withdraw your AZERO coins from MEXC Global
      • How to withdraw your AZERO coins from HTX
  • Setting up or restoring a wallet
    • How to set up or recover your AZERO account using Aleph Zero Signer
    • How to set up or recover your AZERO account using the official mainnet web wallet
    • How to set up or recover your AZERO account using Nova Wallet
    • How to set up or recover your AZERO account using SubWallet
    • How to set up or recover your AZERO account using Talisman
  • Staking
    • How to stake via a direct nomination using the Aleph Zero Dashboard
    • How to stake via a nomination pool using the Aleph Zero Dashboard
    • How to destroy a nomination pool via the Aleph Zero Dashboard
Powered by GitBook
On this page
  • Prerequisites
  • Setup and running
  • Managing the node

Was this helpful?

  1. USE
  2. Validate
  3. Running an Aleph Node on Testnet

Downloading and running the node

After completing this section, your node will be connected to the Aleph Zero Testnet and will start receiving blocks from the network.

PreviousRunning an Aleph Node on TestnetNextVerifying your setup

Last updated 1 month ago

Was this helpful?

Prerequisites

You will need docker and wget. If you are using Linux, we recommend that you add your user to the docker group so that using docker doesn’t require sudo access. You can find the Docker installation instructions and using it without sudo access (if you can't use Docker without sudo, simply add sudo before running the script.

You will also need to make sure that the ports 9944, 30333, 30343 are not busy. On Linux, you can check this with:

sudo lsof -i -P -n | grep LISTEN | grep -E '9944|30333|30343'

If there is no output, the port is free.

Before you proceed, please take a minute to read the section about as that is crucial to the correct functioning of your node within the Aleph network.

Clone the Aleph Node Runner repo:

git clone https://github.com/Cardinal-Cryptography/aleph-node-runner
cd aleph-node-runner

IMPORTANT: With release 15.1, the Node Runner is undergoing significant changes. You will need to either do a git pull or delete your aleph-node-runner repo and clone it again. Regardless of which option you choose, please make sure to back up any changes you may have made to the config.

The new Node Runner is able to figure out the correct version of Aleph Node to run so the only time where you'll want to do a git pull in the future will be when a new Aleph Node Runner Version is released (it will always be announced).

Setup and running

Once inside the aleph-node-runner folder, run:

./run_node.sh -n <your_nodes_name>  --ip <your public ip>

If you are using a domain name instead of an IP (e.g. in a DynDNS configuration), you will need to pass the --dns argument:

./run_node.sh -n <your_nodes_name> --dns <your domain name>

The choice of your_nodes_name is entirely up to you but for the sake of more comprehensible logs please try using something unique and memorable. If you don’t provide the name, the script will do its best to generate one for you based on your username but it is not recommended as it might result in potential name clashes and make the logs harder to read. On Testnet, it's best to have this name be the same as the identity you'll set in the next section and the name you use in the form.

It might take quite some time before you actually get the node running: the script will first download required files, including a database snapshot (a couple hundred GB). It will then run the node for you and you can inspect the logs by running docker logs <your_nodes_name>

	
2025-03-14 12:40:52 ✨ Imported #88320322 (0x27db…6728)
2025-03-14 12:40:53 ✨ Imported #88320323 (0x1386…f4c0)
2025-03-14 12:40:54 ✨ Imported #88320324 (0xafa1…e47b)
2025-03-14 12:40:55 ✨ Imported #88320325 (0xd71a…b8b9)
2025-03-14 12:40:56 Accepting new connection 1/100
2025-03-14 12:40:56 ✨ Imported #88320326 (0x4c53…47f7)
2025-03-14 12:40:56 Network status report: /0x05d5…60c5/auth/0 connected peers - 29;
2025-03-14 12:40:56 Network status report: /0x05d5…60c5/sync/0 connected peers - 29;
2025-03-14 12:40:57 ✨ Imported #88320327 (0xef5b…aa8e)
2025-03-14 12:40:58 ✨ Imported #88320328 (0xe403…172a)
2025-03-14 12:40:59 ✨ Imported #88320329 (0xd9dd…f3d3)    

You can connect to other nodes before obtaining a full database by providing the --sync_from_genesis flag: it will start with the genesis and perform a full sync by using data from other nodes. Note that it will be significantly slower than using the default way with the DB snapshot.

And that’s it!

Your node is now connected to the Aleph Zero Testnet and is able to communicate with other nodes and receive blocks.

Please read on if you would like to know about customizing your setup and verifying that the node actually works.

Note that the node will be running in background, so you can safely close the terminal window you used to run it.

Managing the node

The setup done by the script is based on Docker, so you can treat Aleph Node like any other container. To execute the commands below, you will need to provide the name of your container. The name assigned to the container will be the same as the name you have chosen for your node.

For instance, you might want to:

Stop the node

docker stop <your_nodes_name>

Start the node after stopping it

You have two options:

  • The first one doesn't require you to execute the script again: docker start <your_nodes_name>

  • while the second is to simply run the script again and let it take care of container management

The script also accepts a --stash_account <your stash account>option: if you provide it, it will do an automatic check of your session keys.

Updating your node

To update your node, you need to run two things:

  • docker stop <your_nodes_name>

  • ./run_node.sh --name <your_nodes_name> --ip <your_ip_address>

That will take care of downloading the newest available version and starting the node again.

If you use a domain name instead of an IP address, the --ip flag above needs to be replaced with the --dns flag. You can also pass the --stash_account flag mentioned above.

Starting with version 12 of the node, the aleph-node-runner repo does not auto-update (but still is able to figure out the correct version of the node to run). However, it's now best to check for updates of the runner repo from time to time and do a git pull.

Database types

By default the aleph-node-runner script uses the RocksDB database in pruning mode. If you just started running a node no action is needed.

If you have ran a node before version 15.1 though, it was almost surely using ParityDB. The script will auto-detect this situation and pring a warning, but whould otherwise keep working. If you explicitly pass an argument --database_engine rocksdbthe script will download a RocksDB snapshot (this will take a while, so don't do this on a validating node) and start using it. Afterwards it will inform you how to delete the unnecessary copy of the DB. Alternatively you can explicitly pass the argument --database_engine paritydbto silence the warning about using ParityDB.

Print logs from Aleph Node

docker logs <your_nodes_name>

Or, if you want to keep getting the logs in real-time:

docker logs --follow <your_nodes_name>

Check running containers and their key properties

docker ps (or docker ps -a if you want to see stopped containers as well)

It will allow you to check which container is running and whether the ports are mapped correctly.

Your ports 30333 and 30343 need to be accessible from the outside after you start your node. You can check that using a website like

We strongly recommend that you set up telemetry for your node, as described .

Before you update, make sure your node is not currently, or is not going to be in a committee of a session that will be starting shortly, by searching for it on . A session takes about 15 minutes, and the update procedure should fit there.

here
here
exposing ports in the context of validators and archivists
https://www.yougetsignal.com/tools/open-ports/
here
https://test.azero.dev/#/staking/futureCommittee