Skip to content

oyren/yet_another_iota_iri_setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 

Repository files navigation

IRI was replaced by Hornet with the Chrysalis (IOTA 1.5) update.

Warning
You should not use this anymore.

Simple IOTA IRI Setup with Docker

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.

Requirements

  • 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'.

Docker Installation

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.

Setup

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
docker-compose.yml
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"
  1. Bind host port 14266 to Docker port 14266 for local API commands: like listing neighbors

  2. Bind host port 14265 to Docker port 14265 for remote API commands

  3. Bind host port 15600 to Docker port 15600 as TCP receiver port

  4. Forward iri.ini with read access

  5. Mount data folder to save the database and logs

  6. IMPORTANT: You should change this! Here is the maximum amount of memory defined JAVA could use.

  7. Java min memory

  8. Enables local API port 14266

If you can’t use one of this ports, you can change the host Port (left side) then.

iri.ini
[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)
  1. Remote API port

  2. TCP receiver port

  3. IMPORTANT: Add neighbors here. You can find some in the IOTA Discord under #nodesharing

Usage

Start the Docker Container/IRI
docker-compose -f /root/docker/iota_iri/docker-compose.yml up -d
Stop the Docker Container/IRI
docker-compose -f /root/docker/iota_iri/docker-compose.yml down
Restart the Docker Container/IRI
docker-compose -f /root/docker/iota_iri/docker-compose.yml restart

Update

Start the Docker Container/IRI
docker-compose -f /root/docker/iota_iri/docker-compose.yml down
docker-compose -f /root/docker/iota_iri/docker-compose.yml up -d

Troubleshooting/Debugging

docker logs -f iota_iri

About

A minimalist IOTA IRI setup with docker-compose

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published