This guide will take you through the process of setting up your masternode on Linux VPS. It is recommended to use Ubuntu 16.0.4 for the Linux VPS. Once you have completed the guide, you will have your masternode set up as a hot/cold wallet set up.
This is the safest way to run a masternode. The hot wallet is hosted on the linux VPS and actually contains no coins.
If you haven't already got the MIRAI QT wallet, download and install the correct version for your local PC operating system.
It's a good idea to run the wallet as administrator: For Windows, right click the mirai-qt.exe, choose Properties>Compatibility tab>Run as Administrator.
Once the wallet is running, let it synchronize. You should also encrypt your wallet with a password. Keep it safe, there is no way to recover it if lost.
When the wallet has fully synchronized, check it against the block explorer to make sure you are on the correct block.
Once you are certain you are on the correct block you will need to transfer the coins for the masternode.
1. Go to: File> Receiving addresses.. Click New. Choose an easy label like MN1, then click OK.
2. Now send exactly 1000 coins to the new address you created.
You need to wait for 1 confirmation before proceeding.
3. Now go to Tools>Debug Console. Type: masternode genkey
4. Copy and paste the results into a text file.
Now back in the debug console,
5. Type: masternode outputs
6. Save the results to the same text file and save the text file.
7. Go to Tools>Open Masternode Configuration File or find it in the AppData folder
Enter the masternode details in the following format:
LABEL VPS-IP:14440 MASTERNODE-GENKEY MASTERNODE-OUTPUTS SINGLE-DIGIT-AFTER-MASTERNODE-OUTPUTS
Here is an example:
MN1 199.299.399.499:14440 4hgFCthisisthegenkeyringtherej4ALV 8e6835thisisthemasternodeoutputsrightthere6bec40a1f 1
The details should be on one line with a single space between each element.
8. Save the masternode.conf file.
Copy the details to a text document if you haven't already. You will need them later.
1. Open Putty and log into your Linux VPS server as Root.
2. Type: apt update && apt upgrade -y
If you are prompted to type, just hit enter.
Once the updates are complete..
3. Type: adduser mymirainode (or whatever you want your username to be)
You will be prompted to add a password. Make sure you remember it. You will need it.
Just hit enter to skip through adding user details
4. Next type: usermod -a -G sudo mymirainode
This gives your new user admin privileges.
5. Close or log out of Putty.
6. Open WinSCP and log into your Linux VPS as mymirainode (or whatever username you chose)
7. Use the link in the 'software requirements' section above to download the MIRAI Ubuntu cli (not the qt).
8. Unzip it and upload the 3 files to your VPS server in the directory that opened by default. (right side window).
9. Once they are uploaded, select all 3 files, right click and choose properties. Tick execute(X) permissions for owner and group. Hit OK
Leave WinSCP open.
10. Back in putty log in as mymirainode (not root).
11. Type ./miraid -daemon
You will receive an error message, but that is expected.
When the daemon attempted to start, it created the data folder and files, which we need to access.
Back in WinSCP:
12. Click the 'find files' button and search for mirai.conf
13. Open it and add the following information:
rpcuser=ANYUSERNAMEYOULIKE
rpcpassword=ANYPASSWORDYOULIKE
listen=1
server=1
daemon=1
staking=0
logtimestamps=1
rpcallowip=127.0.0.1
externalip=LINUX-IP:14440
bind=LINUX-IP:14440
maxconnections=256
masternode=1
masternodeprivkey=YOURMASTERNODEGENKEY
port=14440
14. Replace everything in capitals with your own information.
15. Save the file.
16. Now right click on mirai.conf and choose properties. Tick execute(X) permissions for owner and group. Then click OK.
17. Back in Putty, type ./miraid -daemon again. (If you get an error, check you are still logged in as mymirainode and not root)
You should see a message telling you it has started successfully.
18. Next type: ./mirai-cli getinfo
Look for the line showing blocks and also look at number of connections. Blocks may appear as 0 at first, while the VPS is gaining connections.
If it doesn't change it is likely that you need to open ports 14440 and 14445 to allow the connections.
19. Type this to open the ports:
sudo ufw allow 14440 (if prompted enter your password)
Then
sudo ufw allow 14445
20. Then type the getinfo command again.
Check that the block count matches the block count on the explorer. It's ok if it is just a few blocks difference.
MASTERNODE_NOT_PROCESSED: 0
MASTERNODE_IS_CAPABLE: 1
MASTERNODE_NOT_CAPABLE: 2 (usually an issue with privkey or txid, but occasionally a wallet bug where you need to redo transaction to new wallet address and set up masternode again )
MASTERNODE_STOPPED: 3
MASTERNODE_INPUT_TOO_NEW: 4 (not enough confirmations on masternode collateral transaction)
MASTERNODE_PORT_NOT_OPEN: 6 ( allow port in firewall)
MASTERNODE_PORT_OPEN: 7
MASTERNODE_SYNC_IN_PROCESS: 8 (give walllet time to sync or check addnodes)
MASTERNODE_REMOTELY_ENABLED: 9
Most problems can easily be fixed if you understand the steps you went through to start the masternode.
The transaction for the masternode never leaves your controller wallet. It is matched to the vps through the config files.
If your problem relates to a message about ip or port, or if the masternode details appear incomplete, check the masternode.conf file
If the VPS masternode status is 'waiting for remote activation, check that the 1000 coin transaction has over 16 confirmations.
If the masternode is dropping out of the masternode list, check genkey and outputs for errors.