Each step is required. If it’s not in the guide it is not required. Details matter; skip a detail and more than likely your SmartNode will not work. Take your time to read it patiently, follow the instructions, and verify each step is done correctly. And remember, do not give your private key to anybody or you will lose your funds.


This guide will cover step by step how to:

  1. Create your Vultr Instance that will meet the SmartNode Requirements
  2. Installing the SmartCash Daemon with a Script that installs and activates ddos protection and a custom ssh port
  3. And creating the required “genkey” for a SmartNode. Each node must use a unique genkey.
  4. What are some suggested next steps, including Improving the Security of your SmartCash SmartNode on Vultr and Monitoring Your SmartCash SmartNode.

First of all you need to create an account at Vultr. 

Vultr enables you to quickly create the required dedicated VPS instance at $5/month. Once you do your first payment using credit card or PayPal you can send later payments using Bitcoin. Vultr generates invoices on the 1st of each month based off previous months usage. You can also easily create more nodes by creating a snapshot of your original SmartNode, which makes it easy to manage.

Once you create your account you need to deploy a new server instance at this link: https://my.vultr.com/deploy/

Select any server location. Spread out your nodes geographically to help support the SmartCash network.


Server Type: Select 64-bit OS, Ubuntu 16.04. See screenshot below.

 

Server Size select $5/month 25GB SSD, 1 CPU, 1024MB Memory, 1000GB bandwidth. Anything more is not required.

You can leave all the options for sections 4-6 unchecked right now. Section 7 give your server any name. SmartNode is fine.

Click “deploy now” and Vultr will create your dedicated VPS server. It takes a a minute or two for it to get it ready for you.



 

You will see your server being created with the “installing” in orange and a spinning thing.


 


Take a moment now to go to your SmartCash Desktop Wallet, making sure it’s the latest version. Then go to smartNodes tab and use "Create SmartNode" button to create your node.

 


 

 



Fill in the alias, ip address, and select the collateral from the list, then copy the smartnode key and click "Apply". If your collateral isn't listed it's either being used by another node or you need to have an exact 100.000 SMART transaction in your wallet.


 


Now let’s go back to Vultr and check on your server at this page: https://my.vultr.com/.When it is done there will be an IP address written under the server name and the server will show Running in green on the right.

Write down the IP address as you will need it later. In my example it is 45.77.253.191.

Click on Manage on the right side of the row.

Now we need to connect to the server to manage it. You can find the username and password in the left side of the server info. Click the eye icon next to password so you can view the password and write it down.


Now we will log into the server using the built in Vultr Console Viewer. This tool does not support copy and paste so it is a little more tedious to use later. You can also use Bitvise or PuTTY to connect to the server. Just put the IP address into the connection field, port 22, and use the root login and password. This step is beyond the scope of this guide — so just look it up on google if you need help. Otherwise the console in Vultr is fine as we won’t be typing too many commands. You can login to the console in the top right of the current screen where it looks like a monitor. It’s in the right side of this screenshot

 

 

Click on view console and it will load up a new window to connect. First, make your window a little bigger by clicking the bottom right corner and resizing the window.  Then login. Your login username is “root”, type that without quotes and press enter. Then type in the password and press enter. The password will not show up on the screen as you type don’t worry.

You will then be logged in and see this:


 

That’s great because you’re now connected to and sending commands to the server.

