This is a step-by-step guide for adding a Dash node as a Hot Wallet Buy source. This guide was tested using the Linux 64-bit v0.12.3.3 of the Dash Core wallet. This is only an example and not to be construed as an endorsement for any particular exchange or wallet.
Dash Core runs as a daemon on your VPS (dashd), controlled by a simple command interface (dash-cli). Understand that this is not the same as accessing a Dash node run by someone else. This guide is for installing and operating your own node on your own serverwith CAS.
The following guide is written with instructions to be executed as root. This is discouraged, but simplicity is the goal in mind - not security. You should modify these procedures to safeguard your assets as needed. You will be a target for hackers, and your Dash will be at risk. You are strongly encouraged to implement any and all restrictions available to you to protect your server from unauthorized access. These enhancements however, are beyond the scope of this guide.
Before you begin:
The following example is based on the following presumptions:
Your CAS is installed and functioning.
Your server is running Ubuntu 16.04 LTS.
Your server is online.
According to the Dash official documentation, to install a node you will require:
10 GB additional free disk space
2 GB of memory (RAM)
sudo (root) access to your CLI-based server
Download and install the components:
Start at the terminal prompt.
Determine which file to download from Dash:
At the CLI, you can easily determine if your server will support 64-bit. If you are unsure, then on your CAS terminal, type:
sudo lscpu | grep '64-bit'
It should report something like: “CPU op-mode(s): 32-bit, 64-bit”
Use the modern 64-bit whenever possible.
If the command above comes back empty, you must use the 32-bit version.
This will save the URL for the download package. You’ll need this in the next step.
Now finish creating the environment variables to automate the next few steps:
Download the Dash installation file:
Change to your home directory:
Next, you’ll use the URL already identified above to download the installation package:
Extract Dash and set the appropriate permissions:
Create and enter a working directory for Dash:
Extract the compressed archive:
Copy the necessary files to the directory and set them as executable:
Cleanup the garbage files:
Create an RPC token for CAS to communicate with dashd:
First, ensure that python is installed on your server:
Now create a Remote Procedure Call (RPC) token.
RPC is a method of communication between two programs. In this case, the two programs are CAS and dashd. The RPC token is designed to eliminate the need for hard-coded passwords in the involved configuration and script files. You will receive a password here ONCE. This password is required for CAS; it's your “RPC Password”. You must save it, preferably in a secure note file or database.
Download rpcauth.py on GitHub
You should already be in the ~/.dashcore directory
THIS IS ALL ONE LINE!
Modify the file permissions to allow the script to execute:
Then finally run the RPC token generator that you just installed and enabled:
Save the name you entered above, the resulting token, AND the generated password. You'll need it in the next step. The “AnyNameYouWantHere” is the “RPC User”, and the password generated by the script is your “RPC Password”.
Create a dashd configuration file:
While you might (under certain circumstances) might want to start the daemon exclusively from a command line, we urge you to change the following settings within dash.conf and run dashd without parameters. Keep it simple!
Locate, change, and save the following settings in ~/.dashcore/dash.conf:
Replace the “rpcauth=” info with the exact token generated in the previous step.
The line "rpcauth=" is one, unbroken line!
Start the dashd daemon (background process):
Once you have modified and saved dash.conf, start the daemon:
You will see a message saying "Dash Core server starting".
You can interrupt dashd at any time using the following command:
It will resume downloading from the point where it stopped the next time you start it. It may take a few minutes to completely shut down.
You may also need to configure your firewall to allow inbound connections to port 9999.
Add Dash to autostart when your CAS server boots up:
You will eventually want dashd to start automatically when the server boots. You should ensure everything works before you do this, though.
To automatically start it up at boot time, type:
Select “nano” (if given a choice of editors), and add the following to the end of the file:
Save (using the defaults) and exit (using “nano”: ctrl-x).
Configure CAS to use Dash
Assemble the required information for CAS:
User: this is the “RPC User” you created earlier. For this example we'll just say it's “rpcuser”.
Password: is the “RPC Password” created earlier. For this example, we'll make the password “rpcpw”.
Accountname: this is the account name of your wallet. An “account” is neither required nor suggested. Account usage is deprecated in dashd, however to view any existing accounts, type:
On a newly installed server, the list is normally empty and may be safely ignored.
Next, add a new crypto-currency type to CAS:
Enter the “Crypto Settings” menu in the left-hand column.
Click on the “+ ADD” button.
Create a suitable description, i.e. “Dash Local”.
Select “DASH” for the required “Crypto Currency*” setting.
Set Configuration Cash Currency* to “USD” (or whatever your local currency might be).
Set “Buy Rate Source” to whatever source you prefer.
Set “Minimum Cash Amount Per Transaction*” to zero – this enables any sale.
Select your Hot Wallet Buy source to “dashd”.
Enter the “Parameters” for the Hot Wallet Buy source as determined in the previous step. Example: “http:rpcuser:rpcpw:127.0.0.1:9998”
Click on “SUBMIT” to save your settings.
Finally, test it out:
Select “Test Hot Wallet Buy” from the RUN BTC SETTINGS TEST.
Presuming everything was entered correctly, you should receive confirmation of success!
You should also now configure the “Hot Wallet Sell” if you implement it.
That's it. All done!
UNINSTALLING DASH CORE:
Uninstallation is essentially the reverse order of installation. The following procedures will also delete any unposted transactions and is completely irreversible. Any Dash in your local wallet will be lost forever.
THIS WILL DELETE ALL PENDING TRANSACTIONS IN YOUR LOCAL WALLET!!
THIS PROCEDURE MAY RESULT IN PERMANENT DATA AND/OR DASH LOSS!!
Change your Crypto settings in CAS to reflect your replacement hot wallet.
In CAS, navigate to “Crypto Settings” and update all settings that involve Dash.
Login to your server CLI.
Shut down the dashd daemon:
(optional) Remove any startup references in crontab:
Finally, restore your firewall to block inbound connections to port 9999.
That's it - Dash has been stopped on your server, however the data files are left behind.
This final step deletes all traces of Dash on your server!!
By removing your .dashcore directory, you are also removing your wallets/addresses and access to any Dash in those wallets. If you followed this guide, then Dash should be located in the /root/.dashcore directory and this line will delete the entire directory (and wallet/transactions).
To PERMANENTLY AND IRREVERSIBLY delete the /root/.dashcore directory:
This may take a few minutes.
TROUBLESHOOTING DASH CORE:
You may discover that running a full node taxes your system dramatically. The following suggestions are offered to assist you in this regard. These pitfalls have nothing to do with CAS, and are offered merely as a courtesy to our valued customers.
You are strongly encouraged to:
Run dashd from a script
Excessive server CPU load:
Shut down any web server. Any unnecessary programs should be eliminated.
Use “cpulimit” to throttle dashd's CPU usage. Download cpulimit:
and then add the following lines in your dashd startup script as follows:
This will throttle dashd to use only 50% of the normal CPU load. You can modify this as you see fit, and periodic adjustment is suggested. After the blockchain has been initialized and the database is fully synced, the CPU load will drop significantly. At that point, you may want to adjust it upwards. Your VPS may shut you down if you abuse their “acceptable use” policy.
The “-z” tells cpulimit to exit when dashd does, and “-b” sends it to the background.
Your exposure as a Dash node will draw some unwanted attention. You may become the victim of targeted attacks. Some suggested ways to mitigate this:
Change your SSH port – attempts to hack into your server become greatly reduced.
Implement fail2ban – it will reduce the effects of attacks against your server.