* This simple guide is valid for setting up a paying masternode (yeeeees! )
* For newest Darkcoin ONYX version
* Masternode works as a combination of local/remote
* Local is home windows pc with actual wallet holding 1K DRK (which for security sake, goes offline/cold, once linux side is activated). View the local side only as a enabler of masternode.
* Remote is linux server with empty wallet, that works as actual masternode 24/7
For Linux server, I am using VULTR. Why VULTR instead of Amazon EC2? In short: simpler, cheaper, better. In detail: Vultr is awesome new self-provisioning, budget, virtual private server (VPS) provider. Built upon infrastructure of gameservers.com, they offer 12+ locations around the globe, many server/OS configurations all with fast SSD drives...
VPS can be obtained from $5/month (charged hourly at $0.007/hour) - making it 3x cheaper than Amazon EC2 where t1.micro starts at $0.02/hour. Additionally, currently they have 2 for 1 deposit bonus! So, deposit $10, and get $20 of credits - enough to run your VPS for 4 months!
I used many VPS providers (including DigitalOcean and Amazon), and I prefer VULTR, because it has clean interface and great features (snapshots, own OS installation from ISO image, windows instances...). I am impressed with them, and so was everyone who tried them.
If you and want to give back to author of this guide, sign up at Vultr thru my affiliate link here. Otherwise this is direct link. Guide should work with any linux server provider.
In case of question or comments, please post below. I do accept donations . See signature for details. Thank you, now let’s get started!
---
!!!!!!!!!!!!!!!!!!
ALWAYS DO A BACKUP OF WALLET.DAT if you already have darkcoins on your computer.
Double think before overwriting/deleting anything, as there is no way back...
Never copy wallet.dat WHEN darkcoind/darkcoin-qt is running! Use BACKUP WALLET command within darkcoin-qt.exe instead.
!!!!!!!!!!!!!!!!!!
1. PREPARATION OF LOCAL / Windows PC:
I presume you start with fresh windows (if you don't, take precautions with backing up existing darkcoin related files, especially wallet.dat).
Install latest version of windows darkcoin-qt.exe, (as found on https://www.darkcoin.io/downloads/).
Move file to new directory c:\darkcoin
Run it. Wait that application synchronizes with network... Should be within few minutes.
Click on "Help"->"Debug window" - and then in Debug window, click on second tab named "Console".
enter: masternode genkey and press enter.
You should see a long string, copy it to notepad, as you will need it later when putting together darkcoin.conf (referenced as XXXXXXXXXXXXXXXXXXXXXXXXXXXXX in there).
enter: getaccountaddress 0 and press enter.
You will generate new darkcoin receiving address within your wallet. This is the address marked with 0, so called “zero address” of your wallet! Copy it to notepad again, you will need it later to transfer 1000 drks to this address.
Close console. In main windows click on "Settings"->"Encrypt Wallet".
Enter your password, and repeat it (I suggest that you try password in notepad, and copy/paste it in the verify window, just so that you visually reconfirm what you typed). Don't forget password! If you do, there is no way to get DRK in this wallet back!
It is normal, that darkcoin-qt.exe now closes, so that it can encrypt the wallet.
Re-run darkcoin-qt.exe, and immediately go to "File"->"Backup Wallet...".
Select path, and backup the wallet.
After you verified that actual file was created, backup it offline (copy it on few USB thumbdrives, or other secure location)!
Now, you need to put 1000 DRKs to your wallet, in order to enable masternode! From your other darkcoin wallet (or from exchange where you bought DRK, send 1000 DRK to zeroth address you just created in previous steps). 1000 DRK must be transferred in one transaction, in ONE piece!!!! Not first 1, and then 999! It has to be 1000 in one transaction, or you will have problems later (you will see "not capable masternode" error message).
ONCE YOU COMPLETED TRANSFER OF 1000 DRK to your ZEROTH ADDRESS obtained above, wait that you get 6 confirmations (you will see that in main window, if you click on "Transactions" tab.) It takes around 6*2.5 min = 15 minutes. You don’t have to wait with for it, so close application, and go to next step.
2. PREPARATION OF REMOTE / Linux server:
Login to your Vultr.com account.
Click Deploy New Instance
Select server type: Performance
Select datacenter location: any you wish, if you have more than one try to spread them around the world.
Select OS: I recommend ubuntu 14.04, 64-bit! Precompiled darkcoind and darkcoin-qt binaries work on all LTS 64-bit ubuntus (but not on CentOS 6/5)...
Select server size: minimum configuration (1 cpu/768MB RAM) for $5/month works perfectly.
It will take 30 seconds for server to come online. Click “My Servers” tab, and “Manage” button server is active, click “View Console”, and login with supplied root password (listed below). Note, that you also see IP address for the server here.
First thing to do is change the root password, and create a new user under which darkcoin daemon will run (in my case jack):
passwd root
adduser jack
passwd jack
In order to be able to copy/paste into server, I suggest you now connect to server via PuTTY or other SSH client.
Login with newly created normal user, then enter:
su –
to become root, then secure your server.
At minimum, use IPTABLES to close inbound ports with exception of 22 and 9999. To do this use the VI editor with this command:
vi firewall.sh
For help google VI editor commands (ESC+key sequences) Copy/paste the following code into file. :
-----
IIP=`/sbin/ifconfig eth0 |sed --silent 's/.*inet addr:\(.*\) \ Bcast.*/\1/p'`
IPTABLES="/sbin/iptables"
echo "Activating firewall for $IIP"
echo 0 > /proc/sys/net/ipv4/ip_forward
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP
$IPTABLES -P FORWARD DROP
$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A OUTPUT -o lo -j ACCEPT
$IPTABLES -A INPUT -s $IIP/32 -j ACCEPT
$IPTABLES -A OUTPUT -s $IIP/32 -j ACCEPT
$IPTABLES -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A INPUT -d $IIP/32 -m multiport -p tcp --ports "22,9999" -j ACCEPT
$IPTABLES -A OUTPUT -s $IIP/32 -m multiport -p tcp --ports "22,9999" -j ACCEPT
-----
And run it:
chmod +x firewall.sh
./firewall.sh
Later, when everything is running, you can for additional security do the following:
* If you have static IP at home, you can leave port 22 (ssh) open only for your static IP (google it how).
* If you dont have static IP, I suggest you install something like knock (http://www.zeroflux.org/projects/knock).
* Or you can even close the port 22 completely, as you can always reach machine thru vultr’s web management, with View Console.
Enter:
exit
to go back to normal user.
To install latest version of darkcoin linux binary, (copy link location from already mentioned https://www.darkcoin.io/downloads/).
File will vary with each darckoin release version. To download the file to linux do this (substitute file name with actual link you got in previous step):
wget --no-check-certificate https://raw.githubusercontent.com/darkcoinproject/darkcoin-binaries/master/darkcoin-0.10.15.13-linux.tar.gz
then continue with unpacking, and copy the darkcoind daemon binary into your home directory, and make it executable:
tar zxvf darkcoin-0.10.15.13-linux.tar.gz
mv darkcoin-0.10.15.13-linux/bin/64/darkcoind .
chmod +x ./darkcoind
Create new file .darkcoin/darkcoin.conf file:
vi .darkcoin/darkcoin.conf
and paste the following in it:
---------
rpcuser=enter-new-LONG-RANDOM-STRING-fisjfijyou_should_change_this
rpcpassword=enter-new-LONGER-RANDOM-STRING-fissjfijyou_should_change_this
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
masternodeprivkey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
addnode=23.23.186.131
------------
But substitute the long XXXXXXXXXXXXXXXXXXXXXXXX string, with your privkey (obtained from windows local machine.
Make it read only for additional security:
chmod 444 darkcoin.conf
run darkcoind daemon:
./darkcoind
continues...
* For newest Darkcoin ONYX version
* Masternode works as a combination of local/remote
* Local is home windows pc with actual wallet holding 1K DRK (which for security sake, goes offline/cold, once linux side is activated). View the local side only as a enabler of masternode.
* Remote is linux server with empty wallet, that works as actual masternode 24/7
For Linux server, I am using VULTR. Why VULTR instead of Amazon EC2? In short: simpler, cheaper, better. In detail: Vultr is awesome new self-provisioning, budget, virtual private server (VPS) provider. Built upon infrastructure of gameservers.com, they offer 12+ locations around the globe, many server/OS configurations all with fast SSD drives...
VPS can be obtained from $5/month (charged hourly at $0.007/hour) - making it 3x cheaper than Amazon EC2 where t1.micro starts at $0.02/hour. Additionally, currently they have 2 for 1 deposit bonus! So, deposit $10, and get $20 of credits - enough to run your VPS for 4 months!
I used many VPS providers (including DigitalOcean and Amazon), and I prefer VULTR, because it has clean interface and great features (snapshots, own OS installation from ISO image, windows instances...). I am impressed with them, and so was everyone who tried them.
If you and want to give back to author of this guide, sign up at Vultr thru my affiliate link here. Otherwise this is direct link. Guide should work with any linux server provider.
In case of question or comments, please post below. I do accept donations . See signature for details. Thank you, now let’s get started!
---
!!!!!!!!!!!!!!!!!!
ALWAYS DO A BACKUP OF WALLET.DAT if you already have darkcoins on your computer.
Double think before overwriting/deleting anything, as there is no way back...
Never copy wallet.dat WHEN darkcoind/darkcoin-qt is running! Use BACKUP WALLET command within darkcoin-qt.exe instead.
!!!!!!!!!!!!!!!!!!
1. PREPARATION OF LOCAL / Windows PC:
I presume you start with fresh windows (if you don't, take precautions with backing up existing darkcoin related files, especially wallet.dat).
Install latest version of windows darkcoin-qt.exe, (as found on https://www.darkcoin.io/downloads/).
Move file to new directory c:\darkcoin
Run it. Wait that application synchronizes with network... Should be within few minutes.
Click on "Help"->"Debug window" - and then in Debug window, click on second tab named "Console".
enter: masternode genkey and press enter.
You should see a long string, copy it to notepad, as you will need it later when putting together darkcoin.conf (referenced as XXXXXXXXXXXXXXXXXXXXXXXXXXXXX in there).
enter: getaccountaddress 0 and press enter.
You will generate new darkcoin receiving address within your wallet. This is the address marked with 0, so called “zero address” of your wallet! Copy it to notepad again, you will need it later to transfer 1000 drks to this address.
Close console. In main windows click on "Settings"->"Encrypt Wallet".
Enter your password, and repeat it (I suggest that you try password in notepad, and copy/paste it in the verify window, just so that you visually reconfirm what you typed). Don't forget password! If you do, there is no way to get DRK in this wallet back!
It is normal, that darkcoin-qt.exe now closes, so that it can encrypt the wallet.
Re-run darkcoin-qt.exe, and immediately go to "File"->"Backup Wallet...".
Select path, and backup the wallet.
After you verified that actual file was created, backup it offline (copy it on few USB thumbdrives, or other secure location)!
Now, you need to put 1000 DRKs to your wallet, in order to enable masternode! From your other darkcoin wallet (or from exchange where you bought DRK, send 1000 DRK to zeroth address you just created in previous steps). 1000 DRK must be transferred in one transaction, in ONE piece!!!! Not first 1, and then 999! It has to be 1000 in one transaction, or you will have problems later (you will see "not capable masternode" error message).
ONCE YOU COMPLETED TRANSFER OF 1000 DRK to your ZEROTH ADDRESS obtained above, wait that you get 6 confirmations (you will see that in main window, if you click on "Transactions" tab.) It takes around 6*2.5 min = 15 minutes. You don’t have to wait with for it, so close application, and go to next step.
2. PREPARATION OF REMOTE / Linux server:
Login to your Vultr.com account.
Click Deploy New Instance
Select server type: Performance
Select datacenter location: any you wish, if you have more than one try to spread them around the world.
Select OS: I recommend ubuntu 14.04, 64-bit! Precompiled darkcoind and darkcoin-qt binaries work on all LTS 64-bit ubuntus (but not on CentOS 6/5)...
Select server size: minimum configuration (1 cpu/768MB RAM) for $5/month works perfectly.
It will take 30 seconds for server to come online. Click “My Servers” tab, and “Manage” button server is active, click “View Console”, and login with supplied root password (listed below). Note, that you also see IP address for the server here.
First thing to do is change the root password, and create a new user under which darkcoin daemon will run (in my case jack):
passwd root
adduser jack
passwd jack
In order to be able to copy/paste into server, I suggest you now connect to server via PuTTY or other SSH client.
Login with newly created normal user, then enter:
su –
to become root, then secure your server.
At minimum, use IPTABLES to close inbound ports with exception of 22 and 9999. To do this use the VI editor with this command:
vi firewall.sh
For help google VI editor commands (ESC+key sequences) Copy/paste the following code into file. :
-----
IIP=`/sbin/ifconfig eth0 |sed --silent 's/.*inet addr:\(.*\) \ Bcast.*/\1/p'`
IPTABLES="/sbin/iptables"
echo "Activating firewall for $IIP"
echo 0 > /proc/sys/net/ipv4/ip_forward
$IPTABLES -F
$IPTABLES -t nat -F
$IPTABLES -t mangle -F
$IPTABLES -X
$IPTABLES -t nat -X
$IPTABLES -t mangle -X
$IPTABLES -t nat -P POSTROUTING ACCEPT
$IPTABLES -t nat -P PREROUTING ACCEPT
$IPTABLES -t nat -P OUTPUT ACCEPT
$IPTABLES -P INPUT DROP
$IPTABLES -P OUTPUT DROP
$IPTABLES -P FORWARD DROP
$IPTABLES -A INPUT -i lo -j ACCEPT
$IPTABLES -A OUTPUT -o lo -j ACCEPT
$IPTABLES -A INPUT -s $IIP/32 -j ACCEPT
$IPTABLES -A OUTPUT -s $IIP/32 -j ACCEPT
$IPTABLES -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
$IPTABLES -A INPUT -d $IIP/32 -m multiport -p tcp --ports "22,9999" -j ACCEPT
$IPTABLES -A OUTPUT -s $IIP/32 -m multiport -p tcp --ports "22,9999" -j ACCEPT
-----
And run it:
chmod +x firewall.sh
./firewall.sh
Later, when everything is running, you can for additional security do the following:
* If you have static IP at home, you can leave port 22 (ssh) open only for your static IP (google it how).
* If you dont have static IP, I suggest you install something like knock (http://www.zeroflux.org/projects/knock).
* Or you can even close the port 22 completely, as you can always reach machine thru vultr’s web management, with View Console.
Enter:
exit
to go back to normal user.
To install latest version of darkcoin linux binary, (copy link location from already mentioned https://www.darkcoin.io/downloads/).
File will vary with each darckoin release version. To download the file to linux do this (substitute file name with actual link you got in previous step):
wget --no-check-certificate https://raw.githubusercontent.com/darkcoinproject/darkcoin-binaries/master/darkcoin-0.10.15.13-linux.tar.gz
then continue with unpacking, and copy the darkcoind daemon binary into your home directory, and make it executable:
tar zxvf darkcoin-0.10.15.13-linux.tar.gz
mv darkcoin-0.10.15.13-linux/bin/64/darkcoind .
chmod +x ./darkcoind
Create new file .darkcoin/darkcoin.conf file:
vi .darkcoin/darkcoin.conf
and paste the following in it:
---------
rpcuser=enter-new-LONG-RANDOM-STRING-fisjfijyou_should_change_this
rpcpassword=enter-new-LONGER-RANDOM-STRING-fissjfijyou_should_change_this
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
masternodeprivkey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
addnode=23.23.186.131
------------
But substitute the long XXXXXXXXXXXXXXXXXXXXXXXX string, with your privkey (obtained from windows local machine.
Make it read only for additional security:
chmod 444 darkcoin.conf
run darkcoind daemon:
./darkcoind
continues...
Last edited by a moderator: