How run c-lightning with the local node bitcoin

2

1

I have a bitcoin-core-18.0 with on my linux mint, and I don't have downloaded the bitcoin with the ppa but I downloaded the official zip directory on site bitcoin.

Now my question is, c-lightning with this configuration bitcoin-core?

I'm running this command and I have this error

./bitcoin-0.18.0/bin/bitcoind -datadir=/media/vincenzo/Maxtor/BitcoinCore/node/ -daemon -testnet & 
./clightning-v0.7.2.1/bin/lightningd --lightning-dir=/media/vincenzo/Maxtor/C-lightning/node/ --network=testnet --log-level=debug

The error

2019-08-22T13:00:06.878Z DEBUG lightning_gossipd(9943): pid 9943, msgfd 20
bitcoin-cli not found. Is bitcoin-cli (part of Bitcoin Core) available in your PATH?

Make sure you have bitcoind running and that bitcoin-cli is able to connect to bitcoind.

You can verify that your Bitcoin Core installation is ready for use by running:

    $ bitcoin-cli -testnet echo 'hello world'

Exist some propriety configuration c-lightning?

vincenzopalazzo

Posted 2019-08-22T13:01:39.287

Reputation: 572

Do you have a fully synced bitcoin testnet node (since you are using testnet)?Ugam Kamat 2019-08-22T13:12:24.700

hi @UgamKamat, yes, I have the same error also with the mainetvincenzopalazzo 2019-08-22T13:21:53.497

Answers

3

It is complaining about not being able to find the bitcoin-cli binary of the Bitcoin Core installation (which is normal since you are running it from a location that is not on the $PATH hence it can't find it).

To fix this issue you can tell lightningd explicitly which binary to use as bitcoin-cli by doing this:

./clightning-v0.7.2.1/bin/lightningd \
      --bitcoin-cli=$(pwd)/bitcoin-0.18.0/bin/bitcoin-cli \
      --lightning-dir=/media/vincenzo/Maxtor/C-lightning/node/ \
      --network=testnet \
      --log-level=debug

This will tell lightningd to use the bitcoin-cli located at $(pwd)/bitcoin-0.18.0/bin/bitcoin-cli. The $(pwd) is there to make the path absolute since lightningd will change directory internally after starting, so that relative paths might not match anymore.

cdecker

Posted 2019-08-22T13:01:39.287

Reputation: 7 878