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.