Adding a 2nd+ SmartCash SmartNode Setup Guide v2.0 for Mac Users (Quick Setup Guide)


#1

Adding a 2nd+ SmartCash SmartNode Setup Guide v2.0 for Mac Users (Quick Setup Guide)

Mac 10.13.2 (Local Wallet)
Ubuntu 16.04 LTS x64 (VPS smartnode)
Date 29/1/2018
By @controllinghand

Donation to my Smartcash: SebFkuHrqDnj3obXvMtfxtQKRgFeVpXF5x

Digital Ocean referral link https://m.do.co/c/4f0c81328877 Free money $10 credit

Introduction

If you are here, then you already have successfully setup a SmartCash SmartNode. Congratulations!
If not please see:

This guide is aimed at the casual MAC user and if you are running more than 1 SmartNode you should take some additional steps going forward. I will include some thoughts around monitoring your VPS and you need to make sure you add the bash SmartNode checker script on all your nodes going forward.
As a recommendation, please read through each section first and try to understand what is going on before doing it. As soon as one section is complete, please move to the next one. Don’t miss any steps and please take your time.
This document is not an official document of the SmartCash team and has only been created by a hive member in the hope to assist others.
We will be creating a second Virtual Private Server (VPS), However, it might be possible to run two nodes on the same VPS. I will not be covering this. Also, there are other Guides out there that will allow you to clone your VPS leveraging Snapshots that could save you a lot of time. I will not be covering this either. Lastly, if you are doing more than 10 SmartNodes you should really look into automating the process. There are other guides that would be a better fit for you.

Requirements (Same Requirements)

  • 10,000 SmartCash for each SmartNode.
  • Computer for running a local wallet only to start nodes and hold funds. Mac is used in this guide, but other QT version wallets work.
  • VPS server for remote node running 24hrs/day which includes:
