Getting started with CloakCoin StakeBox

Getting started with CloakCoin StakeBox

StakeBox and CloakCoin have partnered together to bring you the CloakCoin StakeBox – a device that allows you to stake your CloakCoin cryptocurrency and make a return on your investment.

Staking CloakCoin is the process of securing the network with your coin weight, which in turn rewards you with new coins.

The StakeBox only require a little bit of setup, allowing you to get up and running in no time at all and including all the essential accessories.

This guide will show you how to get up and running staking your cryptocurrency in no time at all with your CloakCoin StakeBox.

Note: This guide is for reference only and we cannot be held responsible for any loss or theft of wallet data. Please make sure you back up your wallet and passphrase in a variety of locations.

What you will need

 

Assemble your hardware 

  1. Connect your HDMI cable to your TV/Monitor
  2. Connect your Keyboard & Mouse
  3. Insert your CloakCoin microSD card into the SD slot (If purchased separately) 
  4. Connect the micro USB power adapter

Connecting to the Internet

This CloakCoin StakeBox requires and Ethernet connection to your internet/router in order to get started with. Once you have powered up your StakeBox and it has connected to the internet via Ethernet you can then configure it to connect to your Wi-Fi connection instead.

Configuring Wi-Fi Connection

Since CloakCoin is built-upon Raspbian Lite, everything we do must be done using the command line interface. When you first boot/power up your CloakCoin StakeBox you will see the command prompt if you are connected to a HDMI monitor/TV. First thing you will need to do is open the spa_supplicant.conf file, this is where the Wi-Fi configuration setting will be. Type in the following or copy and paste the command into the command line:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

 In this file you will need to add the following:

