How to automatically rebalance your channels - profitably!

You’re correct. After publishing, Carsten informed me that --min-remote doesn’t work with -t.
I’ll update the guide.

2 Likes

Thank you. I will wait the update.

I am a non technical pleb. I already have rebalance-lnd installed but it’s in a different path and instead of using the command rebalance.py I have to use “python3 rebalance.py” and when I look up the present working directory of my rebalance-lnd it is installed in the /home/umbrel directory, but if I try to put this in a crontab it does not work and I am not sure how to enter it in a crontab with a different directory than what you have in the tutorial. Any help is appreciated and hope this comment will help others. Thanks.

I did a video version of this tutorial, all the way up to the automation. Working on the automation video that will come out once I work out all the kinks on my end… https://youtu.be/OEdQ4wdxoU4

4 Likes

Thank you i will look the automation part. The rest is working perfectly for me.

1 Like

Crontab tutorial added to the Rebalance-LND setup video. I also go over some helpful commands: https://youtu.be/be3lEYrE3cg

2 Likes

i realized for umbrel you need to put sudo for step three part 2 like this sudo git clone https://github.com/C-Otto/rebalance-lnd.git

i hope that helps someone else

3 Likes

Running into issue when running on Unbuntu with Umbrel. Any thoughts how I can fix?

X@umbrel-VM:/mnt/data/upgrades/rebalance-lnd$ python3 /mnt/data/upgrades/rebalance-lnd/rebalance.py -c
Traceback (most recent call last):
File “/mnt/data/upgrades/rebalance-lnd/rebalance.py”, line 9, in
from yachalk import chalk
ModuleNotFoundError: No module named ‘yachalk’

Make sure you have installed all the required modules before running:

pip3 install -r requirements.txt`

1 Like

Thanks, all fixed now thanks to the community!

Hi,

I’m trying to set this up so it loops over the script trying to rebalance 50.000 sats per time until it reaches min-local-amount of 1.000.000 sats or until if gives a failure because it can’t find a route.
My bash command would be this, but it doesn’t seem to stop on when it fails:

while /mnt/data/upgrades/rebalance-lnd/rebalance.py -t [ChannelId] -A -a 50000 --min-local 1000000; do :; done

I want run this command in crontab so it will run every 3 hours. Any suggestions on how to make this work?

Is there a guideline for choosing a recommended channel to rebalance ?

Thanks so much for this tutorial.

I am running into issues at Step 5. When I enter “/mnt/data/upgrades/rebalance-lnd/rebalance.py -c” it returns “-bash: mnt/data/upgrades/rebalance-lnd/rebalance.py: No such file or directory”…

Any suggestions or ideas where I may have gone wrong?

Rather technically illiterate, but learning…

Thanks!

How can i set a bot to notify me like this ?

Thank you

2 Likes

I wondering it as well.
Is this any kind of bot or something?

It’s BOS: https://github.com/alexbosworth/balanceofsatoshis/blob/master/README.md

I was going to do a guide on how to install it, I just haven’t had time. You need to run it in Docker.

1 Like

Regarding this problem: i’ve got the same…

i currently have like nine channels with good liquidity, but the tool also gives out “Could not find any suitable route”.

How many channels do i have to open in order to get a rebalance going through? The -t function does not work for any of my 9 channels, -f also doesn’t work.

Maybe you could help me a bit :slight_smile:
Kind regards and stay well!

Hi.

I have a 13 channels node (https://lightningnetwork.plus/nodes/031b0b9df8e34e53de02b4f225bea41a3d0d9e043f403a8ac9a38fb1f3289b5946) atm , with almost 13Mil capacity and i still get sometime that message for some channel rebalancing. I think you prolly need a larger number of well distribuited channels to avoid completely that message in every attempts. Keep also in mind that the net is still young and is growing at sick pace, so maybe in a year or so we will have so many more nodes that this message will disappear naturally i guess.

Hope this can help you m8.

If I can help you with this, I’ll volunteer. Reason: I need this, too :slight_smile:

1 Like

thanks, your post helped me understand the problem. I couldn’t figure out how to run the script in one line without having to choose directory first, but as you said you need to point python in the right direction - this worked:
cd /mnt/data/upgrades/rebalance-lnd/rebalance-lnd && python3 rebalance.py -c