<p>You are correct in that you cannot run a LND node with a pruned <code>bitcoind</code> server. </p>

<p>Pruning isn't compatible with <code>transaction indexing</code> because the index would point to transactions which have been pruned (no longer in store).</p>

<p>Each lightning node requires <code>transaction indexing</code>, because it will be looking for specific txid's <code>on-chain</code> throughout the lifetime of the payment channel.</p>

<p>Broadcast and confirmation of:</p>

<ul>
<li>Funding transaction</li>
<li>Commitment transactions in a unilateral close</li>
<li>Closing transaction </li>
</ul>

<p>The only way to determine whether any of the transactions above have been confirmed, is to query an up-to-date transaction index of the strong chain, which is not possible with a pruned node.</p>

<p>Lightning nodes also subscribe to the ZeroMQ subscription service of the bitcoind node, but this only tells the node about newly broadcast transactions accepted by in the mempool, not whether they have been confirmed yet.</p>

CC BY-SA 4.0
2019-01-13T18:36:28.570Z
I've not tried it, but what happens when I start a lightning node in pruned mode in practice?
dvg
CC BY-SA 4.0
2019-01-13T19:38:46.410Z
The lightning node will not be able to query bitcoind for transactions (by txid).
James C.
CC BY-SA 4.0
2019-01-13T19:54:18.470Z
When would I get aware of this?
dvg
CC BY-SA 4.0
2019-01-13T20:13:34.827Z
I dont know, the lnd node will through an error, I dont know exactly how the error msg will look like.
James C.
CC BY-SA 4.0
2019-01-13T20:41:00.423Z
Ok, thx for response!
dvg
CC BY-SA 4.0
2019-01-23T12:44:44.183Z
I keep getting conflicting information about this topic. Here it says that LND will just be slower, but it will still work: https://medium.com/lightning-power-users/284bd5034340 Which one is true?
Dmitry Laptev
CC BY-SA 4.0
2019-01-25T09:39:09.187Z
I researched the issue a bit more. The answer from James C. is correct when working with older versions of Bitcoin Core. 0.16 supports txindex in pruned mode.
Dmitry Laptev
CC BY-SA 4.0
2022-09-23T08:16:53.563Z
LND supports pruned nodes as of https://github.com/lightningnetwork/lnd/releases/tag/v0.13.0-beta.rc5
vv01f
CC BY-SA 4.0
2019-01-13T16:56:09.540Z
2019-01-13T16:56:09.540Z
James C.
<p><strong>Update(2021):</strong> Since version 0.13 pruned nodes are officially supported although they cause performance penalty and higher network usage.</p>
<p>It <strong>is possible</strong> to run Lightning (both LND and c-lightning) with <code>bitcoind</code> pruned mode.</p>
<p>There are already packages turning the pruned mode on when disk space is limited: <a href="https://github.com/PierreRochard/node-launcher" rel="nofollow noreferrer">Lightning Power Node Launcher</a> (works with LND) and <a href="https://github.com/btcpayserver/btcpayserver-docker" rel="nofollow noreferrer">BTCPayServer docker</a> (works with c-lightnig).</p>
<p>There is a lot of conflicting information online, because it became possible only after Bitcoin Core 0.16.0 was released.</p>
<p>Update from the official <a href="https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md#available-backend-operating-modes" rel="nofollow noreferrer"><code>lnd</code> documentation</a>:</p>
<blockquote>
<p>We don't require <code>--txindex</code> when running with <code>bitcoind</code> but
activating the <code>txindex</code> will generally make <code>lnd</code> run faster.</p>
<p><strong>NOTE: WE DO NOT FULLY SUPPORT PRUNED OPERATING MODES FOR FULL NODES.</strong>
It's possible to run a node in a pruned mode and have it serve lnd,
however one must take care to ensure that <code>lnd</code> has all blocks on disk
since the birth of the wallet, and the age of the earliest channels
(which were created around March 2018).</p>
</blockquote>

CC BY-SA 4.0
2019-12-09T23:19:14.970Z
I believe your answer is either incorrect or at least misleading. I tried running bitcoind in pruned mode with txindex enabled, but its startup just fails with message "Error: Prune mode is incompatible with -txindex.".

On the other hand it is possible running bitcoind with pruned mode and txindex disabled. This will however make lnd fallback to lookup and download the missing tx info from peers by itself.
thegeko
CC BY-SA 4.0
2019-12-09T23:24:41.317Z
I read through BIP159, but all it does is signalling, that the node is running in pruned mode hence will provide only latest blocks. It even recommends hiding prune depth by refusing to provide blocks older than 288 blocks from the tip. If the actual bitcoind implementation obeys this recommendation, it would make bitcoind even less usable for tx info lookup after BIP159 implementation.
thegeko
CC BY-SA 4.0
2020-03-02T22:06:20.937Z
You are certainly right: BIP159 reference is confusing, I will edit the answer to remove it.
Dmitry Laptev
CC BY-SA 4.0
2019-01-25T09:36:28.007Z
2021-12-01T15:42:59.630Z
2021-12-01T15:42:59.630Z
Dmitry Laptev
<p>I am running lightning with the LND implementation and a full node. Nevertheless, I heard that it is possible to use <strong>Lighting in pruned mode.</strong></p>

<p>How is this possible?</p>

<ol>
<li>I read in the <a href="https://github.com/lightningnetwork/lnd/blob/8cce2ad6304cc0e1919eeac724ec1c21e952826e/docs/INSTALL.md#running-lnd-using-the-bitcoind-backend" rel="noreferrer">LND install documentation</a> that you need the -txindex flag:</li>
</ol>

<blockquote>
  <p>In order to run lnd with a bitcoind back-end, the bitcoind instance must be configured with --txindex just like btcd above.</p>
</blockquote>

<ol start="2">
<li>In the <a href="https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments" rel="noreferrer">Wikipage of Bitcoin</a> it says for pruned mode: </li>
</ol>

<blockquote>
  <p>This mode is incompatible with -txindex</p>
</blockquote>

<p>I also read <a href="https://www.reddit.com/r/Bitcoin/comments/7rz2l5/prune_node_lightning_node/" rel="noreferrer">here</a> and <a href="https://bitcoin.stackexchange.com/questions/52889/bitcoin-core-txindex-vs-default-mode-vs-pruned-mode-in-depth">here</a> the same arguments.</p>

<p>Is this outdated or is it not possible to use prune mode in lightning?</p>

<lightning-network><full-node><pruning><lightning-network-daemon><core-lightning>
Running lightning in prune mode
dvg
# Running lightning in prune mode

(Asked by: username_0 on 2019-01-13)

I am running lightning with the LND implementation and a full node. Nevertheless, I heard that it is possible to use **Lighting in pruned mode.**

How is this possible?

1. I read in the [LND install documentation](https://github.com/lightningnetwork/lnd/blob/8cce2ad6304cc0e1919eeac724ec1c21e952826e/docs/INSTALL.md#running-lnd-using-the-bitcoind-backend) that you need the -txindex flag:

> In order to run lnd with a bitcoind back-end, the bitcoind instance must be configured with --txindex just like btcd above.

2. In the [Wikipage of Bitcoin](https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments) it says for pruned mode:

> This mode is incompatible with -txindex

I also read [here](https://www.reddit.com/r/Bitcoin/comments/7rz2l5/prune_node_lightning_node/) and [here](https://bitcoin.stackexchange.com/questions/52889/bitcoin-core-txindex-vs-default-mode-vs-pruned-mode-in-depth) the same arguments.

Is this outdated or is it not possible to use prune mode in lightning?

**Tags:** lightning-network, full-node, pruning, lightning-network-daemon, core-lightning


---

## 2 answers

### Answer by username_1 on 2019-01-13. Score: 2 | Accepted answer

You are correct in that you cannot run a LND node with a pruned `bitcoind` server.

Pruning isn't compatible with `transaction indexing` because the index would point to transactions which have been pruned (no longer in store).

Each lightning node requires `transaction indexing`, because it will be looking for specific txid's `on-chain` throughout the lifetime of the payment channel.

Broadcast and confirmation of:

* Funding transaction
* Commitment transactions in a unilateral close
* Closing transaction

The only way to determine whether any of the transactions above have been confirmed, is to query an up-to-date transaction index of the strong chain, which is not possible with a pruned node.

Lightning nodes also subscribe to the ZeroMQ subscription service of the bitcoind node, but this only tells the node about newly broadcast transactions accepted by in the mempool, not whether they have been confirmed yet.

> **Comments:**
> **username_0**: I've not tried it, but what happens when I start a lightning node in pruned mode in practice?  
> **username_1**: The lightning node will not be able to query bitcoind for transactions (by txid).  
> **username_0**: When would I get aware of this?  
> **username_1**: I dont know, the lnd node will through an error, I dont know exactly how the error msg will look like.  
> **username_0**: Ok, thx for response!  
> **username_2**: I keep getting conflicting information about this topic. Here it says that LND will just be slower, but it will still work: https://medium.com/lightning-power-users/284bd5034340 Which one is true?  
> **username_2**: I researched the issue a bit more. The answer from username_1 C. is correct when working with older versions of Bitcoin Core. 0.16 supports txindex in pruned mode.  
> **username_3**: LND supports pruned nodes as of https://github.com/lightningnetwork/lnd/releases/tag/v0.13.0-beta.rc5  

---

### Answer by username_2 on 2019-01-25. Score: 7

**Update(2021):** Since version 0.13 pruned nodes are officially supported although they cause performance penalty and higher network usage.

It **is possible** to run Lightning (both LND and c-lightning) with `bitcoind` pruned mode.

There are already packages turning the pruned mode on when disk space is limited: [Lightning Power Node Launcher](https://github.com/PierreRochard/node-launcher) (works with LND) and [BTCPayServer docker](https://github.com/btcpayserver/btcpayserver-docker) (works with c-lightnig).

There is a lot of conflicting information online, because it became possible only after Bitcoin Core 0.16.0 was released.

Update from the official [`lnd` documentation](https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md#available-backend-operating-modes):

> We don't require `--txindex` when running with `bitcoind` but
> activating the `txindex` will generally make `lnd` run faster.
>
> **NOTE: WE DO NOT FULLY SUPPORT PRUNED OPERATING MODES FOR FULL NODES.**
> It's possible to run a node in a pruned mode and have it serve lnd,
> however one must take care to ensure that `lnd` has all blocks on disk
> since the birth of the wallet, and the age of the earliest channels
> (which were created around March 2018).

> **Comments:**
> **username_4**: I believe your answer is either incorrect or at least misleading. I tried running bitcoind in pruned mode with txindex enabled, but its startup just fails with message "Error: Prune mode is incompatible with -txindex.".  On the other hand it is possible running bitcoind with pruned mode and txindex disabled. This will however make lnd fallback to lookup and download the missing tx info from peers by itself.  
> **username_4**: I read through BIP159, but all it does is signalling, that the node is running in pruned mode hence will provide only latest blocks. It even recommends hiding prune depth by refusing to provide blocks older than 288 blocks from the tip. If the actual bitcoind implementation obeys this recommendation, it would make bitcoind even less usable for tx info lookup after BIP159 implementation.  
> **username_2**: You are certainly right: BIP159 reference is confusing, I will edit the answer to remove it.  

---

