Masternodes

A quick tip on creating and editing your masternode configuration file

Has your masternode stopped working or is it not stable enough? What you need to note is that if your masternode has a laggy performance or if it disconnects randomly then you’ll end up losing your payments. For this reason make sure your nodes are running 24 x 7 without any performance issues. There are several reason for your masternode to have performance issues. First It can be out of memory issue so check your server resources. If you are not sure how to; then check this list of Linux commands. If it is not your server resource then it could be your masternode wallet synchronization issues. It might have either stopped syncing or it could be on the wrong chain.

Login to your VPS and check the number of processed blocks using this command <executable>-cli getblockcount. Now check the latest block height in block explorer. If it is not the same then stop the daemon and re-sync the wallet. But before that it is recommended that you add nodes to have a strong stable network connection going further. To add this you need to edit your masternode configuration file which here we’ll show you how it is done.

Masternode configuration file

Not only to add nodes but even to change any configuration of your masternodes you may need to edit this config file. Before we see how to create and edit masternode configuration file we’ll first explain the local wallet masternode.conf file.

Note: This scenario is only intended for those who already have their masternode running.

Masternode.conf file

When initially setting up the masternode you might have configured your local wallet masternode.conf file which you’ll find in the wallet core directory.

local masternode file location

This is where you’ll enter your masternode configuration string and it looks something like this.

# Format: alias IP:port masternodeprivkey collateral_output_txid collateral_output_index

Example: mn1 127.0.0.2:12456 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0

masternode.conf file

This information in your local masternode.conf file is the most important setting and this is what controls your masternode. Do not edit these lines until unless you know what you are doing. Now to add nodes to your masternode wallet we’ll not be editing this file but the config file which is located on your Linux VPS.

Where is the config file located on the Linux VPS?

In this list of Linux and masternode commands we’ve explained how to access your masternode server using PuTTY. Now login to the server and to locate the configuration file; either list all the files and search through or search that particular file name directly.

Listing files and navigating: Command: ls -al will list all files and directory in your server. Now Locate the core folder (example .dashcore) and navigate to the folder using CD command (example: cd .dashcore). Now again ls -al command to locate the configuration file (example: Dash.conf).

Searching for the file name directly: If you know the name of the file (example: smartcash.conf) then you can locate it without navigating through files. For this use command locate (Example: locate smartcash.conf).

Config file not found: Mostly you’ll find this configuration file. But in case if it does not exist then navigate to the core wallet directory (example: cd .pivxcore) and just create the file like this (touch pivx.conf).

Stop the daemon first

Now before editing this .conf file it is very important that you stop the service first. Also before doing this do note that stopping the daemon will stop your masternodes from running. Now if you restart the service your masternode will be positioned at the bottom of the payment queue. It is like starting a new masternode and depending on the coin it will take few days or weeks to get your first reward.

Now to stop the daemon enter this following command: <executable>-cli stop (example: phore-cli stop). Once it is executed your wallet will stop working. Now you can go ahead and edit the configuration file.

Editing the masternode configuration file

To edit any files we first need a text editor. In Windows we have notepad. Similarly to edit files on your VPS server we’ll be using nano software which is a light weight Ubuntu text editor.

To install this software on your server use this following command and hit enter:

sudo apt-get install nano

Installing nano text editor

That’s it! Now you can edit any files using this text editor. To edit the masternode configuration file first navigate to your wallet core directory (example: cd /.dashcore). Then to edit the file use the following command: nano coinname.conf (example: nano gobyte.conf).

The editor will open the file and now you’ll find a set of lines similar to this.

rpcuser=randomname
rpcpassword=superpassword
rpcallowip=127.0.0.1
listen=1
server=1
daemon=1
logtimestamps=1
maxconnections=256
masternode=1
externalip=82.223.18.239
masternodeprivkey=rhg5hg897jdf9iySiosdfsDGsdfa9fdsfjkLwr324

Editing masternode config

Now using keyboard arrow keys navigate and below the line “masternodeprivkey” you can start adding nodes like this.

Example:

addnode=217.69.15.33
addnode=45.76.253.49

Adding nodes to masternodes

Once you’ve entered all the necessary data on the masternode configuration file you need to save and exit. To “Save and Exit” hit CTRL+X keys which will prompt you to confirm the changes. Type y and hit enter to confirm and type n if you want to cancel.

After the changes are saved start your wallet (example: ./gobyted -daemon). Now after the wallet is fully synchronized start your masternode from your controller wallet.

Note: To better explain here we’ve used different examples such as: Dash, PIVX, Phore. SmartCash & GoByte. Not only these but most masternodes are build on same codebase so the above basic steps and explanation applies to any masternode coin.

Additional read:


Show More

coinguides

We are crypto enthusiasts and our main intention with Coin Guides is to educate people about Cryptocurrency and Blockchain technology. We regularly publish content about Bitcoin, Ethereum, Altcoins, wallet guides, mining tutorials and trading tips.

Related Articles

Leave a Reply

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

Back to top button