Introduction to IOTA Networks
In our exploration of the IOTA ledger, we’ve seen its potential for revolutionizing cryptocurrency. While many advanced features are still in development, the current infrastructure offers plenty of opportunities for experimentation.
Before diving into coding, you’ll need to connect to one of IOTA’s two networks:
- Mainnet: The primary network for real transactions.
- Testnet: A developer-friendly environment for testing.
👉 Learn more about IOTA networks here
Each network consists of community-run nodes. To join, you can either:
- Run your own node.
- Connect to an existing node via its public API.
Understanding IOTA Nodes
IOTA Reference Implementation (IRI)
What IOTA calls the "Reference Implementation" (IRI) serves as the backbone of its network. Written in Java and available as open-source on GitHub, IRI is GPL-licensed.
Key considerations:
- Requires Java JRE, which may not be ideal for IoT devices yet.
Can be run via:
- Precompiled JAR files.
- Docker containers (recommended for ease of use).
Setting Up Your IOTA Node
Running IRI with Docker
To deploy IRI using Docker, execute:
docker run -d --name iota-node \
-p 14265:14265 -p 14777:14777/udp -p 15777:15777 \
-v ~/iota.ini:/iri/iota.ini iotaledger/iri:v1.4.0
Configuration file (iota.ini
):
[IRI]
PORT = 14265
UDP_RECEIVER_PORT = 14777
TCP_RECEIVER_PORT = 15777
NEIGHBORS = [list of neighbor addresses]
IXI_DIR = ixi
HEADLESS = true
DEBUG = true
DB_PATH = mainnetdb
Port Explanations
PORT
: For HTTP API (internal use recommended).UDP_RECEIVER_PORT
/TCP_RECEIVER_PORT
: Must be firewall-exposed for peer communication.
Connecting to Neighbors
To sync with the network:
- Obtain neighbor addresses from IOTA’s Slack (#nodesharing).
- Add addresses to
NEIGHBORS
iniota.ini
(space-separated). - Restart the node or use HTTP API to update dynamically.
Verify connections with getNeighbors
API calls. Syncing may take hours—patience is key!
Light Nodes and Wallet Apps
While wallet apps ("light nodes") exist for token trading, developers often prefer direct HTTP API access for deeper integration.
👉 Explore advanced IOTA API uses here
FAQs
1. What’s the difference between Mainnet and Testnet?
- Mainnet: Real transactions, production environment.
- Testnet: For testing, with relaxed rules and free tokens.
2. How do I find neighbors for my node?
Join IOTA’s Slack (#nodesharing) to exchange node addresses with other users.
3. Can I avoid running a full node?
Yes! Use public nodes’ APIs, but running your own ensures better control and network contribution.
4. What ports need public exposure?
Only UDP/TCP receiver ports (14777/15777). The API port (14265) can remain internal.
5. How long does initial sync take?
Depending on network activity and neighbors, it could take several hours to a day.
Next Steps
Ready to interact programmatically? Stay tuned for our next guide on submitting transactions via Node.js!