This guide is updated for MAINNET, mainnet goes live (from block 645,000, approx. 14th March).
While it is possible to set up a “hot node” in which the masternode stores the 5000 DNR collateral, it is more secure and safer to set up a “cold node” in which the masternode runs on a VPS (Virtual Private Server) and the coins stay local in your Windows/Linux wallet. In this way, the IP address associated with the Masternode (which is clearly visible by anyone) is not the IP address where the coins are kept, making a more secure setup. This type of set-up also allows for the controller (local) wallet to be shut down without affecting the masternode.
A main computer (Your everyday computer used for browsing the Internet or your hardcore gaming PC)
Masternode Server (This need to be switched on and connected to the internet 24/7 running on any Linux distro)
2GB of RAM is recommended or 1GB of RAM and 1GB of swap - VPS can hang if the masternode RAM is not enough, your are advised to upgrade the current server package if this occurs.
A different IP address for EACH masternode (only applicable if you plan to run more than one DNR masternode)
(Guide will use Windows as main wallet and Ubuntu Server 16.04 LTS for the VPS)
I am using Alpharacks, they offer cheap servers along with great service! Check them out for completive offers. Please use my referral link.
For this guide, I’m going to refer to the main computer’s wallet as the main wallet, and the VPS’s wallet as the masternode wallet.
The main wallet will hold all Denarius used to run the masternode. Ensure you open the main wallet in cmd and use -testnet!
Sending masternode collateral and configuring .conf files - Main wallet
1. Make sure your wallet is fully synced before proceeding further. Using the main wallet, enter the debug console (Help > Debug window). This step will generate a masternode private key, please note this down and this will be required later. Type the following command:
2. Get masternode address for your masternode. Replace masternodename with your desired masternode name.
3. Send from your wallet exactly 5,000 DNR to the address you generated from step 2. Ensure you get 20 confirmation before proceeding.
4. Get the outputs of the transaction of the 5,000 DNR send to your masternode address. The long hash is your Transaction Hash and the number after is the Transaction Index. Please note this down and this will be required later.
5. Navigate to your users Roaming folder. Copy and paste %AppData% This should show you the Roaming folder and find Denarius folder.
6. In the denarius folder we will create a denarius.conf file, if it is has not been created already. Copy and paste the configuration below to your denarius.conf file. Make sure to replace the values that are unique to your node without “< >”.
masternodeprivkey=<private key generated in step 1>
7. Create and save another configuration file called masternode.conf in the same location as denarius.conf.
<Alias name of your choice> <VPS IP address>:9999 <Private Key from step 1> <TransactionHash from step 4> <Transaction Index from step 4>
Example: MNDNR 184.108.40.206:9999 DF92WPpkqbr7s6Si4fdsfssjjapuFzAXwETCrpPJubnrmU6aKzh c8f4965ea57a68d0e6dd384324dfd28cfbe0c801015b973e7331db8ce018716999 1
8. Ensure you close or restart your main wallet.
Compile Denarius daemon test masternode on VPS - Masternode wallet
Ensure your VPS is secured; here is a few steps you can take to secure your VPS. There are plenty more way to ensure your VPS is watertight, research via google. this cold node setup will also ensure your coins are not on VPS.
9. Ensure the required dependencies for compiling the masternode daemon are installed:
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get -y install libdb4.8++-dev
sudo apt-get install build-essential libssl-dev libdb++-dev libboost-all-dev libminiupnpc-dev libqrencode-dev -y
Any issues or difficulties with dependencies - see @KawaiiCrypto comments.
10. Download the relevant files and initiate the compile commands, this can take some time depending on the performance of your VPS (up to 30mins):
git clone https://github.com/carsenk/denarius
git checkout master
make -f makefile.unix
11. Once the compiling is complete and you should be still in the "~/denarius/src” directory. Denarius daemon will need to be started. This ensures that the ~/.denarius/ folder and required files are setup. Beware - Denarius daemon will not start up because the denarius.conf file has not been configured.
12. Ignore the message about unable to start, as this is normal and we will specify the configuration information now. Edit the denarius.conf file on the masternode wallet, you can use any linux text editor. I use vi in the example below.
13. Copy and paste the configuration below to your denarius.conf file. Make sure to replace the values that are unique to your node without “< >”. Ensure that rpcuser and rpcpassword are different than you had specified in the main wallet.
masternodeprivkey=<private key generated in step 1>
14. Start your Denarius daemon.
Start masternode remotely - Main wallet
15. From your main computer, go to the debug console and verify masternode.conf file is setup properly.
Make sure the data output here matches the information entered in the masternode.conf file. If not, edit the file and correct the data. You will have to restart the main wallet, if you update the masternode.conf file. If the masternode configuration matches then we can finally start the masternode.
16. Start the masternode by executing the following:
masternode start-alias <alias name specified in masternode.conf>
17. If the output says “masternode is stopped” then run the following command:
Verify on VPS masternode - Masternode wallet
18. To ensure the masternode is running properly you can use the debug and status commands:
./denariusd masternode debug
If there are no issues, there should be a message returned with no problems found.
./denariusd masternode status
You should get a status 1 if the masternode is active and there is no issue!
19. You can see if your masternode is listed on the main wallet - Masternode Icon > Denarius Network tab. If it does not appear straight away, give it 30mins and restart the wallet to check if your masternode shows up on the list.
Note: You do not need to leave your main wallet (windows QT) open. The Denarius daemon/masternode will run independently once remotely activated from main wallet.
Congratulations! That's it, your cold node setup is successfully complete!
Thanks to @buzzkillb whose "hot node" guide I have brought from DNR Masternode Setup.