<p>c-lightning internally calls <code>bitcoin-cli</code> and will pass a couple of commandline arguments to it. These arguments are all prefixed with <code>--bitcoin-*</code> and will match the ones that <code>bitcoin-cli</code> accepts.</p>

<p>So for your use-case you first need to make sure that <code>bitcoin-cli</code> is available on the machine that you will be running the c-lightning instances on. If it isn't you can simply use the Bitcoin PPA to install (but not run) <code>bitcoind</code> which will also install <code>bitcoin-cli</code> (assuming you're using a debian based OS):</p>

<pre><code>sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
</code></pre>

<p>For a remote <code>bitcoind</code> you need to specify the following arguments:</p>

<ul>
<li><code>--bitcoin-rpcconnect=&lt;bitcoind-ip:port&gt;</code> this tells <code>bitcoin-cli</code> to connect to a remote <code>bitcoind</code> instance instead of trying <code>localhost:8332</code> (make sure <code>bitcoind</code> is configured with <code>-rpcallowip=&lt;ip&gt;</code>, where <code>&lt;ip&gt;</code> is the machine you'll be running c-lightning on)</li>
<li><code>--bitcoin-rpcuser=&lt;username&gt;</code> the username configured with <code>bitcoind</code></li>
<li><code>--bitcoin-rpcpassword=&lt;password&gt;</code> the password configured with <code>bitcoind</code></li>
</ul>

<p>In any case I'd suggest running <code>bitcoin-cli --bitcoin-rpcconnect=&lt;bitcoind-ip:port&gt; --bitcoin-rpcuser=&lt;username&gt; --bitcoin-rpcpassword=&lt;password&gt;</code> from the command line on the c-lightning machine to verify that <code>bitcoind</code> and <code>bitcoin-cli</code> are configured correctly.</p>

CC BY-SA 4.0
2019-02-19T11:36:15.273Z
2019-02-19T11:36:15.273Z
cdecker
<p>I want to use multiple nodes with the same remote bitcoind. E.g. my node on my desktop, my node on digital ocean, my node on Google cloud ...</p>

<p>I don't want to run everywhere a full bitcoind and pay for the disk space. 
I currently check the option to use btcpayserver (docker) on Google cloud as well. Again, it would need bitcoind. </p>

<p>Any hints welcome.</p>

<core-lightning>
How to use remote bitcoind with docker
Ronald Wiplinger
# How to use remote bitcoind with docker

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

I want to use multiple nodes with the same remote bitcoind. E.g. my node on my desktop, my node on digital ocean, my node on Google cloud ...

I don't want to run everywhere a full bitcoind and pay for the disk space.
I currently check the option to use btcpayserver (docker) on Google cloud as well. Again, it would need bitcoind.

Any hints welcome.

**Tags:** core-lightning


---

## 1 answers

### Answer by username_1 on 2019-02-19. Score: 1

c-lightning internally calls `bitcoin-cli` and will pass a couple of commandline arguments to it. These arguments are all prefixed with `--bitcoin-*` and will match the ones that `bitcoin-cli` accepts.

So for your use-case you first need to make sure that `bitcoin-cli` is available on the machine that you will be running the c-lightning instances on. If it isn't you can simply use the Bitcoin PPA to install (but not run) `bitcoind` which will also install `bitcoin-cli` (assuming you're using a debian based OS):

```
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update

```

For a remote `bitcoind` you need to specify the following arguments:

* `--bitcoin-rpcconnect=<bitcoind-ip:port>` this tells `bitcoin-cli` to connect to a remote `bitcoind` instance instead of trying `localhost:8332` (make sure `bitcoind` is configured with `-rpcallowip=<ip>`, where `<ip>` is the machine you'll be running c-lightning on)
* `--bitcoin-rpcuser=<username>` the username configured with `bitcoind`
* `--bitcoin-rpcpassword=<password>` the password configured with `bitcoind`

In any case I'd suggest running `bitcoin-cli --bitcoin-rpcconnect=<bitcoind-ip:port> --bitcoin-rpcuser=<username> --bitcoin-rpcpassword=<password>` from the command line on the c-lightning machine to verify that `bitcoind` and `bitcoin-cli` are configured correctly.


---

