Hornet Installation
1. Create user
2. Install packages
3. Install go-package
4. Clone the hornet repository
5. Change directory to hornet
6. Change git branch
7. Build hornet file
8. Change file/folder owner permissions
9. Download service template file
sudo wget https://raw.githubusercontent.com/tanglebay/tutorials/master/hornet-chrysalis/hornet.service -O /lib/systemd/system/hornet.service
10. Reload the system daemon
11. Enable the hornet service
12. Generate salt/hash for the dashboard authentication
copy the salt and the hash into the config (and change the user name)
"dashboard": {
"bindAddress": "localhost:8081",
"auth": {
"sessionTimeoutInMinutes": 4320,
"username": "admin",
"passwordHash": "0000000000000000000000000000000000000000000000000000000000000000",
"passwordSalt": "0000000000000000000000000000000000000000000000000000000000000000"
}
},
13. (Optional) Edit Peering.json
Add your neighbors into the peering.json
{
"peers": [
{
"alias": "Node1",
"multiAddress": "/ip4/124.124.124.124/tcp/15600/p2p/12D3KooWBABCDEFGHIJKLMNOPQRSTUVWXYZ"
},
{
"alias": "Node2",
"multiAddress": "/ip4/123.123.123.123/tcp/15600/p2p/12D3KooWBabcdefghijklmnopqrstuvwxyz"
}
]
}
Display More
Alternatively, the neighbors can be added via the dashboard, so there is no need to edit peering.json.
Install reverse proxy with SSL
To access the Dashboard over a secure SSL connection, you need a reverse proxy. In this step, we will do the setup for this.
It is important that port 80 is enabled to the outside world so that we can apply for a free SSL certificate using Letencrypt.
1. Update packages and install needed packages
sudo apt update && sudo apt install apache2-utils software-properties-common certbot python3-certbot-nginx -y
2. Request the certificate with the help of Certbot at LetEncrypt. At domain.tld you have to replace it with your own domain (which points to the IP address of your server).
First you have to enter your email address, this is required and should be set accordingly. Afterwards you have to accept the conditions with A and in the last step you want to receive your own e-mail information, so you choose N there.
3. Download certificate template and replace existing one
sudo rm -rf /etc/nginx/sites-enabled/default && sudo wget https://raw.githubusercontent.com/tanglebay/tutorials/master/hornet-chrysalis/nginx.template -O /etc/nginx/sites-enabled/default
4. Open & edit configuration file
Here you have to press the key combination ALT + R for the search-replace function. Then enter domain.tld for the search and then your domain for the replace. Then select A (All) to replace all entries directly. Finally save the configuration file.
5. Restart reverse proxy
Now you can access your dashboard from your domain!
Update Hornet
1. Stop the hornet node
2. Update your Hornet node (you must run this command with the Hornet user sudo su hornet!)
curl -sL https://raw.githubusercontent.com/tanglebay/tutorials/master/hornet-chrysalis/update-hornet.sh | bash -
2.1 (OPTIONAL) If you want to keep your database and configuration, you can do this with the following command
curl -sL https://raw.githubusercontent.com/tanglebay/tutorials/master/hornet-chrysalis/update-hornet.sh | bash -s -- -noreset
3. (OPTIONAL) Copy needed configuration data from the backup into the new configuration file. The files can be found in the following directory:
4. Start your hornet node