Complete universal guide to setup a masternode (Cold Wallet)

in #cryptocurrency5 years ago

                                                                      

Preword

Generally are the most ewallets based on the same QT- plattform, and have only individual designed interfaces. You can easily proof if your wallet is compatible, with these instructions, when you take a look in your wallet in the upper right at the „Help“ Section. There you`ll find information to the yourcoin.core version and QT version. If you find that, you should be safe with these instructions. 

Please insert the correct values for your setup, in therefore named fields (ex: yourcoin, xx.xx.xx.xx, xxxx)

Setting up Masternodes

Getting a masternode started and earning money with it, requires a basic understanding of Linux and blockchain technology, as well as an ability to follow these instructions closely.    

Before you begin

We assume, that you start up a masternode for the first time. You need following things to do:

         1. Collateral of that cryptocurrency you decided to participate with. This amount and additional conditions differs for every cryptocurrency and can be found fast over internet.  

                        For example: Masternode Corner 

         2. A local wallet (windows, linux, mac) from the cryptocurrency you want to work with. There you store          the collateral for the masternode. Before you begin to transact something, make sure that the your wallets involved are completly synced, otherwise you can break your local blockchain!

         3. An Ubuntu server (Ubuntu Server 18.04), or, preferably a Virtual Private Server (VPS) with minimum 2GB memory (RAM or RAM+Swap)

         4. Public IP address of Ubuntu server or VPS system

         5. An open port xxxx to your Server or VPS. Mostly found on yourcoin github page or you google it with „Coinname ports“  

Remember to buy a few more coins than the collateral amount, for upcoming transaction fees and optional, additional costs!


By working on this guide, you will be working in your local wallet on your local computer. Also you will be working on the remote system. Therefore we name the differnt machines:

          Local wallet: For your local machine

          Remote wallet: For a remote system on your Ubuntu Server or VPS

Please follow the steps below in order, if you don`t know yet, what you are doing.

Where do I’ll find the files that we will editing?

This depends on the way of installation. You`ll need to find the basic installation directory. On Linux mostly in the home directory, invisible for basic shell. Try in the users home, 

                cd .yourcoin 

In this installation directory, you will find the all files and .conf, that matter for your masternode setup. So let`s go!

We start with the local wallet configuration…

Step 1: Turn off zeromint in your local wallet

        1. Shutdown your wallet

        2. Go to „yourcoin“ directory and edit yourcoin.conf

        3. Add the following lines, save the file and start your local wallet again

       enablezeromint=0

      zeromintpercentage=0

Step 2: Generate a masternode key on your local wallet

        1. Open the debug console in your local wallet (Tools > Debug console)

        2. Type the following command (this generates the masternode privatekey, which we’ll need later in the setup)

       masternode genkey

Write the response down somewhere safe. (Make a Textfile were you store all needed values!)

Step 3: Additional generate a accountaddress on your local wallet

        1. Open the debug console (Tools > Debug console)

        2. Type the following command:

      getaccountaddress YourMasternodeName (e.g. MN01)

Write the response down somewhere safe.

Step 4: Send collateral to the new accountaddress on your local wallet

Still on the local wallet, send the exact amount of collateral coins (important!) to the accountaddress we just created. You´ll have to wait some confirmations for this transaction, to get allowed to start the masternode. The number of confirmation depends on the coin. But you can feel safe mostly with 20> confirmations. You’ll find those infos in the masternode section of yourcoin website or github. 

