# Rebalancing a ring

**URL:** <https://community.umbrel.com/t/rebalancing-a-ring/1080>\
**Category:** Bitcoin and Lightning\
**Created:** [May 24, 2021, 2:40pm UTC](https://community.umbrel.com/t/rebalancing-a-ring/1080 "2021-05-24T14:40:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nitesh](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/nitesh/32/424_2.png) [@nitesh](https://community.umbrel.com/u/nitesh)\
**Post date:** [May 24, 2021, 2:40pm UTC](https://community.umbrel.com/t/rebalancing-a-ring/1080/1 "2021-05-24T14:40:33Z")

</div>

Hello!

I am trying to balance a ring.

> **[GitHub - Rings-of-Fire/ring-of-fire: Creating strong backbones for the...](https://github.com/Rings-of-Fire/ring-of-fire#lncli-1)**
>
> Creating strong backbones for the Lightning Network - Czino/ring-of-fire - GitHub - Rings-of-Fire/ring-of-fire: Creating strong backbones for the Lightning Network - Czino/ring-of-fire

Has anyone tried this command before?  
~/umbrel/bin/lncli buildroute --amt [AMOUNT\_IN\_SATS] --hops [LIST\_OF\_PUBLIC\_KEYS\_OF\_PEERS] --outgoing\_chan\_id [OUTGOING\_CHAN\_ID]

Its not returning anything for me.  
No error or success.  
If this works, I am trying to do this:

~/umbrel/bin/lncli buildroute --amt [AMOUNT\_IN\_SATS] --hops [LIST\_OF\_PUBLIC\_KEYS\_OF\_PEERS] --outgoing\_chan\_id [OUTGOING\_CHAN\_ID] | jq -r ‘(.route.hops[-1] | .mpp\_record) |= {payment\_addr:“[PAYMENT\_ADDRESS]”, total\_amt\_msat: “[AMOUNT\_IN\_MILLI\_SATS]”}’ | lncli sendtoroute --payment\_hash=[PAYMENT\_HASH] -

I am open to other options as well, ThunderHub has a balancing tool but that does not let me select a path.

---

<div class="post-metadata">

**Author:** ![Reach](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@Reach](https://community.umbrel.com/u/Reach)\
**Post date:** [May 24, 2021, 8:59pm UTC](https://community.umbrel.com/t/rebalancing-a-ring/1080/2 "2021-05-24T20:59:45Z")

</div>

Hey Nitesh,

It looks like you may of just checked if there was a route around your ring. Afterwards there’s a little bit more to build a transaction with it and pay yourself.

I’ve found using this script worked and a bit easier to do than using commands: [Igniter](https://github.com/RooSoft/igniter). Just need to follow the instructions on editing the file with nodes, channel and amount.

Also note the comment at the bottom about the workaround for umbrel.

---

<div class="post-metadata">

**Author:** ![nitesh](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/nitesh/32/424_2.png) [@nitesh](https://community.umbrel.com/u/nitesh)\
**Post date:** [May 25, 2021, 2:08am UTC](https://community.umbrel.com/t/rebalancing-a-ring/1080/4 "2021-05-25T02:08:22Z")

</div>

Works like a charm! Thanks!

---

<div class="post-metadata">

**Author:** ![bilhelm](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/bilhelm/32/532_2.png) [@bilhelm](https://community.umbrel.com/u/bilhelm)\
**Post date:** [May 30, 2021, 11:34pm UTC](https://community.umbrel.com/t/rebalancing-a-ring/1080/5 "2021-05-30T23:34:48Z")

</div>

I’m a noob to command line/SSH, so I’m really confused. Do I copy the script into command line, or somehow save the file with the script in it to somewhere on the umbrel and then sudo nano into it?  
Also I’m unfamiliar if there is parts of the file I need to delete or else the script will err out, I would imagine.

---

<div class="post-metadata">

**Author:** ![nitesh](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/nitesh/32/424_2.png) [@nitesh](https://community.umbrel.com/u/nitesh)\
**Post date:** [June 1, 2021, 12:57pm UTC](https://community.umbrel.com/t/rebalancing-a-ring/1080/6 "2021-06-01T12:57:49Z")

</div>

You can copy paste the script into the command line, but first copy paste it into a text editor and make edits to the pub keys for rebalancing and the channel ID of the outgoing pub key. After that you can just paste into command prompt and run it.
