• Forum has been upgraded, all links, images, etc are as they were. Please see Official Announcements for more information

COMPLETE MASTERNODE GUIDE (WINDOWS LOCAL + LINUX REMOTE @VULTR)

Ahh well 3d57m29s and still no payments :(
On drk.mn it says port is closed on your MN... Is it still running?

EDIT: Well, it's running for sure, I just checked by myself (connected to your MN directly and connection is fine). Not sure why it shown as "Closed" on drk.mn then...

EDIT2: It just turned "Open" again... Let's wait then... Maaan, I'm waiting for your first payment like it's mine :grin:
 
Last edited by a moderator:
Thanks yeah I've been doing random port checks on it too...to make sure it's open.

Still no sign :( Really wonder what's up or whether it's something to do with the method I used.

Thanks UdjinM6 for looking into this!

And the clock ticks on... 3d12h58m25s
 
Thanks yeah I've been doing random port checks on it too...to make sure it's open.

Still no sign :( Really wonder what's up or whether it's something to do with the method I used.

Thanks UdjinM6 for looking into this!

And the clock ticks on... 3d12h58m25s
Have you checked to see if your MN is on the MN list?
 
Have you checked to see if your MN is on the MN list?
I checked... It's on MN list, port is open (I successfully connected by "connect=...ip..."), its lastseen is updated too so it definitely sending dseeps.... Will keep looking at this closer...
 
Quick update. tungfa told me to try adding masternodeaddr to the remote config.

Remote:

darkcoin@Ubuntu1404-64bit:~$ cat .darkcoin/darkcoin.conf
rpcuser=X
rpcpassword=X
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
masternodeprivkey=X
masternodeaddr=103.25.203.25:9999
addnode=23.23.186.131
Have restarted darkcoind as well.

darkcoin@Ubuntu1404-64bit:~$ grep HotCold .darkcoin/debug.log
2014-11-27 05:41:51 CActiveMasternode::EnableHotColdMasterNode() - Enabled! You may shut down the cold daemon.

darkcoin@Ubuntu1404-64bit:~$ darkcoind masternode list | grep 103.25.203.25
"103.25.203.25:9999" : 1,​

On the local side:

darkcoin.conf
rpcuser=X
rpcpassword=X
rpcallowip=127.0.0.1
listen=0
server=1
daemon=1
logtimestamps=1
addnode=23.23.186.131
masternode=1
masternodeprivkey=X
masternodeaddr=103.25.203.25:9999​

Wallet shows started in masternode mode.

Btw when I typed masternode start I placed in a wrong password and it still said masternode started remotely.

13:41:11 Welcome to the DarkCoin RPC console.
Use up and down arrows to navigate history, and Ctrl-L to clear screen.
Type help for an overview of available commands.
13:43:54 walletpassphrase X 120
13:43:54
13:44:18 masternode start WRONGPASSWORDINTENTIONALLY
13:44:18 masternode started remotely
13:44:49 masternode start X
13:44:49 masternode started remotely​
 
Quick update. tungfa told me to try adding masternodeaddr to the remote config.

Remote:

darkcoin@Ubuntu1404-64bit:~$ cat .darkcoin/darkcoin.conf
rpcuser=X
rpcpassword=X
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
masternodeprivkey=X
masternodeaddr=103.25.203.25:9999
addnode=23.23.186.131
Have restarted darkcoind as well.

darkcoin@Ubuntu1404-64bit:~$ grep HotCold .darkcoin/debug.log
2014-11-27 05:41:51 CActiveMasternode::EnableHotColdMasterNode() - Enabled! You may shut down the cold daemon.

darkcoin@Ubuntu1404-64bit:~$ darkcoind masternode list | grep 103.25.203.25
"103.25.203.25:9999" : 1,​

On the local side:

darkcoin.conf
rpcuser=X
rpcpassword=X
rpcallowip=127.0.0.1
listen=0
server=1
daemon=1
logtimestamps=1
addnode=23.23.186.131
masternode=1
masternodeprivkey=X
masternodeaddr=103.25.203.25:9999​

Wallet shows started in masternode mode.

Btw when I typed masternode start I placed in a wrong password and it still said masternode started remotely.

13:41:11 Welcome to the DarkCoin RPC console.
Use up and down arrows to navigate history, and Ctrl-L to clear screen.
Type help for an overview of available commands.
13:43:54 walletpassphrase X 120
13:43:54
13:44:18 masternode start WRONGPASSWORDINTENTIONALLY
13:44:18 masternode started remotely
13:44:49 masternode start X
13:44:49 masternode started remotely​

that was a recommendation from @moocowmoo
i got yesterday for him !
Any thoughts on this guys and girls ?!

PS: Wong Password / wallet was still unlocked as of
  1. walletpassphrase ........ 60
 
Last edited by a moderator:
Everybody, don't mess with masternodes that already appear on the network.

Be patient! Restarting your masternode may take you offline while selected for block reward!

If you appear on drk.mn and other people see your ip in their masternode list output leave it alone.

side note: My remote configs all have 'masternodeaddr=ip:9999', but the code indicates it will identify the local ip if not present.
 
BolehVPN
- Replace "masternodeaddr" with "externalip" in remote config. Yes, it will try to get IP automatically and you are already in list so it should be fine, but I highly suggest to keep everything consistent. And masternodeaddr works for local side only to point your local wallet to your remote masternode.
- It took you less then 120 seconds after "walletpassphrase X 120" (where X I assume was correct passphrase) so wallet was still unlocked and your third part in "masternode start WRONGPASSWORDINTENTIONALLY" was simply ignored.

EDIT: slightly corrected to make things clearer.
 
Last edited by a moderator:
Yup! When speaking to flare he mentioned that my first masternode issue was due to 'dust'? Said bug in the protocol or something so it wasn't quite my setup. Just don't fund your masternode addresses directly from an exchange.
 
* 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.
I1KiOV0.png


Click on "Help"->"Debug window" - and then in Debug window, click on second tab named "Console".
DzPaFhB.png


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.
IzkOxTx.png

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...".
uLgdvaE.png

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.
ehY59iI.png


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.
61V8dsm.png


CsirQal.png


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...

Can you please start working on "rebranding" the guide ?!
that would be great and super appreciated
Tx
 
Back
Top