Understanding, installing, configuring, and using a Bitcoin node
Requirements for setting up a Dojo
Choose your machine type
- a laptop ;
- a desktop computer ;
- a mini-PC (e.g. Intel NUC, Lenovo Thincentre Tiny...).
- Price: a refurbished mini-PC or desktop will often be cheaper than a new laptop.
- Footprint: a Mini-PC takes up less space.
- Power supply: a laptop has the advantage of a battery, which means it won't shut down in the event of a power cut, unlike a mini-PC.
- Upgradeability: barbones generally allow you to add memory or easily replace a hard disk.
Recommended equipment
- X86-64 architecture (64-bit processor).
- 2 GHz dual-core processor or faster.
- 8 GB RAM minimum.
- 2 TB or more NVMe SSD (to store Blockchain of Bitcoin and the necessary indexes).
- A Debian-based distribution, like Ubuntu 24.04 LTS.
- HP EliteDesk / EliteBook
- Dell OptiPlex
- Lenovo ThinkCentre / ThinkPad
- Intel NUC
- etc.
1 - Installing Ubuntu
1.1. create a bootable USB key
24.04 at the time of writing, but take the most recent if another is available).1.2. install the operating system
- Select language.
- Select keyboard type.
- If you're connected via RJ45 cable, there's no need to configure Wi-Fi.
- Click on "Install Ubuntu" and check the option to install third-party software (Wi-Fi drivers, multimedia codecs, etc.).
- When the wizard asks for the type of installation, select "Erase disk and install Ubuntu". Warning: this operation will completely erase the contents of the disk. Check carefully that the disk you have chosen corresponds to the NVMe SSD intended for Dojo.
- Create a simple user name (e.g. "loic").
- Assign a name to the machine (e.g. "dojo-node").
- Set a strong password and keep it safe.
- Enable the "Request my password to log in" option to reinforce security.
- Indicate your time zone, then click on "Install".
- Wait for the installation to complete. Once complete, the system will restart automatically.
- Remove the USB installation key when restarting the computer.
1.3. system update
sudo apt update sudo apt upgrade -y
2. Outbuilding installation
2.1. Preparation
cd ~/
sudo apt-get update
2.2. install utilities
apt-transport-https: allows you to download packets securely via HTTPSca-certificates: manages the certificates required for encrypted connectionscurl: to retrieve files from the Internetgnupg-agent: for GPG key management- software-properties-common`: provides utilities for manipulating APT repositories
unzip: unzips files in ZIP format
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common unzip
2.3. install Torsocks
sudo apt install torsocks
2.4. install Docker and Docker Compose
Add Docker signing key
sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc
Official Docker repository added
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \ $(. /etc/os-release && echo "*$VERSION_CODENAME*") stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update
Installing Docker and Docker Compose
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
User authorization
sudo every time.sudo usermod -aG docker $USER
3. Single user creation (optional)
3.1. user account creation
/home/dojo and access to the bash terminal. It will also be added to the sudo group to enable execution of admin commands.sudo useradd -s /bin/bash -d /home/dojo -m -G sudo dojo
3.2. Setting a password
sudo passwd dojo
3.3. Authorize user to use Docker
sudo.sudo usermod -aG docker dojo
3.4. System restart
sudo reboot
3.5. Login with new user
4. Download and check Dojo
4.1. import the developer's PGP key
torsocks wget http://zkaan2xfbuxia2wpf7ofnkbz6r5zdbbvxbunvp5g2iebopbfc4iqmbad.onion/vks/v1/by-fingerprint/E53AD419B242822F19E23C6D3033D463D6E544F6 && gpg --import E53AD419B242822F19E23C6D3033D463D6E544F6
4.2. download the latest version of Dojo
1.27.0: modify the command according to the latest version here on the official GitHub repository.torsocks wget -O samourai-dojo-1.27.0.zip https://github.com/Dojo-Open-Source-Project/samourai-dojo/archive/refs/tags/v1.27.0.zip
4.3. Download fingerprints and signature
torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.27.0/samourai-dojo-1.27.0-fingerprints.txt && torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.27.0/samourai-dojo-1.27.0-fingerprints.txt.sig
4.4. Check PGP signature
gpg --verify samourai-dojo-1.27.0-fingerprints.txt.sig
E53AD419B242822F19E23C6D3033D463D6E544F6 and the associated address [email protected]. A warning may appear stating that the key is not certified: you can ignore it.4.5. Check archive integrity
sha256sum samourai-dojo-1.27.0.zip cat samourai-dojo-1.27.0-fingerprints.txt
4.6. Extract and organize files
unzip samourai-dojo-1.27.0.zip -d . mkdir ~/dojo-app mv ~/samourai-dojo-1.27.0/* ~/dojo-app/
4.7. Clean up unnecessary files
rm -r samourai-dojo-1.27.0 && rm samourai-dojo-1.27.0.zip && rm samourai-dojo-1.27.0-fingerprints.txt && rm samourai-dojo-1.27.0-fingerprints.txt.sig && rm E53AD419B242822F19E23C6D3033D463D6E544F6
5. Dojo configuration
- Dojo (main API)
- Bitcoin core (complete Bitcoin node)
- BTC-RPC Explorer (web block explorer)
- Fulcrum Indexer (rapid indexing of blocks and transactions)
- Fulcrum Electrum Server available on the Tor network
- Fulcrum Electrum Server available on the local network
- Administration credentials
5.1. administration credentials
BITCOIND_RPC_USERBITCOIND_RPC_PASSWORDMYSQL_ROOT_PASSWORD- mYSQL_USER
MYSQL_PASSWORD- nODE_API_KEY`
NODE_ADMIN_KEYNODE_JWT_SECRET
5.2. Access configuration files
conf/ folder. Move to this directory:cd ~/dojo-app/docker/my-dojo/conf/
5.3. Bitcoin core configuration
nano docker-bitcoind.conf.tpl
BITCOIND_RPC_USER=your-ID-here BITCOIND_RPC_PASSWORD=your-password-here
your-ID-here and your-password-here with your own logins (with a strong password).BITCOIND_DB_CACHE=2048
- press `Ctrl + X
- type
y - then press "Enter"
5.4. MySQL configuration
nano docker-mysql.conf.tpl
MYSQL_ROOT_PASSWORD=your-password-here MYSQL_USER=your-ID-here MYSQL_PASSWORD=your-password-here
your-ID-here and your-password-here with your own logins (with strong, unique passwords).Ctrl + X, y, "Enter").5.5. Fulcrum indexer configuration
nano docker-indexer.conf.tpl
INDEXER_INSTALL=on INDEXER_TYPE=fulcrum INDEXER_BATCH_SUPPORT=active INDEXER_EXTERNAL=on
INDEXER_EXTERNAL_IP=192.168.1.157
hostname -I
INDEXER_EXTERNAL_IP=127.0.0.1
Ctrl + X, y, "Enter").5.6. Node service configuration
nano docker-node.conf.tpl
NODE_API_KEY=your-password-here NODE_ADMIN_KEY=your-password-here NODE_JWT_SECRET=your-password-here
your-password-here with your own credentials (with strong, unique passwords).NODE_ACTIVE_INDEXER=local_indexer
Ctrl + X, y, "Enter").5.7. Login management
NODE_ADMIN_KEY
6. Dojo installation
6.1. Check that Docker is working properly
docker run hello-world
Hello from Docker! This message shows that your installation appears to be working correctly...
sudo reboot
2.4. on installing Docker and check each command carefully.6.2. Go to Dojo installation directory
my-dojo folder. Move to this directory:cd ~/dojo-app/docker/my-dojo
ls command to check that the dojo.sh file is present. This is the main script that automates the installation of Dojo and the launch of all its services.6.3. Start installation
./dojo.sh install
y and then "Enter".- download and launch the necessary Docker containers,
- initialize Bitcoin core and start synchronizing Blockchain,
- start the Fulcrum indexer to track transactions and addresses,
- activate the Dojo backend and its APIs.
bitcoind, soroban, nodejs or fulcrum. This scrolling indicates that Dojo is up and running and starting to execute the various services.6.4. Exit log display
Ctrl + C
6.5. Understanding Initial Block Download (IBD)
- the power of your processor and the amount of RAM memory available,
- the speed of your disk,
- the number and quality of peers your node connects to,
- the speed of your Internet connection.
7. Synchronization monitoring
- use of the Dojo Maintenance Tool (or DMT), which is simple but provides few details during IBD;
- direct consultation of Dojo logs on your machine, more technical but much more precise.
7.1. Check via Dojo Maintenance Tool (DMT)
- all lights on green;
- the last validated block for each service (Node, Indexer, Dojo DB).
/my-dojo directory:cd ~/dojo-app/docker/my-dojo
./dojo.sh onion
Dojo API and Maintenance Tool =
/admin. For example, if your URL is wo4zobymdl45gmmzzmpoypeemoukbj74wpibc22rxs2yfgpej62v6dyd.onion, you'll need to enter in the Tor Browser bar:wo4zobymdl45gmmzzmpoypeemoukbj74wpibc22rxs2yfgpej62v6dyd.onion/admin
NODE_ADMIN_KEY password you generated earlier.7.2. Verification via Dojo logs
my-dojo directory. Position yourself in this folder:cd ~/dojo-app/docker/my-dojo
Bitcoin core logs
./dojo.sh logs bitcoind
bitcoind | Pre-synchronizing blockheader, height : NNNNNN
height=. You can also follow the key progress=, which indicates the percentage of IBD progress.Ctrl + C combination.Fulcrum logs
./dojo.sh logs fulcrum
height:, as well as the indexing progress percentage.7.3. Fulcrum database corruption
fulcrum | The database has been corrupted etc...
cd ~/dojo-app/docker/my-dojo ./dojo.sh stop
docker rm -f fulcrum || true docker volume ls | grep -i fulcrum docker volume rm my-dojo_data-fulcrum
my-dojo_data-fulcrum, if this isn't the case for you, adapt the name returned by the previous command../dojo.sh upgrade
docker logs -f fulcrum
8. Using the Dojo Maintenance Tool
- the possibility of connecting your Ashigaru wallet to use your own node to consult Blockchain data and broadcast your transactions,
- and the block explorer, which gives you access to information about the Blockchain Bitcoin without exposing your data to an external instance you don't control.
8.1. Connect Ashigaru to your Dojo
8.2. Using the block explorer
./dojo.sh onion
Block Explorer =
9. Dojo maintenance
9.1 Stop your Dojo
cd ~/dojo-app/docker/my-dojo ./dojo.sh stop
9.2 Update your Dojo
./dojo.sh version
sudo apt-get update sudo apt-get upgrade
cd ~/dojo-app/docker/my-dojo ./dojo.sh stop
sudo reboot
torsocks wget http://zkaan2xfbuxia2wpf7ofnkbz6r5zdbbvxbunvp5g2iebopbfc4iqmbad.onion/vks/v1/by-fingerprint/E53AD419B242822F19E23C6D3033D463D6E544F6 && gpg --import E53AD419B242822F19E23C6D3033D463D6E544F6
cd ~/
1.28.0 (which doesn't yet exist at the time of writing: this is just to give an example). Remember to replace the file and link with the version you wish to install:torsocks wget -O samourai-dojo-1.28.0.zip https://github.com/Dojo-Open-Source-Project/samourai-dojo/archive/refs/tags/v1.28.0.zip
torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.28.0/samourai-dojo-1.28.0-fingerprints.txt && torsocks wget https://github.com/Dojo-Open-Source-Project/samourai-dojo/releases/download/v1.28.0/samourai-dojo-1.28.0-fingerprints.txt.sig
gpg --verify samourai-dojo-1.28.0-fingerprints.txt.sig
gpg: Signature made [date + time] gpg: using EDDSA key E53AD419B242822F19E23C6D3033D463D6E544F6 gpg: Good signature from "[email protected]" <[email protected]> [unknown]
sha256sum samourai-dojo-1.28.0.zip cat samourai-dojo-1.28.0-fingerprints.txt
unzip samourai-dojo-1.28.0.zip -d .
cp -a samourai-dojo-1.28.0/. dojo-app/
~/dojo-app/docker/my-dojo/conf, but replaces all other files with the updated versions.rm -r samourai-dojo-1.28.0 && rm samourai-dojo-1.28.0.zip && rm samourai-dojo-1.28.0-fingerprints.txt && rm samourai-dojo-1.28.0-fingerprints.txt.sig && rm E53AD419B242822F19E23C6D3033D463D6E544F6
cd ~/dojo-app/docker/my-dojo ./dojo.sh upgrade -y
./dojo.sh logs bitcoind ./dojo.sh logs fulcrum
Author
This tutorial has been written by Loïc Morel
You can say thanks by tipping the professor.
I write educational content about Bitcoin.
Credits
This tutorial has not been proofread yet
The original content has been translated by AI, but human review is necessary to ensure its accuracy.
7 331 sats3 666 sats1 833 satsEvery content on the platform is the result of a collaborative effort: each lesson, translation, and revision is made possible by the work of contributors. For this reason, we are always looking for proofreaders who can review our content in many languages. If you want to participate in the proofreading process, please reach out in our Telegram group and read our tutorial. We remind you that this content is open-source - licensed under CC BY-SA - so it can be freely shared and used, as long as the original source is credited.