-    1GB RAM (about half used for the OS and half for the daemon we install)
-    20GB drive (less than 1GB used for wallet, some for OS, and some for future.
-    1 Static IPV4 Address per node (IPV4 address that never changes) (No IPV6)

Section 0: Protect Yourself

  • Backup:
    • (!) IMPORTANT! First step you need to perform (!).
    • (!) Also, I recommend backing up your wallet every time you add a SmartNode. Plus, when you go to recover the time to sync will be shorter (!)
      How to backup and recover your SmartCash Wallet (Mac Version)
  • Protect Yourself:
    • Don’t give anyone access to your VSP, passwords, private keys, don’t trust anyone.
  • Disclaimer:
    • The Author of this Guide is not responsible for, and expressly disclaims all liability for, damages of any kind arising out of use, reference to, or reliance on any information contained within document. While the information contained within the document is periodically updated, no guarantee is given that the information provided in this guide is correct, complete, and up-to-date.
      Although the guide may include links providing direct access to other Internet resources, including Web sites, The Authors are not responsible for the accuracy or content of information contained in these sites.

Section 1: Obtain your second smartnode variables

  1. Now Open up the smartnode.conf file

    This is where you will copy and paste all the variables related to your 2nd+ smartnode
    Just add a new line to this file that you will update with your 2nd+ smartnode variables

    Keep this open while you work through the rest of the steps
  2. On your Smartcash Wallet
    Go to File in the top menu bar and then select “Receiving addresses”.
  3. Important Keep this SmartNode Name Create a new address. Click New. Call it something identifiable i.e. “SmartNode02”. Click OK.

    Input this into smartnode.conf file
    A second address should now appear in Receiving Addresses Window. Click the button “Copy”.
  4. This is your Receiving address that you will send your 10,000 coins to
    Close the Receiving addresses window and lets send 10,000 coins to that address
    Send exactly 10,000 in one transaction. You can send from within the same wallet if you wish. Sending from an exchange may require an email approval - accept that and wait for an hour or two. Once off an exchange, in network transfers are seconds.
    Paste the address into the PayTo Field: You will notice that the Label will automatically populate. Do NOT select subtract fee from amount and put in exactly 10,000 coins and hit Send

    Put in the Password you used to encrypt your wallet

    Select Yest to send
  5. While that’s working let’s fill out the rest of the smartnode.conf file
    In the SmartCash wallet select Help in the top menu bar.
    Click “Debug window”
  6. In the Debug window click the console tab.
  7. Let’s get the genkey
    At the bottom of the window type into the input box.
    smartnode genkey
    This will generate a long string of text. Copy and paste this into the smartnode01-addr-genkey file as you will need it later
    Copy and paste this into the smartnode.conf file.


    At this point you have #1 nodename and #2 genkey in the smartnode.conf file
  8. Now let’s ket the transaction id and index id
    In the Mac Wallet Debug Console (Help in the Menu and Debug Console) type:
    smartnode outputs
    Copy and paste the key and index(0,1,2…) in the file in smartnode.conf file
    You should see two rows of text. Select the one that is not your Node1 txid and indexid
  9. At this point you should have the following:
    SmartNode Name:
    SmartNode Genkey:
    SmartNode Transaction ID:
    SmartNode Index ID:
    At this point you can update your smartnode.conf will all the variable except your VSP IP which you will get in the next steps

    Please continue with Section 2

Section 2: Using the built-in SSH client in MAC OSX

Mac OS X includes a command-line SSH client as part of the operating system. To use it, go to Finder, and select Go-> Utilities from the top menu. Then look for Terminal. Terminal can be used to get a local terminal window, and also supports SSH connections to remote servers.
RUNNING SSH FROM THE TERMINAL COMMAND LINE
Once you have the terminal window open, you have two alternatives. The first approach is to type ssh hostname or ssh user@hostname into the terminal window. This is more familiar for Linux and Unix users who are used to using a command line.
RUNNING SSH WITH A GRAPHICAL USER INTERFACE
The second option is to select New Remote Connection… from the Shell menu of Terminal. This opens a graphical dialog asking for the host to connect to and the user name. This also allows saving connections. This is recommended for users who are not accustomed to using a command line.
We will show you examples how to use this in the next section.

Section 3: Digital Ocean sign up and Droplet Creation

Digital Ocean referral link https://m.do.co/c/4f0c81328877

If you click the referral you get a $10 credit

Next are the steps to create a Virtual Server on Digital Ocean. For a small amount each month you can have an Ubuntu machine running in the cloud 24 hours a day, 7 days a week to run your SmartCash SmartNode.

  1. Open Google Chrome and go to
    https://www.digitalocean.com/
  2. Click on the blue “Sign In” button in the top right
  3. Enter your email and create a password.
  4. Go to your email and check for a digital ocean email. Confirm the email.
  5. Enter in Payment Details so that you can create a Droplet (VPS)
  6. Once this is all done, log in again to Digital Ocean and go to “Create Droplet”
  7. Select an Ubuntu Distribution use Ubuntu Version 16.04 LTS. Select a monthly plan.
    Our suggestion is to setup with 1GB or more of RAM. Although, 512MB of RAM will work for a few days, it will often cause the wallet to lockup when it runs out of memory. As we add features, our wallets will use more resources too.
  8. You Don NOT need to Add block storage so leave this empty.
    Choose a Datacenter Region. If you have multiple nodes use different locations.
    DO NOT select additional options
    DO NOT add SSH keys
  9. Give your VPS a name and select create.
  10. Check your email account for an email from Digital Ocean which will contain the root password.
  11. Back on the Digital Ocean page in your Internet Browser.
    Once the machine is created you will be presented with this screen. Click on more link and select Access console.
  12. On the console screen enter the root credentials with the password from the email (step 10) to log in.
    Please note copy and paste may not work. So please type carefully.
  13. You will be asked to change your password so please follow the instructions and make note of your new password and keep it safe.

    Congratulations. You have successfully created and logged into the VPS in Digital Ocean

Section 4: Install your smartnode software on to your VSP server

  1. In the connection to the virtual machine let us get the latest updates, please type in
    apt-get update
    And hit enter.
  2. Now type
    apt-get upgrade
    And hit enter it will ask you if you want to upgrade just type yes.
  3. Restart the machine with
    reboot
    And log in again.
  4. While that is rebooting update your VSP-IP in your smartnode.conf
  5. Let’s open up a terminal session on your local Mac
  6. Now let’s log into our VSP with ssh as root
    ssh root@VSP-IP
  7. Now download the install script
    wget https://rawgit.com/smartcash/smartnode/master/install.sh
  8. Now install the smartnode software
    bash ./install.sh
    And input the GenKey (See Video for example)


  9. Wait a minute or two and ssh back into the VSP
    ssh root@VSP-IP
  10. Check the status of the smartnode
    Now that smartcashd is running please leave it to sync the complete blockchain this can take about an hour.
    smartcash-cli getinfo
    Type the above command every couple of minutes and check that the “block” field is increasing. When these numbers get within 1 block of the latest block explorer number you should then be fully synced.
    Go to your Chrome Browser and get the latest block number from
    https://explorer.smartcash.cc

  11. Once your VPS has completely synced run the command.
    smartcash-cli smartnode status
    This will return a smartnode status.
    “Smartnode is capable but not activated"
    or
    "Smartnode is not capable"
    That doesn’t matter, just continue to the next step
    Once you run the start command from your LOCAL wallet (Section 9) and wait a few minutes, it will say
    "Smartnode successfully started”.

Section 5: Start the SmartCash SmartNode

  1. Save your smartnode.conf file on your Mac

    Save the file.
    Note: for those doing more than one SmartNode
    You would follow the same steps up to this point but add a new row into this file
  2. Start the SmartCash wallet (If it is already started please close the application and restart the wallet so it can read the changes made).
    Wait for the wallet to fully sync: Indicated by the tick in the bottom right corner
  3. Click on the “SmartNodes” Tab.

    Wait a few minutes for the screen to load it sometimes takes a little bit
  4. Click on the “My SmartNodes” Tab.
  5. Not to finally start your SmartNode.
    Click on “Start MISSING” button. (Clicking on “Start all” will reset any other SmartNode already started and push their payment date back. Start MISSING only starts nodes that need to be started.)
    You will be asked to type in your passphrase.

  6. Your SmartNode will change from a “missing” status to a “pre-Enabled” to finally “Enabled” this takes about 10 minutes.

    Congratulations you are now running your 2nd+ SmartCash Smartnode! You are on a Roll!. The local Mac wallet does not need to be left on 24/7. The Mac wallet can be used to see the rewards and SmartNode uptime.
    Congratulations your SmartNode is now configured.

Section 6: Secure your Smartnode

This section will guide you through disabling ssh access for root and creating a smartadmin user that will have access via ssh with the keys controlled on your MAC.

Section 7: Monitoring your Smartnode going forward

This section will guide you through how to monitor your Smartnode and how to setup alerts when your Node becomes over burdened


Transfer Node Payouts without Losing SmartRewards Eligibility