Change log:
Click to read
2022-10-04T17:00:00Z
- Fix tag sorting, update the fix by running:
sudo bash -c "rm -f blink.sh && curl -LO https://raw.githubusercontent.com/incognitochain/incognito-chain/production/bin/blink.sh && chmod +x blink.sh && ./blink.sh -y2"
2022-09-07T17:00:00Z
- Bugs fix
- Better usage for -y1 and -y2 option
- More improvement on readability
- NOTE: since this version, the “inc_node_latest_tag” file is no longer needed. If you want to force a re-pull, stop then remove the container “inc_mainnet_0” and then start the IncognitoUpdater service again (or execute “/home/incognito/run_node.sh” is equivalent)
2022-09-04T17:00:00Z
- Update hub.docker APIv2 (Thanks to @fiend138 for pointing this out)
- Add RandomizedDelaySec=1000, avoid spamming hub.docker
- Add an option to update the IncognitoUpdater service without interrupting the node operation
- Improve readability
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:
- 2GB RAM
- 4 CPUs
- 250GB SSD (NVMe preferred)
Preparation
Hardware preparation
Disclaimer: Setting up a vNode and maintaining a vNode can be challenging and therefore is considered to be “advanced”. The Incognito team can help users, however, vNode operators are required to have a basic, low-level understanding of Linux related commands and directory structures. Example: cd, cp, mv, rm, docker, etc.
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 -LO https://raw.githubusercontent.com/incognitochain/incognito-chain/production/bin/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/blink.sh
-
open it with your favorite text editor and change the following settings:
# ============================= CHANGE CONFIG HERE ===========================================
declare -A CONFIGS HINTS
CONFIGS[VALIDATOR_K]="validator_key_1,validator_key_2,validator_key_3"
CONFIGS[GETH_NAME]="https://mainnet.infura.io/v3/xxxyyy"
CONFIGS[RPC_PORT]="8334"
CONFIGS[NODE_PORT]="9433"
CONFIGS[NUM_INDEXER_WORKERS]="0"
CONFIGS[INDEXER_ACCESS_TOKEN]="edeaaff3f1774ad2888673770c6d64097e391bc362d7d6fb34982ddf0efd18cb"
- Make it executable and run to install Incognito node:
sudo chmod +x blink.sh sudo ./blink.sh -y1
- 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 ./blink.sh -u
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)
- Remove all current docker containers:
docker container rm inc_mainnet_0 inc_mainnet_1 ....
- Start IncognitoUpdater service again:
or just run the run_node.sh script:sudo systemctl start IncognitoUpdater.service
sudo /home/incognito/run_node.sh
How to update the IncognitoUpdater service if I already install an older version of it?
Click to read
There are 2 ways to do this:
- Just run the blink.sh script, then when asked, select option 2 to update the IncognitoUpdater service
- Rune the blink.sh script with [-y2] argument
sudo ./blink.sh -y2
What does the blink.sh script do?
Click to read
For installation:
- Create a new user name “incognito” in your system.
- Create a systemd “IncognitoUpdater.service” to check for new node release.
- Create a systemd “IncognitoUpdater.timer” to trigger the updater service hourly. You can change the schedule by changing the “OnCalendar” param of the “/etc/systemd/system/IncognitoUpdater.timer” file, more about this here
- Create a “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
How to quickly sync new or existing nodes?
Summary
You can use our bootstrap script to quickly sync both beacon and shard data. For regular vNodes you only need to sync the assigned shard#. If running a fullnode, you can use option 55.
https://we.incognito.org/t/node-operator-bootstrapping-introduction-guide/14239
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?
Summary
Luckily, YES. And here it is: How to use the Node monitor