Sovereignty, Privacy & Economic Freedom.

Guides

Dojo x86 Bitcoin Node Guide: Part 4 – Installing Dojo.

samourai wallet dojo logo
  1. Dojo x86 Bitcoin Node Guide: Part 1. Installing Bitcoin Core & Tor.
  2. Dojo x86 Bitcoin Node Guide: Part 2 – Installing Fulcrum Indexer.
  3. Dojo x86 Bitcoin Node Guide: Part 3. Installing Mempool Explorer.
  4. Dojo x86 Bitcoin Node Guide: Part 4 – Installing Dojo.
  5. Dojo x86 Bitcoin Node Guide: Part 5 – Installing Whirlpool & UFW.
  6. Dojo x86 Bitcoin Node Guide: Part 6 – Installing Updates

Running your own Dojo server is essential for those wanting to utilise the privacy benefits achieved through Samourai Wallet’s post-mix spending tools and powerful Whirlpool CoinJoin implementation.

SSH into your node and go to your downloads directory.

cd ~/downloads

Next, download the latest version of Dojo from the official Samourai Dojo repository, using the following command.

wget https://code.samourai.io/dojo/samourai-dojo/-/archive/master/samourai-dojo-master.zip

Now unzip the downloaded Dojo archive.

unzip samourai-dojo-master.zip

Once the archive is unpackaged, create a new directory and move the unpackaged files across.

mkdir ~/dojo-app
mv ~/downloads/samourai-dojo-master/* ~/dojo-app/

The archive and leftover folder are no longer required and can be safely removed.

rm -r samourai-dojo-master && rm samourai-dojo-master.zip

Next, you must edit multiple configuration files before Dojo can be initialised.

cd ~/dojo-app/docker/my-dojo/conf/
nano docker-bitcoind.conf.tpl

Edit the file 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.

In the next file, you can choose whether or not to install the Bitcoin RPC Explorer. Since we installed Mempool Explorer in the previous guide, I will disable it; however, the choice is yours. If you want to disable it, follow the next step; otherwise, skip to the following step.

nano docker-explorer.conf.tpl

Edit the file as follows;

####change
EXPLORER_INSTALL=on

##to
EXPLORER_INSTALL=off

Save and exit the file.

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.

nano docker-mysql.conf.tpl

You need to add a MySQL root and user password to this file. Use a password generator and ensure you back them up securely. I recommend avoiding the use of special characters.

####add your new passwords here

MYSQL_ROOT_PASSWORD=rootpassword
MYSQL_PASSWORD=password

Save and exit the file.

nano docker-node.conf.tpl

You need to generate another three passwords, again avoiding special characters, and back them up safely. The admin key is of particular importance since it’s required whenever accessing your Dojo’s backend GUI, the Dojo maintenance tool.

Edit the following fields to include the new passwords.

NODE_API_KEY=myApiKey
NODE_ADMIN_KEY=myAdminKey
NODE_JWT_SECRET=myJwtSecret

In the same file, edit as follows.

####change
NODE_ACTIVE_INDEXER=local_bitcoind

##to
NODE_ACTIVE_INDEXER=local_indexer

In this file, you also have the option to enable Auth47, allowing you to log into your maintenance tool using your BIP47 payment code. This adds a QR code to the login page, which can be scanned from inside your Samourai Wallet to authenticate.

Whilst completely optional, to enable Auth47, simply paste your BIP47 payment code, starting with “PM8T“, next to the following line.

NODE_PAYMENT_CODE=

Save and exit the file. You are now ready to initialise your Dojo.

cd ~/dojo-app/docker/my-dojo
./dojo.sh install

Your Dojo will begin the installation process. Once you start to see a constant stream of “node.js” logs, the installation is complete, and you can exit the logs with “control+c“.

Your Dojo will now begin to synchronise. To check its status, you will need access to your Dojo Maintenance Tool, commonly referred to as “DMT“.

The DMT is accessed via the Tor Browser, using your Dojo’s randomly generated onion address and the node admin key you created previously. You can find the onion address by running the following command within the same directory.

./dojo.sh onion

Bookmark this onion address for future reference. Once you see a full house of green status checks on your dashboard, you’re ready to pair your Samourai wallet. You will find a “Pairing” menu option to the left, which is where you can find your pairing QR code, which you can scan when prompted during the initial setup steps of creating a Samourai Wallet.

If you previously chose to install the “RPC Explorer“, you will notice that there are two QR codes displayed. The one to the left is your pairing QR.

If you already have an active Samourai Wallet, you must reset the wallet, ensuring that you test your backup file first. You can then recover your wallet using your wallet’s passphrase and backup file, scanning the pairing QR during initialisation.

If a previous Dojo connection is detected in your backup file, you will be asked whether you want to use the newly scanned node or the one that was in use when the backup file was created. Select “Yes” at this prompt to pair with your new Dojo. You can find more detailed guides within Samourai’s documentation pages.

In the next article, we will install Samourai Wallet’s Whirlpool CLI.