By Captainlime - 19 Nov 2017
Below is an attempt at a guide to setting up full node that covers all that one might need it to cover. Please post with any questions, comments about how it could be improved, or things that I have missed.
What a full node does
Full nodes form a core part of IOTA’s underlying infrastructure. Their role is to exchange information with other nodes about the status of the network and the details of. Other applications that use the IOTA network also make calls to full nodes in order to retrieve and add information. For example, when you are running the IOTA Lightwallet, it is connecting to a full node somewhere else to allow you to send and receive transactions. It is worth noting that where other programmes are making transaction calls to a full node, the proof-of-work for those transactions is done client side (e.g. by the computer running the Lightwallet), so your full node is not doing their labour.
Why you should run one
One of the great things about IOTA, and fundamental to how the Tangle works, is that the processing of transactions is entirely done by the users that are creating transactions themselves (i.e. when I want to issue a transaction, I first need to validate two previous transactions). This does away with the mining and transaction fees present in other cryptocurrencies like Bitcoin. However, it also leads to the assumption that there is no incentive to run an IOTA full node. Luckily, this is incorrect and there are valid reasons.
Credit goes to The Tangler, who does a great job setting out these other rationale, and you can read the full post here. To summarise, the main reasons are:
What you need
- if you are making lots of transactions, you probably don’t want to risk relying on connecting to someone else’s full node, as it might be down when you need it;
- if you have a web app or other programme you may want the more stable and faster connection that running a full-node provides;
- you may want to have a copy of the Tangle database that a full node generates; and
- you may be a nice (or financially invested) person and want to run a full node because it helps the network.
In terms of system requirements, 2-4 GB of RAM, 2-4 CPU cores, around 10 GB of hard-drive space, and at least 1Mbps upload speeds should suffice.
It is also important that you can keep your full node running 24/7, or as close to this as possible. People will be relying on your full node to communicate transactions, and just like how people will avoid a bridge if it is frequently washed-out, people will avoid your node if it is often offline. This is especially important as IOTA currently relies on manually connecting to neighbours. If you do not have a computer that you can have running 24/7, you can also run a full node on a cloud provider like Amazon Web Service.
Setting up a static IP
As IOTA does not yet have automatic peer discovery, it is important that you are using a static IP with your full node. A static IP is just an IP address that doesn’t change, as opposed to a dynamic IP that does. If you don’t know what type you have, go to http://whatismyipaddress.com/ and then click ‘Show Me More About My IP’. Along with a bunch of other information, the ‘Assignment’ field will tell you what type of IP you have. If it is already static, then you can move onto installing the node, otherwise keep following on.
For the next step, we will be attaching your dynamic address to a hostname, which then functions as a static IP. This is based on the guide by Lukas Fiedler, which you can read here.
First, head to https://www.noip.com, register an account, and create a hostname. The basic service is free; however, you will need to renew your hostname every 30 days. If you don’t want the hassle, it costs around $12 a year.
Next, download the NO-IP DUC program from https://noip.com/download?page=win. This programme runs in the background and updates noip when your computer’s IP address changes, ensuring that you remain connected to your hostname. Now open up NO-IP DUC and we can check if all is working. Open the terminal and enter ‘ping <YOUR-HOSTNAME>‘. If the terminal outputs something like what is below, everything is working.
Last login: Tue Oct 11 23:58:41 on ttys000
<YOUR-USERNAME>-MBP:~ <YOUR-USERNAME>$ ping <YOUR-HOST-NAME>
PING <YOUR-HOST-NAME> (<IP>'): 56 data bytes
64 bytes from <IP>: icmp_seq=0 ttl=64 time=1.770 ms
64 bytes from <IP>: icmp_seq=1 ttl=64 time=1.018 ms
If it doesn’t work, the most likely problem is your router so we need to fiddle with some settings. Find your router’s local IP address and enter this into your favourite web browser. Then log in and find the page for your DDNS/DynDNS settings. Select noip for the DDNS service; enter your noip hostname, user name, and password; and click apply. An example of what the router page may look like is here: https://i.imgur.com/p7Dinaj.jpg. If noip is not an option on your router’s DDNS settings, you will have to get googling to find a solution.
Choosing headless or GUI
The key choice in installing a full node is whether you want to run a headless node or a GUI based node. The GUI version is easier to install and use as it runs from the same programme as the Lightwallet. A headless node is run from the command line, which some people prefer, it also looks impressive to none technical people to have screes of text rolling down the screen.
Alright, so you have gone for the GUI option. The first step is to download the latest release of the IOTA Wallet. Head to https://github.com/iotaledger/wallet/releases, then download the appropriate package for your OS. While you are there, also download the latest version of the IOTA IRI Mainnet from https://github.com/iotaledger/iri/releases, we will need this later. As of writing, this file was called ‘iri-126.96.36.199.jar’.
Now start installing the wallet and you will be prompted if you want to install a light node or a full node, select full node. You will then be prompted to enter the details of your neighbouring nodes, as seen here https://i.imgur.com/eIE9mvY.jpg. We are just going to ignore this for now so put in some filler address like ‘udp://ip:1245’, and press ‘Start’.
You will now likely get an ‘Initialization Alert’ saying ‘Error: Unable to access jarfile’ and then giving you a file path. Copy the IRI jar file you downloaded earlier into this directory (you might need to create the ‘iri’ folder), and then rename the file so it is just ‘iri.jar’. Click ‘Restart’ and the wallet should open properly.
Alright, we are now ready to find some neighbours and get your node connected.
Great, so you have chosen screes of text. Head to https://github.com/iotaledger/iri/releases and download the latest version of the IOTA IRI Mainnet, it was called ‘iri-188.8.131.52.jar’ at the time of writing. Now create the directory where you want to set up your headless node and move the jar file you downloaded into here. The next steps will vary depending on your OS.
In the same directory as the jar file, create a new .txt file, name it ‘iota.bat’ and save it as type ‘All Files’. This is the file that will use launch your headless node. Open up the iota.bat file in the text editor and add the following:
java -jar iri-<version_number>.jar -p 14265
The ‘14265’ is just the default port number for IOTA, so feel free to change this if you want. Now we just need to set up your INI File, find some neighbours and you are ready to go.
OSX and Linux
For Linux, make sure you have Java8 and Maven installed. If you do not, you can install them using:
sudo apt update
apt-get install oracle-java8-installer
apt-get install -y maven
apt-get install oracle-java8-set-default
For more detail on installing on Linux, including compiling yourself, check out Scott Tudd’s guide here.
To run your headless node on either OSX or Linux, open up the terminal and navigate to the directory where you save the jar file using ‘cd /<file path to where the IOTA headless folder is>/IOTA\ headless’. You can then run the node by entering:
java -jar IRI-<version_number>.jar -p 14265
If you have done the above correctly for Linux, Windows, or OSX, that precocious text will start flowing, but it won't be actually doing anything without some neighbours. However, first we need to set up an ini file for your headless node.This will store some useful information about your node, including the details of your neighbours.
Create a file called ‘iota.ini’ in the same folder as where you have the jar file. Open up the ini file in a text editor and add the following:
PORT =14625 <or another number of your choice>
TCP_RECIEVER_PORT = 14700 <or something else>
UDP_RECIEBER_PORT = 14700 <or something else>
NEIGHBORS = tcp://<IP NEIGHBOR1>:<PORT>udp://<IP NEIGHBOR2>:<PORT>
IXI_DIR = ixi
HEADLESS = true
DEBUG = false
DB_PATH = db
Now when you run the node, you can just type:
java -jar IRI-<version_number>.jar
If you are using a headless node but still want the flexibility of an interface, you can install Nostalgia. Download it from https://github.com/domschiener/nostalgia and run the ‘notslagia.html’ file with your browser (Chrome is recommended to avoid issues). If you set a different port, so not the default 14625, you need to open up nostalgia.html in a text editor and change the port number in the iotajs variable, it looks like:
To connect to another full node, both nodes need to have each other’s details. What you need to know is your IP address, your UDP receiver port, and your TCP receiver port. Get your IP address from going to http://whatismyipaddress.com/. If you used noip, get your IP by typing ‘ping <YOUR-HOSTNAME>‘ into the terminal.
To find your TCP and UDP ports in the GUI, open up ‘Edit Node Configuration’ under the tools tab of the IOTA wallet. Your port numbers will be displayed, and you can change these too if you want, it looks like this: https://i.imgur.com/PTvCox2.jpg. From this you will get two addresses: ‘udp://<your IP>:<UDP Port> (e.g. udp://192.345.2.5:14603) and ‘tcp://<your IP>:<TCP Port> (e.g. tcp://192.345.2.5:16890). If you are going headless, use the port numbers you set in the INI file.
Now it’s time to find some friends. Take yourself over to the official IOTA Slack and join the #nodesharing channel, if you are not a member, you can sign up here: http://slack.iota.org. Alternatively, go post in the Node Sharing forum at https://forum.helloiota.com. Take care not to just post your details for all to see, just say you want to find some neighbours and then swap details via DM. Once they have sent you their details, send them either your UDP or TCP address.
Either add their details to your INI file (for headless) or open up the GUI, click ‘Edit Neighbours’ under tools and add their details there. There you go, once your neighbours add your details your full node will start synchronizing with the network and you can go have a cup of tea.
Finally, it is important to remember that there is an optimum number of other nodes to connect to. Currently, this is around seven or nine neighbours. More than nine is not advised against as you are actually harming the network.
Other ways to help
If you have got this far and realised that a full node is not for you, there are other ways you can still use your computer to help the IOTA network. This is by spamming transactions. Because when you issue a transaction you have to validate two other transactions, just by issuing empty transactions you can help make IOTA stronger and faster. To do this, go to https://prizz.github.io/iota-transaction-spammer-webapp or https://www.mikrohash.de/iota/spamfund, the latter one even pays you some IOTA for spamming.
By spartacuss167 - 4 Dec 2017
This guide looks very helpful, @Finbar, so thank you. But since I am a non-techie, I am already falling into some gaps. I want to set up a full node in the cloud, and I am not sure how to even get started.
Following the line that ends the "What you need" section, "...a cloud provider like Amazon Web Service," I need guidance.
The AWS page has far too many options. Go to https://aws.amazon.com/ and click Products. Where do I go from here?
Please don't give me too many options and ask me to choose, since I am a non-techie. I am very comfortable with instructions like "Select X and set it to Y," even if it's not the absolute best most perfect thing possible. I just want to get it going. Also, I am not trying to get free hosting. I expect to pay for 24/7 up-time.
By Captainlime - 5 Dec 2017
Hi Spartacuss, I don't have experience with setting up on AWS sorry (i just brought a cheap second hand box for my node). But I am planning to look into setting up on AWS when I have the time. In the first instance, I recommend asking some questions #nodesharing at the iotatangle slack. There are lots of people there who use AWS and can help you.
By rexen9 - 9 Dec 2017
You can also setup a Static IP in your computer's Network settings.
Windows 10: https://www.supportrix.com/kb/how-to-set-a-static-or-fixed-ip-address-in-windows-10/
Mac OSX: http://www.macinstruct.com/node/550
By EtUnity - 13 Dec 2017
I am trying to set up a GUI full node and copied the iri file to the folder as suggested. When I try to start the node I got the below error message. Not sure If I am doing something wrong. Any help is appreciated!
OS: Windows 10 , Installed JDK 9.01
12/12 16:31:50.499 [main] INFO com.iota.iri.IRI - Welcome to IRI 184.108.40.206
Exception in thread "main"
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.ValidationException
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
Process exited with status 1
By Nyrmo - 13 Dec 2017
ich have the same problem;
My System: Windows Small Business Server 2011 Essentials, 32 GB Ram, Xeon Quad Core CPU, 3 SSD´s, 100 Mbit FTTH internet connection, Java version JRE 8u151 (same problem with JRE 8u152).
The Port for the Node is in Windows and in the Router open.
I have Java reinstalled with various Versions. Nothing helps.
IOTA is a good idea and I want to help to bring it to the top!
12/13 13:39:00.692 [main] INFO com.iota.iri.IRI - Welcome to IRI 220.127.116.11
Exception in thread "main"
java.lang.UnsatisfiedLinkError: C:\Users\XXXXX\AppData\Local\Temp\1\librocksdbjni1551120723658543325.dll: 09
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
12/13 13:39:02.097 [Shutdown Hook] INFO com.iota.iri.IRI - Shutting down IOTA node, please hold tight...
12/13 13:39:08.101 [Shutdown Hook] ERROR com.iota.iri.IRI - Exception occurred shutting down IOTA node:
at com.iota.iri.network.replicator.ReplicatorSourcePool.shutdown(ReplicatorSourcePool.java:76) ~[iri.jar:na]
at com.iota.iri.network.replicator.Replicator.shutdown(Replicator.java:30) ~[iri.jar:na]
at com.iota.iri.Iota.shutdown(Iota.java:178) ~[iri.jar:na]
at com.iota.iri.IRI.lambda$shutdownHook$0(IRI.java:253) ~[iri.jar:na]
at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_151]
Process exited with status 1
By tylerw13 - 15 Dec 2017
did you ever get this figured out? im getting the same dll error
By enis.olgac - 27 Dec 2017
Me too ...
Appreciate any help !!!
By enis.olgac - 27 Dec 2017
The latest release I am able to start on Windows 10 Pro is: iri.18.104.22.168.jar (Main as well as Test). Later versions (2, 3, and 4) breaks with the error mentioned above:
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
By EtUnity - 7 Jan 2018
@Nyrmo @tylerw13 @Enis Olgac
Uninstall any previous java versions and install http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html
It seems to help with the status 1 error
By enis.olgac - 2 Mar 2018
Release Mainnet v22.214.171.124 has the following footnote:
No need to delete DB, but start node once with `--rescan` flag
* Fixes DB over-storing transactions due to concurrency
* Upgrade to RocksDB 5.7.3
* Upgrades findTransaction logic to match spec (Multi-field intersection, Input field limits)
* Unified API input validation
Since this version iotaledger/iri does not start from executable jar file.
I can compile the cloned source, but mvn package fails for the same reason as mentioned in the previous posts:
Did IOTA give up Windows?