IRI was replaced by Hornet with the Chrysalis (IOTA 1.5) update.
Warning
|
You should not use this anymore. |
This is my simple setup of IOTA IRI (IOTA Reference Implementation) with Docker.
There are already some good tutorials and complete setups, such as IRI Playbook and IOTA Partners. However, they do much more than just provide an IOTA IRI, so here is my simple and minimalist setup.
I’m using Debian 10 (Buster), so this setup is designed for it, but with a few to no adjustments it should run on other systems as well.
-
Server with a static IP Address
-
4 GB RAM (preferable 8GB)
-
2 cores (preferable 4 cores)
-
Some Disk Space (preferable SSD)
I’m using a VPS (virtual private server) from Contabo, called 'VPS L SSD'.
First we need to install Docker and Docker-Compose. These steps are well documented on the official docker website, so I will just link to them.
Create folder structure (you can customize the location if you want) and download the two required files:
mkdir -p /root/docker/iota_iri
cd /root/docker/iota_iri
wget https://github.com/raw/oyren/yet_another_iota_iri_setup/master/docker-compose.yml
wget https://github.com/raw/oyren/yet_another_iota_iri_setup/master/iri.ini
version: '3.3'
services:
iri:
container_name: iota_iri
image: iotaledger/iri:latest
ports:
# Local API Port
- "127.0.0.1:14266:14266" # (1)
# Remote API Port
- "14265:14265" # (2)
- "15600:15600/tcp" # (3)
volumes:
- ./iri.ini:/iri/conf/iri.ini:ro # (4)
- ./data:/iri/data:rw # (5)
environment:
- JAVA_MAX_MEMORY=8192m # (6)
- JAVA_MIN_MEMORY=256m # (7)
- DOCKER_IRI_MONITORING_API_PORT_ENABLE=1 # (8)
restart: unless-stopped
command: ["-c", "/iri/conf/iri.ini"]
network_mode: "host"
-
Bind host port 14266 to Docker port 14266 for local API commands: like listing neighbors
-
Bind host port 14265 to Docker port 14265 for remote API commands
-
Bind host port 15600 to Docker port 15600 as TCP receiver port
-
Forward iri.ini with read access
-
Mount data folder to save the database and logs
-
IMPORTANT: You should change this! Here is the maximum amount of memory defined JAVA could use.
-
Java min memory
-
Enables local API port 14266
If you can’t use one of this ports, you can change the host Port (left side) then.
[IRI]
PORT = 14265 # (1)
NEIGHBORING_SOCKET_PORT = 15600 # (2)
HEADLESS = true
DEBUG = false
TESTNET = false
LOCAL_SNAPSHOTS_ENABLED = true
LOCAL_SNAPSHOTS_PRUNING_ENABLED = true
LOCAL_SNAPSHOTS_DEPTH = 200
LOCAL_SNAPSHOTS_PRUNING_DELAY = 40000
LOCAL_SNAPSHOTS_INTERVAL_SYNCED = 100
LOCAL_SNAPSHOTS_INTERVAL_UNSYNCED = 1000
REMOTE_LIMIT_API = "removeNeighbors, addNeighbors, getNeighbors, setApiRateLimit"
LOCAL_SNAPSHOTS_ENABLED = false
NEIGHBORS = udp://first.neighbor.com:14600 udp://second.neighbor.com:14600 # (3)
-
Remote API port
-
TCP receiver port
-
IMPORTANT: Add neighbors here. You can find some in the IOTA Discord under
#nodesharing
docker-compose -f /root/docker/iota_iri/docker-compose.yml up -d
docker-compose -f /root/docker/iota_iri/docker-compose.yml down
docker-compose -f /root/docker/iota_iri/docker-compose.yml restart
docker-compose -f /root/docker/iota_iri/docker-compose.yml down
docker-compose -f /root/docker/iota_iri/docker-compose.yml up -d