Bitcoin node setup
Configure and sync a Bitcoin Core node optimized for the Bitcoin Indexer.
Overview
The Bitcoin Indexer requires a fully synced Bitcoin Core node with transaction indexing enabled. This guide walks through setting up a node specifically configured for indexer operation.
Download Bitcoin Core
Download Bitcoin Core version 25.0 or higher. Choose the correct version for your processor architecture.
Create Bitcoin directory
$mkdir -p ~/bitcoin-indexer/bitcoin$cd ~/bitcoin-indexer/bitcoin
Download and extract
For x86_64 (Intel/AMD):
$curl -O https://bitcoincore.org/bin/bitcoin-core-25.1/bitcoin-25.1-x86_64-linux-gnu.tar.gz$tar -xzf bitcoin-25.1-x86_64-linux-gnu.tar.gz
For ARM64:
$curl -O https://bitcoincore.org/bin/bitcoin-core-25.1/bitcoin-25.1-aarch64-linux-gnu.tar.gz$tar -xzf bitcoin-25.1-aarch64-linux-gnu.tar.gz
Install globally with symlinks
$sudo ln -s ~/bitcoin-indexer/bitcoin/bitcoin-25.1/bin/bitcoind /usr/local/bin/bitcoind$sudo ln -s ~/bitcoin-indexer/bitcoin/bitcoin-25.1/bin/bitcoin-cli /usr/local/bin/bitcoin-cli
Verify installation:
$bitcoind --versionBitcoin Core version v25.1.0
Configure for indexing
Create data directory
$mkdir -p ~/bitcoin-indexer/bitcoin/chainstate
Create configuration file
$nano ~/bitcoin-indexer/bitcoin/bitcoin.conf
Add the following configuration:
# Data directorydatadir=/home/$USER/bitcoin-indexer/bitcoin/chainstate# Core settingsserver=1txindex=1daemon=1# RPC settingsrpcuser=userrpcpassword=passwordrpcport=8332rpcallowip=127.0.0.1rpcthreads=16# ZeroMQ settings (required for indexer)zmqpubrawblock=tcp://0.0.0.0:18543zmqpubrawtx=tcp://0.0.0.0:18544zmqpubhashtx=tcp://0.0.0.0:18545zmqpubhashblock=tcp://0.0.0.0:18546# Performance settings# Set to 16384 (16GB) during initial sync, reduce to 2048 afterdbcache=16384maxmempool=1000mempoolexpiry=72# Network settingslisten=1maxconnections=125# Deprecated RPCdeprecatedrpc=warnings
Always use a strong, unique password for RPC access. The indexer will use these credentials to communicate with your node.
Storage setup
Bitcoin requires significant storage that grows over time:
$sudo mkdir -p /data/bitcoin$sudo chown $USER:$USER /data/bitcoin$df -h /data[1mFilesystem Size Used Avail Use% Mounted on[0m/dev/nvme0n1 3.9T 12G 3.9T 1% /data
Initial blockchain sync
Start Bitcoin Core with your configuration:
$bitcoind -conf=$HOME/bitcoin-indexer/bitcoin/bitcoin.conf
Initial blockchain sync takes 1-3 days depending on hardware and network speed. The node will download ~600GB of data.
Monitor sync progress in another terminal:
$bitcoin-cli -conf=$HOME/bitcoin-indexer/bitcoin/bitcoin.conf getblockchaininfo | jq '{blocks, headers, verificationprogress}'
You can also monitor detailed sync status:
$bitcoin-cli -conf=$HOME/bitcoin-indexer/bitcoin/bitcoin.conf getblockchaininfo | jq '{chain, blocks, headers, bestblockhash, verificationprogress, size_on_disk}'
Verify indexer compatibility
Once synced, verify the node is properly configured:
$bitcoin-cli -conf=$HOME/bitcoin-indexer/bitcoin/bitcoin.conf getindexinfo$bitcoin-cli -conf=$HOME/bitcoin-indexer/bitcoin/bitcoin.conf getzmqnotifications
systemd service setup
Create a systemd service for automatic startup:
[Unit]Description=Bitcoin Core DaemonAfter=network.target[Service]Type=notifyExecStart=/usr/local/bin/bitcoind -conf=/home/bitcoin-indexer/bitcoin-indexer/bitcoin/bitcoin.confUser=bitcoin-indexerGroup=bitcoin-indexerRestart=on-failureRestartSec=30# Security hardeningNoNewPrivileges=truePrivateTmp=trueProtectSystem=strictReadWritePaths=/home/bitcoin-indexer/bitcoin-indexer/bitcoin/chainstate[Install]WantedBy=multi-user.target
Enable and start the service:
$sudo systemctl enable bitcoind$sudo systemctl start bitcoind$sudo systemctl status bitcoind[32m●[0m bitcoind.service - Bitcoin Core DaemonActive: [32mactive (running)[0m
Performance optimization
Memory allocation
For indexer workloads, allocate more memory to the UTXO cache:
# Increase dbcache based on available RAM# 8GB RAM: dbcache=2048# 16GB RAM: dbcache=4096# 32GB RAM: dbcache=8192# 64GB+ RAM: dbcache=16384
Disk I/O optimization
Use fast NVMe storage and optimize mount options:
# Add noatime to reduce write operations/dev/nvme0n1 /data ext4 defaults,noatime 0 2
Network peers
Connect to reliable peers for faster sync:
# Add known good peersaddnode=seed.bitcoin.sipa.beaddnode=dnsseed.bluematt.meaddnode=dnsseed.bitcoin.dashjr.org
Monitoring
Set up monitoring to track node health:
$cat > /usr/local/bin/check-bitcoin.sh << 'EOF'$chmod +x /usr/local/bin/check-bitcoin.sh
Troubleshooting
Slow initial sync
- 1Check CPU usage - should be near 100% during validation
- 2Verify fast storage - NVMe SSD strongly recommended
- 3Increase dbcache if you have available RAM
- 4Ensure good network connectivity
High memory usage
Normal during initial sync. Bitcoin Core will use up to dbcache + 1GB for operations.
Connection refused errors
- 1Verify bitcoind is running:
systemctl status bitcoind
- 2Check RPC credentials match bitcoin.conf
- 3Ensure firewall allows localhost connections