Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Guide: simple masternode on a Windows machine

Discussion in 'Masternode Guides' started by jules, Feb 4, 2016.

  1. jules

    jules New Member

    Joined:
    Jan 22, 2016
    Messages:
    13
    Likes Received:
    10
    Trophy Points:
    3
    The safest way of running a masternode is using the hot/cold method described in this great tutorial:

    https://dashpay.atlassian.net/wiki/pages/viewpage.action?pageId=1867820

    However, you may want to choose a more simple method of running a mastermode directly on a Windows platform, if you have enough confidence that your digital cash is safe. With this method, you will be using your wallet directly as a masternode, keeping it open 24/7. Please note that if someone gains access to your server and also obtains your wallet password, you may lose all your DASH. So if you want to follow this method, good security of your Windows server and setting a wallet password are paramount.

    There are basically two steps, first configuring your DASH wallet, then configuring your DASH wallet to be a masternode.

    1) Configuring your DASH wallet

    Get the latest version of the Core wallet here: https://www.dash.org/downloads/

    Select Download Installer for the version of the OS you are using, 32 or 64 bits. Don’t use Electrum Dash, as this wallet cannot be a masternode. Run the installer and start the wallet.

    You will get a choice where you want to store the data, including the blockchain. This is 1.6 GB at the time of writing. If you choose a different location then the standard location and want to create a new directory, click the button with the dots …. next to where the path is listed. A Windows Explorer will open, allowing you to browse to the desired location and create a new directory by right-clicking in the empty space. Please note that the location you choose, will be the location where we will make a dash.conf file in step 2.

    [​IMG]

    Run the wallet, allow it access to the internet via the Windows firewall when prompted and allow it to sync the entire blockchain. This will take several hours. You can monitor the progress in the wallet.

    [​IMG]

    Transfer exactly 1000 DASH to your wallet using the preconfigured receiving address you already have (in the wallet: File -> Receiving Addresses).

    Set a password on your wallet, go to Settings -> Encrypt Wallet. This will take a while and you will have to restart the wallet after the encrypting is done. Do not lose this password, as you will lose access to your funds if you forget it.

    Make a backup of your wallet, go to File -> Backup Wallet. Please do this. Save the backup in a physically different place then the computer the wallet is on. Preferably more than one place. Make backups on a regular basis.

    2) Configure your wallet to be a masternode

    There are two steps: you will need a configuration file telling the wallet it is a masternode, and starting the wallet in masternode mode.

    a) Generating a configuration file

    In the wallet, click Tools -> Debug console. This will open a command prompt allowing you to interact with the wallet.

    [​IMG]

    Enter the following command: "masternode genkey" and press ENTER. You will see a long string of numbers and letters. Please copy/paste this string to a notepad file. You will need this string in the dash.conf file we will be creating.

    Now we will generate the configuration file. There are different ways to do this, this guide will only describe one. In the end a dash.conf file containing the correct parameters must be in the root of the folder that contains your DASH data.

    In your wallet, go to Tools -> Open Configuration File. Windows will ask you what program you wish to use to open this file, choose More apps -> Notepad, and keep the checkbox at “Always use this program to open .conf files”.

    Copy and paste the following contents to the Notepad window that opened, replacing the text in capital letters and using the masternode key we just generated.

    Press control-S to save this file, then close Notepad. Please note that if you use “File -> Save as” instead of control-S, you might save the file as dash.conf.txt instead of dash.conf. This will lead to an error in the console later when you try to start the masternode, stating that masternode=1 should be in the dash.conf file.

    b) Start the masternode

    Close the wallet.

    Restart the wallet, allowing it to pick up the dash.conf file (the wallet will not behave differently yet, but this is a necessary step).

    Check that the transaction with exactly 1000 DASH has finished confirming. This transaction will have to be confirmed at least 15 times. You can check the progress of the confirmations in your wallet by using the tab Transactions and then double-clicking the transaction in question.

    Open the console via Tools -> Debug console. Type in the command: “masternode start YOURWALLETPASSWORD”, using the password you set earlier to encrypt your wallet. If all is well, you will get the message: “Successfully started masternode”. Please note that you will have to do this after each restart of the wallet, so e.g. after a reboot for a Windows update or after an update of the wallet. For security reasons, use Control-L to clear the Debug console, as your password is otherwise visible in plain text. If you do not do this, re-opening the Debug console still shows the last commands entered, including your password.

    Now, you can check the status of your masternode by going to this webpage: https://dashninja.pl/ and entering your public key (or receiving address) in the search box. You can also check the status of your masternode by entering "masternode status" in the Debug Console.

    Your wallet needs to be accessible through ports 9998-9999, so you might need to forward those in your router to the local IP-address your server has.

    Found this guide useful? Please tip me @ XuNCkcxoKmamqJuNmJ3Q78MeMUQV4xZWjF

    PS have you backed up your wallet?
     
    #1 jules, Feb 4, 2016
    Last edited by a moderator: Feb 4, 2016
    • Like Like x 4
  2. jules

    jules New Member

    Joined:
    Jan 22, 2016
    Messages:
    13
    Likes Received:
    10
    Trophy Points:
    3
    Any comments are welcome.
     
    #2 jules, Feb 4, 2016
    Last edited by a moderator: Feb 4, 2016
  3. Sub-Ether

    Sub-Ether Well-known Member

    Joined:
    Mar 31, 2014
    Messages:
    1,516
    Likes Received:
    1,254
    Trophy Points:
    183
    Use 'masternode status' at end to check active and make sure have port forwarding on the router set to port 9998-9999.
     
    • Like Like x 1
  4. Drneil

    Drneil New Member

    Joined:
    Feb 21, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
     
  5. Drneil

    Drneil New Member

    Joined:
    Feb 21, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Jules any updates to the simple masternode on a windows machine for V12.1.1?
     
  6. Dandy

    Dandy Member

    Joined:
    Mar 1, 2017
    Messages:
    274
    Likes Received:
    97
    Trophy Points:
    88
    I'm trying to start a Windows masternode on v0.12.1.2 Dash Core wallet.
    I'm going through this tutorial and I got to the line: "In your wallet, go to Tools -> Open Configuration File", but there are now separate wallet and masternode configuration files. I'm guessing I should edit the masternode configuration file? But what's confusing to me is that the example that's displayed in the default masternode config file looks nothing like the text you say I should paste into the config file.
     
  7. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,634
    Likes Received:
    3,534
    Trophy Points:
    1,183
    This guide is 1 year old and I highly discourage anyone from setting up a masternode in such a way, this method should no longer be considered as an option for a mainnet masternode. Keeping wallet with 1000 DASH unlocked online 24/7 on Windows is not a good idea, only a matter of time till you get hacked and robbed, especially given the rising price. Please consider using some other guides and setup a masternode using Hold/Cold config (masternode.conf) i.e. using external server as a masternode and local wallet as a control node (meaning it must be online only to start a masternode).
     
  8. Dandy

    Dandy Member

    Joined:
    Mar 1, 2017
    Messages:
    274
    Likes Received:
    97
    Trophy Points:
    88
    Security issues aside, I would still like to know how could I do this on the current version of Dash Core?
     
  9. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,634
    Likes Received:
    3,534
    Trophy Points:
    1,183
    Well, it's up to you of course... All config for this setup is done via dash.conf iirc.
     
  10. Dandy

    Dandy Member

    Joined:
    Mar 1, 2017
    Messages:
    274
    Likes Received:
    97
    Trophy Points:
    88
    I pasted the lines into dash.conf, as masternode.conf seems to be for remote masternodes.
    But now I've hit another obstacle. When I try to execute “masternode start <WALLETPASSWORD>”, I get a "Error: Please enter the wallet passphrase with walletpassphrase first. (code -13)".
    What exactly do I need to enter and in what order?
     
  11. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,634
    Likes Received:
    3,534
    Trophy Points:
    1,183
    Do what it says :)
    masternode start doesn't support passphrase anymore, this option is deprecated.
    Consider these steps:

    walletpassphrase <WALLETPASSWORD> 99
    (99 is number of second to keep your wallet unlocked)
    and then
    masternode start
     
  12. Dandy

    Dandy Member

    Joined:
    Mar 1, 2017
    Messages:
    274
    Likes Received:
    97
    Trophy Points:
    88
    Thanks for helping :)
    That got me over the previous error, but now I get a "Not capable masternode: Masternode not in masternode list" message
     
  13. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,634
    Likes Received:
    3,534
    Trophy Points:
    1,183
    Hmm... Do you have enough confirmations on 1000 DASH tx?
     
  14. Dandy

    Dandy Member

    Joined:
    Mar 1, 2017
    Messages:
    274
    Likes Received:
    97
    Trophy Points:
    88
    28 confirmations and counting
     
  15. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,634
    Likes Received:
    3,534
    Trophy Points:
    1,183
    Hmmm... strange.
    Try "masternode start" again but now (after command finished executing) open debug.log and look for last strings mentioning CActiveMasternode or GetMasternodeVinAndKeys
    Are there any?
     
  16. Dandy

    Dandy Member

    Joined:
    Mar 1, 2017
    Messages:
    274
    Likes Received:
    97
    Trophy Points:
    88
    This is the last line with CActiveMasternode in debug.log:
    2017-03-01 13:23:57 CActiveMasternode::ManageStateRemote -- NOT_CAPABLE: Masternode not in masternode list

    I can't find the GetMasternodeVinAndKeys string
     
  17. UdjinM6

    UdjinM6 Official Dash Dev
    Dash Core Team Moderator

    Joined:
    May 20, 2014
    Messages:
    3,634
    Likes Received:
    3,534
    Trophy Points:
    1,183
    Maybe some ManageStateLocal then? Tbh, we haven't tested this setup extensively, so there could be some bugs or edge cases preventing it from working correctly. It _should_ work and it did on testnet at some point iirc but ...

    And again, as I already said, we highly discourage anyone from using such setup anyway. It's a legacy way of doing things and I think we are going to drop it completely in next release. Please consider switching to hot/cold now. It's $5-$10/mo per VPS and lets you keep 1000 DASH locally, offline, in some safe place.
     
  18. Dandy

    Dandy Member

    Joined:
    Mar 1, 2017
    Messages:
    274
    Likes Received:
    97
    Trophy Points:
    88
    Can you point me to the relevant tutorial, if I want to run a masternode on a secondary local PC? (Linux or Windows)
     
  19. Dandy

    Dandy Member

    Joined:
    Mar 1, 2017
    Messages:
    274
    Likes Received:
    97
    Trophy Points:
    88
    I managed to start the deamon on the Ubuntu running on a local VirtualBox using Tao's tutorial, but I can't start the masternode from the Dash Core wallet. It reports invalid IP address.
    Is it even possible to use the IP address from the 192.168.x.x range for this, or not?

    Edit:
    I used the external IP adress of my router (the 9999 port is forwarded to the IP adress of the virtual Linux machine) and it seems to be working now! Wohoo! :)
     
    #19 Dandy, Mar 1, 2017
    Last edited: Mar 1, 2017
    • Like Like x 1