Testnet Setup

Setting up a masternode with support for evo services requires a basic understanding of Linux and blockchain technology, as well as an ability to follow instructions closely. It also requires regular maintenance and careful security, particularly if you are not storing your Dash on a hardware wallet. There are some decisions to be made along the way, and optional extra steps to take for increased security.

Commercial masternode hosting services are available if you prefer to delegate day-to-day operation of your masternode to a professional operator. When using these hosting services, you retain full control of the 1000 DASH collateral and pay an agreed percentage of your reward to the operator. It is also possible to delegate your voting keys to a representative, see the governance documentation for more information.

Before you begin

This guide assumes you are setting up a single testnet masternode for the first time. If you are updating a masternode, see here instead. You will need:

  • 1000 Dash

  • A wallet to store your Dash, preferably a hardware wallet, although Dash Core wallet is also supported

  • A Linux server, preferably a Virtual Private Server (VPS)

Dash 0.13.0 and later implement DIP003, which introduces several changes to how a Dash masternode is set up and operated. While this network upgrade was completed in early 2019, a list of available documentation appears below:

This documentation describes the commands as if they were entered in the Dash Core GUI by opening the console from Tools > Debug console, but the same result can be achieved on a masternode by entering the same commands and adding the prefix ~/.dashcore/dash-cli to each command.

Set up your VPS

A VPS, more commonly known as a cloud server, is fully functional installation of an operating system (usually Linux) operating within a virtual machine. The virtual machine allows the VPS provider to run multiple systems on one physical server, making it more efficient and much cheaper than having a single operating system running on the “bare metal” of each server. A VPS is ideal for hosting a Dash masternode because they typically offer guaranteed uptime, redundancy in the case of hardware failure and a static IP address that is required to ensure you remain in the masternode payment queue. While running a masternode from home on a desktop computer is technically possible, it will most likely not work reliably because most ISPs allocate dynamic IP addresses to home users.

We will use Vultr hosting as an example of a VPS, although DigitalOcean, Amazon EC2, Google Cloud, Choopa and OVH are also popular choices. First create an account and add credit. Then go to the Servers menu item on the left and click + to add a new server. Select a location for your new server on the following screen:


Vultr server location selection screen

Select Ubuntu 20.04 x64 as the server type. We use this LTS release of Ubuntu instead of the latest version because LTS releases are supported with security updates for 5 years, instead of the usual 9 months.


Vultr server type selection screen

Select a server size offering at least 2GB of memory.


Vultr server size selection screen

Enter a hostname and label for your server. In this example we will use dashmn1 as the hostname.


Vultr server hostname & label selection screen

Vultr will now install your server. This process may take a few minutes.


Vultr server installation screen

Click Manage when installation is complete and take note of the IP address, username and password.


Vultr server management screen

Set up your operating system

We will begin by connecting to your newly provisioned server. On Windows, we will first download an app called PuTTY to connect to the server. Go to the PuTTY download page and select the appropriate MSI installer for your system. On Mac or Linux you can ssh directly from the terminal - simply type ssh root@<server_ip> and enter your password when prompted.


PuTTY download page

Double-click the downloaded file to install PuTTY, then run the app from your Start menu. Enter the IP address of the server in the Host Name field and click Open. You may see a certificate warning, since this is the first time you are connecting to this server. You can safely click Yes to trust this server in the future.


PuTTY security alert when connecting to a new server

You are now connected to your server and should see a terminal window. Begin by logging in to your server with the user root and password supplied by your hosting provider.


Password challenge when connecting to your VPS for the first time

You should immediately change the root password and store it in a safe place for security. You can copy and paste any of the following commands by selecting them in your browser, pressing Ctrl + C, then switching to the PuTTY window and right-clicking in the window. The text will paste at the current cursor location:

passwd root

Enter and confirm a new password (preferably long and randomly generated). Next we will create a new user with the following command, replacing <username> with a username of your choice:

adduser <username>

You will be prompted for a password. Enter and confirm using a new password (different to your root password) and store it in a safe place. You will also see prompts for user information, but this can be left blank. Once the user has been created, we will add them to the sudo group so they can perform commands as root:

usermod -aG sudo <username>

