Masternodes store a copy of the entire blockchain, they are available whenever possible, they manage immediate cash (InstantSend) and they secure the network. In addition to mining, providing a masternode is another way to generate coins.
For the operation of a masterternode you need
- a computer connected to the Internet with a fixed IP throughout. This could be, for example, a shared Virtual Private Server (VPS) with Linux Ubuntu 16.04
- The DMS wallet, which usually runs on your local PC.
- 5000 DMS coins as a masternode collateral.
Setting up a Masternode
1. In the wallet software "DMS Core" on your local computer
- Please select the menu command .
- At the bottom of the text box, please enter masternode genkey and press Enter. You will need the return value later.
- Now enter getaccountaddress MN1 ein. "MN1" is the recommended name for your first masternode. Alternatively, you can also use the address under .
- Send exactly 5000 DMS to this new address.
Open the Github website and copy the link to the latest Linux release to the clipboard. This will be used at "wget" below.
2. On the VPS
Connect with an SSH client to your Virtual Private Server and enter the following commands into the Linux console:
- mkdir dms
- cd dms
- wget https://github.com/Krekeler/documentchain/releases/download/v0.12.11.0/dmscore-0.12.11-x86_64-linux-gnu.tar.gz (replace the URL with the latest release)
- tar xzf dmscore-0.12.11-x86_64-linux-gnu.tar.gz
- rm dmscore-0.12.11-x86_64-linux-gnu.tar.gz
- ./dmsd -daemon
- Wait a moment, the data directory ~/.dmscore is created.
- killall dmsd
- Check the firewall status: ufw status
- If you are running a firewall, please open port 41319: ufw allow 41319/tcp
Adapt the configuration file dms.conf. You can freely assign "rpcuser" and "rpcpassword". "externalip" is the IP of the VPS followed by port 41319. You have previously created "masternodeprivkey" in the local wallet with the genkey command. "addnode" is possible, but not required. The addresses of some masternodes are hard-coded.
- vi ~/.dmscore/dms.conf
As a template, you can copy the example file to the clipboard. In vi, press i and then right-click to paste from clipboard. Save the file with <Esc>, :w<Enter>, :q<Enter>. Of course you can also use another editor than vi.
- ./dmsd -daemon
- ./dms-cli getinfo to verify that the daemon is running.
- The daemon is now syncing with the blockchain, which may takes some time. You can enter
./dms-cli mnsync status to get the synchronization status. Proceed immediately with the following instructions.
3. "DMS Core" on your local computer
Go to the Transactions tab page and hover your mouse over the previously created 5000-coin Masternode transfer. A pop-up will show the number of recent confirmations for this payment:
You must wait at least 15 confirmations before proceeding. On average, 15 confirmations take 90 minutes.
- Menu .
- Enter masternode outputs. You will get an output like "120326c48d9d46abc64f5a123427fb63abcbd7512337c97f5abc879fea123e1b": "1".
- Menu , to load "masternode.conf" into the editor.
- Add a new line at the end and enter your data:
Name IP:Port Key Outputs1 Outputs2
Name is in our example "MN1".
The IP of your VPS followed by port 41319.
The key was initially generated.
Outputs1 is the transaction ID, which you have queried with "masternode outputs"
and Outputs2 the number behind, in our example it is 1.
- Save masternode.conf
- Menu .
- On tab Wallet, check the options Enable coin control features and Show Masternodes Tab.
- Save with OK, exit the Wallet and restart.
4. On the VPS
Use ./dms-cli mnsync status to verify that synchronization is now complete:
Please wait until "IsBlockchainSynced", "IsMasternodeListSynced", "IsWinnerListSynced" and "IsSynced" have the value "true".
5. "DMS Core" on your local computer
- Go to the tab page Masternodes.
- Select the newly created MN1 and click on Start Alias.
6. Set up automatic service start on VPS (optional)
Your provider will probably restart the VPS occasionally. To run dmsd automatically afterwards, you can create a service unit:
- cd /etc/systemd/system/
- vi dms.service
- Adapt the sample file shown below to your IT-environment and copy the content to the editor. Save and exit editor.
- systemctl enable dms.service
Check the masternode status in your local wallet regularly. You should restart it, if the status is "NEW_START_REQUIRED". Check the VPS, if the status "MISSING" is shown.