Now we need to start sending commands in. Let’s use the nice installs script that was created (you can browse here if you want to learn more about those: https://github.com/SmartCash/smartnode)

Type in:

wget https://raw.githubusercontent.com/SmartCash/smartnode/master/install.sh

Then press enter.

Then type

bash ./install.sh

Then press enter.

It will prompt you that it will reboot. Press enter.

It will prompt you for a custom SSH port (it’s a security technique to change the default). You can change to anything — something between 100 and 1000 is fine. Just don’t use the SmartNode port of 9678. Write that down:

222


It will prompt you to type in a unique genkey (smartnode key) which you copied when creating the node. Paste or type that in now being careful to type it correctly and exactly.


 

 

The script will download and install a bunch of requirements for SmartNodes.

When it is done, it will reboot the server. Now it will take a moment to reload the server.

RECOMMENDED ADDITIONAL SWAP SPACE: I prefer to create more swap space since the VPS memory is a little low and this can improve stability. Run the following commands:

<span style="font-size: 16px;">sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo cp /etc/fstab /etc/fstab.bak
sudo echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
sudo reboot</span>

To see that this worked you can type use the following command:


free
df

Free shows you the swap space and df shows the disk space.

You are done with the install. Once the server reboots it will automatically start up the SmartNode wallet and sync the blockchain.

Last Step to Check on VPS SmartNode Status: Finally, let’s make sure the daemon is running with the command below and check on the status.

smartcash-cli getinfo

smartcash-cli smartnode status

The wallet will load from the downloaded blocks. It takes a few minutes. Once that is done getinfo will show the current block and network state and smartnode status let’s you know how you are doing.

If you get to a screen like this below you’re good. All you need to do next is tell the SmartCash network to use your node, which you need to do from the desktop wallet by clicking "start-alias". 


 

 


Troubleshooting section:

Okay, you did all these steps and it’s not working… you get an error such as “can’t connect to server” after you load smartcashd. You can’t turn off the server with “smartcash-cli stop” … and “smartcash-cli getinfo” is not working either. This happens you need to look at the debug logs to find the error:

Type this:

tail -n 20 ~/.smartcash/debug.log

Now, if you got something in the lines that says “Error: Invalid smartnodeprivkey Please see documentation.” that means the genkey is incorrect. Here’s an example like that below:



Most likely you typed it wrong or didn’t create one. You can use this command to edit the smartcash.conf file and correct the error.

nano ~/.smartcash/smartcash.conf

Make sure it is correctly typed, case sensitive, and that there are no spaces at the end.

Save the file with “ctrl o” to save and then press enter to overwrite the current filename. Then do “ctrl x” to exit the nano editor.

After you do this restart your server:

reboot

Then log in again and check the status:

smartcashd

smartcash-cli getinfo

smartcash-cli smartnode status

 

Sometimes you may get a different error asking you to start with “-reindex or -reindex-chainstate”. 

In this case you just need to issue this command:

smartcashd -reindex-chainstate

This will start up the daemon. You can go back to bootstrapping if you like.

Other things you must or should want to do:

  • HIGHLY RECOMMENDED: Adding a Vultr Firewall for just 9678  – the script we used automatically drops traffic but any less traffic actually getting to your server firewall is better for your server.
  • OPTIONAL If you want to be able to copy and paste commands you can’t use Vultr view console. Add an authenticated user for SSH logins using public/private keys with Bitvise or PuTTY. If you do this you might as well disable root logins with password, or login with password keys entirely.
  • OPTIONAL Copy your desktop smartnode.conf file somewhere as a backup in case you need to add the VPS to the SmartNode list again as a restart. It will be a littler faster than redoing it.
  • REQUIRED: Create your 100000 SMART transactions that are required to be able to generate unique transaction keys to activate the node.
  • REQUIRED: Your desktop wallet is up to date and synced up with the blockchain. Here’s how to speed it up: Wallet v1.2.8 are out please download here https://github.com/SmartCash/Core-Smart/releases/
  • REQUIRED: Setting up a smartcash.conf file on your desktop wallet that uses the IP address of your node and port 9678, the genkey, and the special output from the 100,000 SMART transfer you need. A simple guide is here. Start at section 9: https://cdn.discordapp.com/attachments/389053002079535104/426697609781051393/SmartCash_SmartNode_Script_Setup_Guide_v2.2.pdf
  • REQUIRED: Activate your SmartNode in the SmartNodes tab of the desktop wallet with the “start missing” command… why wait?
  • HIGHLY RECOMMENDED: Assess your security practices — have you backed up your wallet.dat recently? Do you keep it safe and encrypted? Did you create a backup paper wallet? Have you thought about other security issues?
  • A GOOD PRACTICE: Create a snapshot of your server on the Vultr snapshots tab. This is especially useful if you create multiple nodes and you do custom scripts or security. Then you can use the command “pico ~/.smartcash/smartcash.conf” to edit the configuration on any cloned snapshots from the vultr terminal. After you do that restart the daemon to load the updated configuration with the command “smartcash-cli stop” and “smartcashd” to stop and start. This is all that is required for your extra nodes, other than adding a second line in smartnode.conf on the desktop wallet with the required IP, genkey, transaction id and START MISSING in the wallet smartnodes tab.