How to host a Virtual Node

Did you know that you can run a Virtual Node (vNode) on your computer, or on a cloud instance? Below, you’ll find the instructions for hosting a vNode so you can join the Incognito Network and start earning crypto!

Block rewards are paid out in PRV and the current APR (as of 6/14/2022) appears to be ~84%! :exploding_head: :prv: :rocket: :new_moon:

Step 1: Setup Server

Click to expand explanation

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:

The minimum server requirements are:

  • 4GB RAM

  • 4 CPUs

  • 250GB SSD

Remember: SAVE YOUR SERVER EXTERNAL IP ADDRESS. You’ll need it in Step 5.

Step 2: Create your Incognito keychain

Click to expand explanation

Download the Incognito App:

Appl%20store google-play-badge Download APK

Open the app and it will automatically generate a wallet for you.

Set up your keychains and create a new one for each vNode you want to stake:

Wallet Tutorial - manage your keys with a single phrase

Before proceeding, copy and save your SEED PHRASE / PRIVATE KEY safe and securely as well. You do not need the private key for running the Node, but it is the most important key of your node account. Without the private key of your node account, you will not be able to recover that account and regain access to your funds in case of a crash or other loss of your account.

Step 3: Register infura.io account and create API key

Click to expand explanation

Step 4: Run Incognito

Click to expand explanation

Follow this guide to set up 1 or more vNodes on your server. The install script can be done in just one line of code:

How to setup your own node in a blink of an eye (Now support multi-nodes per host)

Once set up move on to Step 5.

Step 5: Get Privacy Token (PRV) to stake

Click to expand explanation

Privacy (PRV) is the native coin of the Incognito Network. To become a validator, you’ll need to stake 1,750 PRV. You can purchase PRV on the Incognito pDEX using a range of coins/tokens from over 14 blockchains.

How to buy PRV in 3 steps

Step 6: Adding your node

Click to expand explanation

To stake your node via the app, you will need to click More menu button and then tap on the Power button to enter the Node Dashboard.

Tap “+” to start adding a new Node

Choose “Virtual Node

Enter your Node’s IP address (from Step 1), then click “Add”

Step 7: Stake

Click to expand explanation

Almost there! Now, that you’ve got PRV, all you have to do is stake it. Remember, you need to stake 1,750 PRV to begin earning rewards.

Tap on the Power button under the More menu option. Here you should see your node with a blue Stake button.

Tap “Stake”.

Congrats! You’re officially part of the network. Welcome to Incognito! :partying_face:

Step 8: Monitoring your node

Click to expand explanation

Check this post: How to use the Node monitor

:warning: IMPORTANT NOTE: Please KEEP YOUR SEED PHRASE / PRIVATE KEY SAFE because anyone who has it can access your funds. You’ll also need it if you have to re-install the mobile app.

See also:
Node Operator Latest Versions >
Node Bootstrapping Guide >
Manage your wallet with a single phrase >
How to use the Node Monitor >

49 Likes
Can Raspberry Pi be used for running a Node?
Best VPS for Node Virtual?
vNode - Beginner's Summary of Useful Commands
Still possible to borrow PRV for staking vNode?
vNode home brew
Tired of transferring your rewards from multiple validators' accounts to a single account?
How to create a Vnode on Contabo
[SOLVED] New to the community - Node options?
How to setup your own node in a blink of an eye (Now support multi-nodes per host)
Step-By-Step: How I built a Virtual Node on World's Smallest Mini PC
Stake information
How to buy PRV in 3 steps
Vnode set up for newbie to code
[SOLVED] Do I need a PC to run a physical node?
Thinking about buying a node.
[Shipped] Network Monitor
Did anyone tried to build a p-node from scratch?
New script run.sh
PRV virtual node hosting operation guide(Easynodes)
Moving your Node Virtual from A to B
Multi-VNode script
A guide through our new Node UI
¡5 formas de obtener $PRV!
The advantages of becoming an Incognito Validator
Incognito chain's code upgrade (tag: 20210516_2)
[Solved] Pnode (availability)
Incognito chain's code upgrade (tag: 20210531_1)
What is the difference between vNodes staked with Provide and vNodes Staked with Power?
Troubles adding vnode to Incognito app.
(Solved) Setting up new Vnode not working...
Shard 2 Stalling at 433077 on Multiple vNodes
Checklist những sản phẩm độc đáo của Incognito
More about today's network issue
How to unstake/withdraw from the Node Pool
Haters Gone Hate? Plz dispel scam allegations :/
node updates with app
[SOLVED] Can't buy Node with credit card?
How to setup your own node in a blink of an eye (Now support multi-nodes per host)
How to setup your own node in a blink of an eye (Now support multi-nodes per host)
Могу я запустить ноду на своём физическом компе?
Where to get PRV
[solved]Virtual Node No Space Left