Now, while still as root, we will update the system from the Ubuntu package repository:

apt update
apt upgrade

The system will show a list of upgradable packages. Press Y and Enter to install the packages. We will now install a firewall, add swap memory and reboot the server to apply any necessary kernel updates, and then login to our newly secured environment as the new user:

ufw allow ssh/tcp
ufw limit ssh/tcp
ufw allow 19999/tcp
ufw allow 26656/tcp
ufw allow 3000/tcp
ufw allow 3010/tcp
ufw logging on
ufw enable

(press Y and Enter to confirm)

fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
nano /etc/fstab

Add the following line at the end of the file (press tab to separate each word/number), then press Ctrl + X to close the editor, then Y and Enter save the file.

/swapfile none swap sw 0 0

Finally, in order to prevent brute force password hacking attacks, we will install fail2ban and disable root login over ssh. These steps are optional, but highly recommended. Start with fail2ban:

apt install fail2ban

Create a new configuration file:

nano /etc/fail2ban/jail.local

And paste in the following configuration:

enabled = true
port = 22
filter = sshd
logpath = /var/log/auth.log
maxretry = 3

Then press Ctrl + X to close the editor, then Y and Enter save the file. Retart and enable the fail2ban service:

systemctl restart fail2ban
systemctl enable fail2ban

Next, open the SSH configuration file to disable root login over SSH:

nano /etc/ssh/sshd_config

Locate the line that reads PermitRootLogin yes and set it to PermitRootLogin no. Directly below this, add a line which reads AllowUsers <username>, replacing <username> with the username you selected above. Then press Ctrl + X to close the editor, then Y and Enter save the file.

Then reboot the server:

reboot now

PuTTY will disconnect when the server reboots.

While this setup includes basic steps to protect your server against attacks, much more can be done. In particular, authenticating with a public key instead of a username/password combination and enabling automatic security updates is advisable. More tips are available here. However, since the masternode does not actually store the keys to any Dash, these steps are considered beyond the scope of this guide.

Send the collateral

A Dash address with a single unspent transaction output (UTXO) of exactly 1000 DASH is required to operate a masternode. Once it has been sent, various keys regarding the transaction must be extracted for later entry in a configuration file and registration transaction as proof to write the configuration to the blockchain so the masternode can be included in the deterministic list. A masternode can be registered from a hardware wallet or the official Dash Core wallet, although a hardware wallet is highly recommended to enhance security and protect yourself against hacking. This guide will describe the steps for both hardware wallets and Dash Core.

Option 1: Holding collateral in a hardware wallet

Set up your Trezor using the Trezor wallet at https://wallet.trezor.io/ and send a test transaction to verify that it is working properly. For help on this, see this guide - you may also choose to (carefully!) add a passphrase to your Trezor to further protect your collateral. Create a new account in your Trezor wallet by clicking Add account. Then click the Receive tab and send exactly 1000 DASH to the address displayed. If you are setting up multiple masternodes, send 1000 DASH to consecutive addresses within the same new account. You should see the transaction as soon as the first confirmation arrives, usually within a few minutes.


Trezor Wallet Receive tab showing successfully received collateral of 1000 DASH

Once the transaction appears, click the QR code on the right to view the transaction on the blockchain. Keep this window open as we complete the following steps, since we will soon need to confirm that 15 confirmations exist, as shown in the following screenshot.


Trezor blockchain explorer showing 15 confirmations for collateral transfer

While we are waiting for 15 confirmations, download the latest version of the Dash Masternode Tool (DMT) from the GitHub releases page here. Unzip and run the file. The following window appears.


Dash Masternode Tool startup screen

Click the third button from the left Check Dash Network Connection in the top left corner of the main window to verify that the connection is working. Then connect your Trezor device and click the next button Test Hardware Wallet Connection to verify the Trezor connection is working.


Dash Masternode Tool successful connection confirmations

We will now use DMT to enter some basic information about the masternode and extract the transaction ID. Carry out the following sequence of steps as shown in this screenshot:


