Core Lightning debug advice - root/.lightning/lightning-rpc is missing

I have ran into an issue with my custom Umbrel install.

error: WARN: /root/.lightning/lightning-rpc is missing, using the bitcoin mainnet subdirectory at /root/.lightning/bitcoin instead

Full output from debug gist

Wondered if anyone here might have any ideas where to start looking, and if all else fails, data seems to be backed up… what steps could be taken to attempt to resolve?

Does uninstall/reinstall of Core Lightning delete all data in /umbrel/app-data/core-lightning ?

1 Like

Same problem here…any ideas?

Trying to remember …

I think it was mainly self-inflicted through messing around on the way I installed. I installed Umbrel (not UmbrelOS) on Bookworm and messed with something I shouldn’t have. I resolved everything in the usual migration steps. A little bit time-consuming but, if you have ssh access you can.

Backup

  1. connect via ssh

  2. sudo chmod 744 umbrel/app-data/core-lightning/data/lightningd/bitcoin/{,/*}

Change permissions are okay for use by different user when reinstalling.
(I keep username / password consistent, but probably good practice)

  1. make a backup copy of your entire core-lightning directory to another Unix machine (Linux / macOS)

scp /Users/yourUser/cln-backup-timestamp/* rpb_deux@192.168.0.x:/path/on/sever

**and also move the whole /app-data/core-lightning/ directory to a safe place, for moving back into position later.

  • See notes on: corelightning.org backup guide If you are using a database backup there’s risk of loosing funds if you use old channel states, as opposed to the latest channel states your peers would have. I was sure I don’t have that problem because I do not route payments. There are other methods to ensure you get your funds back that may be safer.

You need hsm_secret located in this directory anyway.

The three most important files for backup, I believe, are:

hsm_secret
emergency.recover
lightningd.sqlite3

Migration

You now have your lightning folder backed up, if you are going to reinstall, you have your blockchain / electrs data folders to consider. I had an extra SSD connected, so if you Pi has enough power to connect one or two external drives, you can just relocate those data directories (as well as your core-lightning directory, and then simply move them back into place when ready. When that’s ready …

  1. Reinstall Umbrel in the same way you did originally.

  2. Go back to Umbrel appstore. Start with Bitcoin, Install. Then you need the command to stop it.

sudo /path/to/umbrel/scripts/app stop bitcoin

Then you can copy over the blockchain. Do the same for electrs, and core-lightning lastly.

sudo /media/data/umbrel/scripts/app stop electrs
sudo /media/data/umbrel/scripts/app stop core-lightning

Then you can restart each application, one by one, without having to resync. I have all my channels back, funning smoothly over the last week. A little tricky, but not hard. Just double check eveything carefullly and make sure you have valuable data backed up.

1 Like