Documentchain Masternodes

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. Since version 0.17 deterministic masternodes are supported.

To operate a masternode you need

  • a computer connected to the Internet with a fixed IPv4 throughout. This could be, for example, a shared Virtual Private Server (VPS) with Linux Ubuntu 20.04
  • The DMS wallet, which usually runs on your local PC.
  • 5000 DMS coins as a masternode collateral (see Shared Masternode if you have less coins).
Screenshot: Deploy Masternode

Setting up a Masternode

1. In the wallet software “DMS Core” on your local computer

  • You will need a DMS address in your wallet with a balance of at least 5000.1 DMS. This is required for the masternode collateral and transaction fees. Copy the address to the clipboard.
  • Please open the Masternodes tab page. If it is not visible, first select the menu command Settings| Options and activate Wallet | Show Masternode Tab.
  • Click on the Deploy Masternode mouse button.
  • Activate the Create Collateral Transaction option, to create the payout address and transfer 5,000 DMS collateral to it.
  • Please confirm by clicking Yes.
  • In the following dialog the masternode IP is requested. Enter the IPv4 with port, for example “12.23.34.45:41319”. Click on OK.
  • As the fund address, paste the previously copied address with min. 5,000.1 DMS and click OK.
  • Confirm the final prompt “send protx”, the provider transaction will now be sent.
  • In the confirmation dialog, check Show dms.conf suggestion and click OK.
  • Please leave the last dialog box with the dms.conf open or copy the content to a text file.

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.17.0.3/dmscore-0.17.0-x86_64-linux-gnu.tar.gz (replace the URL with the latest release)
    If a certificate error occurs: apt-get install ca-certificates
  • tar -xzf dmscore-0.17.0-x86_64-linux-gnu.tar.gz
  • rm dmscore-0.17.0-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. For this, note the last dialog in your local wallet: the lower block is the proposal for your dms.conf. “rpcuser” and “rpcpassword” you should change. “externalip” is the IP of the VPS followed by port 41319. “addnode” is possible, but not required. The addresses of some masternodes are hard-coded.

Example file:

rpcuser=dmsrpcuser
rpcpassword=MyPassword
rpcallowip=127.0.0.1
rpcport=41320
server=1
listen=1
daemon=1
maxconnections=125
masternodeblsprivkey=6948638e769d7a…
externalip=12.23.34.45:41319

  • nano ~/.dmscore/dms.conf
    As a template, you can copy the example file to the clipboard and paste it into nano with the right mouse button. Save the file with Ctrl+O and close nano with Ctrl+X. Of course you can also use another editor than nano.
  • Tip: download option for faster synchronization of the blockchain.
  • ./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. Initially only the headers will be synchronized, you will not see any progress for the first two or three hours. You can enter ./dms-cli mnsync status to get the synchronization status.

3. 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 or set a cron job:

  • crontab -e
  • Add the line:
    * * * * * pidof ~/dms/dmsd || ~/dms/dmsd –daemon

4. Set up fail2ban on VPS (optional)

For security reasons you should install fail2ban. This will prevent mass login attempts with randomly guessed passwords.

  • apt install fail2ban
  • vi /etc/fail2ban/jail.local
  • Adapt the sample file shown below and copy the content to the editor. Save and exit editor.
  • systemctl restart fail2ban
  • systemctl enable fail2ban

Example fail2ban/jail.local

[sshd]
enabled = true
port = 22
filter = sshd
logpath = /var/log/fail2ban.log
maxretry = 5

 

5. Possibly mining

Does the computer have at least 2 virtual CPU and sufficient system resources? If so, then you can use the wallet to mine coins:

dms/dms-cli setgenerate true 1

For a rented server, please check if the provider agrees. If you renting an expensive server, mining on 1 or 2 CPU will probably be ok. At a VPS for $1 each month, the provider will not calculate with a 100% CPU usage. Often, mining is even explicitly disallowed.

Tip: Weak mining. The parameter setgenerate true -2 or -3 pauses after each calculation. The system uses only a small part of one virtual CPU.

6. Monitoring

Check the masternode status in your local wallet regularly. Reactivate it when the status is “POSE_BAN”:

  • Check the VPS, is it online and is dmsd running (enter pgrep dmsd)?
  • Send a Provider Update Service Transaction: In the local wallet, right-click on the corresponding mastenode and select the menu command of the same name.

VPS

Suitable VPS for Masternodes

Some experience to choose a server for your Masternode.

We have tried some server providers with masternodes. Especially for Documentchain, but also with other Altcoins during the planning phase. Basically, one can say that 256 MB of RAM are not enough. Initially, these small VPS worked, but with increasing blockchain size, they went offline.

System requirement in our experience is 1 vCPU and 0.5 GB RAM. SSD or HDD is usually offered from 10 GB, which is quite sufficient. If you are renting a cheap server, please make sure that a upgrade option is offered.

As operating system we have installed Ubuntu 18.04 or 20.04

Tested VPS

Serverdiscounter 2)Virtual Nano with 0.2 GB€ 1.00❌

Provider VPS approx. 1) ok
deinserverhost.de KVM with 1 GB RAM € 2.00
ethernetservers.com VPS 0.5 GB RAM $ 1.25
hetzner.com CX11 with 2 GB RAM € 2.96
hetzner.com CX21 with 4 GB RAM, 2 vCPU € 5.83
hostus.us US/EU Special 2 with 0.7 GB $ 1.33 3)
hostus.us HK AP Special with 0.5 GB
Hong Kong and Singapore
$ 2.91 3)
ionos.com Cloud S with 0.5 GB $ 2,00
racknerd.com KVM mit 0,5 GB $ 0,83 3)
strato.de V3 mit 0.5 GB € 1.00
strato.de V30 with 16 GB RAM, 6 vCPU € 9.00
virmach.com Micro+ with 0,2 GB RAM $ 1.25
virmach.com Value+ with 0.5 GB RAM $ 2.00

✔ works with masterternode
❌ unsatisfactory

1) Prices per month, we have paid. For current price information see provider page.
2) Problems after setup, wrong payment allocation, no upgrade possibility.
3) Special price for annual payment via affiliate link. Tip: For other orders you can try “TOPPROVIDER” as a coupon code.