Dash Masternode Tool configuration steps

  1. Click the New button.

  2. Enter a name for your masternode. The host name you specified for your VPS above is a good choice.

  3. Enter the IP address of your masternode. This was given to you by the VPS provider when you set up the server. Then enter the TCP port number. This should be 19999.

  4. Click Locate collateral to view unused collateral funding transactions available on the connected hardware wallet. Select the address to which you sent 1000 Dash and click Apply. The Collateral address, path, Collateral TX hash and index fields should be filled automatically.


Dash Masternode Tool with masternode configuration

Leave DMT open and continue with the next step: installing Dash Core on your VPS.

Option 2: Holding collateral in Dash Core wallet

Open Dash Core wallet and wait for it to synchronize with the network. It should look like this when ready:


Fully synchronized Dash Core wallet

Click Tools > Debug console to open the console. Type the following command into the console to generate a new Dash address for the collateral:


Take note of the collateral address, since we will need it later. The next step is to secure your wallet (if you have not already done so). First, encrypt the wallet by selecting Settings > Encrypt wallet. You should use a strong, new password that you have never used somewhere else. Take note of your password and store it somewhere safe or you will be permanently locked out of your wallet and lose access to your funds. Next, back up your wallet file by selecting File > Backup Wallet. Save the file to a secure location physically separate to your computer, since this will be the only way you can access our funds if anything happens to your computer. For more details on these steps, see here.

Now send exactly 1000 DASH in a single transaction to the new address you generated in the previous step. This may be sent from another wallet, or from funds already held in your current wallet. Once the transaction is complete, view the transaction in a blockchain explorer by searching for the address. You will need 15 confirmations before you can register the masternode, but you can continue with the next step at this point already: generating your masternode operator key.


Trezor blockchain explorer showing 15 confirmations for collateral transfer

Masternode Installation

The following tools are available for installing a Dash masternode:

dashmate installation

dashmate replaces the dashman masternode installer by moocowmoo. dashmate is based on Docker technology and features an interactive setup command and the ability to manage multiple node configs and multiple networks. It handles the installation of Dash Core and Tenderdash, as well as all dependencies and supporting services. Full dashmate documentation is available here.

Open PuTTY or a console again and connect using the username and password you just created for your new, non-root user. Begin by installing dashmate dependencies:

sudo apt install -y git curl docker.io docker-compose
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
source ~/.bashrc
nvm install --lts

Add your current user to the docker group, ensure docker starts on boot and refresh the environment:

sudo usermod -aG docker $USER
newgrp docker
sudo systemctl enable docker
sudo systemctl enable containerd

Clone the dashmate repository, set up the dependencies and link the CLI:

git clone -b master https://github.com/dashevo/dashmate.git
cd dashmate
npm ci
npm link

Run the interactive setup wizard:

dashmate setup

You will be prompted to select a network, node type, IP address and BLS private key. Enter this information or accept the detected/generated defaults. Start your node as follows:

dashmate start

You can manage your masternode status, configuration, and running state entirely from within dashmate. See the documentation here or use the built-in help system to learn more:

  • dashmate --help

  • dashmate <command> --help


dashmate displaying a range of status output

You can check the status of your masternode using the various dashmate status commands as follows:

- dashmate status
- dashmate status:core
- dashmate status:host
- dashmate status:masternode
- dashmate status:platform
- dashmate status:services

Continue with the Registration step to setup the collateral, keys and construct the ProTx transaction required to enable your masternode.

Masternode Update

You can use dashmate to update minor versions of the software on your masternode as follows:

dashmate stop
dashmate update
dashmate start

Adding the following git and npm commands optionally also ensures you are using the latest stable version of dashmate:

dashmate stop
git checkout master
git pull
npm ci
dashmate update
dashmate start

Adding the following command will drop all data from Dash Platform (necessary if Platform has been wiped) and restart with the latest version:

dashmate stop
git checkout master
git pull
npm ci
dashmate reset --platform-only
dashmate update
dashmate start

Masternode registration

DIP003 introduced several changes to how a masternode is set up and operated. These changes and the three keys required for the different masternode roles are described briefly under DIP003 Masternode Changes in this documentation.

Option 1: Registering from a hardware wallet

Go back to DMT and ensure that all fields from the previous step are still filled out correctly. Click Generate new for the three private keys required for a DIP003 deterministic masternode:

  • Owner private key

  • Operator private key (generate new or use private key generated by dashmate)

  • Voting private key


