Masternode Setup Linux - friendshipCoin/friendshipcoin-core GitHub Wiki
Setting up a FriendshipCoin Masternode on Ubuntu 16.04
This guide will walk you through setting up a Friendship Coin masternode with a non-root user account.
root
Login to your VPS as It is generally advised or required to change the root password on your new vps account from the one generated by your vps setup.
Create a new user account:
adduser masternode
# input password
gpasswd -a masternode sudo
su - masternode
If you are upgrading your masternode from an older version of FriendshipCoin make sure you stop the current running daemon friendshipcoind stop
Download and configure
wget https://github.com/friendshipCoin/friendshipcoin-core/releases/download/0.1.0/friendshipcoin-0.1.0-ubuntu.tar.gz
tar -zxvf friendshipcoin-0.1.0-ubuntu.tar.gz
cd friendshipcoin-0.1.0
chmod +x dependencies.sh && sudo ./dependencies.sh
sudo cp -a friendshipcoind /usr/local/bin/
sudo cp -a friendshipcoin-cli /usr/local/bin
sudo chmod 755 /usr/local/bin/friendshipcoind
sudo chmod 755 /usr/local/bin/friendshipcoin-cli
sudo chown -R masternode:masternode ~/.friendshipcoin
Run friendshipcoind
friendshipcoind
You should see 'FriendshipCoin server starting', now press enter to return to the shell.
Wait for your wallet to sync with latest block on explorer:
friendshipcoin-cli getinfo
"blocks" line should match latest block on https://explore.friendshipcoin.com
Generate address for the masternode
friendshipcoin-cli getaccountaddress 0
Send masternode collateral to the resulting address (exactly 14466 FSC)
Wait for 1 confirmation, generate masternode private key and save the output
friendshipcoin-cli masternode genkey
Get masternode transaction and index and save the output
friendshipcoin-cli masternode outputs
Here is an example:
{ "60835a7d867d335434925c32f38902268e131e99a5821557d3e77f8ca3829fd8" : "0"}
Stop friendshipcoind
friendshipcoin-cli stop
Edit friendshipcoin.conf with your masternode information
nano ~/.friendshipcoin/friendshipcoin.conf
# add these lines:
masternode=1
masternodeprivkey=<your masternode private key>
# save (ctrl + o) and exit (ctrl + x)
In the same directory create masternode.conf, needed for hot/cold wallet:
nano ~/.friendshipcoin/masternode.conf
# use this format:
<masternode alias> <masternode IP>:58008 <masternode private key> <masternode transaction> <MN transaction
index>
Example:
MN01 54.134.163.173:58008 88kPFWmNAdNTcXuHRRWDCUXGEnQkwZvddsrDAANWtz662nCAotr 60835a7d867d335434925c32f38902268e131e99a5821557d3e77f8ca3829fd8 0
It should all be one line, and masternode alias can be whatever you want.
Restart the daemon and launch masternode
friendshipcoind
friendshipcoin-cli masternode start
Verify the masternode is enabled
friendshipcoind masternode status
Status line should read 1.
Securing your VPS (Optional but recommended)
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ufw
sudo ufw allow ssh
sudo ufw limit ssh/tcp
sudo ufw allow 58008/tcp
sudo ufw allow 58009/tcp
sudo ufw default allow outgoing
sudo ufw enable
Thanks to david987 and Lobin!