Hornet Playbook - IOTA
This repository installs a fully operational IOTA HORNET node.
Table of contents
- Docker Usage Commands
- Control Hornet
- Hornet Controller App
- Hornet Dashboard
- Hornet HTTPS
- Known Issues
Tested on the following operating systems/architectures:
- CentOS 7 and 8 (x86_64)
- Ubuntu 18.04LTS (x86_64, aarch64/arm64) and 19.10.x for Raspberry
- Debian 10 "Buster" (x86_64, aarch64/arm64)
- RAM: At least 1.5GB RAM, as less than this can result in out-of-memory failures.
- x2 CPUs are recommended
Run (as root):
bash <(curl -s https://raw.githubusercontent.com/nuriel77/hornet-playbook/master/fullnode_install.sh)
This pulls the installation file from the root of this repository and executes it.
The installation will:
- Install latest Hornet and start it up.
- Configure basic security (firewalls) and open all required ports for Hornet to operate.
- Install nginx as a reverse proxy to access Hornet's Dashboard.
- Add some helpful tools, e.g.:
If you are working on a fork in a feature branch or happen to directly contribute to this repository you can run the installer pointing it to the appropriate branch, e.g.:
BRANCH="dev-branch"; GIT_OPTIONS="-b $BRANCH" bash <(curl -s "https://raw.githubusercontent.com/nuriel77/hornet-playbook/$BRANCH/fullnode_install.sh")
Docker Usage Commands
These are just a few helpful commands to help you find your way around docker:
List all images
The output will look something like:
REPOSITORY TAG IMAGE ID CREATED SIZE gohornet/hornet v0.2.1 c97cba628d38 2 hours ago 90.4MB <none> <none> b7b60a909a8f 2 hours ago 1.01GB golang 1.13 a1072a078890 8 days ago 803MB certbot/certbot latest 3b7ec24cacc3 11 days ago 148MB nginx latest 231d40e811cd 3 weeks ago 126MB haproxy 2.0.8 142dd6fe8afb 7 weeks ago 91.2MB alpine latest 965ea09ff2eb 7 weeks ago 5.55MB
Note that an image consists of a "REPOSITORY" name and a "TAG".
<node> are "dangling" images that have been used for building a docker image (you can use
horc to cleanup unused images).
Delete a certain image using the image's ID. Images can also be referenced by the image's repository:tag as syntax, e.g.
docker rmi b7b60a909a8f
View Docker Containers
View all docker containers:
docker ps -a
Hornet Help Output
Run hornet with
--help: given that we know the image's name and the tag. A quick way to get the tag variable configured:
docker run --rm -it gohornet/hornet:v0.2.1 --help
You can get the tag by viewing all images, or check the configuration file to see what is the currently used TAG:
grep ^TAG /etc/sysconfig/hornet
grep ^TAG /etc/default/hornet
In the file below we can specify the image and tag to use. In addition we can configure which command line arguments to pass to hornet:
Hornet app start:
systemctl start hornet
You can also replace
Hornet logs follow:
journalctl -u hornet -e -f
-f for not to follow the logs "live")
Hornet Controller App
A GUI utility has been added to help manage some basics like controlling the server, viewing logs, upgrading hornet etc.
Make sure you are root (
sudo su) and run:
Point your browser to your host's IP address or fully qualified domain name with port 8081, e.g.:
A first step is to enable HAProxy via
horc. By default the API port is not exposed.
The second step is to enable HTTPS certificate. Note that you must already have a fully qualified domain name A record pointing to your server's IP.
Enabling a certificate will allow you to connect to your node with IOTA's official Trinity wallet.
If something isn't working as expected, try to gather as much data as possible, as this can help someone who is able to help you finding out the cause of the issue.
If anything is wrong related to Hornet, first thing to look at are Hornet's logs. See how to get logs in Control Hornet chapter.
To check if Hornet's API port is listening you can use the command to see if any output:
sudo lsof -Pni:14265
Note that after restarting Hornet it takes it some time to make the port available (e.g. when loading snapshot file).
502 Bad Gateway
If you receive this error when trying to browse to the dashboard:
- nginx (the webserver/proxy) is working properly
- the back end to which it is trying to connect isn't working properly.
Nginx takes requests from the web and forwards those internally. For example,
https://my-site.io:8081 would tell nginx to connect to Hornet's dashboard. If Hornet is inactive (crashed? starting up?) then nginx would be unable to forward your requests to it. Make sure Hornet is working properly as described in the beginning of this chapter.
If Hornet wasn't shut down properly there is a good chance that the DB is corrupted and you will have to remove it and start all over again.
In the following link you can read more about how to collect logs from your system. Although this documentation is for IRI, the commands are similar (just replace iri with hornet if needed):
Some of Hornet's plugins can be enabled and disabled using the
horc tool via the menu.
Note about the Tangle Monitor plugin: it uses two ports: 4433 and 4434 where the first is for the API and the latter for the webserver/ws.
You can access the Tangle Monitor using
https://[your-server's-address]:4434. Once your node is fully synced you will start seeing data.
Install Alongside IRI-Playbook
This has not been tried and basically discouraged. It could work if you know exactly what you are doing, i.e. making sure no conflicting ports between the two.
On the otherhand, you could probably run hornet-playbook alongside goshimmer-playbook. However, this has not been tested yet.
- Due to the rapid development and changes to Hornet, the configuration file can break the existing configuration when upgrading.
To create, test and maintain this playbook requires many hours of work and resources. This is done wholeheartedly for the IOTA community.
If you liked this project and would like to leave a donation you can use this IOTA address: