Article 4. Local/Control Wallet Preparation For CLI (Ubuntu) Wallet Users. (Hot Masternode)

JAGEND
10 min readJun 30, 2019

ATTENTION

- Before you continue reading this article and avoid confusion, it would be better if you read Article 1. FLITS Masternode Setup (Manually)
- For the CLI wallet, I usually install on Ubuntu. For that, you must have vps. You can read how to rent and deploy new vps in Article 5. How To Deploy New VPS (For Hosting Your Masternode And Creating CLI Wallet)

=======================================
WALLET SPECIFICATION

=======================================

For Cli wallet. At least you must have vps with minimum specification as below :
CPU : 1 vCore
RAM: 1024 MB
Storage: 25 GB SSD
OS : Ubuntu 16.04
My recommendation is using VULTR services. How to deploy new VPS through vultr provider, you can read Article 5. How To Deploy New VPS (For Hosting Your Masternode And Setup CLI Wallet)

=======================================
MASTERNODE WORKING SYSTEM INSTALLATION
=======================================

Based on above image, for CLI Wallet users. You must have 2 VPS.
- 1 VPS will be act as Masternode Wallet
- 1 VPS will be act as Local/Control Wallet.
This article will explain how to create a local/control wallet. Where your FLITS coins will be in this wallet.

=======================================
CLI WALLET PREPARATION
=======================================

  1. Connect To Your VPS

How to connect to your VPS? If you forgot, you can read Article 5. How To Deploy New VPS (For Hosting Your Masternode And Setup CLI Wallet)

2. Install pre-requisite packages
This installation package is absolutely necessary to create crypto wallet. For reminder, You can copy-paste below packages one by one to vps screen using right mouse button: copy packages installation one by one, click right mouse button, and press [Enter].

sudo add-apt-repository ppa:bitcoin/bitcoin -y
sudo apt-get update
sudo apt-get install -y build-essential libtool autotools-dev automake pkg-config libssl-dev libevent-dev bsdmainutils
sudo apt-get install -y libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev
sudo apt-get install -y libdb4.8-dev libdb4.8++-dev
sudo apt-get install libminiupnpc-dev

3. Install Fail2ban.
Fail2Ban
is an intrusion prevention software framework that protects computer servers from brute-force attacks. How to install.

sudo apt-get install fail2ban

4. Install Firewall (For security purpose)
Firewall
will block all access to your computer via SSH, FTP, HTTP, VNC or any other port if set. Your computer or server will be safe from brute force attack.

ufw default any
ufw allow 22/tcp
ufw limit openSSH
ufw enable -force
ufw allow 12270/tcp

Note : If you have this result when type “ufw enable -force” : “Error: Invalid Syntax”. Please type “ufw status” then [Enter]. You will have “Inactive” result. Next, type “ufw enable”, then type “y” then [Enter].If you do it correctly, when you type “ufw status” then press [Enter], then you will get the results according to the image below.

5. Create SWAP File
If you want to know what the benefit of SWAP, you can read through this article : An introduction to swap space on Linux systems.
I recommend to have at least 2 GB for SWAP file. How to do swap :

First check our space capacity using command. Type “free -h
sudo fallocate -l 2G /swapfile.
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile

Do check once again. You will have different result from last action. Type “free -h
Note :
- If you have error message while typing “ sudo fallocate -l 2G /swapfile”. Please type : “sudo dd if=/dev/zero of=/swapfile bs=2024 count=2048576” then [Enter].

Now, Cli wallet preparation is DONE. Congrats!. Next we setup FLITS CLI WALLET (LOCAL/CONTROL WALLET).

=======================================
FLITS CLI WALLET (LOCAL/CONTROL WALLET)

=======================================

  1. Create Directory (Folder)

Type “mkdir Flits” then [Enter].
For “Flits”, you can choose different name. In this article, i use “Flits” name. Check if new directory is in there. Type “ls -la” then [Enter].

2. Download FLITS Wallet from github.

Go to Flits Github and choose FLITS-1.0.0-ubuntu-1604-server.zip. Right click mouse to copy the link, and in vps screen type “wget” and right click mouse to paste flits wallet link, then [Enter]. If you do it correctly, your vps screen turn to this.

Copy file name in orange box. How? block all that file name using “left click mouse”, after blocked, press “CTRL + C” to copy that file.

3. Unzip Downloaded Wallet

For new vps, sometimes you will be asked to install “unzip” first. To check if “unzip” already installed. Type this command : “unzip -v”. If “unzip” is installed, you will have this result

