Skip to content

MajorCommotion/bitcoin-analytics-umbrel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitcoin Analytics for Umbrel

Self-hosted Bitcoin network monitoring with complete privacy

Monitor Bitcoin fees, mempool activity, and large transactions using your own Umbrel infrastructure. No external APIs, no data leakage, no monthly subscriptions.

License: MIT Bitcoin Umbrel


✨ Features

  • Real-time fee estimates - Next block, 30min, 1hr, economy rates
  • 🐋 Large transaction alerts - Get notified of ≥10 BTC movements
  • 📊 Mempool statistics - Size, pending transactions, total fees
  • ⛓️ Blockchain metrics - Block height, latest block details
  • 💬 Discord integration - Optional AI-powered bot commands
  • 📈 Historical charts - 7-day fee rate trends
  • 🔒 100% private - All data from your local node
  • 💰 Cost-effective - ~$0.15/month in API fees (optional automation)

🎯 Why This Project?

Existing solutions have problems:

  • Mempool.space - Great tool, but requires separate hosting
  • Glassnode - Costs $29-800/month
  • CryptoQuant - Expensive, cloud-based, data leaves your control

Our solution:

  • ✅ Free and open source
  • ✅ Runs on your existing Umbrel node
  • ✅ Uses apps you already have (Bitcoin, Mempool, Electrs)
  • ✅ No external dependencies
  • ✅ Complete privacy (all local)

📋 Requirements

Operating System Compatibility

✅ Fully Supported:

  • Linux (Debian 11+, Ubuntu 20.04+, Raspberry Pi OS)
  • macOS (11 Big Sur or later with Homebrew)

⚠️ Manual Setup Required:

  • Other Linux distributions (Fedora, Arch, Alpine) - install jq and bc manually

❌ Not Supported:

  • Native Windows (use WSL2 with Ubuntu instead)

Dependencies:

  • bash - Shell interpreter (pre-installed)
  • curl - HTTP client (usually pre-installed)
  • jq - JSON processor (auto-installed by installer)
  • bc - Calculator (auto-installed by installer)
  • docker - Container runtime (required for Umbrel)

Umbrel Requirements

Required:

  • Umbrel (Pro or Home)
  • Bitcoin Knots or Bitcoin Core (fully synced)
  • Mempool app (installed from Umbrel App Store)

Optional:

  • Electrs (for full blockchain data - highly recommended)
  • OpenClaw (for automation and Discord integration)
  • Discord bot (for remote monitoring)

🚀 Quick Start

One-Command Installation

curl -sSL https://raw.githubusercontent.com/MajorCommotion/bitcoin-analytics-umbrel/main/install.sh | bash

Manual Installation

# Clone the repository
git clone https://github.com/MajorCommotion/bitcoin-analytics-umbrel.git
cd bitcoin-analytics-umbrel

# Run the installer
bash install.sh

The installer will:

  1. ✅ Check your Umbrel environment
  2. ✅ Auto-detect Mempool and Bitcoin APIs
  3. ✅ Install required tools (jq, bc)
  4. ✅ Deploy monitoring scripts
  5. ✅ Configure automation (optional)
  6. ✅ Test the installation

📊 Usage

View Current Metrics

# Show current Bitcoin metrics
bitcoin-metrics

# Output:
# 📊 Bitcoin Metrics - 2026-04-12
# 
# ⚡ Fee Estimates:
# Fastest:    1 sat/vB  (next block)
# 30 minutes: 1 sat/vB
# 1 hour:     1 sat/vB
# Economy:    1 sat/vB
# 
# 🐋 Large Transactions Today: 0
# 🕐 Last Updated: 2026-04-12 08:23 UTC

Discord Integration (Optional)

If you have OpenClaw configured:

@YourBot show Bitcoin metrics
@YourBot what are current fees?
@YourBot any large Bitcoin transactions today?

View Dashboard (Optional)

Open in your browser:

http://your-umbrel-ip:8765/dashboard.html

📁 What Gets Installed

~/.openclaw/workspace/
├── scripts/
│   ├── bitcoin-metrics-monitor.sh   # Daily metrics collector
│   ├── large-tx-monitor.sh           # Large transaction alerts
│   └── show-bitcoin-metrics.sh       # Display current metrics
├── bitcoin-metrics/
│   ├── daily/                        # Daily metric snapshots
│   │   └── YYYY-MM-DD.json
│   ├── alerts/                       # Large transaction alerts
│   │   └── large-tx-*.json
│   └── dashboard.html                # Visual dashboard
└── bitcoin-config.env                # Configuration file

⚙️ Configuration

Edit bitcoin-config.env to customize:

# Mempool API (auto-detected during install)
MEMPOOL_API_URL="http://mempool_web_1:3006/api"

