Running Charge-lnd with cron from lnshell

Hello everyone,

Since Charge-lnd now comes with Umbrel I wanted to run it with a corn job. If I run from the lnshell like "charge-lnd -c /data/charge.config " it works.

But if I try to set up a cron job from lnshell with the same command, it just won’t do anything.

Pretty strange… help please, is there a different way to set a cron job from lnshell?


Playing around with this myself. Seems like no cron in the lnshell. I added the below to the Umbrel user’s crontab to run it every 5 minutes from outside the container. Output appears in syslog. Alternatively can pipe to custom log file.

*/5 * * * * (docker exec -u lnshell -w /home/lnshell lightning-shell_web_1 /home/lnshell/.local/bin/charge-lnd --config /home/lnshell/charge-lnd.config) 2>&1 | logger -t charge-lnd

1 Like

I’m trying to follow this tutorial but having some issues on step [1] :sweat_smile: how I can make sure I’m in the right folder? I run ls but doesn’t do anything…

Either running the line @Hordak suggested charge-lnd -c /data/charge.config did not help

Hey there, weel on the first command its incomplete, that’s why it fails. And on the second one, that config file was what I wrote on my machine, you can called it whatever you want.

where are you writing your lnd-charge.config file? When I ssh into the node, I cant find a similar “lnshell” folder. I’ve tried creating a new folder at /home/umbrel/umbrel/apps/charge-lnd/charge.config and referencing it from the cron job, but syslog says it cant find the config file so I assume the docker command is referencing the file location in a different manner?

Hope that makes sense…

When I run the command docker exec -u lnshell -w /home/lnshell lightning-shell_web_1 /home/lnshell/.local/bin/charge-lnd --config /home/lnshell/charge-lnd.config from the terminal
I just get “Config file not found”.

In lightning shell everything works as ecpected

Nevermind, my config file location is --config /data/charge.config instead of /home/lnshell/charge-lnd.config.

Changed my crontab to this:
*/30 * * * * (docker exec -u lnshell -w /home/lnshell lightning-shell_web_1 /home/lnshell/.local/bin/charge-lnd --config /data/charge-lnd.config) 2>&1 | logger -t charge-lnd

All good now :grin: