This guide walks you through the essential steps to set up an IOTA validator node.\
Ensure the following ports are open in your firewall:
Port | Reachability | Purpose |
---|---|---|
TCP/8080 | inbound | protocol/transaction interface |
TCP/8081 | inbound/outbound | primary interface |
UDP/8084 | inbound/outbound | peer to peer state sync interface |
TCP/8443 | outbound | metrics pushing |
TCP/9184 | localhost | metrics scraping |
Note: Maybe you already noticed that port 8081 is using TCP, which conflicts with docs.iota.org and validator.info as well. This is a known bug, but the node is actually communicating via TCP.
These environment variables are pre-configured for the testnet. You typically don't need to modify them unless you're using custom endpoints.
export IOTA_API_ENDPOINT="https://api.testnet.iota.cafe"
export IOTA_FAUCET_ENDPOINT="https://faucet.testnet.iota.cafe/v1/gas"
export IOTA_TOOLS_DOCKER_IMAGE="iotaledger/iota-tools:testnet"
Download the validator configuration file template:
curl -o validator.yaml https://docs.iota.org/assets/files/validator-f8117cabc760058cd9c133360cfa455f.yaml
Configure your validator's account key pair in the validator.yaml
file, we will use a script to generate key pairs later
account-key-pair:
path: /opt/iota/key-pairs/account.key
Configure the P2P settings in your validator.yaml
file by following these steps:
- Update the external address:
p2p-config:
external-address: /dns/<YOUR-DOMAIN>/udp/8084
Note: Replace
<YOUR-DOMAIN>
with your validator's public domain name. This address must be accessible from the internet.
- Add the seed peers configuration:
p2p-config:
listen-address: "0.0.0.0:8084"
external-address: /dns/<YOUR-DOMAIN>/udp/8084
anemo-config:
max-concurrent-connections: 0
seed-peers:
- address: /dns/access-0.r.testnet.iota.cafe/udp/8084
peer-id: 46064108d0b689ed89d1f44153e532bb101ce8f8ca3a3d01ab991d4dea122cfc
- address: /dns/access-1.r.testnet.iota.cafe/udp/8084
peer-id: 8ffd25fa4e86c30c3f8da7092695e8a103462d7a213b815d77d6da7f0a2a52f5
curl -fLJO https://dbfiles.testnet.iota.cafe/genesis.blob
Note: The URL is for the IOTA Testnet only.
Generate the necessary key pairs for your validator, the key pairs will be stored in key-pairs
folder.
./generate_validator_info.sh
After running ./generate_validator_info.sh
, you'll receive output similar to this:
Validator Address: 0xa8769934bf4fa35eb8fa8313beeb1756258e165dcd265239536ac396c26fa676
Script Version: 5d47a55
Copy this validator information and save it for later use in step 8, where you'll need to provide it to the IOTA Foundation when requesting delegation.
Important: Back up your generated keys securely. Loss of these keys could result in loss of access to your validator.
docker compose up -d
docker compose logs -f
We will obtain some tokens from the faucet for gas fees.
./become_candidate.sh
Contact the IOTA Foundation with your validator information obtained in Step 5
Before joining the committee, ensure:
- Your node is fully synced with the network
- IOTA Foundation has already delegated the staking tokens for your validator
Once your node is ready, submit your request to join the committee:
./join_committee.sh
docker run --rm -v ./iota_config:/root/.iota/iota_config iotaledger/iota-tools:testnet /bin/sh -c "/usr/local/bin/iota validator display-metadata" | grep status
You should see your node's status is pending
now, it will become active and join the committee starting from next epoch.
<YOUR-VALUDATOR_ADDRESS>'s validator status: Pending