How to set up Lightning Network conf file. RPC user / password? and zmqpubraw?

1

In my lnd.conf file I have the following settings:

debuglevel=info
listen=192.168.100.134 
externalip=186.4.235.84    
alias=MyNodeAlias
color=#000000
maxpendingchannels=5
bitcoin.mainnet=1
bitcoin.active=1
bitcoin.node=bitcoind
bitcoind.rpcuser=bitcoind_rpc_user_string
bitcoind.rpcpass=bitcoind_rpc_password_string
bitcoind.zmqpubrawblock=tcp://127.0.0.1:18501
bitcoind.zmqpubrawtx=tcp://127.0.0.1:18502

What is rpcuser and rpcpass? which values should I use? Also, what is zmqpubrawblock and zmqpubrawtx?

Alejandro Veintimilla

Posted 2019-07-02T22:23:48.520

Reputation: 198

Answers

3

So in Bitcoind you can define authentication via an rpc interface (remote procedure call). In the config file of Bitcoind which is usually located in ~/.bitcoin/bitcoin.conf you can set the values for

rpcuser=bitcoind_rpc_user_string
rpcpass=bitcoind_rpc_password_string

Obviously you should select other values than the ones in this answer / question. You could also pass those values as command line arguments to Bitcoind.

As for the other two values. Bitcoind uses zero message queue (zmq) to share raw block data and raw transactionsdata. I guess raw means binary (but I am not sure). These two values are the zmq sockets for both interfaces I guess they are pub / sub sockets to which your lnd node will subscribe.

Rene Pickhardt

Posted 2019-07-02T22:23:48.520

Reputation: 6 565

4Note that the newer rpcauth lines are preferred over rpcuser/rpcpass.Pieter Wuille 2019-07-03T01:24:27.743

1The bitcoin conf should be in ~/.bitcoin/bitcoin.conf. Also, I think it should be noted that you don't usually need any of this configuration if lnd is run as the same user as bitcoind, since lnd just reads the secrets from bitcoin.conf, while bitcoind should autogenerate auth credentials.stefanwouldgo 2019-07-03T07:56:21.997