lightning-terminal icon indicating copy to clipboard operation
lightning-terminal copied to clipboard

Why is .lnd directory created when connecting to a remote lnd instance?

Open mrfelton opened this issue 3 years ago • 5 comments

Consider the following command used to start up lit.

litd --remote.lnd.network=testnet \
  --remote.lnd.rpcserver=localhost:10009 \
  --remote.lnd.macaroondir=/root/.lnd/data/chain/bitcoin/testnet \
  --remote.lnd.tlscertpath=/root/.lnd/tls.cert \
  --uipassword=1234

After startup these 4 directories exist.

ls -al /root
drwxr-xr-x    3 root     root          4096 Nov 12 09:45 .faraday
drwx------    4 root     root          4096 Nov 12 09:45 .lit
drwxr-xr-x    2 root     root          4096 Oct 19 20:36 .lnd
drwxr-xr-x    4 root     root          4096 Nov 12 09:45 .loop

The .lnd directory is created by lit even though it's not actually running lnd. This can cause some unexpected issues when trying to run lit on a machine where .lnd already exists as part of another lnd install (eg, where .lnd is a shared mount from another container that is running lnd)

Why is the .lnd directory created by lit when lit is not starting up a local lnd instance?

mrfelton avatar Nov 13 '20 20:11 mrfelton

Good question, that's certainly not on purpose. Are there any sub directories or files being created inside the .lnd dir?

guggero avatar Nov 14 '20 11:11 guggero

No it is an empty directory

mrfelton avatar Nov 14 '20 11:11 mrfelton

Okay, I looked into this in more detail. If I just point LiT to a remote lnd instance, no .lnd directory is created. Also, looking at the directory timestamps from your output, it looks like the .lnd directory already existed and was created in October. Maybe something went wrong with the mount point and it should actually contain the data from the other container?

guggero avatar Nov 16 '20 11:11 guggero

Interesting. You could be right... will recheck on my end

mrfelton avatar Nov 16 '20 11:11 mrfelton

Any update on this? Can the issue be closed?

guggero avatar Dec 14 '20 08:12 guggero