Bitcoind setups
By default, Dojo installs and runs bitcoind inside Docker.
This guide covers advanced bitcoind configuration options available in docker-bitcoind.conf.
All commands are to be copy and pasted into the terminal of your Dojo, then press ENTER.
Open bitcoind config file
Section titled “Open bitcoind config file”cd ~/dojo-app/docker/my-dojo/conf/nano docker-bitcoind.confUse an external Bitcoin full node
Section titled “Use an external Bitcoin full node”If you want Dojo to use a full node outside Docker, set:
BITCOIND_INSTALL=offBITCOIND_IP=TypeYourBitcoindIPHereBITCOIND_RPC_PORT=TypeYourBitcoindRpcPortHereBITCOIND_RPC_USER=TypeYourBitcoindRpcUserHereBITCOIND_RPC_PASSWORD=TypeYourBitcoindRpcPasswordHereBITCOIND_ZMQ_RAWTXS=TypeYourBitcoindZmqRawTxPortHereBITCOIND_ZMQ_BLK_HASH=TypeYourBitcoindZmqBlockHashPortHereYour external bitcoind should be configured with:
server=1txindex=1- RPC enabled on a reachable IP and port
- ZMQ rawtx and hashblock notifications enabled
Then apply changes:
cd ~/dojo-app/docker/my-dojo./dojo.sh upgradeExpose bitcoind RPC and ZMQ to local apps
Section titled “Expose bitcoind RPC and ZMQ to local apps”By default, these ports are restricted to Dojo’s internal Docker network. Do not expose these ports to the public internet.
Set:
BITCOIND_INSTALL=onBITCOIND_RPC_EXTERNAL=onFor Linux, keep:
BITCOIND_RPC_EXTERNAL_IP=127.0.0.1For macOS or Windows Docker hosts, set BITCOIND_RPC_EXTERNAL_IP to the IP address of the Docker VM.
Then apply changes:
cd ~/dojo-app/docker/my-dojo./dojo.sh upgradeWith this setting, these local ports are exposed:
28256bitcoind RPC9500ZMQ hash tx notifications9501ZMQ raw tx notifications9502ZMQ hash block notifications9503ZMQ raw block notifications
Keep a static bitcoind onion address
Section titled “Keep a static bitcoind onion address”By default, Dojo rotates the bitcoind hidden service address on restart.
To keep a static address, set:
BITCOIND_EPHEMERAL_HS=offThen apply changes:
cd ~/dojo-app/docker/my-dojo./dojo.sh upgradeThis setting only applies when BITCOIND_INSTALL=on and BITCOIND_LISTEN_MODE=on.
Enable bloom filters in Bitcoin Core
Section titled “Enable bloom filters in Bitcoin Core”To enable bloom filter support for compatible light clients, set:
BITCOIND_BLOOM_FILTERS=onIt is also recommended to keep a static onion address for this setup:
BITCOIND_EPHEMERAL_HS=offThen apply changes:
cd ~/dojo-app/docker/my-dojo./dojo.sh upgradeMove Bitcoin blocks to a custom directory
Section titled “Move Bitcoin blocks to a custom directory”This is useful when your chain data should be stored on another disk.
- Find the bitcoind UID and GID used by Dojo:
cd ~/dojo-app/docker/my-dojogrep -E '^BITCOIND_LINUX_UID=|^BITCOIND_LINUX_GID=' .env- Create your target directory:
sudo mkdir -p /external/bitcoin- Set ownership to the UID and GID from
.env(defaults are usually1105:1108):
sudo chown -R 1105:1108 /external/bitcoin- Edit
docker-bitcoind.confand set:
BITCOIND_BLOCKS_DIR=/external/bitcoin- Apply changes:
cd ~/dojo-app/docker/my-dojo./dojo.sh upgrade