MyDojo default setup does its best to take care of your security and your privacy. Some of the setups described in this section may damage them if not properly configured. Use at your own risk!
By default, Dojo uses the Bitcoin daemon as its data source for imports and rescans. While private, this default option has many limitations.
To get rid of these limitations, MyDojo allows to install a local indexer providing the best of both worlds (no request sent to a third party, fast and real time rescans, all transactions referencing the sdaddress are retrieved).
The initial installation of the indexer requires an additional 120GB of disk space (as of January 2020).
The local indexer is activated thanks to the modification of two configuration options
INDEXER_INSTALL
must be set to on
NODE_ACTIVE_INDEXER
must be set to local_indexer
# Edit the indexer config template file
# nano ./conf/docker-indexer.conf.tpl
#
# Set the value of INDEXER_INSTALL to "on"
# Save and exit nano
#
# Edit the nodejs config file (or the corresponding template file if it's your first installation of Dojo)
# nano ./conf/docker-node.conf
#
# Set the value of NODE_ACTIVE_INDEXER to "local_indexer"
# Save and exit nano
#
#
# Launch the installation or the upgrade of your Dojo
# with the commands `dojo.sh install` or `dojo.sh upgrade`
#
#
# Be patient!
# First indexation of all Bitcoin addresses will require a few hours.
# Let the indexer complete all these operations before trying to use it for an import or a rescan.
# You can follow the progress made by the indexer with the commands:
# `dojo.sh logs`
# or
# `dojo.sh logs indexer`
#
If you’re running an instance of ElectrumX or Electrs on your local network, Dojo allows you to define this Electrum server as the data source used for the imports and rescans. This setup is an alternative to the local indexer provided by MyDojo.
Do not use an Electrum server operated by a third party or hosted on a different local network.
The local indexer is activated thanks to the modification of two configuration options
INDEXER_INSTALL
must be set to off
INDEXER_IP
must be set with the IP address of the Electrum serverINDEXER_RPC_PORT
must be set with the port used for the RPC API
of the Electrum server (default 50001
)INDEXER_BATCH_SUPPORT
must be set to active
if the Electrum server is ElectrumX. Otherwise, set the value to inactive
NODE_ACTIVE_INDEXER
must be set to local_indexer
# Edit the indexer config template file
nano ./conf/docker-indexer.conf.tpl
#
# Set the value of INDEXER_INSTALL to "off"
# Set the value of INDEXER_IP with the IP address of your Electrum server
# Set the value of INDEXER_RPC_PORT with the port used by the RPC API of your Electrum server (default=50001)
# Set the value of INDEXER_BATCH_SUPPORT to "active" if your Electrum server is ElectrumX, otherwise set the value to "inactive"
# Save and exit nano
#
# Edit the nodejs config file (or the corresponding template file if it's your first installation of Dojo)
nano ./conf/docker-node.conf
#
# Set the value of NODE_ACTIVE_INDEXER to "local_indexer"
# Save and exit nano
#
#
# Restart Dojo
#
./dojo.sh restart
By default, MyDojo installs a new Bitcoin full node running inside a Docker container. While convenient, this default setup may be redundant for users already running a full node on the host machine or on another machine accessible through the local network. To these users, MyDojo provides the ability to bypass the installation of the new full node and to configure the connection between MyDojo and the external full node.
While this setup can be activated at any time, it’s usually a choice that will be made before the first installation.
Edit the bitcoin.conf
file of your external full node and check that the following lines are properly initialized:
# Force bitcoind to accept JSON-RPC commands
server=1
# Force bitcoind to index all the transactions
txindex=1
# Check that bitcoind accepts connections from 127.0.0.1 (linux)
# or from the IP address of the Docker Virtual Machine (MacOS, Windows)
rpcallowip=...
# Check that a port is defined for the RPC API (or 8332 will be used as default value)
rpcport=...
# Check that the RPC API listens on an IP address accessible from the nodejs container
rpcbind=...
# Check that the RPC user is set
rpcuser=...
# Check that the RPC password is set
rpcpassword=...
# Enable publish hash block on an IP address accessible from the nodejs container
zmqpubhashblock=...
# Enable publish raw transaction on an IP address accessible from the nodejs container
zmqpubrawtx=...
BITCOIND_INSTALL
must be set to off
BITCOIND_IP
must be set with the value set for rpcbind
in the external bitcoin.conf
fileBITCOIND_RPC_PORT
must be set with the value set for rpcport
in the external bitcoin.conf
fileBITCOIND_RPC_USER
must be set with the value set for rpcuser
in the external bitcoin.conf
fileBITCOIND_RPC_PASSWORD
must be set with the value set for rpcpassword
in the external bitcoin.conf
fileBITCOIND_ZMQ_RAWTXS
must be set with the value set for zmqpubrawtx
in the external bitcoin.conf
fileBITCOIND_ZMQ_BLK_HASH
must be set with the value set for zmqpubhashblock
in the external bitcoin.conf
fileThis setup allows to expose the RPC API and ZMQ notifications of the internal Bitcoin daemon run by MyDojo to external applications running on the host machine or on the local network.
With this setup, external applications should be able to access the following ports
Port | Description |
---|---|
9500 |
zmqpubhashtx notifications |
9501 |
zmqpubrawtx notifications |
9502 |
zmqpubhashblock notifications |
9503 |
zmqpubrawblock notifications |
28256 |
RPC API |
This setup has no effect if MyDojo is relying on an external full node (i.e. if
BITCOIND_INSTALL
is set tooff
).
BITCOIND_RPC_EXTERNAL
must be set to on
BITCOIND_RPC_EXTERNAL_IP
must be set with the IP address of the bitcoind container as seen by external apps. This IP address depends on the operating system of the host machine and on the location of the external apps (host machine / another device). Do not use the public IP address of the host machine or be sure to protect the ports of your bitcoin daemon with appropriate rules set on a firewall!!!
By default, MyDojo doesn’t try to hide that Tor is being used. For the majority of Dojo users, connecting directly to Tor will work successfully. But for some users, it may be appropriate to configure Tor Bridges in order to circumvent censorship enforced by ISP, censorship enforcement bodies and other interested parties.
The first step to activate this setup is to retrieve connection informations for 3 Tor bridges:
Get bridges
, then you will see a form with Advanced Options
headerobfs4
and click on Get Bridges
buttonobfs4 24.106.248.94:65531 B9EFBC5... cert=yrX... iat-mode=0
obfs4 ...
obfs4 ...
With the Tor bridge connection information the setup can be activated and configured by modifying following configuration options
TOR_USE_BRIDGES
must be set to on
TOR_BRIDGE_1
must be set with the first line returned in the previous stepTOR_BRIDGE_2
must be set with the second line returned in the previous stepTOR_BRIDGE_3
must be set with the third line returned in the previous stepThis setup allows to install and to run an instance of MyDojo for testnet.
COMMON_BTC_NETWORK
must be set to testnet
This option must be set before the first installation of MyDojo and mustn’t be changed after this first installation.
A single instance of MyDojo can be run per host machine. A machine can’t host both a mainnet and a testnet instance of MyDojo.