VPS is considered as advanced setup. Basically this is setup on linux, so you have to know some basic linux stuff. There is no graphical interface, which makes it even more dificult for linux begginers.
Get two months free credits on one of the following VPS providers:
Register at Hetzner
Register at Vultr
Register at Digital Ocean
Chose VM instance that has minimum 2GB of ram memory.
Once you register account, you must enter your credit/debit card.
Chose Ubuntu 18.04 x64 as Operating system for your server.
Under your provider console you'll find your server IP and password for root user, you need this to connect to your server from your PC. Let's presume you are running Windows on your home PC.
Download Putty, it's a free program that connects to your server, and you can type in commands to deal with idena node and stuff.
In Putty, connect to your servers IP address, just enter address in first screen of putty and hit "Open", it'll ask you to import some key, confirm it.
Login as user root and use password from vultr console. You can copy paste it since its complicated. When you right click in Putty, password will be allready pasted although it won't show any input, just hit enter after that.
Now that we are successfuly loged into server, these are commands that you need to copy paste in Putty
a. cd /home && wget https://github.com/idena-network/idena-go/releases/download/v0.29.0/idena-node-linux-0.29.0
(this gets us in home directory and downloads idena node)
b. mv idena-node-linux-0.29.0 idena-go
(this will rename our downloaded node file to idena-go so it's easier for us to use it)
c. chmod +x idena-go
(this gives idena node file, permision to execute, a linux security measure)
d. screen ./idena-go
(this runs idena node in separate screen, If we dont run it this way, you would have to leave your Putty window open all the time, as well as your PC)
to exit the screen (use screen -r if you want to connect to it again)
(this disconects us from that virtual screen where idena node is running but leaves it running in background, so we can exit Putty without stopping idena node)
f. nano /home/datadir/api.key
copy that code that you get and save it somewhere on PC
(nano is like notepad for linux, we use it to open api.key file, you need api.key which is password for accessing your node so you can connect from idena app on your PC)
Now, close Putty and open it up so we can save connection and tunnel settings. Setup tunnel for connection as showed in this picture
In source enter:
In destination enter:
After you click Add, tunnel is saved. Next step is to save your IP address and connection. Go back to first option on top "Session" in Putty, in Host Name enter your vps IP address as before, in Saved Sessions enter name "vps connection" and press "Save button".
Now we have saved connection details with tunnel, so next time you open Putty you can doubleclick on saved "vps connection" and your login to vps will appear.
Connect to server using putty as before, using root/password... but now we have node running and tunneled connection
Configure Idena client to use node on your VPS. Open idena on PC, go to settings>node turn off "Run built-in node", turn on "Connect to remote node", set:
Node api key:
that key that you saved previously using nano
Save both settings
Now check if you have some idena address by going to My Idena, you'll have some new address(robot) that is not yours. This is normal because you've run new node that generated new address.
Now you can transfer your private key/nodekey/identity to the VPS. We must find it on your PC, go to
(best if you copy paste this in some folders address) there you will find nodekey file. Open it with notepad and copy it.
ALSO, IMPORTANT, BACKUP THIS, THIS IS YOUR PRIVATE KEY, DON'T SHARE IT WITH ANYONE.
Now we must put it on VPS. In Putty, run nano to edit nodekey file on vps so you can paste it there
this will open current private key on VPS, you must delete it and paste your from PC. Make sure you don't have any unnessessary blank spaces or new lines. After paste, just exit nano Ctrl+X
when it asks you to save, save it by pressing Y
and confirm file name by pressing Enter
. Now you have transfered your identity to VPS.
We must restart node on VPS so it runs with new key/identity
- return to running node
- shut the node down
- change directory from current /root
to the /home
where the node is
screen -d -m ./idena-go
- run it again in a detached screen
Now when you go to client, you should see your identity/address/robot.
Now, you need to connect Putty every time you want to open Idena client on PC (when making flips, doing validation, sending coins etc...)
But node runs and mines on VPS with or without Idena client.
So... this setup might take some time, make sure to check if mining is on, after all that you've done.
Adding a Swap file (virtual memory)
If you are running vps with a 1GB memory, it would be wise to enable swap (virtual memory) in case your vps runs low on memory
Enter this command to make additional 1GB swap memmory:
sudo fallocate -l 1G /swapfile2 && sudo chmod 600 /swapfile2 && sudo mkswap /swapfile2 && sudo swapon /swapfile2 && echo '/swapfile2 none swap sw 0 0' | sudo tee -a /etc/fstab
As node works, over time it starts to take more and more memory of the system. On the start it uses about 200mb of RAM memory. If it runs for a week or so, it can reach up to 700mb. It is very recomended to restart your node one day before validation so it clears up RAM memory so your validation runs without problems.
You can restart node with commands:
screen -d -m ./idena-go
Also take a look at comunity made script Idena Manager, this is all in one automated script to setup, run and update your node: