<p>A Lightning Channel does not have any requirement as to when to close the channel, as specified by BOLT. It is entirely decided by the user, and the implementation. For the case of lnd, whenever the user wants to close the channel, he will call 
<code>closechannel</code> trying first to perform a cooperative close, unless specified otherwise:</p>

<pre><code>Name:     "closechannel",
Category: "Channels",
Usage:    "Close an existing channel.",
Description: `
Close an existing channel. The channel can be closed either cooperatively,
or unilaterally (--force).

A unilateral channel closure means that the latest commitment
transaction will be broadcast to the network. As a result, any settled
funds will be time locked for a few blocks before they can be spent.

In the case of a cooperative closure, One can manually set the fee to
be used for the closing transaction via either the --conf_target or
--sat_per_byte arguments. This will be the starting value used during
fee negotiation. This is optional.

To view which funding_txids/output_indexes can be used for a channel close,
see the channel_point values within the listchannels command output.
The format for a channel_point is 'funding_txid:output_index'.`,
</code></pre>

<p>Even when calling <code>closeAllChannels</code> , being that counterparty node offline, the shell prompts to the user before unilaterally closing the channel:</p>

<pre><code>        // If the channel is inactive, we'll attempt to
        // unilaterally close the channel, so we should prompt
        // the user for confirmation beforehand.
        if !channel.GetActive() {
            msg := fmt.Sprintf("Unilaterally close channel "+
                "with node %s and channel point %s? "+
                "The closing transaction will need %d "+
                "confirmations before the funds can be "+
                "spent. (yes/no): ", channel.RemotePubkey,
                channel.ChannelPoint, channel.CsvDelay)
</code></pre>

CC BY-SA 4.0
2019-01-15T15:34:53.020Z
So lnd does not automatically close channels after some time?
Illidanek
CC BY-SA 4.0
2019-02-09T10:26:36.583Z
no, this is not required by design. Users would have to agree to this.
ranchalp
CC BY-SA 4.0
2019-02-09T10:26:51.710Z
this would however happen in Duplex Micropayment Channels
ranchalp
CC BY-SA 4.0
2018-11-02T09:00:54.803Z
2018-11-02T09:00:54.803Z
ranchalp
<p>If my lightning node goes offline, how long will it take until my counterparty nodes close the channels they co-own with me?</p>

<p>This is obviously up to the counterparty nodes, as they can choose individually when they want to close channels, but what are the default settings for the main implementations?</p>

<lightning-network><ln-node-reliability>
Being offline: when do other nodes close channels?
Dalit Sairio
# Being offline: when do other nodes close channels?

(Asked by: username_0 on 2018-10-30)

If my lightning node goes offline, how long will it take until my counterparty nodes close the channels they co-own with me?

This is obviously up to the counterparty nodes, as they can choose individually when they want to close channels, but what are the default settings for the main implementations?

**Tags:** lightning-network, ln-node-reliability


---

## 1 answers

### Answer by username_1 on 2018-11-02. Score: 2 | Accepted answer

A Lightning Channel does not have any requirement as to when to close the channel, as specified by BOLT. It is entirely decided by the user, and the implementation. For the case of lnd, whenever the user wants to close the channel, he will call
`closechannel` trying first to perform a cooperative close, unless specified otherwise:

```
Name:     "closechannel",
Category: "Channels",
Usage:    "Close an existing channel.",
Description: `
Close an existing channel. The channel can be closed either cooperatively,
or unilaterally (--force).

A unilateral channel closure means that the latest commitment
transaction will be broadcast to the network. As a result, any settled
funds will be time locked for a few blocks before they can be spent.

In the case of a cooperative closure, One can manually set the fee to
be used for the closing transaction via either the --conf_target or
--sat_per_byte arguments. This will be the starting value used during
fee negotiation. This is optional.

To view which funding_txids/output_indexes can be used for a channel close,
see the channel_point values within the listchannels command output.
The format for a channel_point is 'funding_txid:output_index'.`,

```

Even when calling `closeAllChannels` , being that counterparty node offline, the shell prompts to the user before unilaterally closing the channel:

```
        // If the channel is inactive, we'll attempt to
        // unilaterally close the channel, so we should prompt
        // the user for confirmation beforehand.
        if !channel.GetActive() {
            msg := fmt.Sprintf("Unilaterally close channel "+
                "with node %s and channel point %s? "+
                "The closing transaction will need %d "+
                "confirmations before the funds can be "+
                "spent. (yes/no): ", channel.RemotePubkey,
                channel.ChannelPoint, channel.CsvDelay)

```

> **Comments:**
> **username_2**: So lnd does not automatically close channels after some time?  
> **username_1**: no, this is not required by design. Users would have to agree to this.  
> **username_1**: this would however happen in Duplex Micropayment Channels  

---