Dash Masternode Tool ready to register a new masternode

Then click Register masternode. Optionally specify a different Payout address and/or Operator reward, then click Continue. Select Remote Dash RPC Node (automatic method). (See here for documentation on using your own local RPC node.) and confirm the following two messages:


Dash Masternode Tool confirmation dialogs to register a masternode

The public key will be used in following steps. The private key must be entered in the configuration on the masternode. This allows the masternode to watch the blockchain for relevant Pro*Tx transactions, and will cause it to start serving as a masternode when the signed ProRegTx is broadcast by the owner (final step below). If you are using the BLS key generated by dashmate setup, this information is already configured for your masternode. If you generated your own BLS key pair, edit the dashmate configuration as follows:

dashmate config:set core.masternode.operator.privateKey <bls_private_key>
dashmate restart

At this point you can go back to your terminal window and monitor your masternode by entering dashmate status or using the Get status function in DMT.

You can now safely log out of your server by typing exit. Congratulations! Your masternode is now running.

Option 2: Registering from Dash Core wallet

Identify the funding transaction

If you used an address in Dash Core wallet for your collateral transaction, you now need to find the txid of the transaction. Click Tools > Debug console and enter the following command:

masternode outputs

This should return a string of characters similar to the following:

"16347a28f4e5edf39f4dceac60e2327931a25fdee1fb4b94b63eeacf0d5879e3" : "1",

The first long string is your collateralHash, while the last number is the collateralIndex.

Generate a BLS key pair

A public/private BLS key pair is required to operate a masternode. The private key is specified on the masternode itself, and allows it to be included in the deterministic masternode list once a provider registration transaction with the corresponding public key has been created.

If you are using a hosting service, they may provide you with their public key, and you can skip this step. If you are hosting your own masternode or have agreed to provide your host with the BLS private key, you can use the BLS key generated by the dashmate setup command. Alternatively, you can generate a BLS public/private keypair in Dash Core by clicking Tools > Debug console and entering the following command:

bls generate

  "secret": "395555d67d884364f9e37e7e1b29536519b74af2e5ff7b62122e62c2fffab35e",
  "public": "99f20ed1538e28259ff80044982372519a2e6e4cdedb01c96f8f22e755b2b3124fbeebdf6de3587189cf44b3c6e7670e"

These keys are NOT stored by the wallet or dashmate and must be kept secure, similar to the value provided in the past by the masternode genkey command.

Add the private key to your masternode configuration

The public key will be used in following steps. The private key must be entered in the dash.conf file on the masternode. This allows the masternode to watch the blockchain for relevant Pro*Tx transactions, and will cause it to start serving as a masternode when the signed ProRegTx is broadcast by the owner (final step below). If you are using the BLS key generated by dashmate setup, this information is already configured for your masternode. If you generated your own BLS key pair, edit the dashmate configuration as follows:

dashmate config:set core.masternode.operator.privateKey <bls_private_key>
dashmate restart

We will now prepare the transaction used to register the masternode on the network.

Prepare a ProRegTx transaction

A pair of BLS keys for the operator were already generated above, and the private key was entered on the masternode. The public key is used in this transaction as the operatorPubKey.

First, we need to get a new, unused address from the wallet to serve as the owner key address (ownerKeyAddr). This is not the same as the collateral address holding 1000 Dash. Generate a new address as follows:



This address can also be used as the voting key address (votingKeyAddr). Alternatively, you can specify an address provided to you by your chosen voting delegate, or simply generate a new voting key address as follows:



Then either generate or choose an existing address to receive the owner’s masternode payouts (payoutAddress). It is also possible to use an address external to the wallet:



You can also optionally generate and fund another address as the transaction fee source (feeSourceAddress). If you selected an external payout address, you must specify a fee source address.

Either the payout address or fee source address must have enough balance to pay the transaction fee, or the register_prepare transaction will fail.

The private keys to the owner and fee source addresses must exist in the wallet submitting the transaction to the network. If your wallet is protected by a password, it must now be unlocked to perform the following commands. Unlock your wallet for 5 minutes:

