lightningnetwork / lnd

Lightning Network Daemon ⚡️
MIT License
7.67k stars 2.07k forks source link

lncli ignores lnd.conf settings #533

Closed DenisMir closed 3 years ago

DenisMir commented 6 years ago

I don't know if you are aware of the problem or if it is a real problem but I got the following setup.

I'm working with OSX 10.12.6. I have installed lnd like provided in the readme document.

Now I don't like to have the lnd data, logs and macroon directory in its default places. I have configured it in the correct place in the lnd.conf file. lnd does pick up the settings quite fine. But lncli does always output [lncli] open /Users/<user>/Library/Application Support/Lnd/admin.macaroon: no such file or director although I have set the correct place of the admin.macaroon file in the lnd.conf via adminmacaroonpath=/<my path to the file>/admin.macaroon. So the only way to make lncli work is by adding the command line parameter --macaroonpath on every command which is quite nasty.

If you need more information just drop me a message here.

Roasbeef commented 6 years ago

This is expected. If you change the location of the macaroon, you need to use the --macaroonpath argument for lncli. Consider a case where you're using lncli remotely, and there's no lnd.conf at all on that machine.

DenisMir commented 6 years ago

Ok I get the point. But why couldn't it use the lnd.conf by default (if available) and if there is a cli parameter given e.g. ----macaroonpath it could get that one. (cli parameters would always override the lnd.conf setting)