network={
ssid="YOUR_NETWORK_NAME"
psk="YOUR_NETWORK_PASSWORD"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

Replacing "YOUR_NETWORK_NAME" with your routers SSID and "YOUR_NETWORK_PASSWORD" with the password you use to connect to your Wi-Fi. Usually you can find these details on the back of your router in the manual/letter that came with the router. Now reboot your StakeBox for the changes to take effect:

sudo reboot

Once you have rebooted back to the command prompt you can check to see if you are connected to your router via Wi-Fi by typing in the following command:

ifconfig

You should see something like the following:

Wlan0 is your Wi-Fi adapter on the StakeBox, here you should see that it has an IP address. At this point you can now safely remove the Ethernet cable and rely on the Wi-Fi for internet connection.

Expanding filesystem

Before we get started we need to make sure that there is sufficient space on your SD card on your StakeBox so we can then download the CloakCoin Blockchain. By default, the filesystem has not been expanded and as such you could run out of disk space quickly resulting in the cloakcoin daemon service stopping. 

  1. At the command line type the following command:
sudo raspi-config
  1. In the configuration menu navigate to 7 Advance Options

 

  1. In the advanced menu select the first option A1 Expand FileSystem and hit enter

 

Hit OK then Finish and reboot the StakeBox for the filesystem to be expanded.

 

 You can confirm the changes by typing in the following command in the command line: 

df

 Configure CloakCoin

Now that we can access our StakeBox, lets get it configured and secure. First thing you will need to do is change the default password for user 'pi'. To change it type in the following into the command line:

passwd

 The current (default) password is "raspberry", which you will have to enter.

Cloakcoind, which is the program that runs on the StakeBox, will automatically start when you boot up your StakeBox (As long as there is an internet connection). For the next step we will have to stop the program as we need to change some files. Type in the following command to stop the program:

./cloakcoind stop

Now there are two files that we need to modify, CloakCoin configuration file and the web user interface configuration file. Firstly, lets modify the web configuration file:

sudo nano /var/www/html/cloak/config.php

You should see a file with the following in:

Here you will need to change "user" and "password" to a username and password of your choice. Keep a note of what your username and password is for the next step. Now save the file with CTRL+O then CTRL+X to exit.

Now lets change the CloakCoin configuration file so that it matches the credentials we used for the web user interface, as they will need to talk to each other. Type in the following in the command line:

nano .CloakCoin/CloakCoin.conf

You will need to change 'rpcuser' and 'rpcpassword' with the same username and password that you entered before. CTRL-O to save and CTRL-X to exit.

Now we need to download the CloakCoin Blockchain. Depending on your internet connection the download may take up to an hour. Type in the following into the command line:

cd .CloakCoin
wget https://backend.cloakcoin.com/wallet/v2/cloak_ldb.zip
unzip cloak_ldb.zip
cd ..

Now everything is setup and configured. We can begin to start the CloakCoin program by typing in the following or by rebooting your StakeBox:

./cloakcoind -upnp -daemon

You can check the status of the program by typing in the following:

cat .CloakCoin/debug.log

Note: Make sure that upnp is active in your router, otherwise you will need to forward port 29662.

The CloakCoin RPC server may take a few minutes to start running. After which you should be able to enter the following command to test everything is working:

./cloakcoind getinfo

You can now access the web interface by opening a web browser window on your computer and going to http://IPADDRESS/cloak. Where "IPADDRESS" should be replaced with the IP address of your StakeBox. You can find the IP address by typing in the following command:

ifconfig

You should now see the following window.

From this point on you can now enter RPC command from the command line on the StakeBox, like we have been doing, or you can use the web interface but removing the './cloakcoin' at the beginning.

Encrypting your wallet 

Encrypting your wallet is an important aspect of keeping everything safe. You can encrypt your wallet at any time but we recommend doing it at this stage in the guide. To do this you simply type in the following command replacing “yourpassword” with a password of your choice:

./cloakcoind encryptwallet yourpassword

This will now begin to encrypt the wallet which in turn will restart the qtum daemon. You should see the following output:

wallet encrypted; CloakCoin server stopping, restart to run with encrypted wallet.  The keypool has been flushed, you need to make a new backup.

After encrypting your wallet, you can obtain your wallet address by typing the following into the command line:

./cloakcoind getaccountaddress ""

You should see something like the following output: 

QNaNaSP8hxET52wXXXXXXXXXXGMXkjGkVt

You can now send CloakCoin coins to the address we just obtained from the cloakcoind program. To check your transaction (incoming and outgoing) type in the following command:

./cloakcoind listtransactions

 AutoStart CloakCoin

By default the CloakCoin is programmed to automatically start when the StakeBox starts. However, currently it will fail because it is unable to unlock the wallet for staking and as such we need to edit the following file:

nano cloakload

You will need to edit the line: 

/home/pi/cloakcoind walletpassphrase <password> 9999999

and replace password with your wallet password that you used to encrypt it. 

CTRL+O to save and CTRL+X to exit. For the changes to take effect you will need to reboot your StakeBox with sudo reboot.

To test that the CloakCoin application is running you can type ./cloakcoind getinfo.

Staking 

In order to begin staking you will need to have done two things; firstly your wallet needs to be unlocked, which in the previous step hopefully you have done already.You can unlock your wallet with the following command if it is locked:

walletpassphrase <passphrase> <timeout>

Secondly you need to have CloakCoin coins in your wallet to be staking. You can find your address using the web interface and going to "My Addresses" in the menu bar.

To check the status of your staking you can type in the following command:

./cloakcoind getmininginfo

How to update

Note: Before you get started make sure you backup your wallet as per this guide.

You will need access to the command line in order to update to the latest cloakcoin version, which you can do by connecting to a monitor with a keyboard and mouse or you can SSH into the Pi if connected to your local network. 

  1. Stop the current daemon service:
./cloakcoind stop
  1. Download the latest wallet (As of writing it is v2.2.2.0):
wget https://github.com/CloakProject/CloakCoin/releases/download/v2.2.2.0/cloakcoin-RPi_armv7-rEvolution-2.2.2.0.zip
  1. Unzip the archive and replace the existing cloakcoind file:
unzip cloakcoin-RPi_armv7-rEvolution-2.2.2.0.zip
  1. Make the file executable:
chmod +x cloakcoind
  1. Launch the daemon:
./cloakcoin -upnp -daemon
  1. Test the daemon with:
./cloakcoind getinfo

 

Further information

for further information about the CloakCoin cryptocurrency you can visit their website at http://www.cloakcoin.com  and for more information about the software and how to use it please visit their wiki page at https://www.cloakwiki.org/index.php/Main_Page.

You can find a full list of RPC commands at CloakCoins wiki page .

 

Give us a tip!

Our learning and blog content is shared and released for free with no adverts ever, guaranteed! If this content helped your project or you just like the work we do and would like to help us grow the content and products we have available, please consider giving us a tip...

BTC: 12ThHKExWZYzLJ7gWSug7CwN5juLEFnpQx

ETH: 0x7323173a7b70e391b82c811af7ebc9ef0d777643

CoinPayments:

PayPal: Donate with PayPal

Previous article How to remotely access your CloakCoin StakeBox
Next article How to backup and restore your CloakCoin Wallet

Leave a comment

Comments must be approved before appearing

* Required fields