Open koodinmies opened 1 year ago
Do you have bitcoind
installed and synced? https://bitcoincore.org/en/download/
From your link:
c-lightning only works on Linux and Mac OS, and requires a locally (or remotely) running bitcoind (version 0.16 or above) that is fully caught up with the network you're running on, and relays transactions (ie with blocksonly=0). Pruning (prune=n option in bitcoin.conf) is partially supported, see here for more details.
There are a number of ways to solve this, but first we need to explain what the issue here is: we need to be able to talk to bitcoind
so we can communicate with the bitcoin network.
Usually we'd expect bitcoind
to be either co-located with CLN or have bitcoin-cli
configured to connect somewhere else. If you can run bitcoin-cli getnetworkinfo
and it returns a result you're good to go. The problem with docker
containers is that they get their own FS and their own network, so any configuration done on the host likely will not be passed in to the docker
container. We can do a couple of things here:
docker run --net=host
and mount in the lightningd
and bitcoind
configs, so bitcoin-cli
knows how to talk to the hostlightningd
with --bitcoin-rpcconnect=ip.address.of.bitcoind
, --bitcoin-rpcuser
and --bitcoin-rpcpassword
.docker-compose
to start another container with bitcoind
and link it to the lightningd
docker container.Lots of options you can try and find the perfect solution for you. And if you want to sidestep all things bitcoind
you could also run trustedcoin
which replaces bitcoind
with something that queries with block explorers.
In the documentation it tells me this: https://hub.docker.com/r/elementsproject/lightningd/
If you want to experiment with lightningd, there's a script to set up a bitcoind regtest test network of two local lightning nodes, which provides a convenient start_ln helper. See the notes at the top of the startup_regtest.sh file for details on how to use it. . contrib/startup_regtest.sh
I just don't understand how am I supposed to start it differently? Sorry if this is stupid question.
This relates solely to lightningd
running on the same machine as you're executing the script, not in docker. It is intended as a quick and easy way to spin up a regtest network to test against, not running a production node as the docker setup likely is.
Does this look like fixed (answered)? we can close it?
I'm running:
docker run elementsproject/lightningd:latest
Console prints:
In the documentation it tells me this: https://hub.docker.com/r/elementsproject/lightningd/
I just don't understand how am I supposed to start it differently? Sorry if this is stupid question.