Step 5: Confirm the masternode outputs in your local wallet

        1. Open the debug console (Tools > Debug console)

        2. Type the following command (This gets the proof of transaction of sending the collatoral to the new accountadress

      masternode outputs

Copy the response down somewhere safe.

Step 6: Configure the masternode.conf on your local wallet

       1. Shutdown your wallet

       2. Go to your data directory and add the following line to masternode.conf

<Name of your masternode> <IP address of your remote wallet>:55002 <The privkey from Step 2> <The txhash from Step 5> <The outputidx from Step 5>

Set up your own values and always without the “<>”. Tip: Remember that if you see # in the beginning of the line, means that the following option will not be set.

After modifying the configuration file, save it. And you are able to start and use your local wallet normally.

Example masternode.conf

MN 139.14.135.195:55002 7gb6HNz8gRwVwKZLMGQ6XEaLjzPoxUNK4ui3Pig6mXA6RZ8xhsn 49012766543cac37369cf3813d6216bdddc1b9a8ed03ac690221be10aa5edd6c 1

Now we begin working on the remote system.

Step 7: Install  your remote wallet

Depending on your coin, there a several method to install the masternode.

You need a linux distribution according to the wallet, you have already installed on the local machine. Some coins have also masternode setup scripts, that ask you for needed values. Mainly the IP-Adresse of the server, the masternode runs on, the port you have investigated and the masternode private key are important. If possible, then install the bootstrap of the blockchain for faster installation.


Before you start the installation, make a new user that runs masternode.


sudo adduser youruser     add your new user

sudo adduser youruser sudo    and give him superuser

sudo passwd youruser       and a password


After installation, start the server with sudo yourcoind –daemon and let it synchronize the blockchain. 

You can see the progress with yourcoin-cli getinfo and stop the masternode with yourcoin-cli stop . If that doesn't work for you, try: ./yourcoin-cli xxxx

Wait for full synchronization then stop the server and go on with next step.

Step 8: Configure the masternode in your remote wallet

        1. Edit „yourcoin.conf“ in the your data dir, on your remote wallet:

              nano ~/.yourcoin/yourcoin.conf

        2. There should be now a automatic added rpcuser and rpcpassword in the .conf file. 

This user will be generated, when masternode starts for the first time. 

Please write it down, we have to add it to our local wallet configuration. 

Otherwise you have to install the wallet completly again!

        3. Add the following lines (Example configuration remote wallet yourcoin.conf)


        rpcuser=encryptedusernameautomaticlyinstalled

rpcpasswd=encryptedlongerpasswordcopybothtolocalwallet

rpcallowip=127.0.0.1

listen=0

server=1

daemon=1

logtimestamps=1

maxconnections=256

masternode=1

externalip=xx.xx.xx.xx #(The public IP of your remote wallet)

bind=xx.xx.xx.xx       #(The public IP of your remote wallet)

masternodeaddr=xx.xx.xx.xx:xxxx #(Public IP remote wallet:Port)

masternodeprivkey= #(The masternode private key from local wallet)


Make sure you copied rpcuser and rpcpassword to a textfile.

Step 9: Copy RPC credentials to the local wallet

1. Edit „yourcoin.conf“ on your local wallet:

     nano ~/.yourcoin/yourcoin.conf

2. Replace existing RPC credentials with the copied automatic generated values from the remote wallet


Example configuration yourcoin.conf on local wallet (Remember! Use only the automatic encrypted RPC credentials from remote wallet!)

rpcuser=encryptedusernamefromremotewallet

rpcpasswd=encryptedlongerpasswordfromremotewallet

rpcallowip=127.0.0.1

rpcallowip=xx.xx.xx.xx

rpcport=xxxx

listen=0

server=1

daemon=1

That was the configuration part. Now comes the fun part!

Step 10: Starting the masternode

It is important you follow the steps in the exact order.

        1. Start the local wallet

        2. Start the remote wallet as the new user with command 

                  sudo yourcoind -daemon

3. Type the following command in the local wallet debug console:

                 startmasternode alias false  Masternode1


The following should appear:

           

         {

         “overall” : “Successfully started 1 masternodes, failed to start 0, total 1”,

         “detail” : [

        {

        “alias” : “Masternode1”,

        “result” : “successful”,

        “error” : “”

       }


     4.     Start the masternode on your remote wallet:

     5.     Login as new user and type

                        ./yourcoin && ./yourcoin-cli startmasternode local false 

             A message “masternode successfully started” should appear

    6.     Use the following command on your remote wallet to check status:

            ./yourcoin-cli masternode status

You should see something like:

               {

               “txhash” :    “55012766543cac37369cf3813d6216bdddc1b9a8ed03ac690221be10aa5edd6d”,

               “outputidx” : 1,

               “netaddr” : “52.57.41.57:55050”,

               “addr” : “WXDiFihvtMq6v8B4wVu8btnGwEdyAGLnTP”,

               “status” : 4,

               “message” : “Masternode successfully started”

              }

Congratulations! You have successfully created your new masternode!

Now the masternode setup is complete, you are safe to remove “enablezeromint=0” from the yourcoin.conf file on your local wallet.

Don`t forget to take your user from superusergroup to prevent hacking surface! 

Execute comand on your remote machine as Superuser or root

   sudo deluser youruser sudo


Stop running the masternode and get out collateral

Step 1: Stop the masternode on your remote wallet

           ./yourcoin-cli stop

Step 2: Remove the masternode configuration from your local wallet

         1. Shutdown your wallet

         2. Go to your data directory and remove the line that was created in Step 6 from your masternode.conf

         3. Start your wallet again

         4. Your collateral will now be unlocked



Sort:  

✅ Enjoy the vote! For more amazing content, please follow @themadcurator for a chance to receive more free votes!

Coin Marketplace

STEEM 0.28
TRX 0.12
JST 0.033
BTC 69450.75
ETH 3678.92
USDT 1.00
SBD 3.81