franco21 edited this page Mar 21, 2018 · 17 revisions

HOW TO SET UP A FORCE SUPERNODE (MASTERNODE)

Required

  • 500,000 FORCE as collateral for the Masternode.
  • A remote computer to run the Masternode, this is usually a VPS.
  • A secure computer to run the cold wallet that holds collateral.

*check out Links on the last page.


Stage1 - On your cold wallet

1) Generate the Masternode genkey

  • In the wallet upper menu go to Help > Debug > Console.

  • With the console in here type and launch:

masternode genkey

Note somewhere the Masternode Genkey [MASTERNODE_PRIVATE_KEY].

2) Create the collateral (masternode) address

  • Even in the console, type and launch:

getaccountaddress mn1

Now you’ve created a new address called ‘’mn1’’ [MASTERNODE_ADDRESS] (you can check it in ‘’Receive’’ lateral menu). This address will be generated in your wallet, so you will have its control directly through the wallet (create a new backup of wallet.dat).

3) Set up the collateral

  • Send 500000 FOR to the address generated in the previous step [MASTERNODE_ADDRESS], that needs to be done in one transaction. (You don't need to consider transaction fees, just write the amount 500000 and send it).

To use the collateral, one needs to get the transaction id/hash (txid) and the index of the output value (vin) in that transaction.

- Method 1

In the console (Help > Debug > Console), type and launch:

masternode outputs

This returns a key-value pairs (or more) that holds the info needed.

{

"letters and numbers":"0 or 1",

 ...

}

Note the first code [TX_HASH] (letters and numbers) and the second code [OUTPUT_INDEX] (0 or 1)

- Method 2

Look up the address on the Force explorer http://explorer.forcecoin.io/address/MASTERNODE_ADDRESS (replace with your mn address).

Sins it is a new address and only one transaction should be sent to it you can see the transaction id [TX_HASH] (letters and numbers).

By clicking on the transaction id you can see the outputs [OUTPUT_INDEX] (0 or 1). Assuming that the transaction has a remainder you will see two Recipients, one is the collateral the other is the change; if the collateral is above the change or there is no change your vin is 0 else it is 1.

Note the first code [TX_HASH] (letters and numbers) and the second code [OUTPUT_INDEX] (0 or 1)


Stage2 - Set up Force daemon on your VPS / Local computer (as remote server)

On the remote server (VPS, local server)

Note: Setting up a secure and stable server is a whole topic of its own. Sins this guide only looks at a cold wallet setup your funds are never at risk because they remain on the cold wallet and the server has no info to spend them.

Note: The guide assumes you are able to set up a VPS and connect to it using PUTTY (http://www.putty.org/) or some other secure shell. The second assumption is that you are using Ubuntu as Operating System (OS) on the virtual private server (VPS).

VPS providers:

https://www.vultr.com/

https://www.digitalocean.com/

Method1 - Using Setup Script (Ubuntu 16.04) (or ‘’14-04-setup.sh’’ for Ubuntu 14.04)

  • Download the installation script.

wget https://raw.githubusercontent.com/forceunited/force-masternode-setup-ubuntu/master/16-04-setup.sh

  • Next make the script executable and then execute it.

chmod +x 16-04-setup.sh

./16-04-setup.sh

The script will install the force daemon and ask you for infos required to configure the Masternode. After the script is done it will exit and the master node will remain active waiting for it's start command from the cold wallet. Once it is done you can exit the VPS and continue with 'Stage 3'; when the script fails try a manual setup or ask for help.

Required infos:

Password: used to secure the RPC interface of the node.

Masternode Key: Masternode key generated on the cold wallet [MASTERNODE_PRIVATE_KEY]

The IP Address: public address of VPS server the node runs on.

Note: The script says to use port '37245' but further down this guide uses port '37246', both ports will work but if you ever need to interact with the RPC interface of the node using port '37245' will require you to do some extra configuration.

No matter what port you use it needs to be the same on the VPS and the cold wallet!

Method2 - Using Manual setup

In case the script fails or you are using a dfiferent OS, a manual install might be required.

  • Update and install deps:

sudo apt-get update -y && sudo apt-get dist-upgrade -y && sudo apt-get install software-properties-common -y && sudo add-apt-repository ppa:bitcoin/bitcoin -y && sudo apt-get -y update && sudo apt-get dist-upgrade -y && sudo apt-get install software-properties-common -y && sudo add-apt-repository ppa:bitcoin/bitcoin -y && sudo apt-get -y update && sudo apt-get -y install build-essential libssl-dev libdb++-dev && sudo apt-get install libboost-all-dev libcrypto++-dev libqrencode-dev libminiupnpc-dev && sudo apt-get install libgmp-dev autoconf autogen automake libtool libgmp3-dev libssl-dev && sudo apt-get install unzip

  • Get source (adjust for last version):

wget https://github.com/forceunited/force/releases/download/v3.7.0.0/force-3.7.0-0-ubuntu-16.04-d.tar.gz

tar xvzf force-3.7.0-0-ubuntu-16.04-d.tar.gz

rm force-3.7.0-0-ubuntu-16.04-d.tar.gz

cd force-3.7.0-0-ubuntu-16.04-d/

  • Setup the configuration:

mkdir ~/.Force

nano ~/.Force/Force.conf

  • Put the info below in the configuration file and replace '?...?' with your info.

rpcuser=?USERNAMErandom?

rpcpassword=?PASSWORDrandom?

rpcallowip=127.0.0.1

listen=1

server=1

staking=0

daemon=1

masternodeaddr=?IP_ADDRESS?:37245

masternode=1

masternodeprivkey=?MASTERNODE_PRIVATE_KEY?

  • Start the node (enter to go back).

./Forced -daemon

  • Make sure it is running.

./Forced getinfo

At this point, your node is ready for the start command to be sent from the cold wallet. Log out of the VPS and make sure it keeps running.

IF you're using your Local PC as remote server for your Masternode (daemon or qt wallet):

Edit Force.conf: (its position depends on OS, on Mac OS X it's in ~/Library/Application/Support/Force/Force.conf, on Windows in %appdata%/roaming/Force/Force.conf, on Ubuntu in /home/.Force)

rpcuser=?USERNAMErandom?

rpcpassword=?PASSWORDrandom?

rpcallowip=127.0.0.1

listen=1

server=1

daemon=1

masternodeaddr=?IP_ADDRESS?:37245

masternode=1

masternodeprivkey=?MASTERNODE_PRIVATE_KEY?

  • Insert informations required (username, password and your ip static address for your pc as remote server).

  • If needed configure your Firewall adding proper port rules.


Stage3 - Register the Masternode On your cold wallet (local pc)

x) If the wallet is encrypted, unlock it

  • In the wallet upper menu go to Settings > Unlock wallet. Unlock it unchecking ''For Staking only''.

1) Add the masternode

  • Starting from the wallet lateral menu go to Supernodes > My Master Nodes > Create… A new window pops up asking you for node info.

Alias: a name for the node

Address: IP_ADDRESS (vps ip / remote pc static ip):37245 or 37246

PrivKey: MASTERNODE_PRIVATE_KEY

TxHash: txid (TX_HASH)

Output Index: vin (OUTPUT_INDEX)

Reward Address: *optional other address to recieve rewards

Reward %: *optional percentage of coins to send to other address

  • Insert informations required.

  • Press 'OK' and then 'Update' in the main window.

2) Start the masternode

