Code Monkey home page Code Monkey logo

iota-node's Introduction

Dockerized IOTA Full Node

Install

docker build -t bluedigits/iota-node .

Run

  1. Create a folder for IRI's data, e.g. /iri/data
  2. Create a folder for IRI's config, e.g. /iri/conf
  3. Create a text file /iri/conf/neighbors and specify your neighbors IPs, one neighbor per line.
  4. Invoke docker run as follows: docker run -d --net=host --name iota-node -e API_PORT=14265 -e UDP_PORT=14600 -e TCP_PORT=15600 -v /iri/data:/iri/data -v /iri/conf/neighbors:/iri/conf/neighbors bluedigits/iota-node:latest

Additional Parameters

You can specifiy IRI parameters to the end of your docker run command chain, e.g. you want IRI to revalidate it's database, just add --revalidate.

Full command would be then: docker run -d --net=host --name iota-node -e API_PORT=14265 -e UDP_PORT=14600 -e TCP_PORT=15600 -v /iri/data:/iri/data -v /iri/conf/neighbors:/iri/conf/neighbors bluedigits/iota-node:latest --revalidate

API Limits

You can forbid API commands you don't want IRI to interpret by specifying another ENV variable named REMOTE_API_LIMIT. This is by default set to "attachToTangle, addNeighbors, removeNeighbors".

Example: You want IRI to forbid the getNeighbors command but to allow anything else, just specify -e REMOTE_API_LIMIT "getNeighbors". Multiple limits have to be comma-separated.

Ports

You can specify a different API port and different UDP/TCP receiver ports by changing the values behind the -e flags when invoking docker run.

  • API_PORT: The port IRI listens on for receiving API commands, i.e. getNeighbors, attachToTangle, etc.
  • UDP_PORT: The UDP port IRI listens on for mutually exchanging transactions.
  • TCP_PORT: The TPC port IRI listens on for mutually exchanging transactions.

Java Options

You can specify a custom set of Java JVM arguments by adding the environment variable JAVA_OPTIONS when invoking docker run. Please note that you have to include the defaults for JAVA_OPTIONS if you don't want to remove them!

Example: docker run [...] -e JAVA_OPTIONS="-XX:-PrintCommandLineFlags -XX:-PrintGCDetails -Xlog:gc:garbage-collection.log" bluedigits/iota-node

  • JAVA_OPTIONS: JVM Options which are passed to the java process

Note

The syncing process takes a while so be patient. You can watch the logging with: docker logs iota-node -f.

Neighbors

Please specify the neighbors within your neighbors file by adding the udp or tcp IPs and the corresponding ports, one per line.

Example:

udp://neighbor1:14600
udp://neighbor2:14600

Memory Options

Memory options are currently not used in the image because we suggest to run without explicit memory options for java heap. Majority of memory is consumed by RocksDB and this is native memory and not limited by the -Xmx and -Xms options. So we don't want to bind physical memory to java heap which is most of the time not required by iri. The idea is to leave as much memory as possible unbound and available for RocksDB. To avoid native out of memory exceptions on a machine with linited resources you may add swap to survive memory peaks.

Sync data:

You might have a compressed backup of transaction data. If so, you can extract data into the dedicated data folder before running your node.

iota-node's People

Contributors

bluedigits avatar nicozimmermann94 avatar nimearo avatar pr4xx avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.