Masternode Manual Setup

Set up a TWINS masternode on a VPS server manually.

This guide is for a setting up a TWINS masternode on a Ubuntu 16.04/18.04 64bit server (VPS) and will be controlled from the wallet on your local computer (Local wallet). The wallet on the the VPS will be referred to as the Remote wallet.

Requirements:

  • 1,000,000 TWINS

  • A main computer (Your personal computer) — This will run the Local wallet, hold your collateral 1,000,000 TWINS and can be turned on and off without affecting the masternode.

  • Masternode Server running Ubuntu 16.04/18.04 (VPS — The computer that will be on 24/7 and runs the Remote wallet ). Minimum required specs for VPS: 1GB RAM, 20 GB drive, and one static IPV4 Address.

Local wallet installation:

  • Download, install and sync your TWINS wallet in your local computer. This will be henceforth referred to as the Local Wallet in this guide. Wallet links can be found here: https://win.win/#download or https://github.com/NewCapital/TWINS-Core/releases

  • Now in the Local wallet, enter the debug console by going to (Tools > Debug console) and type the following command:

masternode genkey

This command will generate your <Masternode Private Key>. Save this Key, we will be using it later.

  • Now in the Local wallet still, enter the following command on the debug console:

getaccountaddress chooseAnyNameForYourMasternode

This will create a wallet address and a <Masternode Name> for your masternode. Save this as we will need it later.

  • Send 1,000,000 TWINS to the address generated in the previous step. When you press the Send button, the wallet will calculate the proper transaction fee. Click Yes in the dialog box that follows and proceed to the next step.

IMPORTANT: In the Amount box, type in EXACTLY 1,000,000. This single transaction tells the blockchain, the address you are sending to is a masternode. If you type in more/less than 1,000,000, or attempt to split the payment into two transactions you will not be able to proceed to the next step.

Be absolutely 100% sure that this is copied correctly. And then check it again. We cannot help you, if you send 1,000,000 TWINS to an incorrect address

  • Using your local wallet, wait for 16 confirmations, and then enter the debug console (toolbar: Tools > Debug Console) and type the following command:

masternode outputs

This will display the <Transaction ID> followed by the <Output Index> . Save this to Notepad. (This gets the proof of transaction of sending 1,000,000 TWINS )

  • In the local wallet’s toolbar, click Tools > Open Masternode Configuration File to open masternode.conf and add the following line with appropriate info:

<Name of Masternode> <Unique IP address of the vps>:37817 <Masternode Private Key> <Transaction ID> <Output Index>

Save the file. For reference see sample format below and the screenshots.

masternode.conf
#Example as per above format:
mn1 127.0.0.2:37817 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0

VPS Remote wallet installation:

To install the wallet first you will log into your VPS using your SSH client. After logging in, type the following commands into your VPS terminal.

  • Go to your home directory by typing: cd ~

  • From your home directory, download the latest version from the TWINS GitHub repository by typing:

wget https://github.com/NewCapital/TWINS-Core/releases/download/twins_v3.2.3.0/twins-3.2.3.0-MN-x86_64-linux-gnu.tar.gz

  • Unzip and extract the downloaded file by using the following command:

tar -zxvf twins-3.2.3.0-MN-x86_64-linux-gnu.tar.gz
  • If this is the first time running the wallet in the VPS, you’ll need to attempt to start the wallet ./twinsd .This will create the twins.conf config files in your ~/.twins data directory.

  • Now press CTRL+C to exit / stop the wallet then continue to the next step.

  • Now again come back to the home directory by typing: cd ~

  • Now go to the Twins data directory by typing: cd ~/.twins

  • Open the twins.conf by typing: vi twins.conf

  • Then press “ i ” button to go into insert mode and make the config look like this:

twins.conf
rpcuser=long random username
rpcpassword=longer random password
rpcallowip=127.0.0.1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
externalip=your unique public ip address
masternodeprivkey= Enter the key we got by running masternode genkey command
during local wallet installation

Make sure to replace rpcuser and rpcpassword with your own.

  • To exit the editor press esc then :wq! then press Enter

Starting your Masternode:

Now, you need to finally start these things in this order

  • Starting the daemon client in the VPS (Remote wallet). In your home directory you can start the wallet daemon by typing: ./twinsd

  • Now to activate your masternode in your Local wallet, enter the debug console (toolbar: Tools > Debug Console) and type the following command:

startmasternode alias false <mymnalias>

Where <mymnalias> is the name of your masternode alias (without brackets).

The following should appear:“overall” : “Successfully started 1 masternodes, failed to start 0, total 1”, “detail” : [ { “alias” : “<mymnalias>”, “result” : “successful”, “error” : “” }

  • Now go back to the VPS (remote wallet), start the masternode by: ./twins-cli startmasternode local false

    A message “masternode successfully started” should appear.

  • Use the following command to check status: ./twins-cli masternode status

    You should see something like:{ “txhash” : “334545645643534534324238908f36ff4456454dfffff51311”, “outputidx” : 0, “netaddr” : “45.11.111.111:37817”, “addr” : “WmXhHCV6PjXjxJdSXPeC8e4PrY8qTQMBFg”, “status” : 4, “message” : “Masternode successfully started” }

You also need to check the masternode explorer after starting the masternode in your wallet.

To do so, copy your masternode wallet address from your terminal window by selecting it with your mouse (WmXhHCV6PjXjxJdSXPeC8e4PrY8qTQMBFg in the above example), visit the masternode section of the TWINS explorer, and paste it in the lower right search box to find your masternode.

Your masternode status should appear as "ACTIVE".

After starting a masternode its status changes in the following order:

"ACTIVE" --> for around 2 - 3 hours after starting it

"EXPIRED" --> It will be just for a couple of minutes

"REMOVED" --> for just a couple minutes

"ENABLED" --> Eventually the masternode will remain in this status and the "Active" time will start increasing.

NOTE: if the masternode status is "MISSING" in your local wallet, check its status in the masternode explorer, it might be EXPIRED/REMOVED there which is fine.

Do not be impatient! The first masternode reward takes 2x or 3x longer to come than regular rewards later. If you start the masternode again from the wallet, this timer will reset to zero.

Thats about it. Congratulations! You have successfully created your masternode.