Close a Lightning Channel
Closing a channel is final and cannot be cancelled.
Only do this if you're closing your shop or you're doing a workshop.
Ambrosia must be running in order to close the channel.
Prerequisites
- The
channel IDyou want to close - A valid
Bitcoin on-chain address - A suitable
fee rate (in sat/vbyte)
You can see current fee rates using a Bitcoin block explorer like https://mempool.space/
Fee rate is for the child's feerate, set a higher value for an effective parent+child fee rate.
All funds will be sent to the on-chain Bitcoin address you provide.
Step 1: Open a terminal and ensure phoenixd is running
For Linux/MacOS
Verify that the Phoenix container is up:
docker ps
You should see a container named phoenixd.
Step 2: List your channels
For Linux/MacOS
List all channels:
docker exec -it phoenixd /phoenix/phoenix-cli getinfo
Copy the channelId of the channel you want to close.
For Windows
Open Docker Desktop and click on Terminal (bottom right corner), then:
docker exec phoenixd phoenix-cli getinfo
Copy the channelId of the channel you want to close.
Step 3: Close the channel
For Linux/MacOS
Run the following command:
docker exec -it phoenixd /phoenix/phoenix-cli closechannel \
--channelId=<CHANNEL_ID> \
--address=<BITCOIN_ADDRESS> \
--feerateSatByte=<FEE_RATE>
For Windows
Run the following command:
docker exec phoenixd phoenix-cli closechannel \
--channelId=<CHANNEL_ID> \
--address=<BITCOIN_ADDRESS> \
--feerateSatByte=<FEE_RATE>
Result
If successful, Phoenix returns the transaction ID of the closing transaction:
758b3df67c62c9cd9ebbde1ff6eaadc1c51f94d5b1a3efb2548236b9a6f1c659
You can track this transaction using a Bitcoin block explorer like https://mempool.space/
The channel status will display as 'Negotiating' even after a succesful closure, this is a phoenixd bug, the channel should be closed after 6 confirmations and sats won't be available since they were sent to an on chain address.