How to setup a Stash masternode for beginners

Stash Pay
Stash Pay
Jun 2, 2018 · 9 min read

This guide will take you through the process of installing a Stash masternode.

First the basic requirements:

  • 10,000 STASH
  • An extra say 0.0001 STASH to cover any transaction fees
  • VPS running one of the following Ubuntu 16.04, Ubuntu 18.04, Ubuntu 18.10, Ubuntu 19.04, Debian 8, Debian 9 with 1GB RAM (required to be running 24/7).

We will first setup a Virtual Private Server (VPS) which is basically a computer in the cloud capable of running a masternode 24/7. Next we prepare the 10,000 STASH collateral. We will be using a hot/cold wallet approach. This means that our masternode wallet (hot wallet on the VPS) does not hold any funds, instead we store the collateral 10,000 STASH on our local PC wallet. Lastly we will bring the masternode VPS online by issuing a start command from the local PC wallet.

This guide will be broken down into three parts:

Part A — Deploying the masternode (VPS)

Part B — Preparing the local wallet and collateral (Local PC)

Part C — Starting the masternode (Local PC)

We will be using the hosting service Vultr in this guide, however there are also many alternatives available if you prefer such as DigitalOcean, Amazon AWS

  1. Create an account at Vultr. Please note the link includes a referral code that gives $50 free credit to new users at the time of writing.

2. Server Location — choose your preferred location.

Image for post

3. Server Type — Select one of the following: Ubuntu 16.04, Ubuntu 18.04, Ubuntu 18.10, Ubuntu 19.04, Debian 8 or Debian 9.

Image for post

4.Server Size — Select the $5/mo server with 1GB RAM, 1CPU and 25GB SSD.

Image for post

5. Deploy the server — Leave Additional Features unchecked. Leave Startup Scripts. If you are an advanced user it is recommended to use an SSH key, if not skip SSH Keys.

Server Hostname & Label can be set to anything you like, in this example we name our masternode stash-mn1. Set the label the same as the hostname.

Click the deploy button to deploy the server.

Image for post

6. Installation — The server will now be deployed. This may take some time while the operating system is automatically installed.

Image for post

7. Get the server details — When the server has finished setting itself up a “Manage” link will become available, click it (if you do not see Manage there will be a 3 dot button in the same place, click it then Server Details)

Image for post

8. Make a note of your server details — we will need the following info to connect to our masternode to finish setting it up:

  • IP Address
  • Username
  • Password
Image for post

9. In this next section we will connect to our masternode from our local PC using ssh to finish the VPS setup. This step will be different depending on which operating system you use on your local PC.

Mac OS X users:

Open a new terminal by going to spotlight (by pressing ⌘ + Space bar) and search for terminal and press enter.

Image for post

Next we will connect to our VPS using ssh. At the terminal type “ssh root@ipaddress” replacing ipaddress with IP address you obtained in step 8. For example in this guide the server IP address is 155.138.128.16 so we would type:

ssh root@155.138.128.16
Image for post

Windows Users

Unfortunately Windows does not have a ssh client installed by default. We need to install a program called Putty that will allow us to connect to the masternode (VPS).

Download and install putty. If you need assistance with this please see this guide https://www.ssh.com/ssh/putty/windows/install

Now that Putty is installed connect to the VPS using the IP address obtained from step 8. Enter the IP address and click Open.

Image for post

Click Yes to the dialog box below:

Image for post

Login using your user name (root) and your VPS password from step 8 above. Copy your password from step 8. Right click the mouse on the terminal window to paste the password (it will appear that nothing has happened because the terminal hides the password — just press enter after right-clicking once).

Image for post

10. Run the masternode install script on the VPS. This will automatically install and configure Stash to run as a masternode. This script will take some time to run while it downloads and installs additional components (zksnark parameters used for shielded transactions).

At the terminal type:

wget stashpay.io/masternode.sh && bash masternode.sh
Image for post

When prompted type y and press Enter

