Configuration
BTX Node configuration reference: btx.conf options, network sections, and example setups.
Start from the workflow that matches why you are here.
The docs are broad. These two paths jump straight into the operator and builder material behind the new microsites.
Operators, miners, and power sites
Go to the Mine microsite for the operator thesis, fleet playbook, and mining-focused doc bundles.
Open Path DevelopAPI teams, agent runtimes, and gateways
Go to the Develop microsite for service challenges, PQ identity framing, and builder launch kits.
Open PathBTX Node is configured through a combination of a configuration file and command-line flags. Command-line flags take precedence over values in the config file.
Config File Location
| Platform | Default path |
|---|---|
| Linux | ~/.btx/btx.conf |
| macOS | ~/Library/Application Support/BTX/btx.conf |
Create the config file if it does not exist:
# Linux
mkdir -p ~/.btx
touch ~/.btx/btx.conf
chmod 600 ~/.btx/btx.conf
# macOS
mkdir -p ~/Library/Application\ Support/BTX
touch ~/Library/Application\ Support/BTX/btx.conf
chmod 600 ~/Library/Application\ Support/BTX/btx.conf Set permissions to 600 because the file may contain RPC credentials.
File Format
The config file uses a simple key=value format, one option per line. Lines starting with # are comments.
# This is a comment
server=1
txindex=1
rpcuser=myuser
rpcpassword=mypassword Network Sections
Options can be scoped to a specific network using section headers. Unscoped options apply to all networks. Network-specific values override global ones.
# Global — applies to all networks
server=1
txindex=1
[main]
rpcport=19334
[test]
rpcport=29334
[regtest]
rpcport=39334 Available sections:
[main]— mainnet (default)[test]— testnet[regtest]— regression test network
Key Options
| Option | Default | Description |
|---|---|---|
server | 0 | Accept JSON-RPC commands. Required for btx-cli to work. |
daemon | 0 | Run in the background as a daemon. |
listen | 1 | Accept incoming P2P connections. |
txindex | 0 | Maintain a full transaction index. Enables getrawtransaction for any txid. |
datadir | (platform default) | Override the data directory path. |
rpcport | 19334 | Port for JSON-RPC connections. |
rpcbind | 127.0.0.1 | IP address to bind for RPC. Use 0.0.0.0 to allow remote connections (use with rpcallowip). |
rpcuser | — | Username for JSON-RPC authentication. |
rpcpassword | — | Password for JSON-RPC authentication. |
rpcallowip | 127.0.0.1 | Allow RPC connections from this IP/subnet (e.g. 192.168.1.0/24). |
port | 19335 | Port for P2P connections. |
addnode | — | Add a peer to connect to (can be specified multiple times). |
maxconnections | 125 | Maximum number of peer connections. |
dbcache | 450 | UTXO database cache size in MB. Larger values speed up sync. |
prune | 0 | Reduce storage by pruning old blocks. Value in MB (minimum 550). |
zmqpubrawblock | — | ZMQ endpoint for raw block notifications (e.g. tcp://127.0.0.1:28332). |
zmqpubrawtx | — | ZMQ endpoint for raw transaction notifications. |
For the complete list of options, run:
./build-btx/bin/btxd --help Command-Line Flags vs Config File
Every config file option can also be passed as a command-line flag prefixed with -:
# These are equivalent:
./build-btx/bin/btxd -server -txindex -rpcport=19334
# ...to having this in btx.conf:
# server=1
# txindex=1
# rpcport=19334 Command-line flags override config file values. Boolean options accept 0/1 in the config file and can be toggled with -option / -nooption on the command line.
Example Configurations
Full Archive Node
A fully-indexed node suitable for block explorers and API services:
server=1
daemon=1
txindex=1
listen=1
maxconnections=64
dbcache=2048
rpcuser=btxrpc
rpcpassword=CHANGE_ME_TO_A_STRONG_PASSWORD
rpcport=19334
rpcbind=127.0.0.1
# ZMQ notifications
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333 Mining Node
Optimized for solo mining with MatMul PoW:
server=1
daemon=1
listen=1
txindex=0
dbcache=1024
rpcuser=miner
rpcpassword=CHANGE_ME_TO_A_STRONG_PASSWORD
rpcport=19334
rpcbind=127.0.0.1
# Connect to known peers
addnode=100.85.221.75
addnode=100.115.222.45
addnode=100.123.243.104 RPC-Only (No Incoming Peers)
A node that syncs the chain but does not accept inbound P2P connections — useful for wallets and services behind a firewall:
server=1
daemon=1
listen=0
maxconnections=8
rpcuser=service
rpcpassword=CHANGE_ME_TO_A_STRONG_PASSWORD
rpcport=19334
rpcbind=127.0.0.1 Local Regtest Development
A local regression-test node for development and testing:
regtest=1
server=1
[regtest]
rpcuser=dev
rpcpassword=dev
rpcport=39334 Start it with:
./build-btx/bin/btxd -regtest -daemon Security Notes
- Always set
chmod 600on yourbtx.confto prevent other users from reading RPC credentials. - Never bind RPC to
0.0.0.0without restricting access viarpcallowipand a firewall. - Use strong, random passwords for
rpcuser/rpcpassword. Consider usingrpcauthfor hashed credentials instead. - If you do not need RPC, omit
server=1entirely.