Open AndySchroder opened 1 year ago
Thanks for reporting @AndySchroder. Indeed --lnddir
is currently only used to instruct lncli
where the macaroon and tls cert paths are to be found, see https://github.com/lightningnetwork/lnd/blob/master/cmd/lncli/main.go#L302
For now you have to specify --rpcserver
or other config params via the command line parameters. Feel free to convert this ticket into a feature request or otherwise you could also close this issue.
Okay, I changed the title to say feature instead of bug.
It's not always the case that lnd
and lncli
will run on the same machine, so rpclisten
would be mislabeled if it's being used as the host for lncli
to connect to. Perhaps a better solution is to add a profile to lncli
that specifies the rpc server.
Something like this: lncli --rpcserver <lnd_rpc_host> --opt1 <opt1> --opt2 <opt2> ... profile add --name <profile_name>
Then, when you want to make a call using those options, you can do so using: lncli -p <profile_name> <command>
Background
lncli --lnddir=
doesn't fetch therpclisten
fromlnd.conf
Your environment
Expected behaviour
lncli
should read thelnd.conf
file in the specifiedlnddir
and use therpclisten
value for therpcserver
.Actual behaviour
The default value of
10009
is used forrpcserver
instead.I think that the
rpcserver
option should be usable to override a value found in thelnd.conf
file in the specifiedlnddir
=, but it should not be required.Right now I feel like
rpcserver
needs to be duplicately defined if you are using the--lnddir
option withlncli
.