ChainCoin masternodes are an excellent way to get passive income. Below are instructions on how to set-up and start your first masternode:
Please see http://www.chaincoin.org for requirements for the VPS.
Once you have created and launched your masternode VPS, login as root and create a new user:
Run these commands:
adduser newUsername
usermod -aG sudo newUsername
Now sign into your masternode with your new user. If you would like, secure the VPS using SSH. Please search youtube and http://www.chaincoin.org for instructions to secure your server using SSH.
Increase the swap file size so that the server utilizes all available memory. This is a necessary step otherwise the masternode daemon will crash.
Run these commands:
sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=1000;sudo mkswap /var/swap.img;sudo swapon /var/swap.img;sudo chmod 0600 /var/swap.img;sudo chown root:root /var/swap.img;sudo nano /etc/fstab
(A nano editor will open up, append this to the last line and save)
/var/swap.img none swap sw 0 0
Now we need to install the proper software dependencies:
Run this command and press ‘y’ (yes) to every prompt you receive while it installs:
sudo apt-get update;sudo apt-get install automake;sudo apt-get install libdb++-dev;sudo apt-get install build-essential libtool autotools-dev;sudo apt-get install autoconf pkg-config libssl-dev;sudo apt-get install libboost-all-dev;sudo apt-get install libminiupnpc-dev;sudo apt-get install git;sudo apt-get install software-properties-common;sudo apt-get install python-software-properties;sudo apt-get install g++;sudo add-apt-repository ppa:bitcoin/bitcoin;sudo apt-get update;sudo apt-get install libdb4.8-dev libdb4.8++-dev -y;
Now we have our dependencies installed. We can now install the ChainCoin software
Run these commands:
cd ~;git clone https://github.com/chaincoin/chaincoin.git;cd ~/chaincoin/
sudo ./autogen.sh
sudo ./configure –-without-gui
make
sudo make install
cd ~/.chaincoin/
mkdir ~/.chaincoin/
touch chaincoin.conf
nano chaincoin.conf
A nano editor of your chaincoin.conf will be opened. This is the configuration file to run your masternode. We will be creating and editing this config file.
Add these lines to chaincoin.conf:
rpcuser='any-username' (no quotes)
rpcpassword='any-unique-password' (no quotes)
server=1
Make sure to save your username and password somewhere safe
Close and save chaincoin.conf and start the chaincoin daemon:
cd ~
chaincoind –daemon
You should see a console output of Chaincoin Starting… Congratulations your node is up and running!
Now we need to set the wallet up, and send our 1000 CHC to our nodes wallet address
run these commands:
*if you receive an error chaincoin server connection failed but the chaincoin node is running, wait 45 seconds and run the commands again
chaincoind getaccountaddress 0
chaincoind masternode genkey
Make sure to save your wallet address, and wallet private key. Keep these safe
Now go to your main wallet, and send exactly 1000.00 CHC to your mastenodes wallet address
Now go to your masternode and see if your funds have arrived. Run this command to check
chaincoind getinfo
You now should see your 1000.00 in your wallet under ‘balance’. If you do not see it, do not worry; your node is probably not synced.
If you do not see your 1000.00 CHC in your wallet, run this command and wait for your wallet to sync (approx 3 hours):
watch chaincoind getinfo
Once your node finishes syncing, you will see the 1000.00 CHC in your balance. Press Ctrl + C to exit the ‘watch’ screen.
Stop the chaincoin node so that we can edit the chaincoin.conf file
chaincoind stop
Now we need to update our chaincoin.conf with our wallet address and wallet private key
Ensure you are in the home directory by running this:
cd ~
Then open chaincoin.conf in the nano editor:
sudo nano .chaincoin/chaincoin.conf
Add these lines to your chaincoin.conf and save:
listen=1
masternode=1
masternodeprivkey='masternode-wallet-private-key' (no quotes)
masternodeaddr='your server ip':11994
Make sure to keep your wallet and private key safe
Your chaincoin masternode configuration is now complete!
You can now restart your chaincoin node and start your masternode!
*Note, you cannot start your masternode until your 1000.00 CHC transaction has at least 15 confirmations
Run these commands to restart chaincoin and start the masternode:
If you receive any errors running chaincoind commands after starting your chaincoind node, please wait 45 seconds and run the command again
cd ~
chaincoind start
chaincoind listtransactions
(once transaction count for the intial 1000.00 is over 15, start the masternode)
chaincoind masternode start
Success!! Your masternode is now up and running! Get ready to reap the rewards!
Check your wallet balance using the ChainCoin block explorer here:
I hope this tutorial was helpful, please post if you have any questions, bugs, or suggestions
Enjoy!
Hi there, excellent write up! I am having an issue with:
mn@mn:~$ chaincoind –daemon
chaincoind: command not found
Prior to this point, I also had an error with this command:
mn@mn:~/chaincoin$ ./configure – -without-gui
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: –
checking build system type... Invalid configuration
–': machine
–' not recognizedconfigure: error: /bin/bash src/build-aux/config.sub – failed
So I just ran ./configure which seemed to work.
Then saw this error while compiling:
CXX masternode.o
masternode.cpp: In member function 'bool CMasternodePayments::ProcessBlock(int)':
masternode.cpp:434:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(vecLastPayments.size() > nMinimumAge) break;
^
Any ideas??
This may be the problem!! Someone on youtube found a typo:
-note to others --copy paste from the website error
./configure --without-gui
(website reads ./configure – -without-gui)
I am reinstalling the server and trying again, wish me luck!
Arg, now stuck here:
mn@mn:~/chaincoin$ make
Making all in src
make[1]: Entering directory
/home/mn/chaincoin/src' make all-recursive make[2]: Entering directory
/home/mn/chaincoin/src'Making all in .
make[3]: Entering directory
/home/mn/chaincoin/src' CXX activemasternode.o activemasternode.cpp:429:1: fatal error: opening dependency file .deps/activemasternode.Tpo: Permission denied } ^ compilation terminated. make[3]: *** [activemasternode.o] Error 1 make[3]: Leaving directory
/home/mn/chaincoin/src'make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
/home/mn/chaincoin/src' make[1]: *** [all] Error 2 make[1]: Leaving directory
/home/mn/chaincoin/src'make: *** [all-recursive] Error 1
sudo make seems to be working....
Still see this error when making
CXX masternode.o
masternode.cpp: In member function 'bool CMasternodePayments::ProcessBlock(int)':
masternode.cpp:434:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(vecLastPayments.size() > nMinimumAge) break;
^
It worked perfectly. My first masternode is up and running!
great tutorial, keep up the good work.
Seems I got past all that.. now:
mn@mn:~$ chaincoind –daemon
error: couldn't connect to server
ARG!!
mn@mn:~$ sudo chaincoind -daemon
Chaincoin server starting
WHOOHOOO!
You got the chaincoin server running, now you have to "start the masternode " right??
chaincoind masternode start
Do I need to put BOTH the Wallet address & Private key here?
if so, which one first, how do you separate the key and address?
Now we need to update our chaincoin.conf with our wallet address and wallet private key ** masternodeprivkey='masternode-wallet-private-key' (no quotes)
Please help! So I transferred 999.9999 instead of 1000 into my masternode wallet using my private key. I tried to run the master node but it wouldn't let me start. Even after I transferred an additional 1 chc. I would like to know how do I retrieve my 999.9999 back to my chaincoin wallet so I could resend. I really stuck at this point. Any help would be great thanks!
You have to manually send all 999.999 back to your main wallet, then perform another transaction for exactly 1000.000 CHC
Having issue when I get to :
sudo nano /etc/fstab
I don't see the same thing as in the video or described in the tutorial.
What does the wallet do in a macbook? I got it downloaded but can you do masternode off that or not?
hello i was wondering on what to do when you have exceeded the disk space? my masternode keeps says cant connect to server even after upgrading to a higher capacity. How do i reconnect?
my masternode stays up for few hours..sometimes almost a day and then it exits(crashes?). i see nothing at end of debug.log out of the ordinary. often once it does this i can't start it again until i reboot. (hasn't earned me anything yet probably because of this) any diagnostics i could be looking at?
this sounds like its server specific. Maybe its something with your VPS. It doesnt sound like the problem is in the Masternode code
Congratulations @crypto-wizard! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
You made your First Comment
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Congratulations @crypto-wizard! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
You got a First Reply
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
Interesting thoughts