- Tools
- Bitcoin Indexer
- Full Sync
Full sync
Run the Bitcoin Indexer from scratch.
- Set up and configure the Bitcoin Indexer
- Run the indexer from scratch
- Monitor indexing progress effectively ::
Prerequisites
- Bitcoin Core node running with
txindex=1
- PostgreSQL running with databases created
- Sufficient storage space
If you haven't already, consider bootstrapping from archives to save days of indexing time.
Start indexing services
The Bitcoin Indexer runs separate services for each metaprotocol. Navigate to your indexer directory:
$cd ~/bitcoin-indexer/bitcoin-indexer
Index Ordinals (includes BRC-20)
$./target/release/bitcoin-indexer ordinals service start --config-path=bitcoin-indexer-config.toml
Index Runes
In a separate terminal:
$./target/release/bitcoin-indexer runes service start --config-path=bitcoin-indexer-config.toml
If you are downloading a release from our end, run cargo build --release
after navigating to the folder to compile the project. This step is necessary to use /target/release/bitcoin-indexer
for starting services.
Monitor indexing progress
Check service logs
The indexer outputs detailed progress information:
$tail -f ~/bitcoin-indexer/bitcoin-indexer/ordinals.log
Query indexer status via API
Once the API server starts (usually after a few blocks):
$curl http://localhost:3000/ordinals/v1/status{"block_height": 819600,"inscriptions_indexed": 52342567,"latest_inscription_number": 52342567,"sync_percentage": 99.93,"blocks_behind": 523}
Service management
Stop services gracefully
$ps aux | grep bitcoin-indexer
Restart after interruption
The indexer automatically resumes from the last processed block:
$./target/release/bitcoin-indexer ordinals service start --config-path=bitcoin-indexer-config.toml
Systemd service setup
For production deployments, use systemd to manage services:
Create Ordinals service
[Unit]Description=Bitcoin Indexer - Ordinals ServiceAfter=network.target postgresql.service bitcoind.service[Service]Type=simpleUser=bitcoin-indexerWorkingDirectory=/home/bitcoin-indexer/bitcoin-indexerExecStart=/home/bitcoin-indexer/bitcoin-indexer/target/release/bitcoin-indexer ordinals service start --config-path=bitcoin-indexer-config.tomlRestart=on-failureRestartSec=30[Install]WantedBy=multi-user.target
Create Runes service
[Unit]Description=Bitcoin Indexer - Runes ServiceAfter=network.target postgresql.service bitcoind.service[Service]Type=simpleUser=bitcoin-indexerWorkingDirectory=/home/bitcoin-indexer/bitcoin-indexerExecStart=/home/bitcoin-indexer/bitcoin-indexer/target/release/bitcoin-indexer runes service start --config-path=bitcoin-indexer-config.tomlRestart=on-failureRestartSec=30[Install]WantedBy=multi-user.target
Enable and start services
$sudo systemctl daemon-reload$sudo systemctl enable bitcoin-indexer-ordinals bitcoin-indexer-runes$sudo systemctl start bitcoin-indexer-ordinals bitcoin-indexer-runes$sudo systemctl status bitcoin-indexer-ordinals
Performance optimization
During initial sync
Optimize for throughput during catch-up:
[resources]# Use more cores during initial synccpu_core_available = 12bitcoind_rpc_threads = 10
After reaching chain tip
Reduce resource usage for steady-state operation:
[resources]# Reduce for normal operationcpu_core_available = 4bitcoind_rpc_threads = 4
Verify successful indexing
Check API endpoints
Test that APIs are returning data:
$curl http://localhost:3000/ordinals/v1/inscriptions/0