BolehVPN is a proud supporter of Dash and grants a 10% discount to users who pay for our services using Dash.
As you know, we are a big fan of Dash, a privacy centric, anonymous and innovative digital currency that seeks to solve the drawbacks of Bitcoin. These improvements are achieved primarily through a layer of users hosting servers that provide services on top of Dash which are called masternodes.
Masternodes enable the following services:
Masternode users also have to put down a stake of their Dash (1000 Dash which at the time of writing is worth about USD4240.00) and temporarily locks it up to host a masternode. This prevents people from easily creating a masternode in order to game the security of the system.
Masternode users also are given voting rights on proposals. Each masternode has 1 vote and this vote can be used on budget proposals or important decisions that affect Dash.
Masternodes cost money and effort to host so they are paid a share of the block reward to incentivize them. With current masternode numbers and rewards masternodes earn approximately a 14% return on 1000 Dash (which means 140 Dash or USD593.60 at current prices) for the year of 2016. This rewards fall off in subsequent years but as the value of Dash is rising and the supply of Dash goes down, masternodes should still be sufficiently incentivized. This projection also doesn’t count the fees that masternodes earn whenever someone uses its services (InstantX and PrivacyProtect).
If you can’t be bothered with setting up and maintaining your own and don’t mind paying a little extra, you can go with paid masternode hosters which will greatly simplify the process. A few good ones are:
BolehVPN is not affiliated to any of these providers though we have been in contact with most of them. A full list can be found here.
This post assumes you are familiar with setting up a Ubuntu 14.04 VPS and already have a Dash wallet installed on your local computer.
If you do not have your Dash wallet yet, you can download the client from here. You can also read full documentation on the Dash wallet here.
If you need step by step instructions on setting up a VPS, you can use Tao’s Masternode setup guide for dummies which has a section on setting up one in Vultr.
First of all make sure you have encrypted your wallet. This makes sure your Dash is kept safely even if your computer or wallet falls in the wrong hands.
Click on Settings > Encrypt Wallet and choose a suitably long passphrase.
Your masternode private key identifies you as the owner of the masternode. It also allows you to vote on budget proposals.
Although it isn’t a good idea to leak out your masternode private key, even if this information is out, your 1000 Dash is safe. If a third party gets hold of this masternode private key, all they can do is use your vote on proposals so it isn’t the end of the world.
Your deposit address is where you will be depositing your 1000 Dash.
Click on Tools > Debug Console and enter in the following commands as in the picture below.
Copy the two results and save it in a text file for later use. The first result is the masternode private key and the second result is the masternode deposit address. We will use it very shortly!
Make sure DarkSend (or Privacy Protect) and InstantX are left UNCHECKED. Send EXACTLY 1000 Dash into the masternode deposit address that you just created in one single transaction. That means, don’t send 500 and then another 500! It has to be in one single transaction! When sending it from direct from an exchange, make sure you have accounted for the transfer fees or else you might end up with less than 1000 Dash!
You now have to wait for 15 confirmations which should take approximately 40 minutes. We can move on to the other steps first while waiting for this!
Dashman is an amazing script by Moocowmoo (one of Dash’s devs) that automates a lot of the tedious parts of maintaining a masternode.
SSH into your Linux server.
Type the following in a terminal.
sudo apt-get install git
git clone https://github.com/moocowmoo/dashman.git
cd dashman
./dashman install
This will create a new hidden folder called .dash in your user directory with all the relevant Dash files. You now need to edit the Dash configuration file.
nano ~/.dash/dash.conf
This will bring up a file like this:
#----
rpcuser=1c94c9c6ec78e96d78c2db67639ff71340af4f499670ded12bde1f679a5c6634
rpcpassword=5ee4ffecc41502bc19e18e338c26e84bb03239e7f49ay4e50fd70f40aac6633f
rpcallowip=127.0.0.1
rpcport=9998
#----
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=64
#----
#masternode=1
#masternodeaddr=YOURMASTERNODEIP:9999
#masternodeprivkey=YOURMASTERNODEPRIVATEKEY
Delete the three “#” marked in green and enter in your masternode private key that you created in Step 2 in the place marked red. Dashman should have already automatically inserted your masternode ip in the appropriate section but just double check to make sure.
Press Ctrl X and confirm to save the file.
Type the following to restart your dash client to use the new settings:
./dashman restart
It is also highly recommended also to setup a simple firewall for added security.
apt-get install ufw
Enter the following commands EXACTLY (in this order) to set up your firewall:
Please note: Make sure you enter the code in this order! If you do not, the program will not work!
If need be you can disable your firewall by entering as root: ufw disable.
ufw allow ssh/tcp
ufw limit ssh/tcp
ufw allow 9999/tcp
ufw logging on
ufw enable
Check your firewall’s status by entering the following command:
ufw status
You will see a message saying that your ufw status is active and will activate upon reboot as well.
Masternode.conf is a place to put all your masternodes details so your local Dash wallet knows which funds are in masternodes and allows you to label your masternodes.
You would first need to get your transaction hash and index for the deposit that you did into your masternode deposit address. To do this, go to Tools>Debug Console and type
masternode outputs
This will return something like this (the details below are fake but are for illustration purposes only).
{
“06e38868bb8f9958e34d5155437d009b72dff33fc28874c87fd42e51c0f74fdb” : “0“,
}
The transaction hash is the first part marked in blue and the index is the single digit marked in orange (usually 0 or 1). You will need this info to create your masternode.conf.
Create a new text file called masternode.conf in the same place where dash.conf is located on your local PC (not your masternode server!). On Windows this is located at %appdata%/Dash (type this in Windows Explorer). Open it to edit it and enter in the following format.
LABEL: Any name that you want to call your masternode in one word. For e.g. MN1
IP: Your masternode IP
MASTERNODEPRIVKEY: This is the masternode private key that you placed in your remote configuration just now
TRANSACTIONHASH: This is the transaction hash for the transaction in which you got your 1000 DASH deposited which you obtained just now through the masternode outputs
command.
INDEX: This is the Index of your transaction which you obtained just now through the masternode outputs
command.
To make things clearer let’s show a made up example of how a masternode.conf would look like. Colors are for illustration only.
MN1 52.14.2.67:9999 7rxSr3fXpX3dZcU7CoiFuFWqeHYw83r28btCFfIHqf6zkMp1PZ4 06e38868bb8f9958e34d5155437d009b72dff33fc28874c87fd42e51c0f74fdb 0
Once you have entered the necessary details, save your masternode.conf. Restart your Dash local client so it would take the new settings.
Note for multiple masternodes:
If you are creating more than one masternode, the “masternode outputs” command will return several transaction hashes and indexes. Just determine which one is the new one by comparing it with your existing masternode.conf and see which one is not in it.
You will then add the new corresponding details in new line in masternode.conf. An example is below:
MN1 52.14.2.67:9999 7rxSr3fXpX3dZcU7CoiFuFWqeHYw83r28btCFfIHqf6zkMp1PZ4 06e38868bb8f9958e34d5155437d009b72dff33fc28874c87fd42e51c0f74fdb 0
MN2 52.14.2.70:9999 7qmYP6epTN8d3S7pmkKsY52oFWRPCMs99kDe8tY4jkiDcP2X5bM 2788be8a939d445fff0c53ba5a53669925434a7498bd607a0791117633810b6a 1
Remember to restart your local Dash wallet whenever you edit your masternode.conf.
Before you proceed, make sure your masternode is synced up to the latest block. To do this, on your masternode server, type:
./dashman status
This will return a result that shows the health and other information on your masternode. Generally if everything is ok, it will appear green. To check if your masternode has fully synced, see this portion of the status:
If your local dashd has the same number as the other ones, you are synced!
Now startup your local Dash wallet if it isn’t open already.
Open up your terminal and type
masternode start-missing YOURWALLETPASSWORD
If all is well, you will see something to similar to this (in this example there are 3 Masternodes listed in masternode.conf)
{
"overall" : "Successfully started 3 masternodes, failed to start 0, total 3",
"detail" : {
"status" : {
"alias" : "MN1",
"result" : "successful"
},
"status" : {
"alias" : "MN2",
"result" : "successful"
},
"status" : {
"alias" : "MN3",
"result" : "successful"
}
}
}
You can also use the command below to selectively start a single masternode.
masternode start-alias YOURMNLABEL
To make sure they are properly started, go back to your masternode server and type again
./dashman status
It should show the following:
Sometimes the ninja one may take a few minutes to sync up but if the first two results are YES you should be safe and can check a bit later to ensure that ninja is updated.
Congratulations, you now have a running masternode!
Your first payment may take a week or more to show but afterwards should take place once every 6 days. As long your dashman status
shows that everything is okay, you should be in line for a masternode payout!
IMPORTANT NOTE: Everytime you start a masternode, it resets its place in the payout queue thus delaying payments. Therefore although there is also a “masternode start-many
” command, it isn’t recommended since it would also restart nodes that have no issues. If one of your masternode servers has an issue (for e.g. the server was rebooted), only restart the masternodes which are down by using the masternode start-missing
command and not the
start-many
command.
If there is a new version of Dash out, you can easily update by issuing the following command on your masternode server which will update your Dash to the latest version.
./dashman update
After you update always double check with a./dashman status
to make sure your masternode is still in a started state. If not, you will have to start it again from your local Dash wallet.
You can also install a monitor to auto restart dash if it crashes. This is optional. The below is taken from Moomoocow’s post:
Install Monit
sudo apt-get install monit
Create file /home/user/.dash/start_dashd.sh (change user to yours)
#!/bin/bash
/bin/su user -c '/home/user/.dash/dashd 2>&1 >> /home/user/.dash/rc.local.log'
Make it executable
chmod 755 /home/user/.dash/start_dashd.sh
Edit the file /etc/monit/monitrc
sudo nano /etc/monit/monitrc
Edit the file as follows:
# uncomment these lines
set httpd port 2812 and
use address localhost # only accept connection from localhost
allow localhost # allow localhost to connect to the server and
# add this to bottom - change user to yours
check process dashd with pidfile /home/user/.dash/dashd.pid
start program = "/home/user/.dash/start_dashd.sh" with timeout 60 seconds
stop program = "/bin/su user -c /home/user/.dash/dash-cli stop"
Load the new configuration
sudo monit reload
Enable the watchdog
sudo monit start dashd
That’s it. You only have to do above once.
You can check monit’s status by typing below:
sudo monit status
It’ll keep your dashd running for you (across reboots too, no need for any crons or scripts) and keep you from fighting with your chosen OS. Monit only runs once a minute, so be patient if you’re waiting for it to do something.
If you need proof it works, once you see your dashd in the ‘sudo monit status
‘ output, you can test it by simply stopping your dashd (dash-cli stop) — within 2 minutes it’ll start it back up,
This post is not officially affiliated with Dash nor sponsored in any way. Our Co-Founder Reuben is a big fan of the cryptocurrency and wished to share what he had to learn through asking around and trawling many posts scattered across the web. He owns several masternodes in his own private capacity.
0 Comments
This is a very nice write-up….
I even see attributes from DASH DEV(s)…..
HIGHLY RECOMMENDED!!!
Would @Moocowmoo be willing to share/post an Advanced Setting: Dump the ‘debug.log’ into “no-where” ?? – nice thing to have….
To bypass writing to debug.log, add ‘printtoconsole=1’ to your dash.conf.
If you do this, it’s recommended to launch dashd in a screen session so you have the option of reviewing the recent debug.log output if needed.
If you don’t know about GNU screen, here’s a good primer https://www.linode.com/docs/networking/ssh/using-gnu-screen-to-manage-persistent-terminal-sessions
Really impressive sir! Thank you for all your hard work
This is an awesome wiki. Thanks so much. I have 1000 dash and want to setup a mnode. I am just considered that even if I use a VPS will it be a problem that my local DashQT node is installed on a machine at a coworking space (which I will leave in a month)
I am worried my static IP will suddenly change I will have problems reconfiguring or possibly lose my Dash!
In other words my question is: once I get the masternode up and running on my vpn server can I take my local dash wallet offline and leave it in cold storage? Would I lose the masternode? maintain the masternode but lose the ability to vote ?
Mateo: Once the masternode is setup on your remote server or VPS, you can close off your local Dash wallet and the masternode will continue to run. You can actually continue voting if you want to use services like DashWhale by Rango. They store your masternode voting private keys but in a trustless way which is encrypted by your passphrase.
Thanks Reuben. That’s super cool! I have my VPS running. I almost ready to fire up dashd. I just didn’t exactly follow the wiki on this blog; I also combined with part’s of Tao’s masternode wiki and I want to make sure I have it right.
The question I have is basically if my ./dashd (or I guess, ./dashman for this wiki) needs to be in the same directory as my dash.conf file ??
there is already 3500 master nodes, it seems it is not interesting at all to setup a master node is the setupcost is 1000 dash…
It’s not a ‘cost’ since you can get the 1000 dash back anytime.