LND Channel Rebalancing -- Fix Stuck Routing
LND Troubleshooting GuideWhy Rebalance?
Unbalanced channels cause routing failures. If all liquidity is on one side, you cannot route in that direction. Rebalancing moves liquidity from outbound-heavy channels to inbound-heavy ones.
Check Channel Balance
lncli listchannels | jq '.channels[] | {remote_pubkey, local_balance, remote_balance}'Manual Circular Rebalance
# Pay invoice to yourself via specific outgoing channel lncli addinvoice --amt 100000 # then: lncli payinvoice --allow_self_payment <payment_request> --outgoing_chan_id <chan_id>
Using bos (Balance of Satoshis)
npm install -g balanceofsatoshis bos rebalance \ --amount 100000 \ --out <outbound_peer_pubkey> \ --in <inbound_peer_pubkey> \ --max-fee-rate 500
Automated with charge-lnd
pip install charge-lnd # charge.config [default] strategy = proportional fee_rate = 500 # Run: charge-lnd -c charge.config
Profitability Check
Track routing fees: lncli fwdinghistory --max_events 1000
Do not rebalance if the fee cost exceeds the routing revenue from that channel. Rebalancing only makes sense if the channel earns more than it costs to maintain.