The node should now be visible in the list and you can select it followed by the 'Start' button to get the node running.

Leave the cold wallet open for a while so it can send the command out to other nodes and shortly after you should see rewards coming in. (How long till the first reward depends on network state).

ENJOY YOUR FORCE SUPERNODE! -----------------------------------------------


+Updating

If new updates come out it is not required to repeat all steps mentioned above. You just update the cold wallet (local pc) and then you have to update the remote Masternode on the VPS before starting the master node again from the cold wallet.

_Method1_Script

  • Download and execute the update script:

wget https://raw.githubusercontent.com/forceunited/force-masternode-setup-ubuntu/master/update.sh

chmod +x update.sh

./update.sh

rm -r ./update.sh

Once this is done it might be required to go to the cold wallet and execute the start command again from the Supernodes > My Master Nodes window.

_Method2_Manual (+Manual compilation)

  • Remove old app (adjust for old version), make sure your vps is up-to-date as well.

rm -r ./force-3.6.0.0

rm ./Forced

sudo apt-get update -y && sudo apt-get dist-upgrade -y && sudo apt-get -y update

  • Reboot (and re-connect).

sudo shutdown -r now

  • Get source (adjust for last version).

wget https://github.com/forceunited/force/releases/download/v3.7.0.0/force-3.7.0-0-ubuntu-16.04-d.tar.gz

tar xvzf force-3.7.0-0-ubuntu-16.04-d.tar.gz

rm force-3.7.0-0-ubuntu-16.04-d.tar.gz

cd force-3.7.0-0-ubuntu-16.04-d/

  • Build and copy the executable (the make command will take a while).

cd src

make -f makefile.unix

cp ./Forced ~/Forced

cd ~/

  • Reboot (and re-connect).

sudo shutdown -r now

  • Start the node and check it.

./Forced -daemon

./Forced getinfo

Once this is done it might be required to go to the cold wallet and execute the start command again from the Supernodes > My Master Nodes window.


+Links


Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.