walletpassphrase yourSecretPassword 300

We will now prepare an unsigned ProRegTx special transaction using the protx register_prepare command. This command has the following syntax:

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: The txid of the 1000 Dash collateral funding transaction

  • collateralIndex: The output index of the 1000 Dash funding transaction

  • ipAndPort: Masternode IP address and port, in the format x.x.x.x:yyyy

  • ownerKeyAddr: The new Dash address generated above for the owner/voting address

  • operatorPubKey: The BLS public key generated above (or provided by your hosting service)

  • votingKeyAddr: The new Dash address generated above, or the address of a delegate, used for proposal voting

  • operatorReward: The percentage of the block reward allocated to the operator as payment

  • payoutAddress: A new or existing Dash address to receive the owner’s masternode rewards

  • feeSourceAddress: An (optional) address used to fund ProTx fee. payoutAddress will be used if not specified.

Note that the operator is responsible for specifying their own reward address in a separate update_service transaction if you specify a non-zero operatorReward. The owner of the masternode collateral does not specify the operator’s payout address.

Example (remove line breaks if copying):

protx register_prepare


  "tx": "030001000175c9d23c2710798ef0788e6a4d609460586a20e91a15f2097f56fc6e007c4f8e0000000000feffffff01a1949800000000001976a91434b09363474b14d02739a327fe76e6ea12deecad88ac00000000d1010000000000e379580dcfea3eb6944bfbe1de5fa2317932e260acce4d9ff3ede5f4287a34160100000000000000000000000000ffff2d4ce6ef4e1fd47babdb9092489c82426623299dde76b9c72d9799f20ed1538e28259ff80044982372519a2e6e4cdedb01c96f8f22e755b2b3124fbeebdf6de3587189cf44b3c6e7670ed1935246865dce1accce6c8691c8466bd67ebf1200001976a914fef33f56f709ba6b08d073932f925afedaa3700488acfdb281e134504145b5f8c7bd7b47fd241f3b7ea1f97ebf382249f601a0187f5300",
  "collateralAddress": "yjSPYvgUiAQ9AFj5tKFA8thFLoLBUxQERb",
  "signMessage": "yjZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN|0|yfgxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip|yfRaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg|ad5f82257bd00a5a1cb5da1a44a6eb8899cf096d3748d68b8ea6d6b10046a28e"

Next we will use the collateralAddress and signMessage fields to sign the transaction, and the output of the tx field to submit the transaction.

Sign the ProRegTx transaction

We will now sign the content of the signMessage field using the private key for the collateral address as specified in collateralAddress. Note that no internet connection is required for this step, meaning that the wallet can remain disconnected from the internet in cold storage to sign the message. In this example we will again use Dash Core, but it is equally possible to use the signing function of a hardware wallet. The command takes the following syntax:

signmessage collateralAddress signMessage


signmessage yjSPYvgUiAQ9AFj5tKFA8thFLoLBUxQERb yjZVt49WsQd6XSrPVAUGXtJccxviH9ZQpN|0|yfgxFhqrdDG15ZWKJAN6dQvn6dZdgBPAip|yfRaZN8c3Erpqj9iKnmQ9QDBeUuRhWV3Mg|ad5f82257bd00a5a1cb5da1a44a6eb8899cf096d3748d68b8ea6d6b10046a28e



Submit the signed message

We will now submit the ProRegTx special transaction to the blockchain to register the masternode. This command must be sent from a Dash Core wallet holding a balance on either the feeSourceAddress or payoutAddress, since a standard transaction fee is involved. The command takes the following syntax:

protx register_submit tx sig


  • tx: The serialized transaction previously returned in the tx output field from the protx register_prepare command

  • sig: The message signed with the collateral key from the signmessage command


