How to install Incognito node
Preparation: install curl, wget and docker if you haven’t done it yet
$ sudo apt install curl wget docker.io
Download node setup shell script here
open it with your favorite text editor and change the following settings:
(*): refer to Step 3 on this guide to create an infura link.
Make it executable and run to install Incognito node:
$ sudo chmod +x inc_node_installer.sh
$ sudo ./inc_node_installer.sh
Blink your eye (yes! one eye is enough) and it’s done. If it’s not, just blink a few more times faster
To make some change to your node:
Just follow the exact same steps as installation
sudo ./inc_node_installer.sh uninstall
What does the inc_node_installer.sh script does?
- Create a new user name “incognito” in your system.
- Create a systemd service “IncognitoUpdater” to check for new node release every hours. You can change the interval as your wish by changing the “CHECK_INTERVAL” setting in the script
- Create a “/bin/run_node.sh” script, which will be invoked by systemd service when a new tag is found, to download and run the latest docker image.
- Stop then remove the systemd “IncognitoUpdater” service.
- Stop and remove docker container “inc_mainnet”
- Delete all Incognito block chain data
- Remove “incognito” user
What is the difference using the previous method comparing to this?
The previous method uses only a while loop in a shell script to check for new release. For some reason, if that update-checking script gets killed then your node will never get updated automatically again unless starting that script again manually.
This method uses systemd service to check for updates and to install the updates. Even when the update-checking script gets killed or your node gets rebooted, systemd will start it again. In short, you just have to set up your node with this method for once and leave it there, the node will always be up to date, you don’t have to worry about your node getting in trouble because it cannot update itself for different reasons.