<p>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 <code>~/.bitcoin/bitcoin.conf</code> you can set the values for</p>

<pre><code>rpcuser=bitcoind_rpc_user_string
rpcpass=bitcoind_rpc_password_string
</code></pre>

<p>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. </p>

<p>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. </p>

CC BY-SA 4.0
2019-07-03T01:24:27.743Z
Note that the newer `rpcauth` lines are preferred over `rpcuser/rpcpass`.
Pieter Wuille
CC BY-SA 4.0
2019-07-03T07:56:21.997Z
The 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
CC BY-SA 4.0
2023-01-31T15:03:48.750Z
Is that needed in case on `lnd` running on same machine of `bitcoind`?
smartmouse
CC BY-SA 4.0
2019-07-02T22:43:22.523Z
2019-07-03T09:27:02.887Z
2019-07-03T09:27:02.887Z
Rene Pickhardt
<p>In my lnd.conf file I have the following settings:</p>

<pre><code>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
</code></pre>

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

<json-rpc><lightning-network><bitcoin.conf><authentication>
How to set up Lightning Network conf file. RPC user / password? and zmqpubraw?
Alejandro Veintimilla
# How to set up Lightning Network conf file. RPC user / password? and zmqpubraw?

(Asked by: username_0 on 2019-07-02)

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?

**Tags:** json-rpc, lightning-network, bitcoin.conf, authentication


---

## 1 answers

### Answer by username_1 on 2019-07-02. Score: 5 | Accepted answer

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.

> **Comments:**
> **username_2**: Note that the newer `rpcauth` lines are preferred over `rpcuser/rpcpass`.  
> **username_3**: The 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.  
> **username_4**: Is that needed in case on `lnd` running on same machine of `bitcoind`?  

---