How much effective is SSD on joining committee, earning PRV etc.? I use HDD nearly for two months and I earned well for the first month but I earned nothing within the second month.

4 Likes

HI:)
I create a new server vNode…
Why a mistake?photo_2020-02-09_01-40-21photo_2020-02-09_02-08-48

8 Likes

I think this tutorial has more details on running multiple nodes on the same machine. Advanced setup shows how to change port but after I examine run.sh, I’ve seen some other ports which are probably used by eth_mainnet docker. Without changing those ports, will my nodes in different folders work?

2 Likes

I can’t see your complete command, but you seem to have some weird characters right after the validator key. Could you check?

4 Likes

I don’t have to tell you SSD is faster than HDD.
The speed difference becomes more important when more data is involved.

If communication with your node takes too long, your node could be considered unstable and skipped for being selected to earn. The more stable your Node is, the less likely it is skipped.

That said, the increasing number of Nodes online also has an impact on the chance of being selected.

2 Likes

curl https://node.incognito.org/run.sh > run.sh && sed -i “s/xxx/validator_key/” run.sh && sudo bash run.sh
Thanks!

8 Likes

I had to reinstall a vnode. When I run the curl command with validator key, I immediately get this error:

run.sh: line 1: syntax error near unexpected token ‘new line’
run.sh: line 1: ‘’

I cannot get around this error. Any ideas?

3 Likes

Should we run this new command on an existing vnode that has the old command? I can see the inc_logshipper is missing.

3 Likes

I hope my question isn’t lost in the crowd :slight_smile:

This: How to host a Virtual Node

2 Likes

Hi JG20, we just updated the command. From now, please use this: curl https://node.incognito.org/run.sh > run.sh && sed -i “s/xxx/validator_key/” run.sh && sudo bash run.sh

4 Likes

Hi JG20, if your current vNode is running normally. There is no need to run this new command. The inc_logshipper is removed to save up some spaces.

3 Likes

I think this tutorial has more details on running multiple nodes on the same machine. Advanced setup shows how to change port but after I examine run.sh, I’ve seen some other ports which are probably used by eth_mainnet docker. Without changing those ports, will my nodes in different folders work?

Hi abduraman

You need at least one eth_mainnet docker container running on one virtual machine. An eth_mainnet docker container can be used to serve multiple incognito_mainnet containers on the same virtual machine.
I suggest that you should NOT change the eth_mainnet port.

For Example:

[email protected]:~# docker ps
CONTAINER ID        IMAGE                                         COMMAND                  CREATED             STATUS              PORTS                                                                                                                               NAMES
cc190c872a42        incognitochain/incognito-mainnet:20200205_1   "/bin/sh run_incogni…"   About an hour ago   Up About an hour    0.0.0.0:9334->9334/tcp, 0.0.0.0:9433->9433/tcp                                                                                      inc_mainnet_1
4ab8ef0133c6        incognitochain/incognito-mainnet:20200205_1   "/bin/sh run_incogni…"   About an hour ago   Up About an hour    0.0.0.0:9335->9334/tcp, 0.0.0.0:9434->9433/tcp                                                                                      inc_mainnet_2
9b0f9bc25b47        parity/parity:stable                          "/bin/parity --light…"   About an hour ago   Up About an hour    5001/tcp, 8080/tcp, 8082-8083/tcp, 8180/tcp, 0.0.0.0:8545->8545/tcp, 8546/tcp, 0.0.0.0:30303->30303/tcp, 0.0.0.0:30303->30303/udp   eth_mainnet

You can see that i use one eth_mainnet to serve both inc_mainnet_1 and inc_mainnet_2

7 Likes

In that case, just changing the ports of inc_mainnet in run.sh is not enough for the case of “multiple nodes in the same machine”, is it? I should remove “docker run” lines for log_shipper and eth_mainnet. Or no need for this? The best, could you send your run.sh? :slight_smile: @khanhj

2 Likes

Hi Abduraman, I think @khanhj is the one who can give you a correct answer. Would you please share your words, @khanhj?

3 Likes

I tagged his username. Is it OK?

2 Likes

Hi @abduraman,

In that case, just changing the ports of inc_mainnet in run.sh is not enough for the case of “multiple nodes in the same machine”, is it? I should remove “docker run” lines for log_shipper and eth_mainnet. Or no need for this? The best, could you send your run.sh?

Let’s keep your 1st run.sh file as default, we are going to edit the 2nd one.

  1. Rename the 2nd run.sh to run_2.sh
  2. Edit the run_2.sh
validator_key=YourValidatorKey
data_dir="data_2"
#eth_data_dir="eth-mainnet-data"
#eth_data_dir_geth="eth-mainnet-data-geth"
#logshipper_data_dir="logshipper-mainnet-data"

node_port="9434"
rpc_port="9335"

