<commit_before>---
layout: post
title: Getting started with IOTA
excerpt: >-
  Although the plans of IOTA are great, currently the project is in its
  incubation phase, with the majority of the most attractive features not yet
  ready to use. But this shouldn't stop us from playing with what we already
  have today. Let's play!
tags:
  - IOTA
  - blockchain
  - cryptocurrency
comments: true
author: adam
date: '2017-10-16T22:00:00.000Z'
published: true
---

In the [previous post](/blog/iota-new-kid-in-cryptocurrency-town/) we took a first glance at [IOTA](http://iota.org/) ledger. Although the plans are great, currently the project is in its incubation phase, with the majority of the most attractive features not yet ready to use. But this shouldn't stop us from playing with what we already have today.

Before we dig into the code, we need to get connected to one of the two IOTA networks. The "proper" network is called `mainnet` and there is also a [slightly more relaxed one](https://blog.iota.org/the-iota-testnet-training-wheels-for-the-community-fd65dbdddb3b) called `testnet`. As the names suggest, the latter is for test purposes. Each network consists of the multiple nodes that are run by the community. In order to join the network, we either need to run our own node or to connect to the existing node using its public API. 

## Is node a node?

If we're tech savvy enough and we have decided to become an active part of the IOTA network, we need to have our node up and running. IOTA's terminology avoids using "node" name for what they offer now. The only software that is able to run as a part of the network is called "IOTA Reference Implementation" (IRI) - my guess is that it is intended to suggest clearly that the project is still in its infancy and everything might change over time.

IRI is written in Java and is [publicly available on GitHub](https://github.com/iotaledger/iri) as [GPL-licenced](https://github.com/iotaledger/iri/blob/dev/LICENSE) open source. Requiring a full Java JRE to run a node is probably one of the reasons IOTA is not yet feasible for real IoT usage. We can choose to run it either from a [JAR file provided](https://github.com/iotaledger/iri/releases) or - which sounds more appealing to me - using [Docker image](https://hub.docker.com/r/iotaledger/iri/).


## Let's roll

To build and run the Docker image, type the following:

```
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
```

We're creating a container named `iota-node` for an easy future access. With `-p` options we're exposing three custom network ports for external communication. And with `-v` we're passing a path to our node's configuration file that should look as follows:<commit_msg>add image to blog post<commit_after>---
layout: post
title: Getting started with IOTA
excerpt: >-
  Although the plans of IOTA are great, currently the project is in its
  incubation phase, with the majority of the most attractive features not yet
  ready to use. But this shouldn't stop us from playing with what we already
  have today. Let's play!
tags:
  - IOTA
  - blockchain
  - cryptocurrency
comments: true
author: adam
date: '2017-10-16T22:00:00.000Z'
image: images/iota_logo.png
published: true
---

In the [previous post](/blog/iota-new-kid-in-cryptocurrency-town/) we took a first glance at [IOTA](http://iota.org/) ledger. Although the plans are great, currently the project is in its incubation phase, with the majority of the most attractive features not yet ready to use. But this shouldn't stop us from playing with what we already have today.

Before we dig into the code, we need to get connected to one of the two IOTA networks. The "proper" network is called `mainnet` and there is also a [slightly more relaxed one](https://blog.iota.org/the-iota-testnet-training-wheels-for-the-community-fd65dbdddb3b) called `testnet`. As the names suggest, the latter is for test purposes. Each network consists of the multiple nodes that are run by the community. In order to join the network, we either need to run our own node or to connect to the existing node using its public API. 

## Is node a node?

If we're tech savvy enough and we have decided to become an active part of the IOTA network, we need to have our node up and running. IOTA's terminology avoids using "node" name for what they offer now. The only software that is able to run as a part of the network is called "IOTA Reference Implementation" (IRI) - my guess is that it is intended to suggest clearly that the project is still in its infancy and everything might change over time.

IRI is written in Java and is [publicly available on GitHub](https://github.com/iotaledger/iri) as [GPL-licenced](https://github.com/iotaledger/iri/blob/dev/LICENSE) open source. Requiring a full Java JRE to run a node is probably one of the reasons IOTA is not yet feasible for real IoT usage. We can choose to run it either from a [JAR file provided](https://github.com/iotaledger/iri/releases) or - which sounds more appealing to me - using [Docker image](https://hub.docker.com/r/iotaledger/iri/).


## Let's roll

To build and run the Docker image, type the following:

```
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
```

We're creating a container named `iota-node` for an easy future access. With `-p` options we're exposing three custom network ports for external communication. And with `-v` we're passing a path to our node's configuration file that should look as follows:
{'fraction_non_alphanumeric': 0.07700477960701009, 'fraction_numerical': 0.018764383076650733, 'mean_word_length': 3.9867608120035305, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6197278', 'n_tokens_mistral': 1732, 'n_tokens_neox': 1554, 'n_words': 827}