RESQ Masternode Installation
NOTE: This installation guide is provided as is with no warranties of any kind.
NOTE: This newer version of the script does not ask for IP address or masternode genkey anymore. Instead the script will detect VPS IP Address and generate Masternode Private Key (genkey) automatically. It will also create a 2GB swap file.
If you follow the steps and use a newly installed Ubuntu 16.04 VPS, it will automatically configure and start your Masternode. Ubuntu 17.10 and other Linux distros are not currently supported in this installer
0) Create a new VPS or use existing one. Recommended VPS resource configuration is similar to the vultr's $5/mo (25GB SSD/1xCPU/1GB RAM, Ubuntu 16.04). https://www.vultr.com/?ref=7388052 It can handle several MNs running simultaneously on the same public IP address but they have to use different ports. Therefore you cannot easily run more than one resq MN on the same box. Different coins are fine.
1) In Windows wallet, create a new receiving address and name it mn1 for example.
2) Send exactly 300,000 resq to this new address. NOTE: if you are setting up many masternodes and wish to perform multiple 300k payments in a row before following through steps (3)-(6), make sure you select correct inputs for each payment or lock your 300k coins manually after each payment using Coin Control Features, otherwise your coins may get reused and only last payment will yield valid masternode output. The wallet will lock your payments automatically after you restart it in step (6).
3) View masternode outputs - output transaction ID and transaction index in wallet Debug Console (Tools -> Debug console) by typing:
Copy it somewhere safe. You will use these in the masternode.conf file for your wallet later.
4) Connect to your VPS server console using PuTTY terminal program, login as root and run
bash <(curl https://raw.githubusercontent.com/enginama/resq-masternode-setup/master/resq-install.sh)
NOTE: This process may take anywhere from 5 to 10 minutes, depending on your VPS HW specs. If it's not your very first ever masternode setup, you may want to speed up the process by doing things in parallel. While the MN setup script is running on the VPS, you can spend this time getting ready to start your new masternode from your Hot Wallet (also referred to as Control Wallet) by following instructions in next step (6).
Once the script completes, it will output your VPS Public IP Address and masternode Private Key which it generated for this masternode. Detailed instructions on what to do next will be provided on the VPS console.
6) Prepare your Hot Wallet and start the new masternode. In this step you will introduce your new masternode to the resq network by issuing a masternode start command from your wallet, which will broadcast information proving that the collateral for this masternode is secured in your wallet. Without this step your new masternode will function as a regular resq node (wallet) and will not yield any rewards. Usually you keep your Hot Wallet on your Windows machine where you securely store your funds for the MN collateral.
Basically all you need to do is just edit the masternode.conf text file located in your hot wallet data directory to enter a few masternode parameters, restart the wallet and then issue a start command for this new masternode.
There are two ways to edit masternode.conf. The easiest way is to open the file from within the wallet app (Tools -> Open Masternode Configuration File). Optionally, you can open it from the wallet data folder directly by navigating to the %appdata%/roaming/RESQ. Just hit Win+R, paste %appdata%/roaming/RESQ, hit Enter and then open masternode.conf with Notepad for editing.
It does not matter which way you open the file or how you edit it. In either case you will need to restart your wallet when you are done in order for it to pickup the changes you made in the file. Make sure to save it before you restart your wallet.
Here's what you need to do in masternode.conf file. For each masternode you are going to setup, you need to enter one separate line of text which will look like this:
mn1 231.321.11.22:13200 27KTCRKgqjBgQbAS2BN9uX8GHBu16wXfr4z4hNDZWQAubqD8fr6 5d46f69f1770cb051baf594d011f8fa5e12b502ff18509492de28adfe2bbd229 0
The format for this string is as follow:
masternodealias publicipaddress:13200 masternodeprivatekey output-tx-ID output-tx-index
Where: masternodealias - your human readable masternode name (alias) which you use to identify the masternode. It can be any unique name as long as you can recognize it. It exists only in your wallet and has no impact on the masternode functionality.
publicipaddress:13200 - this must be your masternode public IP address, which is usually the IP address of your VPS, accessible from the Internet. The new script (v1.1) will detect your IP address automatically. The :19988 suffix is the predefined and fixed TCP port which is being used in resq network for node-to-node and wallet-to-node communications. This port needs to be opened on your VPS server firewall so that others can talk to your masternode. The setup script takes care of it. NOTE: some VPS service providers may have additional firewall on their network which you may need to configure to open TCP port 19988. Vultr does not require this.
masternodeprivatekey - this is your masternode private key which script will generate automatically. Each masternode will use its own unique private key to maintain secure communication with your Hot Wallet. You will have to generate a new key for each masternode you are setting up. Only your masternode and your hot wallet will be in possession of this private key. In case if you will need to change this key later for some reason, you will have to update it in your masternode.conf in Hot Wallet as well as in the resq.conf in data directory on the masternode VPS.
output-tx-ID - this is your collateral payment Transaction ID which is unique for each masternode. It can be easily located in the transaction details (Transactions tab) or in the list of your masternode outputs. This TxID also acts as unique masternode ID on the resq network.
output-tx-index - this is a single-digit value (0 or 1) which is shown in the masternode outputs
NOTE: The new MN setup script will provide this configuration string for your convenience. You just need to replace:
mn1 - with your desired masternode name (alias) TxId - with Transaction Id from masternode outputs TxIdx - with Transaction Index (0 or 1)
Use only one space between the elements in each line, don't use TABs.
Once you think you are all done editing masternode.conf file, please make sure you save the changes!
IMPORTANT: Spend some time and double check each value you just entered. Copy/paste mistakes will cause your masternode (or other nodes) to behave erratically and will be extremely difficult to troubleshoot. Make sure you don't have any duplicates in the list of masternodes. Often people tend to speed up the process and copy the previous line and then forget to modify the IP address or copy the IP address partially. If anything goes wrong with the masternode later, the masternode.conf file should be your primary suspect in any investigation.
Finally, you need to either restart the wallet app, unlock it with your encryption password. At this point the wallet app will read your masternode.conf file and populate the Masternodes tab. Newly added nodes will show up as MISSING, which is normal.
Once the wallet is fully synchronized and your masternode setup script on VPS has finished its synchronization with the network, you can issue a start broadcast from your hot wallet to tell the others on resq network about your new masternode.
Todo so you can either run a simple command in Debug Console (Tools -> Debug console):
masternode start-alias <masternodename>
masternode start-alias mn1
Or, as an alternative, you can issue a start broadcast from the wallet Masternodes tab by right-clicking on the node:
Masternodes -> Select masternode -> RightClick -> start alias
The wallet should respond tith "masternode started successfully" as long as the masternode collateral payment was done correctly in step (2) and it had at least 15 confirmations. This only means that the conditions to send the start broadcast are satisfied and that the start command was communicated to peers.
Go back to your VPS and wait for the status of your new masternode to change to "Masternode successfully started". This may take some time and you may need to wait for several hours until your new masternode completes sync process.
Finally, to monitor your masternode status you can use the following commands in Linux console of your masternode VPS:
resq-cli masternode status resq-cli mnsync status