---
# System prepended metadata

title: 'Guide: Use Balance Of Satoshis to rebalance channels'

---

# Guide: Use Balance Of Satoshis to rebalance channels
Balance of Satoshis (BOS) is a powerful tool for managing a lightning node. It is especially useful for rebalancing channels because it makes multiple attempts to find the cheapest route available. There isn't yet a fully fledged GUI for BOS, so the commands are executed in the command line, which may be challenging for some lightning node operators.

Here is a basic guide to using the "bos rebalance" command:
#### Access the help menu:
>
> - **bos rebalance --help**
> - The help menu will provide a list of options to use with the "bos rebalance" command to customize the operation. 
 

#### Circular Rebalance:
>
> - **bos rebalance  <options>**
> - Simply entering `bos rebalance` will begin a rebalancing operation between two automatically selected peers.
> - The following options may be used with `bos rebalance` to customize the rebalance operation.
>##### Syntax Example
>**`bos rebalance --out <node alias A> --out <node alias B> --in <node alias C> --avoid <node alias D> --amount 3000000`**
A lightning payment will route out of a channel with Node A or Node B and into a channel with Node C in an amount that targets 3 million satoshis. If neither Node A's nor Node B's channels are acceptable to pay from, another channel will be attempted, but not the channel with Node D.


##### Options
> **`--amount <amount> `**          *Maximum amount to rebalance [optional]*. 
The <amount> has units of satoshis.  

> **`--avoid <pubkey> `**           *Avoid forwarding through node [optional]*. 
The <pubkey> may be the complete public key of the node to avoid or it may be a node alias, matched with best effort. This option is useful if one node is repeatedly failing with a remote channel failure.

> **`--avoid-high-inbound `**       *Avoid rebalancing when inbound is high [optional] [default: false]*.  
This option may be useful to preserve inbound liquidity in channels with lots of inbound liquidity.

> **`--in <pubkey_or_alias> `**      *Route in through a specific peer [optional].* 
Selects a channel that is preferred to receive the rebalance payment. This will reduce the inbound liquidity in this channel and increase the outbound liquidity. Increased outbound liquidity will allow you to send more or larger payments in the future from this channel at the expense of reducing the amount that can be received in the future.

> **`--in-target-outbound <amt> `**     *Balance up to outbound amount [optional].*
Specify the amount of outbound capacity in satoshis that you would like this channel to be able to pay out. Use in conjuction with an `--in <pubkey_or_alias>` option. 

> **`--max-fee <max_fee> `**           *Maximum fee to pay [optional].* 
The `<max_fee>` is in units of satoshis.
                                     
> **`--max-fee-rate <max_fee_rate> `**           *Max fee rate to pay  [optional].*
The <max_fee_rate> should be entered in parts per million (ppm). An 80 ppm fee rate would be a fee of 8 sats for a 100,000 sat payment. If the cumulative fees for the cheapest functional route exceed the max fee rate threshold, the rebalance will fail. 

> **`--minutes <minutes> `**           *Time-out route search after N minutes  [optional].*

> **`--no-color `**           *Mute all colors  [optional] [default: false].*

> **`--node <node_name> `**           *Node to use for payment request check [optional].*

> **`--out <pubkey_or_alias> `**           *Route out through a specific peer [optional].*

> **`--out-channel <pubkey_or_alias>`**           *Lock outbound rebalance to channels [optional] [default: false]*
Only the channels specified will be used to route payments out. No other channel will be used and if there are no suitable routes, the rebalance will fail.

> **`--out-target-inbound <amount>`**  *Balance up to inbound amount [optional].*






   bos 5.39.4

   USAGE

     bos rebalance

     Change the liquidity profile of two peers

   OPTIONS

     --amount <amount>              Maximum amount to rebalance [optional]
     --avoid <pubkey>               Avoid forwarding through node [optional]
     --avoid-high-inbound           Avoid rebalancing when inbound is high [optional] [default: false]
     --in <pubkey_or_alias>         Route in through a specific peer [optional]
     --in-target-outbound <amt>     Balance up to outbound amount [optional]
     --max-fee <max_fee>            Maximum fee to pay [optional]
     --max-fee-rate <max_fee_rate>  Max fee rate to pay  [optional]
     --minutes <minutes>            Time-out route search after N minutes  [optional]
     --no-color                     Mute all colors  [optional] [default: false]
     --node <node_name>             Node to use for payment request check [optional]
     --out <pubkey_or_alias>        Route out through a specific peer [optional]
     --out-channel                  Lock outbound rebalance to channels [optional] [default: false]
     --out-target-inbound <amount>  Balance up to inbound amount [optional]

   GLOBAL OPTIONS

     -h, --help         Display help
     -V, --version      Display version
     --no-color         Disable colors
     --quiet            Quiet mode - only displays warn and error messages
     -v, --verbose      Verbose mode - will also output debug messages



