All my steps from everything I've read, in the spirit of
Liberty or Die - feel free to re-use this guide however you like!
*Be sure to read
Additional Notes & Updates to the guide at the bottom first
Forgive me - I just haven't had time to incorporate them into the guide yet & I'm doing this for free!!
1. Set up Masternode computer Note: if using TOR, might not have to expose ports!#Set up portforwarding on router to computer/ip port 9999
sudo apt-get update
sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libboost-all-dev automake libdb++-dev libssl-dev git
sudo apt-get install ufw
ufw allow ssh/tcp
ufw limit ssh/tcp #this command limits SSH connections to 6 every 30 seconds for greater security---
ufw allow 9999/tcp
ufw logging on
ufw enable
2. Install Tor & Configure torrc on Masternode computerGet the latest version of Tor:
add this line to your /etc/apt/sources.list file
deb http://deb.torproject.org/torproject.org <DISTRIBUTION_NAME_HERE> main
Then add the gpg key used to sign the tor packages by running the following commands at your command prompt:
gpg --keyserver keys.gnupg.net --recv 886DDD89
gpg --export A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89 | sudo apt-key add -
Install Debian package to help you keep Tor signing key current:
apt-get install deb.torproject.org-keyring
To finally install Tor:
#Check that the Tor service is running on port 9050:
If not running, then:
sudo /etc/init.d/tor start
#Make directory that is readable/writeable by the user that will be running Tor.
mkdir /home/username/hidden_service/
#Configure torrc, usually found in /etc/tor
#add the following & save:
nano /etc/tor/torrc
HiddenServiceDir /home/username/hidden_service/
HiddenServicePort 9999 127.0.0.1:9999
#Restart Tor
sudo /etc/init.d/tor stop
sudo /etc/init.d/tor start
#Make note of created *hiddenservicename*.onion in:
/var/lib/tor/YOURHIDDENSERVICENAME/hostname
3. Configure Local/Cold wallet & Generate masternodeprivkey#Go to Debug window > Console
masternode genkey
getaccountaddress 0
#Make note of masternode key and accountaddress
#Send 500 crave to the accountaddress
#Paste the following:
rpcuser=MAKEUPNAME
rpcpassword=MAKEUPPASSWORD
rpcallowip=127.0.0.1
rpcport=USEDIFFERENTPORTNUMFOREACHCLIENT
port=9999
listen=0
server=1
daemon=1
logtimestamps=1
masternode=1
masternodeprivkey=MASTERNODEKEYFROMCONSOLE
masternodeaddr=HIDDENSERVICENAME.ONION:9999
# Save / Write out the file
4. Configure the Masternode computer "craved daemon" #First build secp256ki
git clone https://github.com/bitcoin/secp256k1.git
cd secp256k1
./autogen.sh
./configure
make
./tests #optional
sudo make install
sudo ldconfig
#Get the crave daemon:
git clone https://github.com/industrialcoinmagic/crave.git
#Take the following steps to build daemon (no UPnP support):
cd ~/crave/src
make -f makefile.unix USE_UPNP=
strip craved
#Run ./craved and let it sync:
./craved
./craved getinfo | grep blocks #to find current block number & compare to blockexplorer
#Paste the following:
rpcallowip=127.0.0.1
rpcuser=MAKEUPYOUROWNUSERNAME
rpcpassword=MAKEUPYOUROWNPASSWORD
rpcport=MAKEUPYOUROWNPORT
server=1
daemon=1
listen=1
staking=0
port=9999
masternodeaddr=HIDDENSERVICENAME.ONION:9999
masternode=1
masternodeprivkey=MASTERNODEKEYFROMCONSOLE
# Save / Write out the file
5. Last step#Start the masternode daemon
./craved -conf=~/.crave/crave.conf
#Then start the local/cold wallet with tor option
./crave-qt -tor=127.0.0.1:9050
#Start masternode go to Debug > console
#Check if the masternode is running correctly:
./craved masternode list | grep YOUR-IP
#If working:
Additional Notes: Added already to guide -
you might want to use the tor packages provided here: https://www.torproject.org/docs/debian.html.en to make sure it's up to datefor multiple nodes you duplicate the service config like this:
HiddenServiceDir /home/username/hidden_service1/
HiddenServicePort 9999 127.0.0.1:9999
HiddenServiceDir /home/username/hidden_service2/
HiddenServicePort 9999 127.0.0.1:9998
HiddenServiceDir /home/username/hidden_service3/
HiddenServicePort 9999 127.0.0.1:9997
the hot machine's config needs that changing port as it's rpcport. masternodeaddr's port is 9999. either listen=0 or changing port is needed to keep them from clashing if doing multiple.
you can add the tor= part to cold config so you don't need to specify each time you run the client.
For Linux Setup WITHOUT TORYou can change the port and setup more if you want.
You will need to have multiple copies of the datadir and your crave-qtrpcport and port have to be different ports.
port is for the P2P communication,
rpcport is for local rpc connections.
Something like this for your bash shell script files and
make sure you have a folder to hold the data for each running MN.Remember to do chmod +x on each shell script file!
StartMasterNode1.sh
#!/bin/bash
./crave-qt -datadir=/home/
user/SubFolders/CraveMasterNode1
StartMasterNode2.sh
#!/bin/bash
./crave-qt -datadir=/home/
user/SubFolders/CraveMasterNode2
StartMasterNode3.sh
#!/bin/bash
./crave-qt -datadir=/home/
user/SubFolders/CraveMasterNode3
Crave Master Node 1 Config
maxconnections=100
rpcuser=YourRPCUser
rpcpassword=YourRPCPassword
rpcport=9970
port=9999
gen=0
server=1
daemon=1
staking=0
reservebalance=9999999
masternodeaddr=YouIPAddress:9999
masternode=1
masternodeprivkey=YourMasterKey
rpcallowip=127.0.0.1
Crave Master Node 2 Config
maxconnections=100
rpcuser=YourRPCUser
rpcpassword=YourRPCPassword
rpcport=9971
port=9998
gen=0
server=1
daemon=1
staking=0
reservebalance=9999999
masternodeaddr=YouIPAddress:9998
masternode=1
masternodeprivkey=YourMasterKey
rpcallowip=127.0.0.1
Crave Master Node 3 Config
maxconnections=100
rpcuser=YourRPCUser
rpcpassword=YourRPCPassword
rpcport=9972
port=9997
gen=0
server=1
daemon=1
staking=0
reservebalance=9999999
masternodeaddr=YouIPAddress:9997
masternode=1
masternodeprivkey=YourMasterKey
rpcallowip=127.0.0.1