DigitalNote Masternode Setup
Guide
Guide Version 1.0
Written by the DigitalNote Team
(Please Note: This guide assumes that you are operating on a Windows based Operating System, others will be similar in
configuration but may differ in some areas. Take heed of notes throughout this document as it will pertain to changes in setup
for other operating systems such as Mac OSX or Linux.)
Contents
Introduction
Local Wallet Setup
Preparation
Setup wallet (locally stored coins)
Setup wallet (3rd party stored coins)
Information gathering
Hot Wallet Setup (VPS)
Preparation Compiling
Linux VPS daemon
Run DigitalNote Daemon
Get DigitalNote Daemon status
Stop DigitalNote Daemon
Activate Masternode
Conclusion
Appendix A – NTP Lockdown for your Masternode
Recording your regions time servers
Install NTP service
IPTABLES Update
Introduction
Welcome to the DigitalNote (XDN) Masternode setup guide. This document is intended to provide you
with a step by step instructional manual in which to aid you in your launch of a Masternode for the XDN
network. Though there are many different ways to configure and launch a Masternode we will be using
the most secure and stable method known and not exploring any advanced or custom configurations.
For more advanced configurations please refer to Google available documentation in regards to
Masternodes and their operation as well as possible configurations. This is done as to provide our
community with the most stable method possible and thus hopefully avoid many possible issues and
confusion with running your own Masternode.
A brief rundown of this document and what it covers are as follows in this paragraph. First configuring
your local wallet or, in other words the one you have running on your current computer that you use for
your blockchain applications. With your local wallet configured and the collateral sent to your
Masternode address you are ready to setup the “hot” side of the wallet and launch the Masternode. To
do so this document will guide you through how to setup a VPS (Virtual Private Server) which is what
this guide is assuming you will be using no matter what your local device is that you run your blockchain
applications from. If you are do not wish to use a VPS this documentation will not be of much use
beyond local wallet configuration. Please understand that again this is done in order to provide the best
possible method in which to operate a Masternode.
Though this document is created with the best of intentions and designed to be easy to understand and
follow along DigitalNote would like to stress that we are not liable for any issues that you run into or for
lost coins during any part of the procedure. If you experience issues or have questions, we encourage
you to reach out to us through our contact areas such our Discord server (https:// discord.gg/4dUquty)
or Bitcointalk thread (https://bitcointalk.org/index.php?topic=4451957.0) as we will do our best to
assist you beyond the scope of this document. By continuing on into this guide it is assumed that you,
the reader understands the above statements and are in agreement to them.
(Please Note: You will need at least 2,000,000 or Two Million XDN in order to operate a Masternode, before continuing this
guide please verify that you have this amount in ONE wallet so that you may later send the proper collateral to lock!)
Local Wallet Setup
Preparation
If you haven’t already downloaded and ran the DigitalNote wallet please do so by visiting the releases
page of our GitHub available here: https://github.com/DigitalNoteXDN/DigitalNote-2/releases.
Open your DigitalNote wallet and then proceed to left-click the “Help” tab followed by the “Open Data
Dir” option from the drop-down menu that appears. In the window that should have just opened now
you will see several different files and directories. This is your Data directory which stores all the
important information about your application including your coin balance. Please follow along carefully
to avoid any kind of possible issues and DO NOT delete your “wallet.dat” EVER!
If you have coins already on your local wallet.dat and that is where you’ll be sending your collateral lock
from you have two options before proceeding. This is done as sending to one’s self from the same
wallet will not actually load a transaction onto the blockchain as this is considered an improper use of
network load and will just shuffle coins internally. Shuffling coins internally however will not create the
transaction or other vital data that is required to launch a Masternode. Please choose ONE and follow
along the below options to avoid issues. Before you begin please make sure to open a text editor such
as Notepad to keep information in there while you setup your Masternode.
If you do NOT already have coins on your local wallet and are sending them from somewhere else (such
as an exchange) you may skip the “Setup Wallet (locally stored coins)” section and its steps. Simply
proceed to the “Setup Wallet (3rd party stored coins)”.
One last thing! It is HIGHLY recommend disabling staking WHILE you’re setting up your new
Masternode. Once it’s setup you can stake again as the collateral transaction will be locked but until it’s
locked by the Masternode it has the chance of staking as staking is enabled by default and is user
defined to be turned off.
To turn off staking simply go to the “Settings” tab and select “Options” from the dropdown menu that
appears. Put in an amount over your balance amount in the “Reserve” row and then select “Apply” and
“Ok” to apply the changes. This will ask your wallet to reserve your balance and not stake it. You can
later set this back to “0” so that you stake.
Setup Wallet (locally stored coins)
Options:
1. Create a new wallet.dat and send your collateral lock to it so it can be sent back to your main
wallet.
2. Create a new wallet.dat and send the collateral directly to the new wallet which will be used as
the masternode control wallet and stay independent of your main wallet.
Option 1:
a. With your data directory open from the previous steps locate the file that says
“wallet.dat” and take note of it as we will be renaming it in some of the next steps.
(Please note: if you are using a Windows based operating system and do not see a “wallet.dat” and instead see
“wallet” with no “.dat” please follow this guide and then continue with the masternode setup guide you’re using now:
https://www.thewindowsclub.com/show-file-extensions-in-windows )
b. Go ahead and close your DigitalNote wallet that is running and make sure you don’t see
it running anywhere (for instance accidently minimized instead of closed). Now that your
wallet is off go back to your data directory window that should still be open and rename your
“wallet.dat” file to something like “wallet.dat.main” so that we do not remove your original data
file with your coins.
c. Once this is complete simply turn your wallet on again and let it run through the
extended loading process where it creates a new wallet.dat for you automatically. You’ll know
it’s complete once the wallet opens and shows you the standard interface you saw before with
the other wallet.dat but of course this time it won’t have any balance.
d. As we’ll be sending coins back to your main wallet and not using this for anything other
than a temporary storage location open your text editor as mentioned in the previous part of
this document and copy your “Receive” address by first left clicking on the “Receive” tab in the
left hand column then right clicking on the row with the address in the wallet interface and
selecting “copy address”.
e. After you have pasted the address into your text editor go ahead and shut down your
wallet again (just close it and make sure it’s not running in the background). Open up your data
directory again. You should now see two (2) wallet.dat files. One named “wallet.dat” and the
other named “wallet.dat.main” or what you have named it from the previous steps.
f. Now rename the current “wallet.dat” to something like “wallet.dat.temp” followed by
renaming the “wallet.dat.main” back to “wallet.dat” so that it’s loaded instead of the
temporary wallet data file we were just using. With this complete start up the wallet again and
send AT LEAST one (1) coin over the 2,000,000 XDN collateral lock amount to the address for
the other wallet data file you put in your text editor document.
g. While you’re waiting for the transaction to confirm we need to do a few more steps in
your wallet for launching the masternode. First open the “Help” tab and select “Debug
Window”. In the window that appears select the “Console” tab and follow the below sub-
instructions.
i. Type in: getaccountaddress mn01 and hit “enter” on your keyboard (copy the
output into your text editor).
ii. Type in: masternode genkey and hit “enter” on your keyboard (copy the output
into your text editor).
h. Once the transaction has been confirmed (15 confirmations) close your wallet and
repeat the process done in the previous steps to load your other wallet data file. For example,
rename “wallet.dat” to “wallet.dat.main” again and then “wallet.dat.temp” to “wallet.dat”.
Now start the wallet again and send EXACTLY 2,000,000 to the “mn01” address that was
created with the previous step and wait until it’s confirmed (15 transactions).
i. Switch back to your “main” wallet data file, once more for example rename “wallet.dat” to
“wallet.dat.temp” and then “wallet.dat.main” to “wallet.dat”. Remember to close your wallet
before doing this!
j. Open your wallet again and click on the “Help” tab like in the past and once more select
“Debug Window”. As before click on the “Console” tab in the window that appears and follow
the below sub-instructions.
i. Type in: masternode outputs and hit “enter” on your keyboard (copy the output
into your text editor).
k. Please continue to the “Information Gathering” section of the guide.
(2) aa. With your data directory open from the previous steps locate the file that says “wallet.dat”
and take note of it as we will be renaming it in some of the next steps.
(Please note: if you are using a Windows based operating system and do not see a “wallet.dat” and instead see
“wallet” with no “.dat” please follow this guide and then continue with the masternode setup guide you’re using now:
https://www.thewindowsclub.com/show-file-extensions-in-windows )
a. Go ahead and close your DigitalNote wallet that is running and make sure you don’t see
it running anywhere (for instance accidently minimized instead of closed). Now that your wallet
is off go back to your data directory window that should still be open and rename your
“wallet.dat” file to something like “wallet.dat.main” so that we do not remove your original data
file with your coins.
b. Once this is complete simply turn your wallet on again and let it run through the
extended loading process where it creates a new wallet.dat for you automatically. You’ll know
it’s complete once the wallet opens and shows you the standard interface you saw before with
the other wallet.dat but of course this time it won’t have any balance.
c. Since we’ll be using this wallet data file for our masternode we need to run a few more
commands while we have it open, first open the “Help” tab and select “Debug Window”. In the
window that appears select the “Console” tab and follow the below sub-instructions.
i. Type in: getaccountaddress mn01 and hit “enter” on your keyboard (copy the
output into your text editor). ii. Type in: masternode genkey and hit “enter” on your
keyboard (copy the output into your text editor).
d. Go ahead and shut down your wallet again (just close it and make sure it’s not running
in the background). Open up your data directory again. You should now see two (2) wallet.dat
files. One named “wallet.dat” and the other named “wallet.dat.main” or what you have named
it from the previous steps.
e. Now rename the current “wallet.dat” to something like “wallet.dat.mn01” followed by
renaming the “wallet.dat.main” back to “wallet.dat” so that it’s loaded instead of the
masternode wallet data file we were just using. With this complete start up the wallet again and
send EXACTLY 2,000,000 XDN collateral lock amount to the address for the other wallet data file
you put in your text editor document (the mn01 output, not genkey).
f. Once the transaction has been confirmed (15 confirmations) close your wallet and
repeat the process done in the previous steps to load your other wallet data file. For example,
rename “wallet.dat” to “wallet.dat.main” again and then “wallet.dat.mn01” to “wallet.dat”.
Now start the wallet again and click on the “Help” tab like in the past and once more select
“Debug Window”. As before click on the “Console” tab in the window that appears and follow
the below sub-instructions.
i. Type in: masternode outputs and hit “enter” on your keyboard (copy the output
into your text editor).
j. Please continue to the “Information Gathering” section of the guide.
Setup Wallet (3rd party stored coins)
1. We need to do a few steps in your wallet for launching the masternode. First open the “Help”
tab and select “Debug Window”. In the window that appears select the “Console” tab and
follow the below sub-instructions.
i. Type in: getaccountaddress mn01 and hit “enter” on your keyboard (copy the
output into your text editor). ii. Type in: masternode genkey and hit “enter” on your
keyboard (copy the output into your text editor).
2. Now send EXACTLY 2,000,000 XDN collateral amount to the “mn01” address from whatever
3rd party host is storing your XDN.
3. Once the transaction has been confirmed (15 confirmations) click on the “Help” tab like in the
past and once more select “Debug Window”. As before click on the “Console” tab in the
window that appears and follow the below sub-instructions.
i. Type in: masternode outputs and hit “enter” on your keyboard (copy the
output into your text editor).
4. Please continue to the “Information Gathering” section of the guide.
Information Gathering
It is important to make sure that you have your getaccountaddress mn01, masternode genkey, and
masternode outputs all readily available in your text editor.
Hot Wallet Setup (VPS)
Preparation
In this guide we will be using a VPS company called “DigitalOcean”. There are many VPS providers but, in
this guide, we will focus on using this particular company due to ease of use. Please visit
https://cloud.digitalocean.com/registrations/new and continue this guide after you’ve created your
account.
This guide has been tested on Ubuntu versions 16.04.06 and 18.04 using the following tools:
PuTTy (https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html)
PuTTyGen (https://www.puttygen.com/) ** If creating SSH keys
WinSCP (https://winscp.net/eng/index.php)
It is recommended that you familiarise yourself with the above products, or similar ones of your choice.
Steps
1. Once you’re logged into your DigitalOcean account click on the green “Create” at the top right-hand
side of the screen and select “Droplets” from the drop-down menu.
2. Choose an Image
3. Click on the (arrow) that’s to the left of the pricing until you see “$5/mo” price and click to select it.
4. Select a region to host your masternode
5. Select your authentication, it is strongly recommended to use SSH to connect to your
masternode (instead of just username and password) However this is your choice. Please refer to the
following two links for more information about setting up your SSH access
https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/create-with-putty/
https://www.digitalocean.com/docs/droplets/how-to/add-ssh-keys/to-account/
6. It is recommended to enable backups. Please note this is an additional cost.
7. Scroll down to the bottom and name your server, also assign it to a Project. Finally Select the large
green “Create” button and wait for the droplet to be created.
8. Now click on the “droplets” tab from the left-hand column and then click on the name of the droplet
that was just created followed by copying the “ipv4” (VPS IP address) to your text editor.
9. Open DigitalOcean Console (if using username or password) or PuTTy and Log in using the credentials
emailed to you by DigitalOcean for your VPS (for password only) or using the SSH key configured
above (if you chose that option)
Compiling Linux VPS Daemon
For the below process you will require your masternode genkey that you recorded earlier.
Once logged in, type:
sudo -i
git clone https://github.com/rubber-duckie-au/xdn-installer.git
cd xdn-installer
sudo bash xdn-installer.sh
The script will run through an automated install of the components required to achieve a running
masternode. You will be prompted for:
Your masternode genkey (if fresh install)
An RPC Username (make one up or leave empty to have one autogenerated)
An RPC Password (complex password or leave empty to have one autogenerated)
Once complete the script will start your daemon. for future reference, the below commands are most
commonly used:
Run DigitalNote daemon
cd ~; DigitalNoted
Get DigitalNote daemon status
cd ~; DigitalNoted getinfo
Stop DigitalNote daemon
cd ~; DigitalNoted stop
If at any time you need to update your Masternode (e.g. new wallet version) simply re-run the xdn-
installer.sh script.
Activate Masternode
Now that we’ve setup the VPS and by doing so configured and launched the daemon on it lets focus
back on the local wallet at your computer (you can close your VPS console and/or browser). Back at the
wallet we need to do just a few final steps before you can activate your masternode.
1. With your wallet open on your local computer click on the “Masternodes” tab in the left-hand
column of the wallet and then click on “Create…” located at the top left of the view panel that
appears.
2. Enter the information we’ve previously gathered without any “” symbols just enter the data
itself, for example:
a. Alias = mn01 or whatever we want to call the masternode e.g. mn01
b. Address = your VPS IP and port (used in previous section) e.g. 192.168.1.113:18092
c. PrivKey = your masternode genkey output (not the mn01 key) e.g.
5rpU9o7Fr2icwdmRtVCwxoiQrsMzvTJQxkb8RmvV2MDLXRJRq5b
d. TxHash = your masternode outputs output (the long string not the number at the end)
e.g. 0b3428c5b1dba8deb729541265e1d36b2598d056e63899b83087a61f114d50fa
e. Output Index = either 1 or 0 (found at the end of masternode outputs output) e.g. 1
3. Once you’ve verified the information input into the window click on “Okay” and go back to the
“Masternodes” tab we were just on.
4. Click on “Update” at the bottom of the view, if everything was done correctly and you followed
every part of this guide you should see your masternode show up and state “Not in the
masternode list”.
5. Next select your masternode that has shown up in the window and then click “Start” at the
bottom of the wallet. You will receive a “mn01 Started Successfully” if everything was done
correctly!
Conclusion
Now that you have followed through this rather lengthy but all-inclusive guide you should have a
successfully started and operating masternode. Please bear in mind once again that you will NOT always
receive a reward every block but that you will definitely see rewards come in as the network makes sure
all masternodes are eventually compensated.
Thank you very much for being a part of this community and project and please ask any questions if you
need help with something relating to your experience with XDN.
Appendix A – NTP Lockdown for your Masternode
**Please Note – This is an outline of what the automated NTP install does in the xdn-installer script. It
is purely for informational purposes, or if you wish to perform these steps manually***
NTP (time sync) traffic is received by your server through Port 123. This port is prone to attacks and
securing it is essential for a healthy masternode.
Although step 2 in the masternode script partially automates this lockdown, we will set out below how
to do this manually. This section is directed at the novice who is not familiar with locking down ports
and securing using linux, and hopes to give a basic locked state resulting in your masternode being
functional and a little more secure than out of the box. It is recommended that you let the automated
installer script perform these steps if you are unfamiliar with updating and configuring files and services
in Linux
Although there are several time services out there, this guide will specifically use the NTP application
and details from
Recording your regions time servers
Navigate to https://www.pool.ntp.org/zone/@ and select the zone and region your masternode VPS is
in.
For example, if your masternode was in Australia, you would click on Oceania and then Australia. This
will reveal you local time server pools. In this example they are:
server 0.au.pool.ntp.org
server 1.au.pool.ntp.org
server 2.au.pool.ntp.org
server 3.au.pool.ntp.org
Record your regions time server lines into notepad. They will be used later in this guide.
Install NTP service
On your masternode, login with putty if you have not already done so.
Run the following commands (waiting for each to complete)
sudo apt-get update
sudo apt-get install ntp ntpdate
sudo ufw allow 123/udp
Using either WinSCP or nano, open the file /etc/ntp.conf (command for nano is sudo nano
/etc/ntp.conf)
Navigate to the section below and replace the red lines with the lines gathered from www.pool.ntp.org
in the previous step.
# Use servers from the NTP Pool Project. Approved by Ubuntu
Technical Board
# on 2011-02-08 (LP: #104525). See
http://www.pool.ntp.org/join.html for
# more information.
pool 0.ubuntu.pool.ntp.org iburst
pool 1.ubuntu.pool.ntp.org iburst
pool 2.ubuntu.pool.ntp.org iburst
pool 3.ubuntu.pool.ntp.org iburst
Following on from our example of Australia, the new lines will read:
server 0.au.pool.ntp.org iburst
server 1.au.pool.ntp.org iburst
server 2.au.pool.ntp.org iburst
server 3.au.pool.ntp.org iburst
Finally comment out (by adding a ‘#’) the line below that section that specifies the fallback pool:
# Use Ubuntu's ntp server as a fallback.
#pool ntp.ubuntu.com
Save the file and restart the NTP service using the following command
sudo systemctl restart ntp.service
IPTABLES Update
The following commands will drop all connections to your machine through port 123 that are NOT your
time sync server pools. Executing the following commands will harden port 123 from known attacks.
Again, following our previous example, the iptables entries for the Australian NTP servers are as follows:
sudo ufw allow 123/udp
iptables -A INPUT -p udp --destination-port 123 -j DROP
iptables -A INPUT -p udp -s 0.au.pool.ntp.org --sport ntp -m state
--state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p udp -d 0.au.pool.ntp.org --sport ntp -m state
--state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp -s 1.au.pool.ntp.org --sport ntp -m state
--state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p udp -d 1.au.pool.ntp.org --sport ntp -m state
--state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp -s 2.au.pool.ntp.org --sport ntp -m state
--state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p udp -d 2.au.pool.ntp.org --sport ntp -m state
--state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp -s 3.au.pool.ntp.org --sport ntp -m state
--state ESTABLISHED -j ACCEPT
iptables -A OUTPUT -p udp -d 3.au.pool.ntp.org --sport ntp -m state
--state NEW,ESTABLISHED -j ACCEPT