Skip to content

lnd does not accept bitcoind.rpc* variables in lnd.conf #2193

@oitdmser

Description

@oitdmser

Background

I run lnd and bitcoind under their own users on the same physical machine in preparation for having them run on separate physical machines. As part of my setup lnd does not have read privileges to the bitcoind .cookie, so I'm trying to configure lnd to use RPCauth.

Your environment

  • version of lnd: commit=v0.5-beta-285-gc3546c280d0e59157848a2e82440bc2ea98bc2a3
  • which operating system (uname -a on *Nix): Debian Stretch
  • version of btcd, bitcoind, or other backend: v0.17.0.1
  • any other relevant environment details

Steps to reproduce

When I use the following options in my lnd.conf as described in the lnd documentation:

bitcoind.rpchost=127.0.0.1:8332
bitcoind.rpcuser=joeblow
bitcoind.rpcpass=superSecretPasswordByRPAUTH.py
bitcoind.zmqpubrawblock=127.0.0.1:28332
bitcoind.zmqpubrawtx=127.0.0.1:28333

Expected behaviour

lnd should run using the RPCauth credentials entered in lnd.conf

Actual behaviour

lnd errors out:

lnd.conf:16: unknown option: bitcoind.rpchost
lnd.conf:17: unknown option: bitcoind.rpcuser
etc

lnd runs fine if I specify the above options using the command line like this:

lnd -bitcoind.rpchost=127.0.0.1:8332 -bitcoind.rpcuser=joeblow ... etc

This means typing in the RPC password in the command-line and command-line options can be seen by users running 'top' or task manager. This exposes RPC password to users other than 'lnd.' Having RPC password in lnd.conf is moderately more secure because the file can be locked down with chmod.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions