This guide is designed for Ubuntu 24.04 LTS We recommend using Ubuntu 24.04 LTS Ubuntu 22.04 LTS or Ubuntu 20.04 LTS. Many community members report to run on a different Linux distribution successful but we dont provide step by step guides.
Validator Node Spec recommendation: 4 core 8 gb ram 200gb ssd (growing with blockchain size) and flatrate minimum 100 mbit (up&down) internet access with static IP address and port 17771 open for node to node communication
for normal full node non validator operation far lower requirement cpu/ram/bandwith wise possible but to compile the node still need like 4gb ram and ssd space requirements are the same
Download the necessary files from this repository onto your node server.
We recommend using git for easy downloads and updates.
# Install git
apt install git -y
# Clone the repository for the DMD Diamond mainnet
git clone https://github.com/DMDcoin/Diamond.git
# Switch into the new directory
cd Diamond
Building the Diamond Node involves two steps:
- Preparing your machine to build the software.
- Running the build process.
This setup is required only once:
./setup-build-from-source.sh
This script fetches the latest source version and builds the binaries.
Note: The process may take up to an hour depending on your machine's performance.
./build-from-source.sh
To run a validator node without participating as a validator:
# Start the Diamond Node using the full node configuration
./diamond-node -c=fullnode.toml
Validator nodes require a dedicated unlocked account for the hbbft engine to sign block contributions.
Run the following command to create a mining key:
./dmd create_miner
This creates two files for your mining key:
./data/keys/dmd/dmd_miner_key.json(keystore format)./data/network/key(private key format)
-
Copy the template configuration file:
cp template-validator.toml validator_node.toml
-
Edit the configuration file:
nano validator_node.toml
-
Replace both instances of
put your address herewith the address generated by thedmd create_minercommand. -
Search this sektion
[footprint] TODO: set the maximum amount of memory, you can spare for this diamond-node. if no other services are running, you can set this value to almost all of your available RAM
cache_size = 5120
And adapt the cache_size value to something around 2-3 GB lower than your system memory if u have a recomendet 8gb ram server the default value should be ok (if you have other memory-hungry services, maybe even lower; keep in mind low values decrease your performance, and low performance can create score loss)
-
Start the Validator Node:
./start.sh
Check the logs to confirm that your node is syncing with the blockchain.
The following log output indicates successful synchronization:
INFO import Imported #1040 0xabfe…f189 (0 txs, 0.00 Mgas, 29 ms, 0.56 KiB)
For the latest block information, visit the block explorer.
Use a wallet like MetaMask or the Brave Browser to connect to the DMD Diamond v4 Network. Any key management system that supports ethereum address schema can be used as long as it supports custom chain configuration and walletconnect to interact with dapps
- Network Name: Diamond
- RPC URL: https://rpc.bit.diamonds
- Chain ID: 17771
- Symbol: DMD
- Block Explorer URL: https://explorer.bit.diamonds
To use your own RPC endpoint, start your node with:
./diamond-node -c=rpcnode.toml
Replace the RPC URL with your server's IP address.
To stake on your node:
- Ensure your node is running.
- Have atleast **10,000 DMD available and a fraction of a DMD exctra for the fee of the stake validator collateral smartcontract interaction later (this coins should not be send towards the miner_address we created before! a misstake often reported in BETA)
Your public key can be found in the following locations:
./public_key.txt- In the node startup log (under "Public node URL").
Visit the Diamond-UI and enter your public key.
Follow the instructions to set up a pool with a staking amount between **10,000 and 50,000 DMD
For more details: Diamond-UI Guide
If u own DMD Diamond v3 coins at snapshot block 1851895 u can claim them following the guide here https://claiming.bit.diamonds/ a tiny amount of DMD for enabling to interact with claiming can be requested here https://faucet.bit.diamonds/
Using tmux
-
Install
tmuxif it is not already installed:sudo apt install tmux -y
-
Start a new
tmuxsession:tmux new -s diamond-node
-
Start the node in the session:
./start.sh
-
Detach from the session (leave it running):
Ctrl+b, d
-
To reattach to the session:
tmux attach -t diamond-node
Using screen
-
Install
screenif it is not already installed:sudo apt install screen -y
-
Start a new
screensession:screen -S diamond-node
-
Run the node:
./start.sh
-
Detach from the session:
Ctrl+a, d
-
To reattach to the session:
screen -r diamond-node
Using pm2
-
Install
pm2(for debian):apt update && apt install sudo curl && curl -sL https://raw.githubusercontent.com/Unitech/pm2/master/packager/setup.deb.sh | sudo -E bash -
-
Start the node with
pm2:pm2 start "./start.sh" --name diamond-node -
View logs:
pm2 logs diamond-node
-
Restart the node:
pm2 restart diamond-node
-
Stop the node:
pm2 stop diamond-node
-
List all running pm2 services:
pm2 ls
-
Save the
pm2configuration to start automatically on reboot:pm2 save pm2 startup
Important: Then copy/paste the displayed command onto the terminal details here.