🔑Installation

Prerequisites

  1. Linux-based system (Ubuntu recommended)

  2. Docker and Docker Compose

  3. IOTA testnet or mainnet configuration

  4. A working IOTA wallet (optional but recommended)

Step 1: Install Dependencies

To run an IOTA node, you'll need to install Docker and Docker Compose. These tools will help you manage the containerized environment for the IOTA node.

Install Docker

sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo systemctl enable docker
sudo systemctl start docker

Install Docker Compose

sudo apt install -y python3-pip
sudo pip3 install docker-compose

Step 2: Set Up Your IOTA Validator Node

Clone the IOTA node repository

IOTA nodes are usually set up using Docker containers. You can get the necessary files from the official IOTA repository. For this guide, we'll use the IOTA node from the official GitHub repository.

git clone https://github.com/iotaledger/bee.git
cd bee

Checkout to the appropriate release branch

It's important to use a stable release version for your validator node. You can find the latest release on the IOTA repository or in their release notes.

git checkout release/v2.0.0

Build the node

Once you've cloned the repository, you need to build the node. Run the following Docker Compose command to build and start your node.

docker-compose build

Step 3: Configure Your Validator Node

In this section, we'll configure the node to run as a validator. This will involve setting up several environment variables and configuration files.

  1. Edit configuration file (config.yaml)

Navigate to the config/ folder and create or edit the config.yaml file. This file contains the necessary settings for your node, such as whether it runs as a validator, the network type (mainnet/testnet), and other settings.

cd config

Create or open the config.yaml file and configure it to your preferences.

Example configuration:

node:
  network: mainnet
  bech32_hrp: iota
  tips_selection:
    strategy: "Random"
    tips_per_transaction: 1
  persist: true

validator:
  enabled: true
  public_key: <your_public_key_here>
  private_key: <your_private_key_here>
  reward: 0.1
  stake: 1000000  # Amount of stake you're contributing to the network (in IOTA tokens)
  • network: Choose either mainnet or testnet.

  • enabled: Set this to true to enable the validator functionality.

  • public_key & private_key: Use your wallet's public/private keys for signing transactions.

  • reward: Set the percentage of rewards you want to receive (e.g., 0.1 means 10%).

  • stake: Set the amount of IOTA tokens you're willing to stake.

  1. Generate your public/private key pair You can generate a key pair using the IOTA wallet or any compatible key generation tool. Here's an example of generating keys with the IOTA wallet CLI:

iota-wallet generate --seed <your_seed_here>

This will give you a public_key and private_key that you can use in the config.yaml file.

Step 4: Start Your Node

Once you’ve configured your node, it’s time to start it. From the root of the bee directory, run:

docker-compose up -d

This command will start your IOTA validator node in the background. You can check if it is running properly by viewing the logs:

docker-compose logs -f

Step 5: Monitor Your Node

You can monitor the status of your node and its connection to the network by using the IOTA API.

  1. Check Node Status:

Use the node-status endpoint to check if your node is running and synchronized with the network:

curl http://localhost:8080/api/v1/info
  1. Monitor Validator Rewards:

You can also check the rewards and other validator-specific information:

curl http://localhost:8080/api/v1/validator

Step 6: Manage Your Node

If you need to stop or restart the node, use Docker Compose commands:

  1. Stop the node:

docker-compose down
  1. Restart the node:

docker-compose restart
  1. Check if the containers are running:

docker ps

Step 7: Keep Your Node Secure

Security is critical when running a validator node. Here are a few tips to ensure your node is secure:

  1. Use a Firewall Ensure only the necessary ports are open to the outside world (e.g., ports 8080 for the API). You can configure this using ufw (Uncomplicated Firewall).

sudo ufw allow 8080/tcp
sudo ufw enable
  1. Enable Automatic Updates Keep your system updated to ensure you have the latest security patches. On Ubuntu, you can enable unattended upgrades.

sudo apt install unattended-upgrades
  1. Backup Your Keys Make sure your private keys are stored securely and backed up in a safe location. Losing access to your keys means losing control over your stake.

Step 8: Participate in Consensus

Once your validator node is running and fully synced, it will begin participating in consensus. You will need to monitor your node and ensure it remains online and fully synced with the network to earn rewards.

Validators are incentivized based on their stake and participation in the consensus mechanism. Make sure to check the IOTA documentation for any changes in staking rules or reward structures.


Troubleshooting

  • Node not starting: If your node isn't starting or syncing, check the logs for errors:

    docker-compose logs -f

    Pay attention to any error messages or missing dependencies.

  • High CPU/Memory Usage: Validator nodes can be resource-intensive. If you experience high CPU or memory usage, you might need to adjust the node's configuration or allocate more resources to Docker.

Last updated