What your need

The requirement for setting up a masternode is as follows:

Set up your operating system

Use Ubuuntu or window terminal - simply type ssh root@<server_ip> and enter your password when prompted.

Remember that is somehing like 189.234.432.12

Once you are login change your user password

  passwd root

Add new user with the below code

  adduser <username>

Remeber to change <username>

Add the new user to the sudo group

  usermod -aG sudo <username>

Update the VPS with

  sudo apt update -y
  sudo apt upgrade -y
  sudo apt install ufw python virtualenv git unzip pv -y

Add to your firewall

  ufw allow ssh/tcp
  ufw limit ssh/tcp
  ufw allow 11110/tcp
  ufw logging on
  ufw enable

Add swap to your VPS

  fallocate -l 4G /swapfile
  chmod 600 /swapfile
  mkswap /swapfile
  swapon /swapfile
  nano /etc/fstab


  /swapfile none swap sw 0 0

Add fail2ban by Installing

 sudo  apt install fail2ban -y

Then setup a new configuration file

  nano /etc/fail2ban/jail.local

And enter it in the following configuration

  [sshd]
  enabled = true
  port = 22
  filter = sshd
  logpath = /var/log/auth.log
  maxretry = 3

Then press Ctrl + X to close the editor, then Y and Enter save the file. Retart and enable the fail2ban service::

  systemctl restart fail2ban
  systemctl enable fail2ban

Next, open the SSH configuration file to disable root login over SSH::

  nano /etc/ssh/sshd_config

Locate the line that reads PermitRootLogin yes and set it to PermitRootLogin no. Directly below this, add a line which reads AllowUsers <username>, replacing <username> with the username you selected above. Then press Ctrl + X to close the editor, then Y and Enter save the file.

Then reboot the server::

  reboot now

Send the collateral

Open VkaxCore wallet and wait for it to synchronize with the network.

Go to Tools > Debug console to open the console. Type the following command into the console to generate a new Vkax address for the collateral

  getnewaddress

Output:

  XmdhxVWeyNEc9pjeNW9reTwcDMCwGLi2H

The above address is your collateral address.

Send 10,000,000 to your collateral address and wait for 15 confirmations.

then enter the below code in the console of your desktop wallet and note various outputs down.

bls generate

{
  "secret": "0245672a8899f994e45c67902123a45578e9766558387a4b381af4e2f36642c695e1f1e5,
  "public": "8845672a8899f994e45c67902123a45578e9766558387a4b1af4e2f81af4e2f36642c7c5ecb7b6558387a3a"
}

from the above "secret": "0245672a8899f994e45c67902123a45578e9766558387a4b381af4e2f36642c695e1f1e5 is your masternodeblsprivkey use it in the vkax.conf file

masternode outputs


{
  "8ba5672a8899f994bc06b68b45c67902123a45578e9766558387a4b381a3e481": "1"
}

Also the first long string is your collateralHash, while the last number is the collateralIndex.

Now download and install the Vkax wallet in your Ubuntu VPS server

  wget https://github.com/vkaxproject/vkax/releases/download/v0.17.0.3/vkaxcore-0.17.0-x86_64-linux-gnu.tar.gz

  mkdir ~/.vkaxcore
  tar xfv vkaxcore-0.17.0-x86_64-linux-gnu.tar.gz
  cp -f vkaxcore/bin/vkaxd ~/.vkaxcore/
  cp -f vkaxcore/bin/vkax-cli ~/.vkaxcore/
``
Create a configuration file using the following command::

  nano ~/.vkaxcore/vkax.conf

An editor window will appear. We now need to create a configuration file
specifying several variables. Copy and paste the following text to get
started, then replace the variables specific to your configuration as
follows:

rpcuser=Put-Your-username-here
rpcpassword=Put-Your-password-here 
rpcallowip=127.0.0.1 
listen=1 
server=1 
daemon=1 
masternodeblsprivkey=0245672a8899f994e45c67902123a45578e9766558387a4b381af4e2f36642c695e1f1e5
externalip=189.234.432.12
Now start your `vkaxd`

~/.vkaxcore/vkaxd

Check to see if fully sync

~/.vkaxcore/vkax-cli mnsync status

When synchronisation is complete, you should see the following
response::

```

{
“AssetID”: 999,
“AssetName”: “MASTERNODE_SYNC_FINISHED”,
“AssetStartTime”: 1558596597,
“Attempt”: 0,
“IsBlockchainSynced”: true,
“IsSynced”: true,
“IsFailed”: false
}

```

Registering  Vkax Core Masternode
---------------------------------


- Prepare a ProRegTx transaction
================================


First we need to get a new, unused address from the wallet to serve as
the **owner key address** (``ownerKeyAddr``). This is not the same as
the collateral address holding 10,000,000 Vkax. Generate a new address as
follows:

getnewaddress “ownerKeyAddr”

X4gxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip

- ownerKeyAddr=X4gxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip

getnewaddress “votingKeyAddr”

X2RaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg

- votingKeyAddr=X2RaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg


Then either generate or choose an existing address to receive the
**owner's masternode payouts** (``payoutAddress``). It is also possible
to use an address external to the wallet::

