Installing and Running the DASH Daemon; Optionally Creating a Masternode

 

(If you have any comments or questions about this guide, please let me know in this thread on DashTalk.org.)

 

(These instruction assume that you are using the secure "hardened" Linux server set up here.  If you are not, then these instructions may or may not work for you.)

 

In this section you will install and run the DASH daemon and command line interface on your REMOTE machine. You will also have the option (and be given instructions) to also set up a separate DASH daemon and command line interface on your LOCAL machine, to be used as your “external” masternode wallet. (Note that once you set up your Masternode in this way, you can then lock your local DASH wallet and stop the daemon. This is a VERY secure way to protect your valuable 1000DASH.)

 

1 Install and Run the DASH Daemon and Command Line Interface on the REMOTE machine

 

Create a directory for DASH.

 

cd~

mkdir ~/dash

cd ~/dash

 

Now get the new version of DASH.  To know the location to get it from visit https://www.dashpay.io/downloads/ and right click on the Linux (tgz) button and copy the location.

wget <dash-location> (Probably: wget https://www.dashpay.io/binaries/dash-0.12.0.51-linux64.tar.gz   )

 

To find the name of the downloaded darkcoin archive:

ls

 

The downloaded darkcoin file name will end with ".tar.gz."  This means it is a compressed archive and will need to be extracted.  Execute the following lines to extract the archive and then delete the original compressed version:

sudo tar -xvzf <downloaded-dash-file-name>
sudo rm <downloaded-dash-file-name>

The name of the uncompressed archive directory should be the same as the name of the compressed downloaded archive, without the ".tar.gz" at the end. To see it execute:

ls

 

 

Copy dashd and dash-cli to binaries directory (/usr/bin) and set permissions and ownership

 

sudo cp ~/dash/<uncompressed-archive-directory>/bin/dashd /usr/bin/dashd

sudo cp ~/dash/<uncompressed-archive-directory>/bin/dash-cli /usr/bin/dash-cli
sudo chown -R <darkcoin-user>:<darkcoin-user> /usr/bin/dashd
sudo chown -R <darkcoin-user>:<darkcoin-user> /usr/bin/dash-cli


Create the dash configuration file

 

mkdir ~/.dash
sudo nano ~/.dash/dash.conf

 

Copy and paste the following into the dash.conf file:
 

rpcuser=<some_reallY_long_really_random_username>

rpcpassword=<some_really_long_really_random_password>

alertnotify=echo %s | mail -s "DASH Alert" <your@email-address.com>

server=1

daemon=1

 

(The extra stuff here is for running a masternode. You can leave it out if you are not running one, but should add it if you are.)

 

addnode=23.23.186.131
listen=1
logtimestamps=1
maxconnections=256
masternode=0

masternodeaddr=<ip.add.re.ss>:9999
externalip=<ip.add.re.ss>

 

Run the dash daemon

 

dashd -daemon

 

If you want to follow the progress of the blockchain download, use:


tail -f ~/.dash/debug.log

 

Press Ctrl+C to close the file when you're done looking.

 

If you ARE NOT creating a Masternode, you're already done so STOP!

If you ARE creating a Masternode, continue with step 2 Optional Masternode Setup.

 

2 Optional Masternode Setup
 

(It is only necessary to follow the instructions in this Section if you are creating a Masternode.
If you ARE NOT creating a Masternode, you're already done so STOP!
)


This procedure allows you to run a Masternode in conjunction with your DASH P2Pool. It requires 1000DASH. We will be doing this in the much more secure “external wallet” way, i.e., the wallet with the 1000DASH will be on our LOCAL machine, rather than our REMOTE server, and our wallet will only be unlocked for a minute or two, while the Masternode starts up.


You should already have the DASH daemon running on your REMOTE server, and it should be caught up with the blockchain download.

 

You will need to have the proper version of Ubuntu on your LOCAL machine.  I recommend ONLY Ubuntu 12.04 LTS or 14.04 LTS.  If you use a different version you will encounter PROBLEMS...so start the right way and install one of the recommended operating systems ONLY.  (You can either install this as the primary operating system on your LOCAL machine, or you can install it on a virtual machine.)

 

Once you have installed one of the two recommended versions, get it updated using the following commands:

 

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade


You are now ready (on your LOCAL machine) to download the Release Candidate (Darksend) version of Darkcoin to ~/darkcoin/, copy it to /usr/bin/, and set its ownership and permissions.  On your LOCAL machine, execute:

 

cd ~

mkdir darkcoin

cd ~/darkcoin

 

Now get the new version of DASH.  To know the location to get it from visit https://www.dashpay.io/downloads/ and right click on the Linux (tgz) button and copy the location.

wget <dash-location> (Probably: wget https://www.dashpay.io/binaries/dash-0.12.0.51-linux64.tar.gz   )

 

To find the name of the downloaded darkcoin archive:

ls

 

The downloaded DASH file name will end with ".tar.gz."  This means it is a compressed archive and will need to be extracted.  Execute the following lines to extract the archive and then delete the original compressed version:

sudo tar -xvzf <downloaded-dash-file-name>
sudo rm <downloaded-dash-file-name>

 

Copy dashd and dash-cli to the /usr/bin directory, and set permissions and ownership:
 

sudo cp ~/darkcoin/<uncompressed-archive-directory>/bin/dashd /usr/bin/dashd

sudo cp ~/darkcoin/<uncompressed-archive-directory>/bin/dash-cli /usr/bin/dash-cli

sudo chmod 744 /usr/bin/dashd

sudo chmod 744 /usr/bin/dash-cli

sudo chown -R <local-user>:<local-user> /usr/bin/dashd

sudo chown -R <local-user>:<local-user> /usr/bin/dash-cli


Create the DASH configuration file for the LOCAL machine:

 

mkdir ~/.dash
sudo nano ~/.dash/dash.conf

 

Copy and past the following into the LOCAL ~/.dash/dash.conf.  (Note that the "rpcuser" and "rpcpassword" in the following code do not have to have the same values as on the REMOTE server; in fact, for security purposes it would be preferable for them to be different.)

 

rpcuser=<some_reallY_long_really_random_username>

rpcpassword=<some_really_long_really_random_password>

masternodeaddr=<ip.add.re.ss>:9999

addnode=23.23.186.131

listen=1

server=1

daemon=1

logtimestamps=1

maxconnections=256

masternode=0

 

Save file. Start dashd.


dashd -daemon


You should run it until it also catches up with the blockchain download. You should have a zero balance on this wallet (since you just created it and haven't sent any DASH to it yet).


Generate your "0th" DASH address on the LOCAL machine:


dash-cli getaccountaddress 0

 

Now you're going to get the "private key" of the DASH address which you just generated, and save it in a VERY secure location.  This will protect our 1000DASH (and any other DASH which will be held in that address in the future) in the event of catastrophic hard-drive failure or other condition which could prevent you from accessing your LOCAL wallet.  In the following line <dash-address> is the address you just generated:

dash-cli dumpprivkey <dash-address>

You should now copy that address into a text-file and save the file on a removable media such as a usb thumb-drive.  You can also print out the text-file.  Save both of these in a VERY safe place...maybe even 2 different VERY safe places.  They are your insurance against a big loss in case something "bad" happens to your LOCAL machine.

 

Send exactly 1000DASH to the very first (actually 0th) address you just generated; send the entire 1000DASH all in one transaction. (I'm not going to tell you how to send the 1000DASH. You should be able to figure that out for yourself. It should be noted that you need to have at least the 1000DASH plus a small amount for the DASH transaction fee. If using dash-qt, simply send the 1000DASH to the recipient address, and the extra for the transaction will be added to the transaction automatically, but only the 1000DASH will wind up in the recipient address, which is exactly what you want.)


After sending the 1000DASH to the LOCAL masternode wallet (and the balance becomes 1000DASH) generate the masternodeprivkey (this is different from the 0th address private key which you generated above) and safe it someplace safe.  (You will be using this on both the LOCAL and REMOTE server.)

 

dash-cli masternode genkey


Lock your LOCAL wallet, using a LONG and HARD-TO-GUESS wallet passphrase (which you NEED to save somewhere).  Note that the wallet will also stop when you lock it; this is fine.


dash-cli encryptwallet <wallet-passphrase>

 

Restart the LOCAL wallet, and create a backup.  (If you want to create a new folder for the backup wallet file, you will have to create the new folder first, before creating the backup wallet file; ex: mkdir ~/dash-wallet-backup )


dashd -daemon

dash-cli backupwallet <a-backup-folder> (You may have to wait a few moments to connect to the server.  Something like this should work fine:  dash-cli backupwallet ~/dash-wallet-backup )


Once you make the backup, stop dashd again.


dash-cli stop


Reopen your LOCAL darkcoin configuration file...

 

sudo nano ~/.dash/dash.conf

 

...set masternode=1 and a line to set the masternodeprivkey (using the masternodeprivkey you generated a few lines above):

 

masternode=1
masternodeprivkey=<generated-private-key>

 

Save the file. Then log into your REMOTE server, and switch to your dash-user:

ssh -p <ssh-port-number> <login-user>@<ip.add.re.ss>

su <dash-user>

 

Open the REMOTE dash configuration file...

sudo nano ~/.dash/dash.conf

 

...set masternode=1 and a line to set the masternodeprivkey:

masternode=1
masternodeprivkey=<generated-private-key-from-local-machine>

 

Save the file, then stop and restart the REMOTE DASH daemon:

dash-cli stop
dashd -daemon

 

Log out of the REMOTE server. You will have to exit twice, once to exit out of the dash-user, and once more to exit out of the login-user (and hence the server).

exit
exit

 

Restart your LOCAL DASH wallet:

dashd -daemon

 

Unlock your LOCALwallet. (60 to 120 seconds should work fine.)

dash-cli walletpassphrase <wallet-passphrase> <seconds-to-remain-unlocked>


Start the masternode on the local machine

dash-cli masternode start


Execute the following to verify that your REMOTE server ip is now listed.  (It may take a short time before it becomes listed, so you may need to try the following a few times...also, you might want to try executing this command from the REMOTE server, if you don't see it listed from the LOCAL server after a few tries.)

dash-cli masternodelist addr

 

Once your REMOTE server ip is listed (and your LOCAL wallet is locked again after the time you set) stop your LOCAL dashd.  (You can verify that it is locked by running dash-cli getinfo and checking if "unlocked_until:" is equal to zero..)

dash-cli stop

 

You're done...so you can STOP!

 

(If you have any comments or questions about this guide, please let me know in this thread on DashTalk.org.)


Donations to Planet Crypton may be sent to any of the addresses below:
 
Bitcoin   BTC   1DX7CwPpTVRtYDNdJmAgu6YiGNiBbCy8TK
Cryptogenic   CGB   5ZayDGUUNYvu9NPrzVtqHdgp84yZ4V715Y
Darkcoin   DASH   XhwsyqCT5pXmfbMCvjkVefcqTAzsUd1y2z
Datacoin   DTC   DKPxTR42T6PtGzfypyUmZx4SNoF1EV1FVK
Devcoin   DVC   1NoNpadN8SmYv8CvjzeD5BPoct52WdYa2T
Digitalcoin   DGC   DKnA78uyScD7a5ZVmr7tYLxwQxX4731Ad3
Dogecoin   DOGE   DCQnicGvMgghUTtGfJgvx2XjzdS8rqmJK8
Feathercoin   FTC   6e1gquKd4yMFKcnJqBZZb9gnTT19FxnPWX
Infinitecoin   IFC   i9gdFXagtpzeQjgtTr6mQThCqpWLgsFR5n
Ixcoin   IXC   xmd2TwspuvVHuW2VuLnVzoFSwVAoiAkqez
Litecoin   LTC   LMrKrZRayv4Cj8qoXhnmjSACNGHCG3d48t
Memorycoin   MMC   MLjbQa2CEwh6rXiCUYFYkwXq1ByBmytzXt
Namecoin   NMC   N7yPYNXxVar8wWz2JpCskSHWJuE4Jmd77k
Novacoin   NVC   4YFx3yoCVsRtv3sLK1XSgAY818AvM3ic25
Peercoin   PPC   PL7rUo6QwZskuY4h4JseyoiqwH3Zsk7fAz
Primecoin   XPM   ARLG4MD6zbU9yENDAKxGvZYixVQNxZE35R
Protoshares   PTS   PbgsjytSatjxAUPhx13Miq6Q9QjcDwq9Vo
Quarkcoin   QRK   QP8ogwaK63nqkgiEUDyw4pZSCSWFp56tsT
Terracoin   TRC   16m2hwePmsQyWE8qEamoiWBZoaG9oRqGZM
Testnet   TEST   mjKJfi4CZ7yrWofuDtF9SjyuoqCkorhek8
Vertcoin   VTC   VscmvCqXHJszXEJ7aUP8FA1AhXanU6BNeE
Worldcoin   WDC   WT5Mj26e2w5XtyvnkyFKvr3muwBYcbd99h
Zetacoin   ZET   ZQMfBXnju9nCVWV8pH8oja6u7Ujm725pWg

 



Powered by AlienEngine. Get yours now!