Hi guys, this is a reworked and very noob friendly version of jakiman’s masternode guide. This will be for one masternode setup on a Ubuntu 16.04 64bit server(1GB RAM 25GB SDD) hosted by Vultr.com and will be controlled from the wallet on your local computer.
For how to connect to your server from Windows follow this post.
After you’ve got your server details and are connected, you will need to go through some initial setup before you do anything PIVX masternode related. I would recommend you follow these instructions.
For Security reasons, this is the preferred way to run a masternode. By running your masternode in this way you are protecting your coins in your local wallet on your computer, and you are not required to have your local wallet running after the masternode has been started successfully.
We will be using the debug console from pivx-qt as our local controller and the command line
./pivx-cli for the masternode on the server.
Step 1: On your controller wallet open Tools->Debug console and enter
masternode genkey and then
getaccountaddress masternode1, “masternode1” being the name you give the masternode address, which you can choose your self. Copy-paste the output you get from
masternode genkey to a notepad for later, this is your
IMPORTANT: Before sending any PIVX to the address you just created you should make an extra backup. This video explains well how to go about this properly using the BIP38 tool. https://youtu.be/EWl-Z3A873w?t=20s
Step 2: Send 10.000 PIV to the addresses you generated in Step 1, making sure to send exactly ten-thousand, in one transaction. Then after a minute or two, enter
masternode outputs and copy-paste the output to your notepad, this is the
INDEX you will need later.
Step 3: Open the masternode.conf file in the pivx data directory on your computer and edit it.(Follow pastebin.com/szztLavf if you have any trouble finding it.) Enter the following in one line:
ALIAS IP:51472 MASTERNODEPRIVKEY TXID INDEX
ALIAS can be anything you want it to be, but for simplicity it may be best to use the name you used for the wallet address, masternode1 in this example. The
IP is the IP address where the masternode can be found(your server IP address). The
MASTERNODEPRIVKEY is the output from the command
masternode genkey you copy-pasted earlier to your notepad.
INDEX is the output from the command
masternode outputs you also copy-pasted earlier.
Finally it should look something similar to this:
masternode1 18.104.22.168:51472 87BxAhVTQrCCVdqycRkkttVcaxZvvxCadukwHwv1s7neYFm1EAX 717e59cad55492af9d2c2468c699308139499820c7074c1ef46fa5e19614b006 -1
Step 4: Open the pivx.conf file in the pivx data directory on your computer and edit it.
Modify the contents to match this:
rpcuser=long random username
rpcpassword=longer random password
Step 5: Now close the wallet on your computer.
Next we’re going to login to the sever through ssh command-line and setup the masternode wallet.
First we need to download the wallet on our server
wget https://github.com/PIVX-Project/PIVX/releases/..... (get the latest x86_64-linux-gnu.tar.gz version)
and extract the files
tar -zxvf <file>
Second create the data directory and pivx.conf file
sudo mkdir ~/.pivx/
sudo nano ~/.pivx/pivx.conf
and modify the contents of the file to look like the following
rpcuser=your long random username
rpcpassword=your longer random password
externalip=SERVER IP ADDRESS
bind=SERVER IP ADDRESS
masternodeaddr=SERVER IP ADDRESS:51472
Replacing the username and password with your own, and replacing the X’s with the same
MASTERNODEPRIVKEY you used before in masternode.conf.
And third we need to run the wallet and wait for it to fully sync:
to check the current block you are on run
and compare it to the latest block on a blockexplorer.
Now you just need to start it, you will do this with the controlling wallet on your local computer. Start pivx-qt and open the debug console of the controlling wallet, enter
masternode start-many and you should get an output something like this:
“overall” : “Successfully started masternode, failed to start 0, total 1”,
“alias” : “masternode1”,
“result” : “successful”
For troubleshooting and verifying that your masternode is setup correctly, you can follow the steps in this guide.