Lightning Node Health Score — Diagnose and score your Lightning Network node in seconds.
┌──────────────────────────────────────────────────────────┐
│ ⚡ LIGHTNING NODE HEALTH SCORE ⚡ │
├──────────────────────────────────────────────────────────┤
│ Node: SatoshiRouter │
│ Back: LND │
├──────────────────────────────────────────────────────────┤
│ OVERALL SCORE A │
│ [██████████████████████████░░░] 91/100 │
│ Excellent! Your node is in great shape. │
├──────────────────────────────────────────────────────────┤
│ CHECKS │
│ │
│ ✓ Sync Status ▪▪▪▪▪▪▪▪▪▪▪▪ 100/100 │
│ ✓ Channel Health ▪▪▪▪▪▪▪▪▪▪▪░ 90/100 │
│ ✓ Liquidity Balance ▪▪▪▪▪▪▪▪▪▪▪░ 88/100 │
│ ✓ Routing Activity ▪▪▪▪▪▪▪▪▪▪▪▪ 100/100 │
│ ✓ Fee Policy ▪▪▪▪▪▪▪▪▪▪░░ 85/100 │
│ ✓ Peer Diversity ▪▪▪▪▪▪▪▪▪▪▪▪ 100/100 │
│ ⚠ Backup Reminder ▪▪▪▪▪▪▪▪░░░░ 70/100 │
└──────────────────────────────────────────────────────────┘
- 7 health checks covering sync, channels, liquidity, routing, fees, peers, and backups
- Grades A–F with detailed explanations and fix suggestions
- LND and Core Lightning support
- JSON output for scripting and monitoring
- Nostr post generator — copy-paste ready with hashtags
- Demo mode — try it without a real node
- Zero dependencies — pure Python 3.9+
| Check | Weight | What it measures |
|---|---|---|
| Sync Status | 20% | Chain + graph sync state |
| Channel Health | 20% | Active vs inactive channels |
| Liquidity Balance | 20% | Local/remote liquidity ratio |
| Routing Activity | 15% | Forwards + fees in last 30 days |
| Fee Policy | 10% | Fee sanity (not too high/low) |
| Peer Diversity | 10% | Number of connected peers |
| Backup Reminder | 5% | Static reminder to check backups |
pip install ln-health
ln-health --backend lndgit clone https://github.com/shadowbipnode/ln-health
cd ln-health
pip install -e .
ln-health --backend lndgit clone https://github.com/shadowbipnode/ln-health
cd ln-health
python -m ln_health --backend lndpython -m ln_health.demo good # A-grade node
python -m ln_health.demo average # C-grade node
python -m ln_health.demo bad # F-grade nodeusage: ln-health [-h] [--backend {lnd,cln}]
[--lncli LNCLI] [--rpc-server RPC_SERVER]
[--macaroon MACAROON] [--tls-cert TLS_CERT]
[--network {mainnet,testnet,regtest,simnet}]
[--lightning-cli LIGHTNING_CLI] [--rpc-file RPC_FILE]
[--output {pretty,json,nostr}] [--verbose] [--no-color]
# Default LND (uses lncli from PATH)
ln-health --backend lnd
# LND with custom paths
ln-health --backend lnd \
--rpc-server localhost:10009 \
--macaroon ~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon \
--tls-cert ~/.lnd/tls.cert
# Core Lightning
ln-health --backend cln
# Full verbose output (all check details)
ln-health --backend lnd --verbose
# JSON output
ln-health --backend lnd --output json
# JSON + jq
ln-health --backend lnd --output json | jq '.total_score'
# Generate a Nostr post
ln-health --backend lnd --output nostr
# Testnet
ln-health --backend lnd --network testnet
# No colors (for logging)
ln-health --backend lnd --no-colorGenerate a ready-to-copy Nostr post with your node score:
ln-health --backend lnd --output nostrFor Docker users:
ln-health --backend lnd --lncli "/home/$USER/lnd-cli-wrapper.sh" --output nostrExample output:
⚡ Lightning Node Health Score
Node: shadowbip
Score: 70/100 Grade: C 🟡
✅ Sync Status: 100/100
✅ Channel Health: 100/100
⚠️ Liquidity Balance: 75/100
⚠️ Routing Activity: 25/100
⚠️ Fee Policy: 55/100
⚠️ Peer Diversity: 55/100
Checked with ln-health 🛠️
github.com/shadowbipnode/ln-health
#Bitcoin #Lightning #LightningNetwork #NodeRunner
Copy the output and paste it into your Nostr client (Primal, Damus, Coracle, etc.).
Note: The tool does NOT automatically publish to Nostr. You copy and paste manually for security reasons (your private key never leaves your Nostr client).
Create a wrapper script to run lncli inside the container:
cat > ~/lnd-cli-wrapper.sh << 'EOF'
#!/bin/bash
docker exec lnd lncli "$@"
EOF
chmod +x ~/lnd-cli-wrapper.shRun ln-health:
ln-health --backend lnd --network mainnet --lncli "/home/$USER/lnd-cli-wrapper.sh"Alternative method (using RPC and mounted files):
ln-health --backend lnd \
--network mainnet \
--rpc-server localhost:10009 \
--macaroon /home/$USER/.lnd/data/chain/bitcoin/mainnet/admin.macaroon \
--tls-cert /home/$USER/.lnd/tls.certcd ~/umbrel/app-data/lightning/data/lnd
ln-health --backend lnd \
--macaroon ./chain/bitcoin/mainnet/admin.macaroon \
--tls-cert ./tls.certln-health --backend lnd \
--macaroon /mnt/hdd/lnd/data/chain/bitcoin/mainnet/admin.macaroon \
--tls-cert /mnt/hdd/lnd/tls.certln-health --backend lnd \
--rpc-server <your-embassy-ip>:10009 \
--macaroon <path-to-macaroon> \
--tls-cert <path-to-cert>ln-health --backend lnd \
--macaroon /home/bitcoin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon \
--tls-cert /home/bitcoin/.lnd/tls.certAdd to your crontab to get daily scores:
# Daily health check at 9am, save to log
0 9 * * * /usr/local/bin/ln-health --backend lnd --no-color >> ~/ln-health.log 2>&1
# Weekly Nostr-ready report
0 8 * * 1 /usr/local/bin/ln-health --backend lnd --output nostr >> ~/nostr-weekly.txt{
"node_alias": "SatoshiRouter",
"node_pubkey": "02abc...",
"backend": "LND",
"timestamp": "2025-01-01 09:00:00 UTC",
"total_score": 91,
"grade": "A",
"summary": "Excellent! Your node is in great shape.",
"checks": [
{
"name": "Sync Status",
"score": 100,
"status": "ok",
"detail": "Chain synced ✓ | Graph synced ✓ | Block #850001",
"suggestion": ""
}
]
}PRs welcome! Ideas for next features:
- Watchtower check
- HTLCs in-flight analysis
- Channel age scoring
- Telegram / email alerts
- Web dashboard
- HTLC success rate check
- Mempool fee awareness
git clone https://github.com/shadowbipnode/ln-health
cd ln-health
pip install -e ".[dev]"
pytest tests/MIT — free to use, modify, share.
Built with ⚡ — Share your score on Nostr!
#Bitcoin #Lightning #LightningNetwork #NodeRunner