x86 Bitcoin Node Guide.

Part 4. Installing a Dojo Server.

KYC3
4 min readSep 30, 2024
Part 4 of the x86 Dojo Bitcoin Full Node Guide by Kyc3. Installing Samourai Wallet Dojo Backend Server.

Prerequisites.

  • Completed “x86 Bitcoin Node Guide”, Parts 1–3.

Introduction.

Dojo is a privacy-focused, end-to-end server software solution that acts as a Bitcoin wallet backend for Ashigaru Wallet and other Bitcoin light wallets.

Create a 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 and Verify Dojo.

Download the latest version of Dojo from the official Dojo repository. At time of writing this is v1.25.0.

torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/archive/refs/tags/v1.25.0.zip

Download Dojo’s Developer PGP Key.

torsocks curl -o dojo.asc "https://keys.openpgp.org/vks/v1/by-fingerprint/82820715CECC657E81914847E2520B7E41F39962" && gpg --import dojo.asc && rm dojo.asc

Download the release “fingerprints.txt” file.

torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.25.0/samourai-dojo-1.25.0-fingerprints.txt

Download the release “fingerprints.txt.sig” file.

torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.25.0/samourai-dojo-1.25.0-fingerprints.txt.sig

Verify the fingerprint file.

gpg --verify samourai-dojo-*-fingerprints.txt.sig

The output should read “Good signature from pajasevi@samourai.is.

Do not worry about the “This key is not certified with a trusted signature!” warning. Enhanced trust levels have not been manually set for the imported key.

Compare the downloaded Dojo software against the hash provided within the verified text file.

sha256sum v*.zip && cat samourai-dojo-*-fingerprints.txt

The hashes highlighted should match perfectly. Note that the printed outputs in the image are for v1.25.0.

Remove the leftover fingerprint files.

rm samourai-dojo-*-fingerprints.txt && rm samourai-dojo-*-fingerprints.txt.sig

Unpackage Dojo.

Unzip the downloaded archive.

unzip v*.zip

Create a new directory for Dojo.

mkdir ~/dojo-app

Move the unpackaged files to the new directory.

mv ~/samourai-dojo-*/* ~/dojo-app/

Remove the empty archive & folder.

rm -r samourai-dojo-* && rm v*.zip

Configuring 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.

The following configuration files require a total of 5 unique passwords. You can use the following command to randomly generate them, or create manually if preferred.

The only one of these passwords that need to be permanently stored is the one used for “NODE_ADMIN_KEY,” since this password will be required whenever logging into Dojo’s GUI.

for i in {1..5}; do tr -dc 'A-Za-z0-9' < /dev/urandom | head -c 40; echo; done

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.

Initializing Dojo.

Enter the Dojo install script directory.

cd ~/dojo-app/docker/my-dojo

Run the installation script.

./dojo.sh install

Dojo will begin the installation process.

The installation is complete once a constant stream of “node.js” logs appears. You can then exit the logs with “control+c.”

Dojo Maintenance Tool.

The Dojo Maintenance Tool, or “DMT,” is the graphical interface of your Dojo server, and is accessible only via Tor. The DMT’s dedicated onion address can be requested with the following command.

./dojo.sh onion

The DMT can now be logged into using either the “admin key” previously created or via “Auth47” if previously configured.

Once a full house of green ticks shows on the dashboard, Dojo is fully synched and ready to pair with your Ashigaru Wallet.

Select “pairing” from the DMT’s menu to display the pairing QR code. This QR can be scanned while creating or restoring a wallet within Ashigaru.

If the RPC explorer is not disabled, two QR codes will be displayed. The Dojo pairing QR is the one to the left.

Contribute to the Author.

Bitcoin (Silent Payment):

sp1qq0gtvpsevqz3jpxcujufdc7xw5mmc0756rzfst9as7m3gx7l8dnd2q7zf86u6wvlh7v9kzd267ym5x385h6gue7jkgjgxkvg93rd8zekdvxtw5fj

Monero:

867Xink8cNMbxC6FxafbkjSaJPNTSFMtsSDQiWedYcgihWHEoPy24rKT1hGxFDEuJRXLZW8BFp4e6AXhzxvYsn4mKN9u41X

Bitcoin (Paynym):

PM8TJfTV3SZWgfTpRbPnUPQa3ifyHprpPCC3t71wQXtPoZT8gDkgZByGpxCTNtwjjQrKkEAKgZSWeDrsV3L3s4N7BGkAuMHybJC4cKJsV1HdcMvrbver

--

--

KYC3

Privacy and cryptography advocate. I like to convert complex dev written guides into plain, easy to follow English.