IOTA Omega-Ict tutorial: noob edition

Lambtho

UPDATE : This tutorial is now deprecated. Ict 0.5 introduced a new graphical web interface that considerably simplify the setup process. I wrote a new tutorial more up-to-date. Please follow it instead.

Introduction

IOTA Controlled agenT, abbreviated Ict, is a project started by Come-From-Beyond (CfB, aka Sergey Ivancheglo), one of IOTA’s co-founder and co-director.
This project is now part of the Omega department of IOTA and is undergoing a full rewrite and code expansion, mainly by microhash. A complete explanation of the project was given by microhash recently.
The tutorial I made a month ago is no longer valid, as the “old” version from CfB is deprecated (and not even available on his github page anymore).

This new tutorial will explain how to install and use the new version (Omega-Ict) thanks to a wonderful installation script made by IOTA’s discord user schaeff (Phil#1641).

Custom setup for Ict with two Raspberries. Courtesy of Qaamien#5990

What is Ict

There is currently few information about the exact nature of Ict and its final role in IOTA’s ecosystem. Its main developers suggested that the end goal would be that Ict takes the place of the primary IOTA network, replacing IRI when the Internet of Things becomes a reality.
One of its main characteristics seems to be that it relies on sharding. That means it should be constituted of many small edge nodes (e.g. Raspberry Pis) that work together and act as it they were one single full node.

Ict is in fact the very backbone of this infrastructure. As of today, tt consists mainly of a gossip protocol to exchange transactions (using IOTA standard transaction model) between the participants. The true power of this project lies in the extensions (IXI) that can be added to increase the capabilities of the Ict network. These IXIs can basically do anything you want. That is where the community comes into play. Anyone can build its own IXI and provide new capabilities to the network. Some IXIs can for instance allow the creation of permanodes (by sharding the database between Icts devices), manage a platform for e-voting, allow for personal sub-tangle to be created in order to ensure the sovereignty of your personal data, keep track of in-game objects for online video games, …

Anyway, more official information will come in due time from the IOTA foundation, once the system finalized. Currently, Ict is still in testing phase and its transactions are made on a testnet, without any interaction with regular IRI nodes.

You will need…

As of today, Ict can run on any device connected to internet able to run java. It can be a Raspberry Pi, a Rock64, a regular computer, a VPS, any Virtual Machine or even an Android Phone.

The present tutorial only covers the Ict installation part. Some very nice guides already exist to explain how to initiate the most common devices easily and make them ready for Ict installation.
- Setting up a Raspberry Pi
- Setting up a free google VPS
- Setting up an android phone

This tutorial will mainly focus on the installation for a Raspberry, but the general idea is the same for every other device.

Topics covered

  1. Setup of the device for external access
  2. Setup of Ict
    a. Overview of the install script
    b. Installation of Ict
    c. Finding neighbors
    d. Ict configuration
    e. Report.ixi configuration
  3. Control Ict, interpret the logs,…
  4. Keeping everything up-to-date
  5. Future tutorials

1. Preparation of the device

This section assumes you already have a device running and connected to the internet. If you need guidance for it, refer to the tree setup tutorials linked here-above.

Obtaining a static IP

This step is only required if you do not have already a static IP, VPS users for instance are not expected to go through this.

Ict requires you to use a static IP to connect with your neighbors. Unfortunately, Internet Service Providers often provide dynamics IPs. Therefore, you will need to use a dynamic DNS service to have a static way of accessing your dynamic IP. With that service, your device will simply report the actual public IP to the dynDNS server every few minutes, so it can trace back to you.

Start by going on noip.com, or any other dyndns provider of your choice. Create an account and chose a domain name for easier access (this domain name is the one you will be giving to your neighbor).
Now you need to install some scripts on the raspberry that will send your IP to your dyndns provider.

The following commands are for noip install on a raspberry pi. For other systems, you should only change the path of the install /home/usr/noip.

You have to type the lines one at a time and pressing Enter after each one. You can see in depth what each command does on their documentation website.

mkdir /home/pi/noip
cd /home/pi/noip
wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
tar vzxf noip-duc-linux.tar.gz
cd noip-2.1.9–1
sudo make
sudo make install

After that last line, you have to enter your login and password (the ones that you used for noip.com).
The terminal will then ask you for the time interval between each update. Chose something strictly above 5, otherwise it will raise an error. Finally, enter N to the next question.

You can now run noip using

sudo /usr/local/bin/noip2

Finally, we need to make sure it will restart automatically after a reboot of the system. To do so, type sudo crontab -e , and type this at the bottom of the file

@reboot sudo /usr/local/bin/noip2

Finally, save and quit by successively typing Ctrl + O and then Ctrl + C .

Now simply type cd to return to the home directory before continuing the installation.

Note 1: This last command only runs as long as your Pi is plugged in. If you restart the device, you will need to start noip (by typing again sudo /usr/local/bin/noip2) to make sure your IP will continue to be dynamically linked to the domain name you use.
Note 2: Noip free domain names have an expiration date. Every month you will receive an email asking you to confirm that you are still using the domain. Do not forget to confirm it, otherwise your Ict will be disconnected to its neighbor.

Opening a port for Ict in your home router firewall

ICT requires a port to be open in your router (by default it is 1337 for Omega-Ict, but you can use an other one if you will, such as 14265). Head to the router configuration interface (usually details are printed on a label attached to it). Locate the port forwarding or portmapping tab and link port 1337 to your device local IP and its 1337 port as well. Make sure that you use UDP, otherwise it will not work properly. If you use a VPS, locate the firewall option and allow traffic to the port you want to used for Ict.

While you are at it, you can open port 1338 as well, it will be used for the Report.ixi (we will cover that in a bit). You can also open ports 2187 and 2019 in both UDP and TPC if you are planning to access the web interface of ict and chat.ixi from outside of your network (if you installed ict already outside of your network, like in a VPS, you must do it).

Example config in my home router. External start and end are the one you give to your neighbor; lan port is the one you will specify in Ict parameters.

2. Setup of Ict

As mentioned in the introduction, discord user schaeff (Phil#1641) created a simple script to automate the installation of Ict. The script was tested on various Linux based systems (debian, Raspbian, gentoo, Red hat,…).
The script allows you to either build the executable from the sources or simply download the latest pre-compiled release of Ict. If your plan is to simply run Ict, you probably do not need to download and build the sources. Therefore using the pre-compiled release should suffice (and this will make the install much faster).

a. Script overview

As explained on the github page, the script does the following:

  • Install all required dependencies;
  • Add an user “ict” (security measure);
  • Download and compile the source code or simply download the latest pre-compiled release depending on user choice;
  • It will also download Chat.ixi and Report.ixi
  • Import the old settings from ict.properties if available;
  • Generate a systemd service for easier control of Ict;
  • Start Ict and show the logs.

More explanations on this script can be found on schaeff github repo.

b. Ict first installation

First you need to install gitand download the install script:

sudo apt-get install git
sudo git clone https://www.github.com/phschaeff/ict-install

If you already have ict installed before and just want to update, please read part 4 of this tutorial “Keeping everything up to date”.

Now, simply run the script you just downloaded with the option to either build from sources (BUILD) or to download the pre-compiled release (RELEASE) and with the name you want for your Ict instance. Note that the node name should not have any spaces in it.

cd ict-install
sudo bash install-ict.sh <BUILD/RELEASE> "<nodename> (ict-<XXX>)"

For example:

sudo bash install-ict.sh RELEASE "lambtho (ict-0)"

The name will be used for the chat and the report IXIs. We chose to all use the same convention for clarity. That is <discord_name_without_space> (ict-<number>) . Please respect that naming convention, so it will be easier to identify who is who and inform people of node failure upon analysis of the graph. That gives for example (if it is your first ict): lambtho (ict-0) ; if it is the second one lambtho (ict-1) and so on.

Everything is now being installed, this procedure can take up to 5 min. Once the install is complete, it will automatically launch everything and display the logs. It is perfectly normal to have errors at the first start, as nothing is configured yet. Quit the logs by typing Ctrl+ C.

c. Finding neighbors

Ict requires at least one neighbor to operate properly. You can add up to three of them. Go in the #omega-ict channel of IOTA’s Discord server and ask for neighbors. Start a private discussion with the ones interested and exchange your public IP if it is static or your DNS (that you chose with No-IP for instance). Do not forget to mention the port you will be using (the one you opened in your firewall). Ask them for the port they are using as well as it does not need to be the same as yours (but you need to know it as well).
Ask them too about the port they are using for Report.ixi (and if they are not using it, ask them to upgrade by referring to this tutorial).

Example of a convo :
- Hey mate, here is my address for ict : my.super.ict:1337 . I use port 1338 for report.ixi, so don't forget to add me in the report.ixi.cfg file as well.
- Ok dude, mine is 12.34.56.789:14567 for ict.Pay attention, I use port 1234 for report.ixi, so please take that in account for your report.ixi.cfg

Now that you have found your neighbors, you must add them in the Ict configuration file.

Since you are already on discord, take a few moments to rank-yourself in the ict-testing group. That will allow the devs and mods to ping you easily in order to inform you of the most important developments (new updates for instance). Go in #rank-yourself channel and type !rank ict-testing .

d. Ict configuration

The last step consists in configuring Ict to connect to your neighbors and tweak some other parameters.

Open the parameters file using

sudo nano /home/ict/config/ict.cfg

The first thing to change is the neighbors parameters. Add all your neighbors (maximum 3) with either their static ip +the port or the domain name + the port, separated by a comma. Note that there should not be an empty space after the comma. For example

neighbors=123.456.17.97:1337,myneighbor.ddns.net:14600,myotherneighbor.noip.com:1234

While you are at it, change the default password for the web interface gui_password .

Quit the configuration file by pressing Ctrl + O then Ctrl+ X .

e. Report.ixi configuration

As it is a first install, the Report.ixi config file was created almost blank. You have to fill in your neighbors parameters here as well, but with the port specified for Report.ixi, not the one of ict (usually it will be 1338 ).

Open the parameters file using

sudo nano /home/ict/omega-ict/modules/report.ixi/report.ixi.cfg

Change your neighbors just like for ict, but with the right port

neighbors=123.456.17.97:1338,myneighbor.ddns.net:14650,myotherneighbor.noip.com:1235

And if your name is not set automatically, change it as well. We chose to all use the same convention for clarity. That is <discord_name_without_space> (ict-<number>) . Please respect that naming convention, so it will be easier to identify who is who and inform people of node failure upon analysis of the graph. That gives for example (if it is your first ict): lambtho (ict-0) ; if it is the second one lambtho (ict-1) and so on.

Quit the configuration file by pressing Ctrl + O then Ctrl+ X .

f. Chat.ixi configuration

The last step is to modify chat.ixi config to set your username and password properly. This config is in

sudo nano /home/ict/omega-ict/modules/chat-config/chat.cfg

There you can set your username and a password. Then save and exit.

f. Relaunch everything

To make sure all the new config are now used by ict, restart it with

sudo systemctl restart ict

And this is it ! Ict will restart and load automatically the IXIs.

3. Controls and logs

Ict controls

For easier management, the install script makes Ict run as a services. That means you can safely close the terminal or the ssh connection and it will continue running. Running them as a service also enables easier control of it. Note that since version 0.4 Ict handles the IXI modules by itself, so no need to start them independently anymore.

You can start, display the status, stop or restart Ict respectively with the following commands:

sudo systemctl start ict
sudo systemctl status ict
sudo systemctl stop ict
sudo systemctl restart ict

You can also display the logs with (type Ctrl+ C to quit those logs)

journalctl -fu ict

Use the same commands for the IXIs but replace ict by ict_chat-ixi or ict_report-ixi .

Ict logs

The logs in Ict look like the following

Typical Ict log, with spam=true
  • The first column indicates the total number of transaction coming from the corresponding neighbor (neighbor IP are blurred in the picture). If this number is different from 0, it means that you are currently receiving transactions from your neighbor. If the number is 1, it may indicate that your neighbor is not connected to a large part of the network (only he sends transactions). If the number is larger than that, it means he is connected to a more important part of the network and passes the other transactions he received as well.
  • The second column is the number of new transactions coming from this neighbor. These new transactions are transactions your node has never seen before. It is possible that the total number of transactions (all) is higher than the number of new transactions.
  • The third column indicates the number of requested transactions. This happen if you receive a transaction whose trunk or branch is not already known to you. In that situation your Ict will try to request those information from your neighbors.
  • The fourth column is the number of invalid transactions. It should be 0 or close to 0 at all time. High values indicates a bad neighbor.
  • The fifth column is the number of ignored transaction. When a neighbor sends a very large number of transaction by comparison with the other twos, a spam protection mechanism kicks in and ignore some of these transactions.

Note: if you neighbor has not activated the spam, it is possible that you see 0 transactions in his first column, while the connection between the two of you is still fine. Kindly ask him to turn on the spam option for a few minutes to just to check, and then he can turn it back off again if he wants.
Likewise, a first column indicating 1 does not necessarily means that your neighbor is not connected to the rest of the network. It is also possible that the part of the network he is connected to have all turned spamming off.

4. Keeping everything up-to-date

To keep everything up-to-date, simply get back to your home folder with cd .
Then update the all-in-one installer by successively typing

cd ict-install
sudo git pull

Finally run the install script all over again, don’t forget to input your unique name when prompted (keep always the same)

sudo bash install-ict.sh RELEASE

5. Future tutorials, IXI modules

As mentioned in the introduction, Ict is merely the backbone of what will become a much complex system. Some IXI modules will soon be added by the community and the foundation itself.

Two different IXIs are now available. The install script already had them installed on your device and we configured the Report.ixi. To see how to run and use them, refer to the second tutorial I wrote (skip directly to part 3).


I hope you found all the information you needed in this tutorial. Thanks a lot to Schaeff for his wonderful all-in-one installers and microhash for his very clear explanations about the vision for Ict.

If you still have some issues, do not hesitate to join the #omega-ict channel of IOTA’s Discord server and ask your questions. Lots people will gladly help you sort this out.

Tips in IOTA are always very much welcomed. I will be split them with Schaeff, as he did all the scripts to facilitate the installation.

TCO9AVVRVAVHMSHWHNGHNNYXJXPQUKXEPBALLLNZTLLRHIEOYEGWBZEBWPPGCVBFILAVRMNMSBPUBZYKBZDIEXADUW

Lambtho

Written by

Lambtho

PhD in Aerospace Engineering, crypto enthousiast, strong interest in IoT and IOTA.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade