Installing and managing an Ark Node
Installing an Ark node is pretty easy. But you will need to get comfortable with the ubuntu command line in order to keep your node healthy. This guide tries to give you some basics to get started. Don’t forget to dig deeper.
Getting your own Server
Register on vultr or any other virtual private server (vps) provider.
VULTR Global Cloud Hosting - Brilliantly Fast SSD VPS Cloud Servers. 100% KVM Virtualizationwww.vultr.com
Deploy a server:
- Any location
- Ubuntu 16.04
- 10$/month, 2048 MB Memory (or better)
Connecting to your own Server
Once the server is deployed you can login with any SSH client. I recommend MobaXterm.
Free X server for Windows with tabbed SSH terminal, telnet, RDP, VNC, Xdmcp, Mosh and X11-forwarding. Portable or…mobaxterm.mobatek.net
You can connect by:
- Session -> New
- Choose SSH
- Enter IP in the Remote Host field
- Click ok.
Now the clicking is done and we can start typing in the command line.
Installing Ark node
Login with root and the root password from your vps provider.
Change the root password
Create your own user
Grant your user sudo rights
You want your user to be able to become root/administrator if he wants to. That is the “sudo” right in the linux world.
usermod -a -G sudo jarunik
Now you will want to login with that new user instead of root.
If you try to install Ark on root you will get a lot of permission errors and it will not work.
Ark Commander helps you to manage your Ark node and get started with it. The next chapter will explain the basics.
A longer version of this guide can be found here:
Operating your Ark node
It is recommended to use the ARKcommander.sh unless you really know what you do.
Operations with ARKcommander.sh
- Install — This will install your complete node and all required modules
- Reinstall — Deletes your complete node and installs a fresh node.
- Update — Updates to the new version (if there is a new one)
- Rebuild Database — Deletes the blockchain and installs a snapshot
- Set/Reset Secret — Enter your delegate passphrase to forge
- OS Update — Installs newest ubuntu and module versions
- Additional Options — Some other stuff you rarely need.
A. Start — Start up your node
R. Restart — Restart your node based on new update/config.
K. Kill — Stop your node
S. Node Status — Displays status of your delegate (optional)
L. Log — Rolling log file to check what is happening.
0. Exit — Close the commander.
Manual operation of the node
Start the node (commander A):
forever start app.js -c config.mainnet.json -g genesisBlock.mainnet.json
Stop the node (commander K):
Check if the node is running:
Check the log (commander L):
tail -f ark.log
Edit config files (commander 5):
Install OS updates (commander 6):
sudo apt-get update && sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
Delete and recreate an empty blockchain:
Delete the ark-node and the blockchain db:
rm -rf ark-node
Ubuntu commands (you should know and use)
Check disk space:
Go to your home directory:
Go to your ark-node directory
List files in your folder:
Edit a file:
Create a file:
Create a folder:
Delete a file:
Delete a folder:
rm -rf foldername
Check folder sizes:
Deactivate sudo password prompt (for user jarunik):
#Add the following line at the end of the file
jarunik ALL=(ALL) NOPASSWD: ALL
Configure your log-rotate:
Rebooting (you will have to restart the node):
Find big files on your server:
du -aBM 2>/dev/null | sort -nr | head -n 50 | more
You should harden it’s security if you intend to run your server for longer.
The long version can be found here:
Now that we have our ARK node setup and running, it is time to put some basic security measurements on your server…blog.ark.io
Adapt SSH configuration
sudo nano /etc/ssh/sshd_config
Change to the following settings (choose your own port):
Restart your ssh server in order that the changed config takes effect:
sudo service ssh restart
Install a firewall
sudo apt-get install ufw
sudo ufw default deny incoming
sudo ufw allow 55555/tcp
sudo ufw allow 4001/tcp
sudo ufw allow 4002/tcp
sudo ufw enable
sudo apt-get install fail2ban
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.local
Replace all SSH ports under JAILS with your own port 55555:
port = 55555
Now restart fail2ban:
sudo service fail2ban restart
Register your node on Arkstats
Arkstats shows the current state of the Ark network. It is pretty easy to list your node there.
ArkStats provides real-time graphs, statistics and node information for the Ark network.arkstats.net
You can find the installation guide on github.
arkstats-reporter - Backend service used to report statistics for the Ark networkgithub.com
Short installation guide:
sudo apt-get install git
git clone -b release https://github.com/dafty/arkstats-reporter.git
If you made it this far please take some time and give me some feedback. I would really love to improve and extend this guide and include some more useful information.
You can find me in all Ark communities as jarunik.
My website with all my Ark information can be found here