Just starting with my lightning node and I needed some inbound liquidity, so I opened a 1,000,000 Sat channel with mainnet.lightningconductor.net and they promptly opened one back to me with 500,000 Sats. Great!
I now have two channels open with Lightning Conductor (see image of my channels below). One channel has 0.4M INBOUND liquidity, the other has 1.1M outbound liquidity.
Problem is: when I try to send a payment using this channel Thunderhub only lets me choose the peer, not the specific channel. So I can’t figure out how to use the 1.1M outbound liquidity in the 2nd channel. If I attempt to send a payment over 50k using this peer, Thunderhub tells me there isn’t enough liquidity.
How do I move the 1.1M of outbound liquidity over to the other channel? Or am I thinking about this all wrong?
In order to do this, you’ll want to do what’s called a rebalance - you’ll see it over in ThunderHub’s sidebar there. What this’ll do is send sats from the channel where your sats are (the one you opened) to lightningconductor’s node and bring your sats back into the other channel. Cool, huh?
So you’ll go over into the Rebalance screen (right under channels).
For Outgoing, you’ll select the channel where more sats are on your side - in this case, one of the lightning channels for lightningconductor will have 100% next to it - that will be the one, since 100% of the sats on your side.
For incoming, you’ll select the one where all the sats are on their side - in this case, well, the other one, since TH doesn’t let you rebalance into the same channel.
You want your channel balances somewhat balanced so your peers can route payments through your channels. This said, I’d start with 200,000 sats and see how you look then. Your channel you opened should have a little inbound liquidity with them and the one they opened should be pretty even.
However, keep in mind that you can’t fit a gallon of milk into a quart jug. Same goes for Lightning channels. A channel cannot grow in size after it’s created. So, ultimately, that 500k sats channel can’t
get any bigger (well, not without closing and re-opening the channel). This said, if it was me? I’d move my outbound to their channel (as much as I could) then co-op close the smaller channel. Then you end up with one fairly balanced, 1m sat channel.
Hope this helped.
Thanks for the reply @Szek. This is all really helpful information. However, when I try to rebalance, Thunderhub only let’s me choose the Mainnet channel for Outgoing. For incoming, the other Mainnet channel isn’t an available option. At least when I attempt to rebalance, it appears that both Mainnet channels are being added together and considered as one single channel. See screenshots below…
Open Channels screen:
Ah, I see the problem. Looks like we might need to have some fun in shell then.
Before we get started, open a text doc in whatever text editor you use. Copy and paste this into it:
Open your OS’s terminal and SSH into Umbrel.
Since ThunderHub won’t rebalance automatically, you’ll probably have to do it manually. To do this, you’ll have to start by getting your channels’ public keys. To do this, you write:
lncli listchannels --active_only
Your terminal might write War and Peace for you, but you need to take note of a couple things in the chaos.
“chan_id” - You can get this in ThunderHub as well. The number with all the numbers and “x”s, you’ll need this for the channel you move your local sats out of.
“remote_pubkey” - this is longer and more complicated than the chan_id. You’ll need this for the channel you move local sats into.
Keep your terminal open, and bring back up your text doc. Write your chan_id next to “outgoing_chan_id” and your remote_pubkey you found next to “last_hop”.
- Now that we have these, we can get into the nitty gritty. In your trusty terminal, write:
lncli addinvoice <however many sats you want to rebalance>
This should respond with an invoice you can use to rebalance the channel. Copy this and put it in the text doc next to “invoice”.
- Now we bring it all together. Copy and paste this into your text editor and copy and paste the info we wrote down into it.
lncli payinvoice \
--fee_limit 30 \
--outgoing_chan_id *your chan_id* \
--last_hop *your remote_pubkey* \
Copy and paste the whole thing into your terminal. If needed, hit enter and (hopefully) the channel rebalances.
- Report this to ThunderHub on their GitHub because this sounds like one hell of a bug.
Let me know if this works.
Thanks @Szek. I get an error every time I enter
lncli. It returns:
-bash: lncli: command not found
sudo docker exec lnd lncli addinvoice 1100000
but still get the same error…
-bash: lncli: command not found
Sorry, I’m a dunce when it comes to shell commands :-/
Do you have Lightning Shell installed on your Umbrel, @satoshinaka069? If you boot that up and run the commands in there, it should work.
Ah! You are very smart, indeed. I did not have Lightning Shell installed. Now I do.
Incidentally, I also just installed Lightning Terminal and with that I decided to try to do a loop out with the offending channels. It worked and was surprisingly easy, even for me! With Thunderhub you can now see those two channels are balanced (or at least more balanced than previously)…
So do you think this indicates a bug with Thunderhub? I’m wondering if anyone else has run into this issue. Surely I must not be the first. It’s a nice little app otherwise.
Excellent! Lightning Shell is a nice app and so is Terminal.
Regarding ThunderHub - I would at least mention it. It may not be a bug and there could be a great reason it didn’t work - but telling them and having them say that (and possibly a workaround for next time as well) would be a good thing, because then we’d both find that out.
Absolutely. I will contact him and post any details to this thread. Thanks again @Szek!