Prerequisites.
Introduction #
Dojo is a privacy-focused, end-to-end server software solution that acts as a Bitcoin wallet backend for Samourai Wallet and other Bitcoin light wallets.
Create Dojo User #
Creating a segregated user account for Dojo is beneficial for security.
sudo useradd -s /bin/bash -d /home/dojo -m -G sudo dojo
Set a password for your new user.
sudo passwd dojo
Provide the user “dojo” with the required permissions.
sudo usermod -aG docker dojo
Restart the device.
sudo reboot
Once the system has successfully rebooted, SSH back in as user “dojo.”
Download Dojo #
Download the latest version of Dojo from the official Dojo repository.
torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/archive/refs/heads/master.zip
Unzip the downloaded archive.
unzip master.zip
Create a directory for Dojo.
mkdir ~/dojo-app
Move the unpackaged files to the new directory.
mv ~/samourai-dojo-master/* ~/dojo-app/
Remove the empty archive & folder.
rm -r samourai-dojo-master && rm master.zip
Configure Dojo #
Multiple configuration files need to be modified before initializing Dojo.
cd ~/dojo-app/docker/my-dojo/conf/
Open “bitcoind.conf”.
nano docker-bitcoind.conf.tpl
Edit as follows.
####edit to your core rpc username & password
BITCOIND_RPC_USER=dojorpc
BITCOIND_RPC_PASSWORD=dojorpcpassword
####change
BITCOIND_INSTALL=on
##to
BITCOIND_INSTALL=off
####edit to your nodes IP
BITCOIND_IP=172.28.1.5
####change
BITCOIND_RPC_PORT=28256
##to
BITCOIND_RPC_PORT=8332
####change
BITCOIND_ZMQ_RAWTXS=9501
##to
BITCOIND_ZMQ_RAWTXS=28333
####change
BITCOIND_ZMQ_BLK_HASH=9502
##to
BITCOIND_ZMQ_BLK_HASH=28334
Save and exit the file.
Open “indexer.conf”.
nano docker-indexer.conf.tpl
Edit as follows.
####change
INDEXER_TYPE=addrindexrs
##to
INDEXER_TYPE=fulcrum
####edit to your nodes IP
INDEXER_IP=172.28.1.6
####change
INDEXER_RPC_PORT=50001
##to
INDEXER_RPC_PORT=50002
####change
INDEXER_BATCH_SUPPORT=inactive
##to
INDEXER_BATCH_SUPPORT=active
####change
INDEXER_PROTOCOL=tcp
##to
INDEXER_PROTOCOL=tls
Save and exit the file.
Open “mysql.conf.”
nano docker-mysql.conf.tpl
Create root and user passwords for MySQL, then edit the file.
####edit lines with passwords
MYSQL_ROOT_PASSWORD=rootpassword
MYSQL_PASSWORD=password
Save and exit the file.
Open “node.conf.”
nano docker-node.conf.tpl
Create “API,” “admin,” and “JWT” passwords, then edit the file as follows.
####add passwords here
NODE_API_KEY=myApiKey
NODE_ADMIN_KEY=myAdminKey
NODE_JWT_SECRET=myJwtSecret
####change
NODE_ACTIVE_INDEXER=local_bitcoind
##to
NODE_ACTIVE_INDEXER=local_indexer
####optional - add paynym address if enabaling auth47
NODE_PAYMENT_CODE=
Save and exit the file.
There’s also the option to disable the default Bitcoin RPC Explorer. This is optional, but with an already active Mempool installation, it may not be useful for some.
Skip this next step if wanting to leave RPC Explorer enabled.
Open “explorer.conf.”
nano docker-explorer.conf.tpl
Edit the file as follows to disable RPC Explorer.
####change
EXPLORER_INSTALL=on
##to
EXPLORER_INSTALL=off
Save and exit the file.
Dojo Initialisation #
Enter the Dojo install script directory.
cd ~/dojo-app/docker/my-dojo
Run the script.
./dojo.sh install
Dojo will begin the installation process.
The installation is complete once a constant stream of “node.js” logs appears. Exit the logs with “control+c “.
Dojo Maintenance Tool #
The Dojo Maintenance Tool, or “DMT,” is accessible only via Tor. The server’s dedicated onion address can be requested with the following command.
./dojo.sh onion
The DMT can be accessed via this onion address and logged into using either the “admin key” previously created or “Auth47” if previously configured.
Once a full house of green ticks shows on the dashboard, Dojo is synched and ready to pair with a Samourai Wallet.
DMT in Testnet
Select “pairing” from the DMT’s menu to display the pairing QR code that can be scanned during the setup process of creating or restoring a Samourai Wallet.
If the RPC explorer is not disabled, two QR codes will be displayed. The Dojo pairing QR is the one to the left.