Change log:
Click to read
2022-01-25T17:00:00Z
- Read validator keys from files to start nodes, easier to add more nodes.
- Moving run_node.sh to incognito folder for easier management.
- Systemd service changes: -> avoid harmless error log in journalctl -> avoid confusion
– “oneshot” service type instead of “simple”
– Using timer instead of Restart = on-failure
2021-12-19T17:00:00Z
- Include:
– Hardware recommendation.
– Cloud setup.
– How to add my vnode to Incognito app.
2021-12-07T17:00:00Z
- Add interactive mode
- One-line setup command
2021-08-30T17:00:00Z:
- Support multiple node per host (check the guide below for details)
2021-05-10T17:00:00Z
- First version.
How much power does a node need?
Click to read
For single validator per host, the recommended configuration is:
- 4GB RAM
- 4 CPUs
- 250GB SSD
Preparation
Hardware preparation
There are 2 choices:
- Build your own hardware with your favorite brand and configuration of CPU, memory, SSD
- To the could:
You can run Incognito on a low-cost server. If you don’t have a server yet, it’s really simple and takes just a couple of minutes. You can set up an account with a VPS provider or a cloud service provider like DigitalOcean, AWS, Vultr, Heroku, Microsoft Azure, or Linode.
Always check the TOS of the host for rules on “mining” cryptocurrency using their servers before you signup for one of their plans. Not every host allows you to run mining scripts.
Useful instructions:
Setup your Infura
- Go to infura.io
- Register a free infura account
- Create new project and name it
- On Setting tab of project, copy the mainnet endpoint api url to use for the installation
How to set up Incognito node properly?
Method 1: One-line command, interactive setup (recommended)
Just run the following command on your favorite terminal and follow its steps:
sudo bash -c "apt install curl -y && curl -L https://raw.githubusercontent.com/incognitochain/incognito-chain/production/bin/inc_node_installer.sh -o blink.sh && chmod +x blink.sh && ./blink.sh"
Method 2: Non-interactive setup
-
Preparation: install curl and docker if you haven’t done them yet
sudo apt install curl docker.io
-
Download node setup shell script here
curl -O https://raw.githubusercontent.com/incognitochain/incognito-chain/production/bin/inc_node_installer.sh
-
open it with your favorite text editor and change the following settings:
# change config here:
BOOTNODE="mainnet-bootnode.incognito.org:9330" # this should be left as default
VALIDATOR_K=("validator_key_1,
validator_key_2,
validator_key_3"
"! Input validator keys here, multiple validator keys must be separated by commas (no spaces):\n\t> ")
GETH_NAME=("https://mainnet.infura.io/v3/xxxyyy"
"! Infura link. Example: 'https://mainnet.infura.io/v3/xxxyyy' ")
PORT_RPC=("8334"
"! RPC port, should be left as default (8334),
The first node uses this port, the next one uses port+1, and so on: ")
PORT_NODE=("9433"
"! Node port, should be left as default (9334),
The first node uses this port, the next one uses port+1, and so on: ")
CHECK_INTERVAL=("3600"
"! Interval (second) to check for new release, default=3600s (1 hour): ")
FULLNODE="" # set to 1 to run as a full node, empty to run as normal node
# New parameters since privacy v2
NUM_INDEXER_WORKERS=(100
"! Number of coin indexer workers, default = 100. To disable this, set it to 0: ")
INDEXER_ACCESS_TOKEN=("edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb"
"! Indexer access token, can be generated by running: $ echo 'bla bla bla' | sha256sum
(default: edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb):\n\t> ")
- Make it executable and run to install Incognito node:
sudo chmod +x inc_node_installer.sh sudo ./inc_node_installer.sh -y
- 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 changes to your node:
Just follow the exact same steps as the installation
Uninstall:
Just run:
sudo ./inc_node_installer.sh uninstall
How to add more nodes after running the setup script already?
Click to read
NOTE: Only works for those who use the script newer than 2022-01-25T17:00:00Z
- Open /home/incognito/validator_keys, append more keys to it (separate by commas, no spaces)
- Delete /home/incognito/inc_node_latest_tag
- Start IncognitoUpdater service again:
or just run the run_node.sh script:sudo systemctl start IncognitoUpdater.service
sudo /home/incognito/run_node.sh
What does the inc_node_installer.sh script do?
Click to read
For installation:
- Create a new user name “incognito” in your system.
- Create a systemd service “IncognitoUpdater” to check for new node release every hour. 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.
For uninstalling:
- Stop then remove the systemd “IncognitoUpdater” service.
- Stop and remove docker container “inc_mainnet”
- Delete all Incognito blockchain data
- Remove “incognito” user
What is the difference using the previous method compared to this?
Click to read
The previous method uses only a while loop in a shell script to check for a 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.
How to add my vnode to the Incognito app?
Click to read
to be added later…
Is there any other way to monitor my node?
Luckily, YES. And here it is: How to use the Node monitor