How To Setup Medic Coin Masternode On Ubuntu

Things Needed:

VPS From Vultr : https://digitalocean.com
199999 MEDIC from https://wallet.crypto-bridge.org/market/BRIDGE.MEDIC_BRIDGE.BTC
Putty : http://www.putty.org/

Once you have created and launched your masternode VPS, login as root and create a new user:

Step 1
Run these commands:

adduser newUsername
usermod -aG sudo newUsername

Step 2:
Run these commands to make a swapfile (for small VPS) :

sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
sudo mkswap /var/swap.img
sudo swapon /var/swap.img

Run free again to confirm you now have a swapfile. Note: If you chose a different server
option from Vultr, with less RAM, you’ll need a LARGER swapfile, i.e. set the count
parameter to something larger like 2048, 4096 etc. If the compilation steps fails partway
through this is usually the reason.

To make the swap file persist when the server is rebooted:

sudo chmod 0600 /var/swap.img
sudo chown root:root /var/swap.img
sudo nano /etc/fstab

Append the following line to the end of the file:

/var/swap.img none swap sw 0 0

Save the file and exit

Step 3: Firewall ( can do this step at anytime )

sudo ufw allow OpenSSH
sudo ufw allow 2118
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw enable

 

Step 4 : Compiling the wallet

sudo apt-get -y update
sudo apt-get install git
git clone https://github.com/MEDICCOIN/MedicCoin.git

Step 5: You need to install dependencies

sudo apt-get -y update && sudo apt-get -y install build-essential libssl-dev libdb++-dev libboost-all-dev libcrypto++-dev libqrencode-dev libminiupnpc-dev libgmp-dev libgmp3-dev autoconf autogen automake libtool

Step 6

cd MedicCoin
cd src
sudo make -f makefile.unix

If there is a file named “MedicCoind”, then your wallet is ready.

 

Step 7 Run Wallet to generate conf. error will be presented here.

./MedicCoind -daemon

Now you need to configure your wallet, first we need to close the wallet and edit the conf file :

./MedicCoind stop
cd ..
cd ..
cd .MedicCoind
sudo nano MedicCoind.conf

With Nano add the following:

rpcuser=XXXXXXXXXXXXX
rpcpassword=XXXXXXXXXXXXXXXXXXXXXXXXXXXX
rpcallowip=127.0.0.1
#----
listen=1
server=1
daemon=1
#--------------------

Save the file.

Now we restart the wallet and we wait it the get fully synced

Step 8 When your wallet is synced, you need to setup the masternode

./MedicCoind masternode genkey

Step 6 Lets create a new receiving address

./MedicCoind getaccountaddress 0

This address will receive your coins. Save also this one in the txt file.
Open your Windows wallet if it isn’t yet and send exactly 199,999 Medic coin to this address. You’ll have to pay a fee in addition.
You now need to wait for 16 confirmations before we continue.

Step 9 Encrypt wallet

./MedicCoind encryptwallet YOUR_WALLET_PASSWORD

Step 10 Edit Conf

cd ..
cd ..
cd .MedicCoind
sudo nano MedicCoind.conf

The conf file must look like that :

rpcuser=SomeRandomString
rpcpassword=EvenLongerRandomString
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1

port=2118
masternode=1
masternodeaddr=XXX.XXX.XXX.XXX:2118
masternodeprivkey=XXXXXXXXXXXXXXXXXXXXXXXXXX

Masternodeaddr is the ip and the port used by your VPS. The port must be open.
Masternodeprivekey is the string you got from the “masternode genkey” command.

Step 11 You need to restart the wallet now

cd ..
cd MedicCoind/src
./MedicCoind

The wallet in now ready to run the masternode

./MedicCoind getbalance

You should get 199,999 MEDIC

We can now start the masternode
./MedicCoind masternode start YOUR_WALLET_PASSWORD

Leave a Reply

Your email address will not be published. Required fields are marked *