System requirements

Detailed hardware, software, and infrastructure requirements for running the Bitcoin Indexer in production.


Hardware specifications

The Bitcoin Indexer processes every Bitcoin transaction to extract metaprotocol data. Hardware requirements scale with the metaprotocols you index and API traffic you serve.

Minimum requirements

ComponentSpecificationNotes
CPU6 cores / 12 threadsAMD Ryzen 5 or Intel i5
RAM16 GB DDR432 GB for multiple metaprotocols
Storage2 TB NVMe SSDFast random I/O critical
Network100 Mbps1 Gbps for initial sync
Bitcoin NodeDedicated instanceCannot share with indexer
ComponentSpecificationNotes
CPU16+ cores / 32+ threadsAMD EPYC or Intel Xeon
RAM64 GB DDR4 ECCMore for heavy API load
Storage4 TB NVMe RAID 1Redundancy recommended
Network10 GbpsLow latency to Bitcoin node
Bitcoin NodeDedicated serverSame datacenter preferred

Storage requirements

Storage needs grow over time as the blockchain and metaprotocol activity increase:

Current storage usage (Dec 2024)

ComponentSizeGrowth Rate
Bitcoin blockchain~580 GB~50 GB/year
Ordinals index~450 GB~150 GB/year
Runes index~80 GB~30 GB/year
BRC-20 index~120 GB~40 GB/year
PostgreSQL + overhead~200 GBVaries
Total~1.5 TB~300 GB/year
Storage planning

Plan for 2-3x current requirements to accommodate growth and temporary files during reindexing.

Software dependencies

Operating system

Ubuntu 22.04 LTS recommended. Also tested on:

  • Ubuntu 20.04 LTS
  • Debian 11/12
  • RHEL 8/9
  • macOS 13+ (development only)

Required software

Bitcoin Core

# Version 25.0 or higher
bitcoind --version

PostgreSQL

# Version 14 or higher
psql --version

Build tools (if compiling from source)

# Rust 1.70+
rustc --version
# Clang/LLVM
clang --version

Bitcoin node configuration

Your Bitcoin node requires specific settings for the indexer:

title="/path/to/bitcoin.conf"
# Required settings
server=1
txindex=1
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
# Performance settings
dbcache=8192
maxmempool=1000
mempoolexpiry=72
# Network settings
maxconnections=125
maxuploadtarget=5000
txindex requirement

The txindex=1 setting is mandatory. If your node doesn't have a transaction index, you'll need to reindex with bitcoind -reindex.

PostgreSQL configuration

Optimize PostgreSQL for write-heavy workloads:

title="/etc/postgresql/14/main/postgresql.conf"
# Memory settings
shared_buffers = 8GB
effective_cache_size = 24GB
work_mem = 256MB
maintenance_work_mem = 2GB
# Write performance
checkpoint_segments = 64
checkpoint_completion_target = 0.9
wal_buffers = 16MB
synchronous_commit = off
# Connection settings
max_connections = 200
max_wal_size = 4GB

Database initialization

Terminal
$
sudo -u postgres createuser bitcoin_indexer
$
sudo -u postgres createdb -O bitcoin_indexer bitcoin_metaprotocols
$
sudo -u postgres psql -c "ALTER USER bitcoin_indexer WITH PASSWORD 'secure_password';"

Network architecture

Port requirements

ServicePortProtocolDirectionPurpose
Bitcoin P2P8333TCPInbound/OutboundBlockchain sync
Bitcoin RPC8332TCPLocalhostNode communication
Bitcoin ZMQ28332-28333TCPLocalhostBlock notifications
PostgreSQL5432TCPLocalhostDatabase access
Indexer API3000TCPInboundREST endpoints

Security considerations

  1. 1Firewall rules - Only expose API port (3000) publicly
  2. 2Bitcoin node - Bind RPC/ZMQ to localhost only
  3. 3PostgreSQL - Restrict to local connections
  4. 4API rate limiting - Implement reverse proxy limits
  5. 5SSL/TLS - Use HTTPS for production APIs

Monitoring setup

System metrics to track

  • CPU usage - Parser threads should use 60-80%
  • Memory usage - Watch for OOM conditions
  • Disk I/O - Monitor IOPS and latency
  • Network bandwidth - Track Bitcoin node sync
  • PostgreSQL performance - Query response times
# docker-compose.yml snippet
services:
prometheus:
image: prom/prometheus:latest
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
grafana:
image: grafana/grafana:latest
ports:
- "3001:3000"
node_exporter:
image: prom/node-exporter:latest
ports:
- "9100:9100"

Scaling considerations

Vertical scaling

Start with vertical scaling (bigger hardware) before horizontal:

  • CPU: More cores improve parser throughput
  • RAM: Reduces database cache misses
  • NVMe: Critical for random I/O performance

Horizontal scaling options

For high API traffic:

  1. 1Read replicas - PostgreSQL streaming replication
  2. 2Load balancing - HAProxy or nginx for API requests
  3. 3Caching layer - Redis for hot API responses
  4. 4CDN - Cache static inscription content

Next steps