protx register_submit 030001000175c9d23c2710798ef0788e6a4d609460586a20e91a15f2097f56fc6e007c4f8e0000000000feffffff01a1949800000000001976a91434b09363474b14d02739a327fe76e6ea12deecad88ac00000000d1010000000000e379580dcfea3eb6944bfbe1de5fa2317932e260acce4d9ff3ede5f4287a34160100000000000000000000000000ffff2d4ce6ef4e1fd47babdb9092489c82426623299dde76b9c72d9799f20ed1538e28259ff80044982372519a2e6e4cdedb01c96f8f22e755b2b3124fbeebdf6de3587189cf44b3c6e7670ed1935246865dce1accce6c8691c8466bd67ebf1200001976a914fef33f56f709ba6b08d073932f925afedaa3700488acfdb281e134504145b5f8c7bd7b47fd241f3b7ea1f97ebf382249f601a0187f5300 II8JvEBMj6I3Ws8wqxh0bXVds6Ny+7h5HAQhqmd5r/0lWBCpsxMJHJT3KBcZ23oUZtsa6gjgISf+a8GzJg1BfEg=



Your masternode is now registered and will appear on the Deterministic Masternode List after the transaction is mined to a block. You can view this list on the Masternodes -> DIP3 Masternodes tab of the Dash Core wallet, or in the console using the command protx list valid, where the txid of the final protx register_submit transaction identifies your masternode.

At this point you can go back to your terminal window and monitor your masternode by entering dashmate status or using the Get status function in DMT.

Manual installation

The manual installation guide is currently a work in progress.

This guide describes how to manually download and install the components of your Dash masternode under Ubuntu Linux 20.04 LTS “Focal Fossa” assuming you have a non-root user named dash. You will need to manually adjust apt commands if using a different distro.

Core services

Prepare your environment for installing keys through GPG:

sudo mkdir -m 600 /root/.gnupg

Dash Core

Dash Core is a fork of Bitcoin Core and is responsible for all consensus and communication relating to the base blockchain. Download Dash Core as follows:

cd /tmp
wget https://github.com/dashpay/dash/releases/download/v0.17.0.3/dashcore-

Verify the authenticity of your download by checking its detached signature against the public key published by the Dash Core development team. All releases of Dash are signed using GPG with one of the following keys:

curl https://keybase.io/codablock/pgp_keys.asc | gpg --import
curl https://keybase.io/pasta/pgp_keys.asc | gpg --import
wget https://github.com/dashpay/dash/releases/download/v0.17.0.3/dashcore-
gpg --verify dashcore-

Extract the compressed archive and copy the necessary files to the directory:

tar xfv dashcore-
sudo install -t /usr/local/bin dashcore-0.17.0/bin/*

Create a working directory for Dash Core:

mkdir ~/.dashcore

Configure Dash Core:

externalip=$(curl ifconfig.co)


Optionally replace the rpcuser and rpcpassword fields with your own values. Leave the masternodeblsprivkey field commented out for now. Configure Dash Core to start as a service:

cat << EOF | sudo tee /etc/systemd/system/dashd.service
Description=Dash Core
After=syslog.target network-online.target

ExecStop=/usr/local/bin/dash-cli stop


Start Dash Core:

sudo systemctl daemon-reload
sudo systemctl enable dashd
sudo systemctl start dashd

Verify Dash Core is running:

sudo systemctl status dashd


Sentinel is a watchdog and works to communicate to the network that your node is working properly. Install Sentinel as follows:

sudo apt install -y python3-virtualenv
git clone -b master https://github.com/dashpay/sentinel.git
cd sentinel
virtualenv venv
venv/bin/pip install -r requirements.txt
venv/bin/python bin/sentinel.py

You will see a message reading dashd not synced with network! Awaiting full sync before running Sentinel. Use the following command to monitor sync status:

dash-cli mnsync status

When synchronisation is complete, you should see the following response:

  "AssetID": 999,
  "AssetStartTime": 1558596597,
  "Attempt": 0,
  "IsBlockchainSynced": true,
  "IsSynced": true,
  "IsFailed": false


Tor is an internet relay system designed to preserve anonymity on the internet. Install Tor as follows:

sudo gpg --no-default-keyring --keyring /usr/share/keyrings/tor-archive-keyring.gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys A3C4F0F979CAA22CDBA8F512EE8CBC9E886DDD89
echo "deb [signed-by=/usr/share/keyrings/tor-archive-keyring.gpg] https://deb.torproject.org/torproject.org $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/tor.list
sudo apt update
sudo apt install tor deb.torproject.org-keyring

Platform services

Next, we will install the Dash Platform services. Start with some common dependencies:

curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt install -y libzmq3-dev nodejs build-essential
sudo npm install forever -g


MongoDB is a document-oriented database. Install MongoDB as follows:

sudo gpg --no-default-keyring --keyring /usr/share/keyrings/mongodb-archive-keyring.gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 20691EEC35216C63CAF66CE1656408E390CFB1F5
echo "deb [signed-by=/usr/share/keyrings/mongodb-archive-keyring.gpg] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb.list
sudo apt update
sudo apt install -y mongodb-org

Configure MongoDB:

sudo sed -i 's/#replication:/replication:\n  replSetName: driveDocuments/' /etc/mongod.conf

Restart MongoDB:

sudo systemctl restart mongod

Initiate the MongoDB client:

mongo<<<"rs.initiate({_id:'driveDocuments',version: 1,members:[{_id: 0,host: 'localhost:27017',},],});"

Verify MongoDB is running:

sudo systemctl status mongod


Drive is a replicated state machine for Dash Platform. Download Drive as follows:

git clone -b master https://github.com/dashevo/js-drive
cd js-drive
cp .env.example .env

Configure Drive:

sed -i 's/^CORE_JSON_RPC_PORT.*/CORE_JSON_RPC_PORT=19998/' .env
cat<<EOF>> .env

