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
Component | Specification | Notes |
---|---|---|
CPU | 6 cores / 12 threads | AMD Ryzen 5 or Intel i5 |
RAM | 16 GB DDR4 | 32 GB for multiple metaprotocols |
Storage | 2 TB NVMe SSD | Fast random I/O critical |
Network | 100 Mbps | 1 Gbps for initial sync |
Bitcoin Node | Dedicated instance | Cannot share with indexer |
Recommended production setup
Component | Specification | Notes |
---|---|---|
CPU | 16+ cores / 32+ threads | AMD EPYC or Intel Xeon |
RAM | 64 GB DDR4 ECC | More for heavy API load |
Storage | 4 TB NVMe RAID 1 | Redundancy recommended |
Network | 10 Gbps | Low latency to Bitcoin node |
Bitcoin Node | Dedicated server | Same datacenter preferred |
Storage requirements
Storage needs grow over time as the blockchain and metaprotocol activity increase:
Current storage usage (Dec 2024)
Component | Size | Growth 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 GB | Varies |
Total | ~1.5 TB | ~300 GB/year |
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 higherbitcoind --version
PostgreSQL
# Version 14 or higherpsql --version
Build tools (if compiling from source)
# Rust 1.70+rustc --version# Clang/LLVMclang --version
Bitcoin node configuration
Your Bitcoin node requires specific settings for the indexer:
# Required settingsserver=1txindex=1zmqpubrawblock=tcp://127.0.0.1:28332zmqpubrawtx=tcp://127.0.0.1:28333# Performance settingsdbcache=8192maxmempool=1000mempoolexpiry=72# Network settingsmaxconnections=125maxuploadtarget=5000
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:
# Memory settingsshared_buffers = 8GBeffective_cache_size = 24GBwork_mem = 256MBmaintenance_work_mem = 2GB# Write performancecheckpoint_segments = 64checkpoint_completion_target = 0.9wal_buffers = 16MBsynchronous_commit = off# Connection settingsmax_connections = 200max_wal_size = 4GB
Database initialization
$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
Service | Port | Protocol | Direction | Purpose |
---|---|---|---|---|
Bitcoin P2P | 8333 | TCP | Inbound/Outbound | Blockchain sync |
Bitcoin RPC | 8332 | TCP | Localhost | Node communication |
Bitcoin ZMQ | 28332-28333 | TCP | Localhost | Block notifications |
PostgreSQL | 5432 | TCP | Localhost | Database access |
Indexer API | 3000 | TCP | Inbound | REST endpoints |
Security considerations
- 1Firewall rules - Only expose API port (3000) publicly
- 2Bitcoin node - Bind RPC/ZMQ to localhost only
- 3PostgreSQL - Restrict to local connections
- 4API rate limiting - Implement reverse proxy limits
- 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
Recommended monitoring stack
# docker-compose.yml snippetservices:prometheus:image: prom/prometheus:latestvolumes:- ./prometheus.yml:/etc/prometheus/prometheus.ymlgrafana:image: grafana/grafana:latestports:- "3001:3000"node_exporter:image: prom/node-exporter:latestports:- "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:
- 1Read replicas - PostgreSQL streaming replication
- 2Load balancing - HAProxy or nginx for API requests
- 3Caching layer - Redis for hot API responses
- 4CDN - Cache static inscription content