#if [ ! -d "$PWD/${eth_data_dir}" ]
#then
#  mkdir $PWD/${eth_data_dir}
#  chmod -R 777 $PWD/${eth_data_dir}
#fi

docker rm -f inc_mainnet_2
#docker rm -f eth_mainnet
#docker run -ti --restart=always --net inc_net -d -p 8545:8545  -p 30303:30303 -p 30303:30303/udp -v $PWD/${eth_data_dir}:/home/parity/.local/share/io.parity.ethereum/ --name eth_mainnet  parity/parity:stable --light --jsonrpc-interface all --jsonrpc-hosts all  --jsonrpc-apis all --mode last --base-path=/home/parity/.local/share/io.parity.ethereum/

docker run --restart=always --net inc_net -p $node_port:$node_port -p $rpc_port:$rpc_port -e NODE_PORT=$node_port -e RPC_PORT=$rpc_port -e BOOTNODE_IP=$bootnode -e GETH_NAME=eth_mainnet -e MININGKEY=${validator_key} -e TESTNET=false -v $PWD/${data_dir}:/data -d --name inc_mainnet_2 incognitochain/incognito-mainnet:${latest_tag}

ps aux | grep '[r]un_2.sh' | awk '{ print $2}' | grep -v "^$$\$" | xargs kill -9
  1. run the run_2.sh as normal: sudo bash run_2.sh

You can get my sample run_2.sh here:

Important: In order to run 2 nodes on a server, your server specs should meet the following requirement:

  • 8 CPUs
  • 4 GBs of RAM
  • 500 GBs of SSD
13 Likes

I got 3 errors:

1- Error: No such container: inc_mainnet2
2- Error response from daemon: network with name inc_net already exists
3- docker: Error response from daemon: Conflict. The container name “/inc_logshipper” is already in use by container “fee43127e869d6f0b5acd2a660d46836463710b281f7b88e0cd28959b813857d”. You have to remove (or rename) that container to be able to reuse that name.

I ignore all of them :slight_smile: Is it OK? 1 and 2 are the ones you specified before. To prevent 3, we should have commented out the following lines:

if [ $is_shipping_logs -eq 1 ]
  then
    if [ ! -d "$PWD/${logshipper_data_dir}" ]
    then
      mkdir $PWD/${logshipper_data_dir}
      chmod -R 777 $PWD/${logshipper_data_dir}
    fi
    docker image rm -f incognitochain/logshipper:1.0.0
    docker run --restart=always -d --name inc_logshipper -e RAW_LOG_PATHS=/tmp/*.txt -e JSON_LOG_PATHS=/tmp/*.json -e LOGSTASH_ADDRESSES=34.94.14.147:5000 --mount type=bind,source=$PWD/${data_dir},target=/tmp --mount type=bind,source=$PWD/${logshipper_data_dir},target=/usr/share/filebeat/data incognitochain/logshipper:1.0.0
  fi

OR

set

is_shipping_logs=0

I checked your sample run.sh. It is correct. No problem there.

2 Likes

Hey @abduraman,

Seem like it worked on your machine, in detail:

  1. on the first time you run sudo bash run_2.sh, it will try to remove the container inc_mainnet_2, since it not existed before, the error shown. => can you show me the output of sudo docker ps ?

  2. inc_net already created when you run sudo bash run.sh (the 1st run.sh) => ignore this error

  3. the inc_logshipper is used for analytic, but the team no longer need it => ignore this error

2 Likes

Hey @khanhj ,

CONTAINER ID        IMAGE                                         COMMAND                  CREATED             STATUS              PORTS                                                                                                                               NAMES
3cbb737605ec        incognitochain/incognito-mainnet:20200205_1   "/bin/sh run_incogni…"   20 minutes ago      Up 20 minutes       0.0.0.0:9335->9335/tcp, 0.0.0.0:9434->9434/tcp                                                                                      inc_mainnet2
fee43127e869        incognitochain/logshipper:1.0.0               "/usr/local/bin/dock…"   6 weeks ago         Up 10 days                                                                                                                                              inc_logshipper
f788fcd2742b        incognitochain/incognito-mainnet:20191227_1   "/bin/sh run_incogni…"   6 weeks ago         Up 10 days          0.0.0.0:9334->9334/tcp, 0.0.0.0:9433->9433/tcp                                                                                      inc_mainnet
994da074e85c        parity/parity:stable                          "/bin/parity --light…"   6 weeks ago         Up 10 days          5001/tcp, 8080/tcp, 8082-8083/tcp, 8180/tcp, 0.0.0.0:8545->8545/tcp, 8546/tcp, 0.0.0.0:30303->30303/tcp, 0.0.0.0:30303->30303/udp   eth_mainnet

I think no problem since I tap “Stake” button and it seems working.

2 Likes