LND Channel Rebalancing -- Keep Routing Fees Flowing
LND Troubleshooting GuideWhy Rebalance?
Channels become unbalanced over time. All funds on one side means you cannot route in that direction. Rebalancing restores liquidity.
Check Channel Balance First
lncli listchannels | jq '.channels[] | {alias: .peer_alias, local: .local_balance, remote: .remote_balance}'Option 1: bos rebalance (recommended)
npm install -g balanceofsatoshis # Rebalance up to 500k sats, max 100 ppm fee bos rebalance --max-rebalance-sats 500000 --max-fee-rate 100 # Target specific channels bos rebalance --out CHANNEL_ID --in CHANNEL_ID2 --max-rebalance-sats 200000
Option 2: Loop Out
loop out --amt 500000 --channel CHANNEL_ID
Cost Rule of Thumb
Only rebalance if expected routing revenue exceeds cost. Common threshold: max-fee-rate under 50 ppm.
Automate via cron
# Every 6 hours 0 */6 * * * bos rebalance --max-fee-rate 50 >> /var/log/bos-rebalance.log 2>&1