Install package dependencies:

npm_config_zmq_external=true npm install

Start Drive:

forever start -a --uid "drive" scripts/abci.js

Verify Drive is running by checking for a time value under uptime:

forever list


Tenderdash is a fork of Tendermint and is the blockchain implementation used by Dash Platform. As binaries are not yet published, you will need to build from source. Install Go as follows:

cd /tmp
wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.16.4.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin

Build and install Tenderdash as follows:

sudo apt install -y cmake libgmp-dev
git clone -b coreChainLocksV6 https://github.com/dashevo/tenderdash
cd tenderdash
make install-bls
make build-linux
sudo install -t /usr/local/bin build/*

Initialize Tenderdash:

tenderdash init

Several files will be generated in the ~/.tenderdash directory. Modify the configuration with the following commands:

sed -i 's/\(^moniker.*\)/#\1/' ~/.tenderdash/config/config.toml
sed -i 's/^timeout_commit.*/timeout_commit = "500ms"/' ~/.tenderdash/config/config.toml
sed -i 's/^create_empty_blocks_interval.*/create_empty_blocks_interval = "3m"/' ~/.tenderdash/config/config.toml
sed -i 's/^namespace.*/namespace = "drive_tendermint"/' ~/.tenderdash/config/config.toml
sed -i 's/^seeds.*/seeds = "aa4c3870e6cebd575c80371b4ae0e902a2885e14@,81c79324942867f694ee49108f05e744c343f5a1@"/' ~/.tenderdash/config/config.toml
curl https://gist.githubusercontent.com/strophy/ca6acd23bbdec1e55f322dac04a1059d/raw/a2786b3f390e4a6310b66bab05de0f383b6c49ed/genesis.json > ~/.tendermint/config/genesis.json

Configure Tenderdash to start as a service:

cat << EOF | sudo tee /etc/systemd/system/tenderdash.service
After=syslog.target network-online.target

ExecStart=/usr/local/bin/tenderdash node


Ensure Dash Core is fully synced and start Tenderdash:

sudo systemctl daemon-reload
sudo systemctl enable tenderdash
sudo systemctl start tenderdash

Verify Tenderdash is running:

sudo systemctl status tenderdash


DAPI provides masternode services over the JSON RPC and gRPC protocols. Download DAPI as follows:

git clone -b master https://github.com/dashevo/dapi
cd dapi
cp .env.example .env

Modify the configuration with the following commands:

sed -i 's/^API_JSON_RPC_PORT.*/API_JSON_RPC_PORT=3004/' .env
sed -i 's/^API_GRPC_PORT.*/API_GRPC_PORT=3005/' .env
sed -i 's/^DASHCORE_RPC_PORT.*/DASHCORE_RPC_PORT=19998/' .env
sed -i 's/^DASHCORE_ZMQ_PORT.*/DASHCORE_ZMQ_PORT=29998/' .env
sed -i 's/^DASHCORE_P2P_PORT.*/DASHCORE_P2P_PORT=19999/' .env

