Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Masternode setup guide using OS X local & Linux remote

Discussion in 'Masternode Guides' started by Ryan Taylor, Jul 13, 2014.

  1. Ryan Taylor

    Ryan Taylor Well-known Member
    Dash Core Team Foundation Member

    Joined:
    Jul 3, 2014
    Messages:
    505
    Likes Received:
    1,584
    Trophy Points:
    263
    EDIT: Updated on July 5th, 2016 to update versions.

    For all of us "feeling forgotten" OS X users, I thought I'd put together a guide for setting up a remote Linux masternode using a local OS X - based wallet. Enough said... let's get started.

    Step 1: Make sure you've downloaded and installed the latest Qt wallet from the Dash.org website on your local OSX computer
    I'm not going to walk you through these steps, because if you can't download and open a dmg file and drag the contents to your application folder, you have no business operating a masternode... Doh!!! Damn it, I wasn't going to walk you through that! :tongue:

    Step 2: Make sure all of the following is completed
    I'm assuming you've already done the following
    - Opened your Dash Qt and allowed it to fully sync, encrypted it, and backed it up... do this before depositing any Dash into your wallet
    - Created a hardened 64-bit Linux instance on your favorite server hosting service such as AWS, Vultr, or some other service. You should have secured the necessary ports, created tough logins, etc. If you have not yet done this, there are plenty of other guides here that walk you through the steps, so I'm not going to recreate the wheel here. I particularly like SocioMind's excellent thread and associated guide here, but feel free to use others - https://dashtalk.org/threads/comple...e-for-noobs-and-experienced-users-alike.1609/

    Step 3: Relocate dashd to the proper folder on your Mac
    By default, when you download the Qt, dashd is stored in your "downloads" file folder. This obviously isn't a great place for it. So if you haven't done so already, you'll want to move the file to your dash support folder. Make sure Dash is shut down. Open the terminal utility (which can be found in Utilities folder inside the Applications folder), and enter the following into the command line to move dashd to the Dash support folder
    Code:
    cd ~
    cd ~/Downloads
    mv dashd ~/Library/Application\ Support/Dash
    Leave the Terminal window open. You will need it later.

    Step 4: Reopen the Dash application and get a new address and MN private key
    Once the Dash application is open, go up to the menu and click on "Tools" and select "Debug console". A new window should appear with the "Console" tab selected at the top. Enter the following into the command line at the bottom.
    Code:
    masternode genkey
    Copy the string of characters to another application like Word or Notes. You will need that string later.
    Now you need an address for your masternode. Get one by going to the "File" menu, click on "Receiving addresses", and click "New". You can then label the address (e.g., "MN01"). You will need a different address for each masternode you plan to create.

    Step 5: Put 1000 Dash in your new address
    You need to fund your zero address with 1000 Dash before you can activate your MN. It must be one transaction of exactly 1000 Dash. No, you cannot send more than 1000 Dash. No, you cannot send 999.99 Dash. No, you cannot put in 1 Dash first and then 999 Dash. It must be all at once. If you want to test the address first, fine, but you will still need to send 1000 Dash later all in one transaction. No, if you have 1000 Dash in the wallet already, that doesn't count... you must send it to yourself by sending it to your new address.

    Step 6: While we are waiting for the needed 6 confirmations of our 1000 Dash transfer, we can now prepare the remote server
    Once logged in, download the current set of Dash files.
    Code:
    cd ~
    wget https://www.dash.org/binaries/dash-0.12.0.58-linux64.tar.gz
    Unpack the contents of the file, copy dashd, and dash-cli and then set permissions.
    Code:
    tar xfvz dash-0.12.0.58-linux64.tar.gz
    cp dash-0.12.0/bin/dashd dashd
    cp dash-0.12.0/bin/dash-cli dash-cli
    chmod 755 dashd
    Before we launch dashd, we need to create a configuration file.
    Code:
    mkdir .dash
    cd .dash
    nano dash.conf
    Once open, you'll want to insert the following text.
    Code:
    rpcuser=<enter any user name>
    rpcpassword=<enter any long password>
    rpcallowip=127.0.0.1
    listen=1
    server=1
    daemon=1
    logtimestamps=1
    maxconnections=256
    masternode=1
    masternodeprivkey=<enter your masternode key which you generated earlier>
    You now want to hit ctrl+x to exit and make sure to save as "dash.conf". Now that you have a config file, you can launch dashd.
    Code:
    cd ~
    ./dashd
    <wait 15 seconds>
    ./dash-cli getinfo
    If you run the "getinfo" command several times, you should see that the number of blocks is increasing. The number of blocks must eventually catch up to the current blockchain before your masternode is active. You can check if the number of blocks is up to the current height by comparing to the current number of blocks reported on one of the many Dash blockchain explorers... there are several listed on the dash.org website.

    However, we don't need to wait for that to complete for us to move on to the next steps, so let's keep going while the blockchain continues to download.

    Step 7: Remove unneeded files and folders from our download
    We are done with the installation files and folders, so those can be removed.
    Code:
    ls
    rm -rf dash-0.12.0
    rm dash-0.12.0.58-linux64.tar.gz
    Step 8: Go back to your Mac's Terminal and create configuration files
    Back in Terminal on our local machine, we need to create a config file. Make sure that Dash wallet is closed.
    Code:
    cd ~/Library/Application\ Support/Dash
    nano dash.conf
    This should bring up a GNU session that is blank (unless you already had a conf file created). In any case, make sure it has the following text.
    Code:
    rpcuser=<enter a username of your choosing>
    rpcpassword=<enter a really long string of random characters>
    rpcallowip=127.0.0.1
    listen=0
    server=1
    daemon=1
    logtimestamps=1
    maxconnections=8
    You now want to hit ctrl+x to exit and make sure to save as "dash.conf".

    We will also need a masternode.conf file. After saving the dash.conf file, you should be back at the Terminal command in the Dash folder.
    Code:
    nano masternode.conf
    This should bring up a new GNU session. You will need to select a name or "alias" for each of your masternodes. In the example below, I have chosen "MN01", but you can name it whatever you want. Populate the file with the following:
    Code:
    MN01 <IP Address of your remote masternode>:9999 <masternode private key generated earlier> <hash of the 1000 Dash deposit> <index number of the deposit>
    The tricky part here is identifying the transaction ID and index of your 1000 Dash deposit, but it is really easy using most block explorers. There are two simple ways to find it. The first way is to enter the receiving address for your masternode that you deposited your 1000 Dash into, click on the "hash" of the 1000 Dash transaction you just completed, and you should see the transaction listed under "outputs" with an index number. Use this hash and index number for your masternode.conf file.

    A second method is to use the Qt wallet to determine the transaction ID (a.k.a., "hash"). Click on the transactions tab and double click on the 1000 Dash transaction. It should be the most recent transaction and listed as "Payment to yourself". Copy the "Transaction ID" without the "-" and three numbers on the far right, and paste that into a block explorer. You'll see the address with the 1000 Dash deposit and an index number.

    You will need a separate line for each masternode in the masternode.conf file. But you may add as many masternodes to the same wallet and the masternode.conf file as you wish.

    Exit and save the file and close your Dash-qt file. You will need to open it with the configuration files saved before it will open with those settings and masternode data.

    Step 9: Start your masternode(s)
    Now launch the Dash Qt and reopen a console session. Enter the following to activate your remote masternode.
    Code:
    walletpassphrase <enter passphrase> 60
    masternode start-alias <alias of the masternode you are starting>
    You should get a message saying "started masternode successfully". To double check, go back to your remote server and enter the following.
    Code:
    ./dash-cli masternode list full | grep <your MN IP address>
    If your address comes up with "ENABLED" in the string, you've done everything correct. Congratulations! If it doesn't show enabled, don't panic yet. The blockchain must fully download on the remote server before it becomes active. You can check the status of the blockchain download by running the "getinfo" command repeatedly until it is fully caught up to the current number of blocks. Once it is caught up, give it a minute and try again to see if it shows as "ENABLED".

    Hopefully, I remembered all the steps, but let me know if you have any issues.
     
    #1 Ryan Taylor, Jul 13, 2014
    Last edited: Jul 6, 2016
    • Like Like x 2
  2. coltan

    coltan New Member

    Joined:
    Jul 7, 2014
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    What information exactly is hidden in the masternodeprivkey? I've always wanted to know that :D
     
  3. Ryan Taylor

    Ryan Taylor Well-known Member
    Dash Core Team Foundation Member

    Joined:
    Jul 3, 2014
    Messages:
    505
    Likes Received:
    1,584
    Trophy Points:
    263
    I have no idea. Honestly, I don't think it contains any "information" per se, but rather just serves as a private key to link the local and remote wallet securely.
     
  4. vertoe

    vertoe Three of Nine

    Joined:
    Mar 28, 2014
    Messages:
    2,574
    Likes Received:
    1,656
    Trophy Points:
    1,283
    Let me quote eduffield:
    And flare:
     
    • Like Like x 1
  5. tungfa

    tungfa Administrator
    Dash Core Team Foundation Member Masternode Owner/Operator Moderator

    Joined:
    Apr 9, 2014
    Messages:
    8,672
    Likes Received:
    6,640
    Trophy Points:
    1,283
    Ahhhh ... i guess this is what I was looking for ?!
    Tx guys ....>

    Any pointers if/where i can find guide to migrate MN from one location (Australia - Iceland / example) to another (Amazon) for MAC ??

    Tx
     
  6. Ryan Taylor

    Ryan Taylor Well-known Member
    Dash Core Team Foundation Member

    Joined:
    Jul 3, 2014
    Messages:
    505
    Likes Received:
    1,584
    Trophy Points:
    263
    I just updated this woefully outdated guide as there are no other OSX-specific guides out there. Sorry for letting it fall out of service!

    The only thing that this guide is missing is how to take advantage of the start-many and start-alias commands, which requires a masternode.conf file. Many other guides are here to walk the users through that process for other platforms, the only difference being the folder that it would go it on OSX. That folder is the same as where the dash.conf file is located.

    If you only have one MN, the above instructions are fine. If you plan to implement more than one MN, then you will need to implement the masternode.conf setup that can be found in those other guides. If this is not clear, let me know and I'll make that part clear in my guide as well... this is only meant to get the first time MN-owner up and running.
     
    • Like Like x 1
  7. tungfa

    tungfa Administrator
    Dash Core Team Foundation Member Masternode Owner/Operator Moderator

    Joined:
    Apr 9, 2014
    Messages:
    8,672
    Likes Received:
    6,640
    Trophy Points:
    1,283
    you updated the OP ?
    nice I update the wiki later based on yours
    tx
     
  8. Ryan Taylor

    Ryan Taylor Well-known Member
    Dash Core Team Foundation Member

    Joined:
    Jul 3, 2014
    Messages:
    505
    Likes Received:
    1,584
    Trophy Points:
    263
    Correct. The OP should now be corrected. I will probably go back and add the instructions for the masternode.conf setup when time permits.
     
    • Like Like x 1
  9. Trepolino

    Trepolino New Member
    Masternode Owner/Operator

    Joined:
    Apr 7, 2016
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Dash Address:
    XjqbT8m8RivbjJzYVi7er3xp3Hzcunmd4S
    At step 6 when i start dashd, I get an "Error: Invalid masternodeprivkey. Please see documentation"

    I've doubled checked and it's the right one generated from the Qt client. Any ideas?
     
  10. Ryan Taylor

    Ryan Taylor Well-known Member
    Dash Core Team Foundation Member

    Joined:
    Jul 3, 2014
    Messages:
    505
    Likes Received:
    1,584
    Trophy Points:
    263
    Unless you have actually copied and pasted the masternode private key directly, you have simply entered it incorrectly on the remote machine's dash.conf file. The Qt for OSX font displays many capital letters such that they appear to be lower case, so it can be a bit tricky. For example, upper case "Z" and "X" characters are short, so they may appear to be lower case.

    To double check that you have entered all the characters correctly, paste the masternodeprivkey to the debug console's command line. It is much more legible there. You could also paste to Word or Notes to get a more legible private key.

    If these steps fail to produce a successful start, you can try producing a new masternodeprivkey and replace it in the local and remote conf files. As long as the two match, you are good to go.

    Make sure to restart your remote machine using ./dash-cli stop and then starting again using ./dashd once the remote server's dash.conf file is updated and saved, as well as restarting the local wallet once the local masternode.conf file is updated and saved.
     
    #10 Ryan Taylor, Apr 9, 2016
    Last edited by a moderator: Apr 9, 2016
    • Like Like x 2
  11. Trepolino

    Trepolino New Member
    Masternode Owner/Operator

    Joined:
    Apr 7, 2016
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Dash Address:
    XjqbT8m8RivbjJzYVi7er3xp3Hzcunmd4S
    Thank you! The problem was easier than any of that. I simply had forgotten to remove the brackets in the .conf files. A bike ride and some fresh air and I saw it right away :)
     
    • Like Like x 1
  12. Ryan Taylor

    Ryan Taylor Well-known Member
    Dash Core Team Foundation Member

    Joined:
    Jul 3, 2014
    Messages:
    505
    Likes Received:
    1,584
    Trophy Points:
    263
    Ah, always the tiny details that get us! I'm glad you were able to get it up and running.
     
  13. nakamoto38

    nakamoto38 New Member

    Joined:
    Mar 14, 2016
    Messages:
    10
    Likes Received:
    5
    Trophy Points:
    3
    Thank you for great setup guide.

    I don't understand that how Mac and remote Linux work together.
    So I have a question.

    Do you I may be to shut down the DashQT on Mac ?
    Do the remote linux masternode continue working?
     
  14. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,621
    Likes Received:
    3,531
    Trophy Points:
    1,183
    I'm not sure I get the question right but if it was about some high level overview than it works like this:
    You send a message from your wallet signed with a key that has 1000 DASH which says smth like "Hey everyone, I have 1000 DASH on this address A, please verify me. And I'd like to run an instance which will sign messages for me with some secret key, you can verify its messages by this public key B." Since you are sending this in one single signed message everyone on the network can accept public key B as long as address A is legit and holds 1000 DASH. Moreover, every node checks this message against its own key so when they match the node knows it can (and must) be activated and work standalone.
     
  15. Trepolino

    Trepolino New Member
    Masternode Owner/Operator

    Joined:
    Apr 7, 2016
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    3
    Dash Address:
    XjqbT8m8RivbjJzYVi7er3xp3Hzcunmd4S
    Yes the remote linux masternode runs by itself, no need to keep DashQt running. Although as I understand you need to keep an eye on the masternode, so it doesn't go down for too long. Max 1h per 24h? More than that and you lose your spot on the pay schedule (?). Websites like node40 and dashninja helps you with that.

    I'm not very knowledgeable in linux and the terminal, so took me 4-5 days to set it up. Great learning experience.
     
  16. nakamoto38

    nakamoto38 New Member

    Joined:
    Mar 14, 2016
    Messages:
    10
    Likes Received:
    5
    Trophy Points:
    3

    Thank you for replying:)
    I will learn more.
    And I completed setting up masternode.
    https://dashninja.pl/mndetails.html?mnpubkey=XtrqNjFsmpaidqiXY5EantSXaJZTZXoekb
    Japan node may be rare.:cool:
     
    • Like Like x 3
  17. nmarley

    nmarley Administrator
    Dash Core Team Moderator

    Joined:
    Jun 28, 2014
    Messages:
    342
    Likes Received:
    413
    Trophy Points:
    133
    Dash Address:
    XdBKajV4g2wnpnAvvnV9dxwypQMfFHYWtp
    Just make sure you have enough memory and it shouldn't crash often if at all. You can set up a watch script as described here and not worry about watching it:
    Masternode got delisted and i can't restart it
     
    • Like Like x 1
  18. Ryan Taylor

    Ryan Taylor Well-known Member
    Dash Core Team Foundation Member

    Joined:
    Jul 3, 2014
    Messages:
    505
    Likes Received:
    1,584
    Trophy Points:
    263
    Trepolino You can also use dashwhale.org to monitor your masternode. They even have monitoring software that you can link to your account and set up notices for any downtime or if the block height is off. It will even attempt to reboot your daemon if it fails.
     
    • Like Like x 1
  19. Commuter on dikes

    Commuter on dikes New Member

    Joined:
    Jan 1, 2017
    Messages:
    14
    Likes Received:
    2
    Trophy Points:
    3
    Hi babygiraffe,
    first of all, thank you very much for your tutorial. I had no knowledge about linux, VPS Server and terminals, but I think you navigated through and I hope I have my masternode active now.
    And here my two questions:
    1. In step 9 I received the message
    "started masternode successfully".
    But I cannot manage the double check. If I do so, my remote server answers for the request: ./dash-cli masternode list full | grep <your MN IP address>:
    "error: couldn´t connect to server". I waited untill the blockchain was fully downloaded. Do you have an idea, what is wrong?
    2. How can monitor my masternode and see the current status and receive alerts in downtimes etc.? Do you recommend dashcentral?

    Thx in advance,
    Commuter on dikes
     
  20. Avi Mehenwal

    Avi Mehenwal New Member

    Joined:
    Mar 25, 2017
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    How do one get 1000 Dash currency to run a masternode ?
     
  21. BITCOINDENMARK

    BITCOINDENMARK New Member

    Joined:
    May 23, 2014
    Messages:
    24
    Likes Received:
    4
    Trophy Points:
    3
    Dash Address:
    Xn5mLjodJ2m2kfSNnqGZAeufQxbqfYLfbh

Share This Page