If “unzip” not installed, then you will have different result. For this situation, you need to install “unzip” to your os. Please type “sudo apt-get install unzip” then [Enter]. After installed, do check using “unzip -v” commands.
After “unzip” installed, we need to “unzip” downloaded file.
Type : “unzip FLITS-1.0.0-ubuntu-1604-server.zip -d Flits” then [Enter].
Caution : “Flits” in that commands is my directory name. Change “Flits” with your directory name.
If you type it correctly, vps screen will look like this :

Now we can delete that downloaded file, coz we don’t need it anymore. Please type “rm -R FLITS-1.0.0-ubuntu-1604-server.zip” then [Enter]. Do checking using “ls -la” commands.

4. CHMOD command

chmod” command aiming to sets the permissions of files or directories. To set permissions, please type this commands : “chmod 775 Flits/*” then type [Enter]. Theres no output will shows up.

5. Run Daemon

To run “daemon”, please type : “Flits/flsd -daemon” then [Enter]. Result will be like “Flits server is starting”.

6. Do Checking If Wallet Is On The Correct Chain

To find out whether your cli wallet is ready or not, you can run the following commands :
Flits/fls-cli mnsync status
Flits/fls-cli getinfo

In “mnsync status” result, “RequestedMasternodeAssets” must shows “999
In “getinfo” result, “blocks” must same with “current blocks”. For current blocks, you can check through Flits Explorer.
After wallet full synchronized, we need to check if our wallet is in correct chain. Please type “Flits/fls-cli getblockhash 101317”. Result must show like this : “bf3ef530734c89238476eac49fcc1893f330ce642c02806e57ea74d873a3f91e

Do double check with explorer result through Flits Explorer. Type “101317” in Flits explorer column.

7. Create New Address

We need to create 2 Address. We can name it “Recepient” and “MN1” address.
- Recipient Address : This address will be used as the recipient of the FLITS coins that you bought from the exchange. Send minimum 1001 FLS to recipient address. 1000 FLS will be allocated as masternode collateral. 1 FLS is allocated for masternode transaction fees. Don’t try to send coins from exchange to MN1 address directly. You will unable to send exactly 1000 FLITS from exchange. You can check your transaction through FLITS explorer : https://explorer.flitsnode.app/

How to create New Address :

Please Type :
Flits/fls-cli getnewaddress “recepient”
Flits/fls-cli getnewaddress “mn1”

Now you can send minimum 1001 FLS to your “recipient” address.

8. Create Private Key For Each Address

Privkey is used as a backup if at any time your wallet is in corrupt condition.
type “Flits/fls-cli dumpprivkey recipientaddress
type
“Flits/fls-cli dumpprivkey mn1address

Do it one by one and store the output in safe place.

9. Send Flits Collateral To MN1 Address

Now, after 1001 FLS that you bought arrive to “recipient” address, you can send exact 1000 FLS to “mn1” address. To make sure that 1001 FLS already arrived at your wallet, please type “Flits/fls-cli getbalance” then [Enter]. Output will be your wallet balance. Now send exact 1000 FLS to “mn1” address using this command

Flits/fls-cli sendtoaddress mn1address 1000” then [Enter].
Note : Change “mn1address” with your mn1 address.

10. Create Masternode Private Key

Please type “Flits/fls-cli masternode genkey” then [Enter].
Store the output in safe place

11. Create Masternode Outputs

Please type “Flits/fls-cli masternode outputs” then [Enter].
Output will be like this.
[
{
“txhash” : “<txhash>”,
“outputidx” : <txindex>

}
]
Store the output in safe place

12. Encrypt Wallet

Please store password and backup securely. You will not be able to recover your wallet in case of passphrase loss.
Please type “Flits/fls-cli encryptwallet <password>” then [Enter].
Note :
- Change <password> with your own password. Store the password in safe place.
-
Output result will shows that your daemon is stopping (flushing) and asked you to restart your wallet.

13. Configure Wallet Configuration And Masternode Configuration

While wallet (daemon) is turned off, we can do setting to run our masternode.
We need to do configuration in “fls.conf” and “masternode.conf”.

A. “fls.conf “ Configuration

Please type : “nano .fls/fls.conf” then [Enter]. Result, you will have “blank screen”. You need to fill some configuration inside that directory. You can copy paste this inputs and PLEASE do modification for some text:

# RPC configuration part
rpcuser=ReplaceThisWithSentencesWithoutSymbolOrSpace
rpcpassword=ReplaceThiswithPasswordsWithoutSymbolOrSpace
rpcconnect=YourLocalWalletIPThatYouUseNow
rpcconnect=127.0.0.1
rpcbind=YourLocalWalletIPThatYouUseNow
rpcport=12271
rpcthreads=8
rpcallowip=127.0.0.1
rpcallowip=YourLocalWalletIPThatYouUseNow
server=1

# P2P configuration part
daemon=1
externalip=YourLocalWalletIPThatYouUseNow
bind=YourLocalWalletIPThatYouUseNow
port=12270
maxconnections=256

# Add node
addnode=134.209.93.244
addnode=178.62.64.227
addnode=108.61.188.68
addnode=45.63.100.26
addnode=46.101.244.207
addnode=159.89.118.15
addnode=45.77.217.47

Note : “YourLocalWalletIPThatYouUseNow” it is mean IP that you were using to setup Local/Control Wallet.

After you fill that, close “fls.conf” directory using “Ctrl+x” type “Y” then [Enter]. To check if your input is working, please type “more .fls/fls.conf” then [Enter].

B. “masternode.conf “ Configuration

Please type : “nano .fls/masternode.conf” then [Enter]. Result, you will have “blank screen”. You need to fill some configuration inside that directory. You can copy paste this inputs and PLEASE do modification for some text:

You must type like this :
“Masternodename VPSIP:Port masternodeprivkey txhash txid
Masternodename : Your MN label (mn1) (Step 7).
VPS IP :Your vps ip (Masternode/VPS Wallet IP)
Port : 12270
Txhash & Txid : Masternode outputs result (Step 11).
Example :
MN1 46.101.244.207:12270 3Djv2k6JonYhgMVPetFZe4CoPqQJcXSphNGB68 18343178f3fe23f07cebf387b6df491cb4da17df07224b8f71a40ac44c 0

After you fill that, close “masternode.conf” directory using “Ctrl+x” type “Y” then [Enter]. To check if your input is working, please type “more .fls/masternode.conf” then [Enter].

14. Restart Wallet

Please type “Flits/flsd -daemon” then [Enter]. Result will be like “Flits server is starting”. Let it full synchronized and check if wallet is on correct chain using step 6. Do Checking If Wallet Is On The Correct Chain as mentioned above.

15. Unlocked Wallet

After full synced and wallet is in correct chain, we need to unlock our wallet.
Please type “Flits/fls-cli walletpassphrase <password> 999999999” then [Enter].
Note :
- Change <password> with your previous password
- Number 999999999 shows that wallet will be unlocked for around 30 years.
- No output shows up after you hit [Enter]

16. Checking If Wallet Unlocked

Please type “Flits/fls-cli getstakingstatus” then [Enter].
Output will like this :
“validtime”: true,
“haveconnections”: true,
“walletunlocked”: true,
“mintablecoins”: true,
“enoughcoins”: true,
“mnsync”: true,
“staking status”: true
Note :
- Sometimes “mintablecoins” showing “false” and “staking status” showing “false” also. It is fine. Keep moving to activate masternode.

17. Activate Masternode

Please type “Flits/fls-cli startmasternode alias false mn1” then [Enter].
Output will shows like this

Do double check, please type “Flits/fls-cli masternode list-conf”. Result will shows like this :

“alias”: “mn1”,
“address”: “YourVpsWalletIpAddress:12270”,
“privateKey”: “YourMasternodePrivateKey”,
“txHash”: “YourMasternodeTxHash”,
“outputIndex”: “YourMasternodeTxID”,
“status”: “Active”

status” “Active” will changed to be “Enabled” after around 3–4 hours.(The time mentioned is based on the number of MNs that are in the network at the time this article was created.)

Do double check about your masternode status through your Masternode VPS. You can check your masternode status at step 10 Article 3. Masternode/VPS Wallet Preparation (Manually Setup)

18. Do checking in next 4–5 hours, to find out whether the masternode status has changed to “Enabled”. If “status” changed to “Enabled”. Congrats!!, You have configured your masternode properly.

Thank you for reading this article. If there is an update in the command, please let me know. And if you want to donate, I am very grateful.
BTC : 12jGH5VZhp5cEmZrMhFdXoTRVjBwzGb2Hx
BNB (BEP 2) : bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23. memo : 100760277
Doge : DBGQBhRzMbHySUpCcVi4gkAPDTV86tBmkg
Arweave : T9xbjUvMwHol8uMa8SD_l0hJbBUX617_My0TdePYVZU

--

--

JAGEND

Newbie in blockchain space. Love the technology and ideas behind it. Working as selfemployee (Forex and Catering). Trading and eating are great combos