Currently, modern technology is gradually taking over, along with the development of cryptocurrency investment. Blockchain technology offers investors a variety of ways to earn extra income. This does not say well known is the opportunity and the reason why so many investors are attracted to this space. As Bitcoin and Altcoin investments are both required to actively participate in the market. But there are many ways to earn passive income, for example when you run a masternode is an example. The following Yield Nodes will be a step-by-step guide for beginner investors, aimed at those with little or no programming knowledge of How to Set up a Masternode.
What are Masternodes?
Masternodes are considered nodes that can perform special functions that “standard” nodes are not capable of. The masternode operators provided additional services to the blockchain network so they were financially rewarded and they built a system based on collateral.
Masternodes actually come in many different shapes and sizes, but in the setup they are done similarly, mostly “pre-masternodes”.
In this How to Set up a masternode article, we give you a setup guide on the DASH masternode setup process. Meanwhile, DASH is one of the most commonly used masternode coins on the market.
How to set up DASH masternode
This is an important part of How to Set up a Masternode, you must pay close attention to avoid taking risks for yourself.
Set up your own VPS
What is VPS? VPS (Virtual Private Server) is an OS (operating system) installation that will run inside a virtual machine. This is indispensable to be able to run multiple systems on a single server, then they will be working with a higher level of efficiency and much cheaper than running it from a desktop. at home.
There are different cloud hosting services such as Amazon EC2, Google Cloud, but here we will take Vultr as an example of VPS.
Vultr offers many options for memory, storage capacity and server locations. On top of that, it’ll be more affordable, reliable, and have an all-too-common ability to deliver the best user experience.
The first step is that you need to create an account and add credits. Then go to the Server Menu item on the left then click the + sign, and select your server:
Then the server will run on Linux, please choose Ubuntu 18.04×64 as the server type.
Memory must be at least 2GB, so choose the size of the server accordingly.
Then enter your hostname and label.
And wait for Vultr to complete your server settings within a few minutes. When done, click Manage and save the IP address, username and password.
Set up your operating system.
At this step we will connect to your new server.
Then on Windows, we need to download PuTTY and make sure to choose the appropriate installer and suitable for your system.
On Mac or Linux, we will ssh directly from the terminals by typing: ssh [email protected] <server_ip>
If you have PuTTY installed, run the application using your own Start Menu. Then enter the server’s IP in the Host Name field and click Open. The certificate warning will then appear the first time you connect to this server. Then just click Yes.
Then log in to your server with the user root and password provided by your hosting providers.
Note: The root password must be changed as soon as possible also for security purposes. Copy and paste this command into the PuTTY window:
– password root
When you enter the new password. Next, we’ll create a new user with the commands below to replace <Username> with a name you’re free to choose:
– adduser <Username>
Then a prompt for a password will be displayed. Enter your new password and remember to save it.
Now, while still being root, we will update the system from the Ubuntu package repository when it is time to enter the commands:
– apt update
– apt upgrade
At that time, the system will display a list of packages that can be upgraded. Press Y and Enter to install the package. Then enter:
– apt install ufw python virtualenv git extract pv
Press more Y Enter and then type:
– ufw allows ssh/tcp
– ufw limited ssh/tcp
– ufw allows 9999/tcp
– ufw login
– ufw allowed
Press Y and Enter. Import :
– fallocate – 14G / swapfile
– chmod 600 /swapfile
– mkswap / swapfile
– swapon / swapfile
– nano /etc /fstab
Then add the line to the end of the file (press tab to separate each word/number), then Ctrl + X to close the editor and press Y and Enter to save the file.
– / swapfile does not swap swap sw o o
Regarding security measures, then we will install fail2ban and disable root login over ssh.
For fail2ban, type: apt install fail2ban
Create a new configuration file: nano/etc/fail2ban/jail.local
Then paste them into the config
enabled = true
port = 22
filter = sshd
logpath = /var/log/auth.log
maxretry = 3
Then press Ctrl X to close editing, then Y and Enter to save the file. Please restart and enable the fail2ban service by typing:
– systemctl restart fai2ban
– systemctl allows fail2ban
Next open the SSH configuration file to disable root login over SSH:
– nano /etc/ssh/sshd_config
Find the line that says PermitRootLogin yes and set it to PermitRootLogin no. Below this, add a line that says AllowUsers<Username>, replace <Username> with the name you chose above. Then press Ctrl + X to close the editor, then press Y and Enter to save the file
Restart the server by typing: Reboot now.
Running a Masternode DASH requires you to collateralize 1000 DASH. And a Masternode can be registered using the official Dash Core. That said, hardware wallets are an option with enhanced security.
But in this article, we will use a software wallet because it is more popular.
First, you have to download Dash Core Wallet. Then you open it up and wait for it to sync, syncing may take some time. It will appear as shown below when fully synced:
Then you select Tools > Debug Console to open the console. Enter the command into the console and create a new Dash address for the mortgage account below:
Remember to save the collateral as we will need it later
For security purposes, encrypt the wallet by Settings > encrypt wallet. Save your password and make sure no one knows about it.
Readmore: What Is a Crypto Wallet? How It Works
Back up your wallet by choosing File > Backup Wallet. Save the file to an external hard drive or other storage unrelated to your computer. So, when anything happens to your hardware, you can still access your funds.
What to do now is to send exactly 1000 DASH in one transaction to the collateral address you created in the previous step. Then, view the transaction as it’s completed in the Blockchain Explorer by searching for the address.
At that point, you’ll need 15 confirmations before you can sign up for a masternode, but you’ll likely continue with the next step: generating your masternode operator key.
Install Dash Core
Dash Core is a software that runs the Dash Core graphical user interface wallet alongside Dash Masternodes and is also behind the Dash blockchain.
Open PuTTY again to connect using the username and password for your new, non-root user.
To make it easier, install Dash Core using the automatic installation method driver. Using Dashman to install Dash, enter the following commands after logging in:
– git clone https://gifthub.com/moocowinoo/dashman
– ~/dashman/dashman install
Press Y and Enter to confirm
Dashman will then download the latest version of Dash Core for your system, along with an initial snapshot of the blockchain to speed up the startup process. Then download and install Sentinel, required for masternodes at version 0.12.1 and above:
– ~/dashman/dasman install Sentinel
And your system will then be run as a standard Dash node and synchronized with the blockchain. Dashman will not automatically restart your masternode in the event of a system failure, so add the ability to check in crontab to make sure it checks every minute to make sure the masternode is still running:
– crontab – e
Select nano as the editor and enter the following line at the end of the file:
– *****pidof dashd | | ~/.dashcore/dashd
Then press Enter to make sure that there is a blank line at the end of the file, then press Ctrl + X to close the editor again and then save the file with Y and Enter. Check sync status and wait for all blockchain syncs and 15 collateral confirmations to complete:
– ~/dashman/ dashman status
Register your Masternode
– identify sponsorship transaction
First, we have to find the txid (transaction ID) of the transaction. Click Tools > Debug Console and enter the command:
– masternode output
This will return a string literal:
The first long string will be your margin, the last number the mortgage account.
– Generate BLS . key pair
A public/Private BLS key pair will be required to operate the masternode.
If you are currently using a hosting service, they will probably provide you with a public key so you can skip this step.
If you are hosting your masternode, you should generate a BLS public/private key pair in Dash Core by clicking Tools>Debug Console and entering the following command:
– bls created
Save these keys you must write down or keep them in a safe place.
– Add private key to your masternode configuration
The public key will then be used in the following steps. The private key must be entered in the dash.conf file on the masternode. Log in to your masternode with ssh or putty to be able to edit the configuration as follows:
– nano ~/.dashcore/dash.con
The editor will appear with the existing masternode configuration. These lines can be added or uncommented in the file, replacing the key with the BLS private key generated above:
– masternode = 1
Then press Enter to make sure that there will be a blank line at the end of the file, press Ctrl +X to close the editor and Y + Enter to save the file. The masternode must be restarted for this change to take effect.
Next, enter the following commands, taking the amount and seconds for Dash Core to have time to shut down:
– ~ / .dashcore / strikethrough-cli stop
– sleep 15 minutes
– ~ / .dashcore / dashd
– Prepare ProRegTx . transactions
Once there, a BLS key pair for the operator was generated above and the private key was imported on the masternode. The public key used in this transaction will be the same as operatorPubKey
First, we need to get a new, unused address from the wallet as the owner Key Address (ownerKeyAddr). They will not be the same as collateral account addresses holding 1000 Dash. Which creates a new address like this:
This address can be used as the voting key address (votingKeyAddr ). Alternatively, you can also specify an address that your selected voting delegate gives you, or you will create a new voting key address as follows:
Next, create or select an existing address that can receive the owner’s masternode payments (payoutAddress). Or you can also use the address outside the wallet:
You can also use the option to create and choose to fund another address as a source of transaction fees (feeSourceAddress). And if you have selected an external billing address, it is imperative that you specify a source address. At that time, the billing address or the fee source address must ensure enough balance to be able to pay the transaction fees. Otherwise trade register_submit at the end will fail.
Along with that, the private keys for the owners and their wallet source addresses must be included in the transaction fees to the network. And if your wallet is being password protected, it will be unlocked so that the following commands can be executed. It will unlock your wallet within 5 minutes:
– walletpassphrase yourSecretPassword 300
Next, you will have to prepare an unsigned ProRegTx special transaction using the protx register_prepare command. The syntax of this command is as follows:
protx register_prepare collateralHash collateralIndex ipAndPort ownerKeyAddr
operatorPubKey votingKeyAddr operatorReward payoutAddress (feeSourceAddress)
Open a text editor such as notepad to prepare this command. Replace each argument to the command as follows:
CollateralHash: Txid of 1000 Dash Collateral Financing Transaction
collateralIndex : Output index of funding transaction 1000 Dash
ipAndPort: Masternode IP address and port, in format xxxx:yyyy
ownerKeyAddr: The above newly created Dash address for the owner/voting address
operatorPubKey: BLS public key generated above (or provided by your hosting service)
voteKeyAddr: The above newly created Dash address, or delegate address, is used to vote the proposal
operatorReward: Proportion of the block reward allocated to the operator as payment
payoutAddress: New or existing Dash address to receive owner’s masternode rewards
feeSourceAddress: An address (optional) used to fund ProTx fees. payoutAddress will be used if not specified.
Some notes that the operator will be responsible for “Specifying their own reward” address in a separate update_service transaction when you specify an operatorReward.
At that time, the masternode collateral account owner will not specify the operator’s billing address.
Here are some examples
– How to remove line breaks when copying:
Then use collateralAddress and signMessage to be able to sign the transaction and the result of the tx field to make the transaction
– Sign ProRegTx transactions
We will now sign the content of the signMessage field using the private key for the collateral address as specified in collateralAddress. The command takes the following syntax:
signmessage collateralAddress signMessage
For an easy-to-understand example:
signmessage yjSPYvgUiAQ9AFj5tKFA8thFLoLBUxQERb yjZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN|0|yfgxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip|yfRaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg|ad5f82257bd00a5a1cb5da1a44a6eb8899cf096d3748d68b8ea6d6b10046a28e
II8JvEBMj6I3Ws8wqxh0bXVds6Ny + 7h5HAQhqmd5r / 0lWBCpsxMJHJT3KBcZ23oUZtsa6gjgISf + a8GzJg1BfEg =
Submit the signed message
And your Masternode is registered; it appears in the specified Masternode list after the transaction has been mined into a block.
You can then view this list on the Dash Core wallet’s Masternodes -> DIP3 Masternodes tab, or you can view it in the console using the valid protx command list, where the txid of the transaction protx register_submit will verify. Define your Masternode.
In the meantime, you can return to the terminal window and easily monitor your Masternode by using command ~/dashman/dashman status status, enter Masternode status ~/.dashcore/dash-climasternodes tatus or can use the Get Status feature in DMT.
The final result will appear:
Finally, log out of the server by typing exit .
Your new Masternode is running on the system. Congratulations!
The article on How to set up a Masternode above has almost fully demonstrated how to create and make your Masternode work. This is a reference article for the purpose of sharing content for new investors who want to invest in masternode. Finally, I wish Masternode investors to be able to run their masternode through the above tutorial and wish you all success.