getnewaddress “payoutAddress”

XeZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN

- payoutAddress=XeZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN

payout address must have a minimum of 1 Vkax


Use the below code to register

protx register_prepare collateralHash collateralIndex ipAndPort ownerKeyAddr operatorPubKey votingKeyAddr operatorReward payoutAddress (feeSourceAddress)

Open a text editor such as notepad to prepare this command. Replace each
argument to the command as follows:

- ``collateralHash``: 8ba5672a8899f994bc06b68b45c67902123a45578e9766558387a4b381a3e4
- ``collateralIndex``: 1
- ``ipAndPort``: 189.234.432.12:11110
- ``ownerKeyAddr``: X4gxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip
- ``operatorPubKey``: 8845672a8899f994e45c67902123a45578e9766558387a4b1af4e2f81af4e2f36642c7c5ecb7b6558387a3
- ``votingKeyAddr``: X2RaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg
- ``operatorReward``: 0
- ``payoutAddress``: XeZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN
 
No

Example (remove line breaks if copying)::

  protx register_prepare 
    8ba5672a8899f994bc06b68b45c67902123a45578e9766558387a4b381a3e4
    1 
    189.234.432.12:11110
    X4gxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip
    8845672a8899f994e45c67902123a45578e9766558387a4b1af4e2f81af4e2f36642c7c5ecb7b6558387a3
    X2RaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg
    0 
    XeZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN
    XeZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN 

Output::

  {
    "tx": "030001000175c9d23c2710798ef0788e6a4d609460586a20e91a15f2097f56fc6e007c4f8e0000000000feffffff01a1949800000000001976a91434b09363474b14d02739a327fe76e6ea12deecad88ac00000000d1010000000000e379580dcfea3eb6944bfbe1de5fa2317932e260acce4d9ff3ede5f4287a34160100000000000000000000000000ffff2d4ce6ef4e1fd47babdb9092489c82426623299dde76b9c72d9799f20ed1538e28259ff80044982372519a2e6e4cdedb01c96f8f22e755b2b3124fbeebdf6de3587189cf44b3c6e7670ed1935246865dce1accce6c8691c8466bd67ebf1200001976a914fef33f56f709ba6b08d073932f925afedaa3700488acfdb281e134504145b5f8c7bd7b47fd241f3b7ea1f97ebf382249f601a0187f5300",
    "collateralAddress": "XmdhxVWeyNEc9pjeNW9reTwcDMCwGLi2Hb",
    "signMessage": "XeZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN|0|yfgxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip|yfRaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg|ad5f82257bd00a5a1cb5da1a44a6eb8899cf096d3748d68b8ea6d6b10046a28e"
  }

Next we will use the ``collateralAddress`` and ``signMessage`` fields to
sign the transaction, and the output of the ``tx`` field to submit the
transaction.

Sign the ProRegTx transaction
=============================

We will now sign the content of the ``signMessage`` field using the
private key for the collateral address as specified in
``collateralAddress``. 

signmessage collateralAddress signMessage

```shell
Example::

  signmessage XmdhxVWeyNEc9pjeNW9reTwcDMCwGLi2H XeZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN|0|yfgxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip|yfRaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg|ad5f82257bd00a5a1cb5da1a44a6eb8899cf096d3748d68b8ea6d6b10046a28e

Output::

  II8JvEBMj6I3Ws8wqxh0bXVds6Ny+7h5HAQhqmd5r/0lWBCpsxMJHJT3KBcZ23oUZtsa6gjgISf+a8GzJg1BfEg=

Submit the signed message

We will now submit the ProRegTx special transaction to the blockchain to register the masternode. This command must be sent from a Vkax Core wallet holding a balance on either the feeSourceAddress or payoutAddress, since a standard transaction fee is involved. The command takes the following syntax::

  protx register_submit tx sig

Where:

Example::

  protx register_submit 030001000175c9d23c2710798ef0788e6a4d609460586a20e91a15f2097f56fc6e007c4f8e0000000000feffffff01a1949800000000001976a91434b09363474b14d02739a327fe76e6ea12deecad88ac00000000d1010000000000e379580dcfea3eb6944bfbe1de5fa2317932e260acce4d9ff3ede5f4287a34160100000000000000000000000000ffff2d4ce6ef4e1fd47babdb9092489c82426623299dde76b9c72d9799f20ed1538e28259ff80044982372519a2e6e4cdedb01c96f8f22e755b2b3124fbeebdf6de3587189cf44b3c6e7670ed1935246865dce1accce6c8691c8466bd67ebf1200001976a914fef33f56f709ba6b08d073932f925afedaa3700488acfdb281e134504145b5f8c7bd7b47fd241f3b7ea1f97ebf382249f601a0187f5300 II8JvEBMj6I3Ws8wqxh0bXVds6Ny+7h5HAQhqmd5r/0lWBCpsxMJHJT3KBcZ23oUZtsa6gjgISf+a8GzJg1BfEg=

Output::

  aba8c22f8992d78fd4ff0c94cb19a5c30e62e7587ee43d5285296a4e6e5af062

Your masternode is now registered and will appear on the Deterministic Masternode List after the transaction is mined to a block.