Shut down your Core Lightning (clightning, cln)!
Then read this:
Core Lightning is under a security embargo. How to keep selling while you wait, if you have btcpayserver (I use btcpay-docker).
If you run BTCPay with Core Lightning, the advice right now is to upgrade or take your node offline, and there's no fixed build to upgrade to yet. You don't have to stop taking Lightning payments to do it.
You can tell the following to your AI agent if you don't want to do it yourself:
1. Put the node in offline mode rather than stopping it
A stopped node also stops watching the chain, so it can't respond if a peer force-closes or publishes an old state. Core Lightning's offline flag refuses all peer traffic while lightningd keeps running and following blocks.
Create docker-compose-generator/docker-fragments/opt-cln-offline.custom.yml:
services:
clightning_bitcoin:
environment:
LIGHTNINGD_OPT: |
offline
Register and apply it:
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-cln-offline.custom"
. ./btcpay-setup.sh -i
Check it took. You want "Started in offline mode!" in the log, and no binding field at all in getinfo:
docker logs btcpayserver_clightning_bitcoin 2>&1 | grep -i "offline mode"
docker exec btcpayserver_clightning_bitcoin lightning-cli getinfo | jq .binding
2. Block the REST port
offline closes port 9735 and nothing else. If your compose publishes clnrest, that's unpatched Core Lightning code answering HTTP from the internet. Find the published mapping onto container port 3010 with docker ps, then probe it from off the box. Anything other than 000 means it's open.
ufw won't help here, because Docker's publish path skips the INPUT chain. The rule goes in DOCKER-USER and matches the container port, since packets are already DNAT'd by then:
iptables -I DOCKER-USER -i eth0 -p tcp --dport 3010 -j DROP
Use your real public interface. Docker rebuilds DOCKER-USER empty on boot, so wrap it in a systemd unit if you want it to survive a reboot.
3. Install Blink (blink.sv) on your phone, create a non-custodial (Spark) account, and set a username. That gives you a Lightning address of the form [email protected].
4. Point your stores at it
Install the Blink plugin in BTCPay and restart. Get 1.1.2 or newer: earlier builds fail on BTCPay-served Lightning addresses with a description hash error. The plugin needs BTCPay 2.4.2 or newer.
For each store, go to Settings, then Lightning, then Use custom node, and enter:
type=blink;[email protected]
Anything left on the internal node needs either a new backend or its Lightning payment method switched off.
Store settings are cached, so restart BTCPay afterwards with docker restart generated_btcpayserver_1. Then buy something from your own store. "Test connection" isn't enough.
Stay safe. Keep receiving sats.
Then read this:
Core Lightning is under a security embargo. How to keep selling while you wait, if you have btcpayserver (I use btcpay-docker).
If you run BTCPay with Core Lightning, the advice right now is to upgrade or take your node offline, and there's no fixed build to upgrade to yet. You don't have to stop taking Lightning payments to do it.
You can tell the following to your AI agent if you don't want to do it yourself:
1. Put the node in offline mode rather than stopping it
A stopped node also stops watching the chain, so it can't respond if a peer force-closes or publishes an old state. Core Lightning's offline flag refuses all peer traffic while lightningd keeps running and following blocks.
Create docker-compose-generator/docker-fragments/opt-cln-offline.custom.yml:
services:
clightning_bitcoin:
environment:
LIGHTNINGD_OPT: |
offline
Register and apply it:
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-cln-offline.custom"
. ./btcpay-setup.sh -i
Check it took. You want "Started in offline mode!" in the log, and no binding field at all in getinfo:
docker logs btcpayserver_clightning_bitcoin 2>&1 | grep -i "offline mode"
docker exec btcpayserver_clightning_bitcoin lightning-cli getinfo | jq .binding
2. Block the REST port
offline closes port 9735 and nothing else. If your compose publishes clnrest, that's unpatched Core Lightning code answering HTTP from the internet. Find the published mapping onto container port 3010 with docker ps, then probe it from off the box. Anything other than 000 means it's open.
ufw won't help here, because Docker's publish path skips the INPUT chain. The rule goes in DOCKER-USER and matches the container port, since packets are already DNAT'd by then:
iptables -I DOCKER-USER -i eth0 -p tcp --dport 3010 -j DROP
Use your real public interface. Docker rebuilds DOCKER-USER empty on boot, so wrap it in a systemd unit if you want it to survive a reboot.
3. Install Blink (blink.sv) on your phone, create a non-custodial (Spark) account, and set a username. That gives you a Lightning address of the form [email protected].
4. Point your stores at it
Install the Blink plugin in BTCPay and restart. Get 1.1.2 or newer: earlier builds fail on BTCPay-served Lightning addresses with a description hash error. The plugin needs BTCPay 2.4.2 or newer.
For each store, go to Settings, then Lightning, then Use custom node, and enter:
type=blink;[email protected]
Anything left on the internal node needs either a new backend or its Lightning payment method switched off.
Store settings are cached, so restart BTCPay afterwards with docker restart generated_btcpayserver_1. Then buy something from your own store. "Test connection" isn't enough.
Stay safe. Keep receiving sats.
1112❤️13⚡️2👍2🧡2♥️1🤙1