NIS Auto-Boot and Auto-Harvest

read

The NIS (NEM server) and the NCC (NEM wallet) are completely separated. As shown in this tutorial a person does not need a NIS to send and receive XEM or assets, they only need a wallet. Likewise in this tutorial, we will learn that a NIS does not need a wallet to start a full node and start harvesting.

This can easily be done through the NIS configure.properties file located in the nis folder. For stand alone users you can find this in the package folder. For people using the installer, it will be in your program files in the NEM folder.

Step 1.

Once you have opened the nis folder double click on configure.properties. You will need to delete the following data in the red boxes.

Step 2.

You will then fill in the spaces with the following information.

After nis.bootKey = it is VERY IMPORTANT at this point to only use your delegated harvesting private key, and not your regular private key.

After nis.bootName = enter the name of your node. You may pick any name you would like and can make it in color by following this tutorial.

That is it! Next time you start your NIS only, then your server will automatically boot a node and start harvesting on the delegated key provided.

Advanced

If in the case you would like to harvest on more than one account. This is possible too. You can enter extra delegated harvesting private keys (only for delegated accounts) separating them by a pipe "|" after the line nis.additionalHarvesterPrivateKeys =.

You must also change the nis.unlockedLimit to at least the number of accounts you desire to have harvest.

Good luck and Happy Harvesting!


This is a companion discussion topic for the original entry at http://blog.nem.io/nis-auto-start-and-auto-harvest/

I’m not clear on why one would set nis.bootKey? I mean with delegated harvesting you might as well use the nanowallet for your harvesting right, and just leave that entry commented out on the NIS? I just don’t see the benefits, but maybe I’m missing the point

When a node goes down, anyone who was harvesting on that node will no longer be harvesting, even after reboot. Setting the boot key, and changing “shouldAutoHarvestOnBoot”, will allow you to automatically start harvesting after reboot

OK, so ultimately it’s a means to ensure your harvesting continues without having to rely on another party.

Thanks Saul!

1 Like

Are we sure the autoboot function works? I’ve tried it and no effect. I have the following settings:

nis.shouldAutoBoot = true
nis.shouldAutoHarvestOnBoot = true

These are default values and seem correct. I’ve not (yet) set my bootKey, could that explain?

I’ve created the following cron entry which does work, the NIS starts nicely upon reboot:

@reboot cd /home/bart/package/; bash nix.runNis.sh > /home/bart/nis.log 2>&1

Thanks Saul. I has been two years since we lauch and at that means, I put my real private key in the config file for two years. This article tells me I can use my delegate private key. Thanks:blush: