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.GUI installation
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-22.214.171.124.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.Headless installation
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-126.96.36.199.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.Windows
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 14265INI FIle
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>.jarNostalgia
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:Getting neighbours
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
, the latter one even pays you some IOTA for spamming.