How To Deploy An IOTA Node
By running an IOTA node, you become a part of the backbone that secures and processes transactions on this feeless and scalable network. In this guide, we will walk you through the process of setting up your own IOTA node and provide you with the necessary setup requirements.
What is an IOTA Node?
IOTA nodes are the force that empowers the IOTA network. Each node runs a node software and is responsible for multiple tasks on the network. As of July 2023, there are two node software - Hornet and Chronicle. Our guide will solely focus on running a Hornet node on the IOTA network.
IOTA Node Requirements
To ensure smooth operation and handle potentially high message rates per second, IOTA nodes require adequate computational power and must meet the following minimum specifications:
- At least 4 cores or 4 vCPUs.
- A minimum of 8 GB RAM.
- SSD storage.
- A public IP address.
The amount of storage needed depends on whether you decide to prune old data from your local database and the frequency of such pruning.
Hornet exposes distinct functionalities through various ports:
- Port 15600 TCP: Gossip protocol.
- Port 14626 UDP: Autopeering (optional).
- Port 14265 TCP: REST HTTP API (optional).
- Port 8081 TCP: Dashboard (optional).
- Port 8091 TCP: Faucet website (optional).
- Port 1883 TCP: MQTT (optional).
The proper operation of the node relies on these ports. The REST HTTP API port is optional and only necessary if you want to grant access to your node's API. Customization of all ports can be done in the config.json file.
Operating System: Hornet, coded in Go, is compatible with major platforms. It is recommended to deploy Hornet secured behind a Traefik SSL reverse proxy using Docker.
For further updates on recommended requirements, you can check out IOTA Wiki.
How to Deploy an IOTA Node on Linux
Step 1: Prepare Environment and Requirements
- Install Docker
Make sure you have Docker installed on your system. You can refer to the official Docker documentation for installation instructions.
- Install Docker Compose CLI Plugin
Install the Docker Compose CLI plugin to manage your Docker services.
- Domain Name and Ports
Have a registered domain name pointing to your server's public IP address. You'll need ports 15600 TCP, 14626 UDP, 80 TCP (optional), and 443 TCP (optional) open in your server's firewall.
- Download the Latest Release
Open a terminal and run the following commands to download the latest Ronin release:
mkdir hornet cd hornet curl -L -O "https://github.com/iotaledger/node-docker-setup/releases/download/v1.0.0-rc.16/node-docker-setup_chrysalis-v1.0.0-rc.16.tar.gz"tar -zxf node-docker-setup_chrysalis-v1.0.0-rc.16.tar.gz
Step 2: Set Up Environment and Configuration
- HTTPS Setup
Create a file named .env
and add the following content:
COMPOSE_FILE=docker-compose.yml:docker-compose-https.yml [email protected] NODE_HOST=node.your-domain.com
Replace [email protected]
with your email and node.your-domain.com
with your domain pointing to your server's public IP address.
- HTTP Setup (Optional)
If you want to use HTTP instead, create a file named .env
and add this line to expose Traefik on a different port (e.g., 9000):
HTTP_PORT=9000
- Setup Neighbors
Edit the peering.json
file and add your Hornet neighbor addresses.
- Create Data Folder
Run the script to create the data folder with the correct permissions:
./prepare_docker.sh
- Set Dashboard Credentials
Generate a password hash and salt for the dashboard:
docker compose run hornet tool pwd-hash
Create a file named .env
if not already created and add these lines, replacing with your generated values:
DASHBOARD_PASSWORD=generated-password-hash DASHBOARD_SALT=generated-salt
Optionally, if you want to change the default admin username, add this line:
DASHBOARD_USERNAME=someotherusername
- Enable Additional Monitoring
If you want to enable additional monitoring, create a .env
file and add the following line:
COMPOSE_PROFILES=monitoring
Step 3: Start the Ronin Node
Start the Ronin node by running the following command in the terminal:
docker compose up -d
The -d
flag starts the containers in the background.
Step 4: Access Services
HTTPS: After starting the node, access services using these endpoints:
- API: https://node.your-domain.com/api/routes
- Hornet Dashboard: https://node.your-domain.com/dashboard
- Grafana: https://node.your-domain.com/grafana (if using "monitoring" profile)
HTTP: Access services at these endpoints (add port if changed):
- API: http://localhost/api/routes
- Hornet Dashboard: http://localhost/dashboard
- Grafana: http://localhost/grafana (if using 'monitoring' profile)
Step 5: Display Logs and Stop Node
Display Hornet logs with this command:
docker compose logs -f hornet
Stop the Hornet node:
docker compose down
Congratulations! You've successfully set up a Ronin Node using Docker. Your node is now contributing to the Ronin blockchain for Axie Infinity.