Install package dependencies:

npm_config_zmq_external=true npm install

Start DAPI:

forever start -a --uid "dapi" scripts/api.js

Start the transaction filter stream:

forever start -a --uid "tx-filter-stream" scripts/tx-filter-stream.js


Envoy is a gRPC service proxy for cloud-native applications. Install Envoy as follows:

sudo gpg --no-default-keyring --keyring /usr/share/keyrings/envoy-archive-keyring.gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 5270CEAC57F63EBD9EA9005D0253D0B26FF974DB
echo "deb [signed-by=/usr/share/keyrings/envoy-archive-keyring.gpg] https://dl.bintray.com/tetrate/getenvoy-deb focal stable" | sudo tee /etc/apt/sources.list.d/envoy.list
sudo apt update
sudo apt install -y getenvoy-envoy

Configure Envoy as follows:

sudo mkdir /etc/envoy
curl https://gist.githubusercontent.com/strophy/3724a3537d4cbc6fbdba169768392f28/raw/ba521d719c198f9bb44cf3231ad6507ac4418900/grpc.yaml | sudo tee /etc/envoy/config.yaml

Configure Envoy to start as a service:

cat << EOF | sudo tee -a /etc/systemd/system/envoy.service
After=syslog.target network-online.target

ExecStart=bash -c '/usr/bin/envoy --config-path /etc/envoy/config.yaml | tee'


Start Envoy:

sudo systemctl daemon-reload
sudo systemctl enable envoy
sudo systemctl start envoy

Verify Envoy is running:

sudo systemctl status envoy

Finishing up

Ensure services managed by forever start on reboot:

* * * * * cd ~/.dashcore/sentinel && ./venv/bin/python bin/sentinel.py 2>&1 >> sentinel-cron.log
@reboot { sleep 5;cd ~/js-drive&&forever start -a --uid "drive" scripts/abci.js;}
@reboot { sleep 6;cd ~/dapi&&forever start -a --uid "dapi" scripts/api.js;}
@reboot { sleep 7;cd ~/dapi&&forever start -a --uid "tx-filter-stream" scripts/tx-filter-stream.js;}

At this point you can safely log out of your server by typing exit. Congratulations! Your masternode is now running.

Developer installation

Developers requiring a local masternode can get started quickly by starting dashmate and providing a private key containing collateral directly. Install dependencies if necessary (Docker, NodeJS, NPM, Github CLI). Windows, macOS and Linux are supported, the following example shows how to install dependencies under Ubuntu 20.04 LTS.:

curl -sL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0
sudo apt-add-repository https://cli.github.com/packages
sudo apt install -y nodejs git docker.io docker-compose
sudo usermod -aG docker $USER
newgrp docker

Generate a new Dash address for temporary use using this script or the getnewaddress and dumpprivkey RPC commands in Dash Core in testnet mode. Go to https://testnet-faucet.dash.org/ and request 1000+ tDash to your new address using the promo code ‘masternode’. Then download and initialize dashmate as follows:

git clone -b master https://github.com/dashevo/dashmate.git
cd dashmate
npm install && sudo npm link

If you are using Windows, you will need to change the path for two log files. Modify the example below with a log path of your choosing:

dashmate config:set platform.drive.abci.log.prettyFile.path C:\Users\strophy\Documents\GitHub\dashmate\testnet-drive-pretty.log
dashmate config:set platform.drive.abci.log.jsonFile.path C:\Users\strophy\Documents\GitHub\dashmate\testnet-drive-json.log

Register your masternode on the network as follows:

dashmate setup testnet masternode -p <funding-private-key>

Wait until sync and registration are complete. Then start the masternode:

dashmate start

Your masternode is now providing service on the following local ports:

Core P2P:     19999
Core RPC:     19998
Platform P2P: 26656
Platform RPC: 26657
DAPI HTTP:    3000
DAPI gRPC:    3010

Note that platform sync will take some time after core sync is complete. You can monitor progress with dashmate status:platform or use dashmate --help to view other commands.