# Rebalancing command LNCLI?

**URL:** <https://community.umbrel.com/t/rebalancing-command-lncli/3790>\
**Category:** General Discussion\
**Created:** [October 3, 2021, 5:24pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790 "2021-10-03T17:24:54Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Don911](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Don911](https://community.umbrel.com/u/Don911)\
**Post date:** [October 3, 2021, 5:24pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/1 "2021-10-03T17:24:54Z")

</div>

I want to run the LNCLI rebalancing command on lightningnetwork.plus. The instructions say:

Create an invoice to get the [PAYMENT\_ADDR] and [R\_HASH] values:  
lncli addinvoice --amt 2000000

But that didn’t work. Does anyone know if I have to add something before that line since I’m on Umbrel, i.e. docker etc? Thanks.

---

<div class="post-metadata">

**Author:** ![DarthCoin](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/darthcoin/32/1628_2.png) [@DarthCoin](https://community.umbrel.com/u/DarthCoin)\
**Post date:** [October 3, 2021, 7:57pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/2 "2021-10-03T19:57:34Z")

</div>

You are running the command in the wrong folder.  
As it is explained in the [Umbrel troubleshooting manual](http://community.umbrel.com/t/umbrel-troubleshooting-guide/3632) the command is:  
`cd ~/umbrel/bin`  
`sudo docker exec lnd lncli`

---

<div class="post-metadata">

**Author:** ![Don911](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Don911](https://community.umbrel.com/u/Don911)\
**Post date:** [October 3, 2021, 10:45pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/3 "2021-10-03T22:45:09Z")

</div>

OK, thanks! So just to clarify, I first enter “cd ~/umbrel/bin” and hit return, then enter “sudo docker exec lnd lncli”, and then finally I run the “lncli addinvoice --amt 2000000” command?

Update: It seemed to work if I enter “sudo docker exec lnd lncli addinvoice --amt 2000000”.

---

<div class="post-metadata">

**Author:** ![Don911](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Don911](https://community.umbrel.com/u/Don911)\
**Post date:** [October 4, 2021, 9:00pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/4 "2021-10-04T21:00:46Z")

</div>

The first command worked but the 2nd one not. The instructions for the 2nd command says: “lncli buildroute --amt 1000000 --hops…”. So I tried to use “sudo docker exec lnd lncli buildroute --amt 1000000 --hops…”. Can someone let me know if that’s correct or not? When I run it, I first get an error but then it looks like it did something anyway. This is what I get:  
-bash: lncli: command not found  
[lncli] rpc error: code = Unknown desc = no matching outgoing channel available for node 3 (037172d2110c4148d6ed0c2790ec8be948458022425dced6794fede834be92af36)  
umbrel@umbrel:~/umbrel/bin $

---

<div class="post-metadata">

**Author:** ![DarthCoin](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/darthcoin/32/1628_2.png) [@DarthCoin](https://community.umbrel.com/u/DarthCoin)\
**Post date:** [October 4, 2021, 9:35pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/5 "2021-10-04T21:35:18Z")

</div>

yes you are doing it right. Only that destination is offline or you paste the a wrong channel id

---

<div class="post-metadata">

**Author:** ![Don911](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Don911](https://community.umbrel.com/u/Don911)\
**Post date:** [October 4, 2021, 10:02pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/6 "2021-10-04T22:02:13Z")

</div>

OK, thanks! Just curious as to why it first says “-bash: lncli: command not found” before the result?

Also, I’m currently participating in 3 different swaps on Lightningnetwork.plus. And I get the same error message when I run the scripts for each of these swaps, i.e. “no matching outgoing channel available for node X”. When I look in Thunderhub, all nodes are online. Any ideas? One is a Triangle swap and two are Pentagon swaps.

---

<div class="post-metadata">

**Author:** ![DarthCoin](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/darthcoin/32/1628_2.png) [@DarthCoin](https://community.umbrel.com/u/DarthCoin)\
**Post date:** [October 4, 2021, 11:05pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/7 "2021-10-04T23:05:20Z")

</div>

You have to run the ln-cli in the bin folder  
`cd ~/umbrel/bin`  
`sudo docker exec lnd lncli`

---

<div class="post-metadata">

**Author:** ![Don911](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Don911](https://community.umbrel.com/u/Don911)\
**Post date:** [October 4, 2021, 11:28pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/8 "2021-10-04T23:28:37Z")

</div>

> [@DarthCoin](#):
>
> You have to run the ln-cli in the bin folder

That’s what I have been doing. But other people in the swaps are saying that they are getting the same error. And someone speculated that it could perhaps be because some people have updated to lnd 13.3 and some not (I have not)? Could that be what’s going on could it be something else?

---

<div class="post-metadata">

**Author:** ![DarthCoin](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.umbrel.com/darthcoin/32/1628_2.png) [@DarthCoin](https://community.umbrel.com/u/DarthCoin)\
**Post date:** [October 4, 2021, 11:31pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/9 "2021-10-04T23:31:31Z")

</div>

Yes, many nodes are updating now, you should try that in few days until this crazyness is slowing down.  
People are freaked out too easy and enter in panic mode.  
Patience is important.

---

<div class="post-metadata">

**Author:** ![Don911](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@Don911](https://community.umbrel.com/u/Don911)\
**Post date:** [October 5, 2021, 12:03am UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/10 "2021-10-05T00:03:12Z")

</div>

> [@DarthCoin](#):
>
> You should try that in few days until this crazyness is slowing down.

OK, thanks. Hopefully that’s what’s going on.

---

<div class="post-metadata">

**Author:** ![agoldhammer](https://avatars.discourse-cdn.com/v4/letter/a/ebca7d/32.png) [@agoldhammer](https://community.umbrel.com/u/agoldhammer)\
**Post date:** [December 15, 2021, 5:04am UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/11 "2021-12-15T05:04:43Z")

</div>

I am also having some challenges with the LNCLI

I am getting a “the input device is not a TTY” error.

I am working to rebalance channels from a lightningnetwork.plus swap

First step:  
umbrel@umbrel:~/umbrel/bin $ sudo docker exec lnd lncli addinvoice --amt 1150000

umbrel@umbrel:~/umbrel/bin $ sudo docker exec lnd lncli buildroute --amt 1150000 --hops 02bc320249b608a53a76cf3cbd448fdd3ab8f3766f96e8649c2edc26cf03bf8277,035eb7d2253d934b51dd1cc145b6f36a9c2d953c4379f5fff9c39bb437ece525ae,03ac80331775d256eeb7438463e9cf1b986fcc77f84d9501cb52f34ab957fb6e1b,02bd173762f980267f9aa02f5db6a43c1b1f075a0f9f8425668eaa3a21f5252897,0263816bd2eedcb22690bfa623b36512f20aa134e77d247e56f15f2ab57c9fbebc | jq -r ‘(.route.hops[-1] | .mpp\_record) |= {payment\_addr:"[PAYMENT\_ADDR]", total\_amt\_msat: “1150000000”}’ | lncli sendtoroute --payment\_hash=[R\_HASH] -

the input device is not a TTY

Are there additional flags I need to set?

---

<div class="post-metadata">

**Author:** ![dahans](https://avatars.discourse-cdn.com/v4/letter/d/f4b2a3/32.png) [@dahans](https://community.umbrel.com/u/dahans)\
**Post date:** [November 19, 2024, 12:09pm UTC](https://community.umbrel.com/t/rebalancing-command-lncli/3790/12 "2024-11-19T12:09:59Z")

</div>

Hello!  
I would do the same.  
Command sudo docker exec lnd lncli got this error: No such container: lnd

do i need to install a app for that?
