If you - as probably most masternode owners - have your masternode running under VPS service and have access to it via SSH, then using it as a JSON-RPC gateway will probably be the best option for you.
For security reasons, the TCP port used for JSON-RPC communication (9998 by default) should be blocked on Dash full-nodes. For this reason, you will not be able to connect to it directly over the Internet. However, if you have SSH access to this server, you can create a secure channel that connects the local machine to the remote JSON-RPC service so that the DMT application feels like the remote service was working locally.
The communication is carried out as follows:
- an SSH session with a remote server (Dash daemon) is created using its public IP and SSH port
- out of the pool of unused ports on your computer, a random is selected to play the role of the local channel's endpoint
- within established SSH session a secure channel is created that connects local endpoint with the port on which the JSON-RPC service is listening on the remote server (127.0.0.1:9998)
- DMT connects to the local endpoint and performs JSON-RPC requests as if the Dash daemon was working locally
Local computer ━━━━━━━━━━━━━━━━> SSH session ━━━━━━━━━━━━━━━━> remote_server:22
┃- connecting to 127.0.0.1:random local port ┃ - listenning on 127.0.0.1:9998
DMT app ━━┛ ┗━━━ Dash daemon JSON-RPC
The procedure is similar to the RPC/indexing procedure for a local RPC node scenario.
- log-in to the server running Dash daemon (dashd) with a SSH terminal
- cd do the dashd's configuration directory:
cd ~/.dashcore
- open the
dash.conf
file with your preferred text editor - enter the configuration parameters listed here
- stop the dashd process:
./dash-cli stop
- start the dashd with the -reindex parameter:
./dashd -reindex
Take into account, that the last step can take several hours to complete.
- In the main application window click the
Configure
button. - Choose the
Dashd network
tab. - Click the
+
(plus) button on the left side of the dialog. - Check the box
Use SSH tunnel
. - Check the box
Enabled
. - Fill in the values:
SSH host
: IP addres (hostname) of your remote serverport
: SSH listening port number of the serverSSH username
: username you are using to establish a connectionRPC host
: IP address of the network interface where dashd listens for JSON-RPC calls (127.0.0.1 by default)port
: TCP port number on which dashd listens for JSON-RPC callsRPC username
: a value you've entered forrpcuser
parameter in thedash.conf
fileRPC password
: a value you've entered forrpcpassword
parameter in thedash.conf
file
Instead of entering parameters related to the RPC configuration, you can click the Read RPC configuration from SSH host
. In this case, the applications will try to read the values from the remote dash.conf
file.