Image for post

10. When the script finishes it will display some import info that we need for later. Copy (by highlighting in Putty and right clicking the mouse) the Network address and Masternode key and save them to a notepad file or word document.

Image for post

Check that the masternode is up and running by typing:

watch cli mnsync status
Image for post

The masternode will now sync with the Stash network, this may take some time. When the sync completes you should see the following:

AssetID: 999
AssetName: "MASTERNODE_SYNC_FINISHED"
IsBlockchainSynced: true
IsMasternodeListSynced: true
IsWinnersListSynced: true
Image for post

Press ctrl-c to exit the watch command.

To see the whole setup process:-

Image for post

This completes the VPS setup. You can close putty and move on to preparing the collateral.

In order to run a masternode we need to prove that we that we hold 10,000 STASH in a single address in our wallet. Follow the steps bellow to ensure your wallet is setup correctly.

  1. Install Stash Core — follow guide How to install Stash Core wallet
  2. Backup wallet — follow guide How to backup Stash Core wallet
  3. Import crowd sale funds — follow guide How to import crowd sale funds
  4. Create a new receiving address — click the Receive tab then Request payment
Image for post

5. Copy the receive address — click Copy Address and Close.

Image for post

6. Send Collateral — click on the Send tab. Copy the address from step 5 above and paste it in the Pay To box. In the amount enter exactly 10000. Make sure Subtract fee from amount is unchecked. Make sure InstantSend is unchecked also. Click Send and wait about 10 minutes while the transaction confirms.

Image for post

7. Check collateral — If all things went well we should now have exactly 10,000 STASH in a single transaction. To make sure this has worked correctly go to Tools -> Debug console

Image for post

At the console type:

masternode outputs
Image for post

If your 10,000 collateral is setup correctly you should see a transaction hash and index number that looks similar this:

Image for post

Copy the transaction hash and the index number. Close the console.

8. Go to Tools -> Open Masternode Configuration File

Image for post

A notepad file will open. We need to add a line to the text file with the following format:

alias network-address masternode-key transaction-hash index
  • alias — this can be any name you like, in our guide mn1
  • network address — get this information from Part A) Step 10.
  • transaction hash — get this info from step 7 above.
  • index — get this info from step 7 above.

Ensure that there there is a space between each value and remove any quotation marks.

Image for post

9. Save and close the notepad file. Go to Settings -> Options

Image for post

10. Ensure Show Masternodes Tab is checked. Press OK.

Image for post

11. Close and restart Stash Core Wallet. Go to the Masternodes tab. There should be a masternode with Status MISSING.

Image for post

12. Enable the masternode — To start the masternode our 10,000 STASH collateral transaction must have at least 20 conformations. We will check this on the Stash Explorer.

Copy your masternode output transaction hash from 7) above (just the hash with no quotation marks, not the index).

Navigate to the http://explorer.stashpay.io/ and paste your transaction hash in the search bar:

Image for post

Check to make sure the transaction has at least 20 confirmations. This should take on average 20 minutes but may be more or less. You can press refresh to periodically update the page.

Image for post

Once we have 20 confirmations in the explorer, go back to our Stash Core wallet on our local PC and click the Start MISSING button

Image for post

The status of your masternode should change to PRE_ENABLED. It will stay in the pre-enabled state for quite some time (usually around 10–30 mins)

Image for post

Eventually your node status should say ENABLED. If you have reached this point congratulations you have successfully stated your masternode and will be placed in the masternode queue.

Image for post

If you have troubles enabling your masternode back your your VPS in Part A) of this guide and run the following command:-

cli masternode status

Ideally you should see “Masternode successfully started”

Image for post

If you you receive “This is not a masternode” error message something went wrong in Part A).

Image for post

Ensure that your masternode is synced properly. Ensure that AssestID is 999, if the AssestID is less that 999 you need wait longer before pressing the “Start MISSING”.

Image for post

Originally published at medium.com on June 2, 2018.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store