# Large transaction alert threshold
LARGE_TX_THRESHOLD_BTC="10"

# Enable/disable specific checks
ENABLE_BLOCKCHAIN_METRICS="true"
ENABLE_MEMPOOL_MONITORING="true"
ENABLE_FEE_ESTIMATES="true"

🤖 Automation (OpenClaw)

If you have OpenClaw installed, the installer can set up:

Daily Metrics Collection

  • Schedule: Every day at 06:00 UTC
  • Action: Collect blockchain metrics
  • Notification: Discord summary (optional)

Large Transaction Monitoring

  • Schedule: Every hour
  • Action: Check for transactions ≥10 BTC
  • Notification: Discord alert when found

Cost: ~$0.15/month in Claude API fees (for automation only)


📊 Sample Output

JSON Metrics File

{
  "timestamp": "2026-04-12T08:23:01Z",
  "blockchain": {
    "blocks": 944715
  },
  "mempool": {
    "count": 234,
    "vsize": 92516,
    "total_fee": 152384
  },
  "fees": {
    "fastestFee": 1,
    "halfHourFee": 1,
    "hourFee": 1,
    "economyFee": 1,
    "minimumFee": 1
  },
  "latest_block_stats": {
    "height": 944715,
    "tx_count": 4113,
    "size": 1729383,
    "pool": {
      "name": "Foundry USA"
    }
  }
}

🔒 Privacy & Security

Your data never leaves your Umbrel:

  • ✅ All API calls are local (container-to-container)
  • ✅ No external services contacted
  • ✅ No tracking or analytics
  • ✅ No data collection

Data flow:

Bitcoin Knots → Electrs → Mempool API → OpenClaw
     (local)      (local)     (local)      (local)

Everything stays on your machine. Period.


🛠️ Troubleshooting

"Mempool API not found"

  • Ensure Mempool app is installed and running in Umbrel
  • Check: docker ps | grep mempool
  • Restart Mempool app if needed

"No metrics collected yet"

  • Metrics are collected daily at 06:00 UTC
  • For immediate test: bash scripts/bitcoin-metrics-monitor.sh

"jq: command not found"

  • Run the installer again (it will install missing tools)
  • Or manually: brew install jq bc

Dashboard not accessible

  • Dashboard requires additional network configuration
  • Use Discord integration or CLI instead (easier)

See TROUBLESHOOTING.md for more help.


📖 Documentation


🗺️ Roadmap

Phase 1: Minimal Enhancement ✅ COMPLETE

  • Daily metrics collection
  • Large transaction monitoring
  • Fee estimates
  • Mempool statistics
  • Discord integration
  • HTML dashboard

Phase 2: Enhanced Analytics (Planned)

  • PostgreSQL database (historical storage)
  • Advanced charts (MVRV, NVT, Puell Multiple)
  • UTXO set tracking
  • Transaction fee predictions
  • Email/SMS alerts

Phase 3: Professional Analytics (Future)

  • Address clustering
  • Transaction tracing
  • Entity attribution
  • OFAC sanctions monitoring
  • Custom alert rules

💰 Cost Analysis

Free Tier (Manual Use)

  • Cost: $0/month
  • What you get:
    • Manual script execution
    • All metrics available
    • Local dashboard

Automated Tier (OpenClaw)

  • Cost: ~$0.15/month
  • What you get:
    • Automatic daily collection
    • Hourly large TX monitoring
    • Discord notifications
    • AI-powered queries

Compare to:

  • Glassnode: $29-800/month
  • CryptoQuant: $50-300/month
  • This solution: FREE or $0.15/month 🎉

🤝 Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Ideas for contributions:

  • Additional metrics (SegWit adoption, Lightning capacity)
  • New alert types (fee spikes, hash rate drops)
  • Dashboard improvements
  • Documentation enhancements
  • Bug fixes

📜 License

This project is licensed under the MIT License - see LICENSE for details.


🙏 Acknowledgments

Inspired by:

Built with:

  • Bash scripts
  • Bitcoin Knots / Bitcoin Core
  • Electrs
  • Mempool.space (self-hosted)
  • OpenClaw (optional)
  • Chart.js (dashboard)

📧 Contact

Author: MajorCommotion
GitHub: @MajorCommotion
Email: rj5al@pm.me

Support this project:

  • ⭐ Star this repository
  • 🐛 Report bugs via Issues
  • 💡 Suggest features
  • 🔀 Submit pull requests

⚡ Bitcoin

If this project helped you, consider contributing to Bitcoin development:

Bitcoin Core: bitcoin.org/en/development


Made with ❤️ for the Bitcoin community

Self-hosted. Private. Free.

About

Self-hosted Bitcoin network monitoring for Umbrel. Track fees, mempool, and large transactions with complete privacy.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors