Closed omid-1985 closed 1 year ago
Reading more about it, lnd Github repo explicitly mentions that: "The auth parameters rpcuser and rpcpass parameters can typically be determined by lnd for a bitcoind instance running under the same user."
We have lnd running under lnd user and running bitcoind under bitcoin user. Thus we need to pass the auth parameters in lnd.conf by adding these parameters into /usr/local/etc/lnd.conf:
bitcoind.rpcuser=***youruser***
bitcoind.rpcpass=***yourpass***
bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333
The above help to go as far as lnd wallet creation, but after that lnd process fails due to another permission issue:
@omid-1985 In order to get past the cookie error, I had to add lnd to the _tor group.
pw usermod lnd -G lnd,_tor
Yeah for the cookie authentication the lnd user needs to be added to the tor and bitcoin groups pw usermod lnd -G lnd,_tor,bitcoin
Fixed!
On the lnd page and on the LND Startup and initialization section, the result of running lnd package under lnd user is:
su -m lnd -c 'lnd --configfile=/usr/local/etc/lnd.conf'
But running it under root is fine:
lnd --configfile=/usr/local/etc/lnd.conf
following this instruction stops you here as lnd user does not have permission to read from /var/db/bitcoin.