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 local full node as its data source for imports and rescans of HD accounts and addresses. While private, this default option has many limitations. MyDojo allows to install a local indexer (addrindexrs) providing the best of both worlds (no request sent to a third party, fast and real time rescans, complete transactional history is retrieved).
The initial installation of the indexer requires an additional 60GB of disk space.
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
# If you're installing a new Dojo or if you're upgrading from a Dojo version <= 1.4.1, edit the docker-indexer.conf.tpl file
nano ./conf/docker-indexer.conf.tpl
# Otherwise, edit the docker-indexer.conf file
nano ./conf/docker-indexer.conf
#
# Set the value of INDEXER_INSTALL to "on"
# Set the value of INDEXER_TYPE to "addrindexrs"
# Set the value of INDEXER_BATCH_SUPPORT 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
#
#
# 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 want to use external apps (such as Sparrow Wallet) which are able to connect to a trusted Electrum server, it is possible to use Fulcrum instead of default addrindexrs.
To date, the initial installation of the indexer requires 120GB of additionnal disk space.
# If you're installing a new Dojo or if you're upgrading from a Dojo version <= 1.4.1, edit the docker-indexer.conf.tpl file
nano ./conf/docker-indexer.conf.tpl
# Otherwise, edit the docker-indexer.conf file
nano ./conf/docker-indexer.conf
#
# Set the value of INDEXER_INSTALL to "on"
# Set the value of INDEXER_TYPE to "fulcrum"
# Set the value of INDEXER_BATCH_SUPPORT to "active"
# 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 days.
# Let Fulcrum 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 fulcrum`
#
# Afterwards, you can get the onion URI of your Fulcrum server with command:
# `dojo.sh onion`
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.
# If you're installing a new Dojo or if you're upgrading from a Dojo version <= 1.4.1, edit the docker-indexer.conf.tpl file
nano ./conf/docker-indexer.conf.tpl
# Otherwise, edit the docker-indexer.conf file
nano ./conf/docker-indexer.conf
#
# 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 or Fulcrum >=1.6.0, otherwise set the value to "inactive"
# Set the value of INDEXER_PROTOCOL to "tcp" or "tls" based on Electrum server configuration - over SSL/TLS or plain TCP (unencrypted)
# 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
#
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.
Note - The external full node must use rpcauth for authentication.
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 rpcauth payload is set (generated by ./share/rpcuser/rpcuser.py)
rpcauth=...
# 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=...
# If you're installing a new Dojo, edit the docker-bitcoind.conf.tpl file
nano ./conf/docker-bitcoind.conf.tpl
# Otherwise, edit the docker-bitcoind.conf file
nano ./conf/docker-bitcoind.conf
#
# Set the value of BITCOIND_INSTALL to "off"
# Set the value of BITCOIND_IP with the IP address of you bitcoin full node
# Set the value of BITCOIND_RPC_PORT with the port used by your bitcoin full node for the RPC API
# Set the value of BITCOIND_RPC_USER with the user used by your bitcoin full node for the RPC API
# Set the value of BITCOIND_RPC_PASSWORD with the password used by your bitcoin full node for the RPC API
# Set the value of BITCOIND_ZMQ_RAWTXS with the port used by your bitcoin full node for ZMQ notifications of raw transactions
# (i.e. port defined for -zmqpubrawtx in the bitcoin.conf of your full node)
# Set the value of BITCOIND_ZMQ_BLK_HASH with the port used by your bitcoin full node for ZMQ notifications of block hashes
# (i.e. port defined for -zmqpubhashblock in the bitcoin.conf of your full node)
#
# Save and exit nano
#
When Dojo is installed for the first time, the Tracker imports the block headers in the database.
Follow these steps if you want to speed up this operation by preloading an archive of the block headers.
# Download the archive [https://samouraiwallet.com/static/share/2_blocks.sql.gz](https://samouraiwallet.com/static/share/2_blocks.sql.gz) to the "<dojo_dir>/db-scripts/" directory. Don't modify the name of the archive.
./dojo.sh install
This 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.
The following steps allow to expose the RPC API and ZMQ notifications to applications running on your local machine but outside of Docker.
#
# If your Docker runs on macos or windows,
# retrieve the local IP address of the VM
# hosting your Docker containers
#
# Stop your Dojo
./dojo.sh stop
# If you're installing a new Dojo, edit the docker-bitcoind.conf.tpl file
nano ./conf/docker-bitcoind.conf.tpl
# Otherwise, edit the docker-bitcoind.conf file
nano ./conf/docker-bitcoind.conf
#
# Set the value of BITCOIND_RPC_EXTERNAL to "on"
#
# If your Docker runs on macos or windows,
# set the value of BITCOIND_RPC_EXTERNAL_IP to the IP address of the VM
#
# Save and exit nano
#
# Start your Dojo
./dojo.sh start
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
).
By default, Dojo creates a new onion address for your bitcoind at each startup.
The following steps allow to keep a static onion address (not recommended).
# Stop your Dojo
./dojo.sh stop
# If you're installing a new Dojo, edit the docker-bitcoind.conf.tpl file
nano ./conf/docker-bitcoind.conf.tpl
# Otherwise, edit the docker-bitcoind.conf file
nano ./conf/docker-bitcoind.conf
#
# Set the value of BITCOIND_EPHEMERAL_HS to "off"
#
# Start your Dojo
./dojo.sh start
By default, Bitcoin Core doesn't have bloom filters enabled. This functionality can be useful for light wallets leveraging bloom filter capability, such as Bisq.
The following steps allow to enable this functionality.
# Stop your Dojo
./dojo.sh stop
# If you're installing a new Dojo, edit the docker-bitcoind.conf.tpl file
nano ./conf/docker-bitcoind.conf.tpl
# Otherwise, edit the docker-bitcoind.conf file
nano ./conf/docker-bitcoind.conf
#
# Set the value of BITCOIND_BLOOM_FILTERS to "on"
#
# Additionally, it might be useful to keep the same onion address for bitcoin core hidden service
# Set the value of BITCOIND_EPHEMERAL_HS to "off"
#
# Save and exit nano
# Start your Dojo
./dojo.sh start
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 ...
If you're installing a new Dojo, edit the docker-tor.conf.tpl file
nano ./conf/docker-tor.conf.tpl
Otherwise, edit the docker-tor.conf file
nano ./conf/docker-tor.conf
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.