DEV Community

Hannah Rosenberg
Hannah Rosenberg

Posted on

Bitcoin is an agent's best friend

AI + Lightning Demo: Getting an Open‑Claw Bot to Run a Lightning Node

Welcome to the first installment of our AI‑and‑Lightning demo series (Lightning of course being Bitcoin's second layer for faster, cheaper payments). In these episodes we’ll be experimenting with large language models (LLMs), autonomous agents, and the Bitcoin Lightning Network. Our goal is simple:

  • For Lightning developers – see how AI agents can be taught to interact with a Lightning node, make payments, and offer services that other bots can purchase.
  • For AI practitioners – discover a concrete way to give your LLM‑driven applications access to a real‑world payment network.

In today’s walk‑through we’ll work with an Open‑Claw bot and instruct it to install a lightweight Lightning node (LND) on the same virtual private server (VPS). The node will run on Signet, which is one of Bitcoin’s public testing networks so we can experiment without risking real funds.

Meet the Bot: Otto
The bot we’ll be working with is called Otto. Otto is an OpenClaw bot that lives on a fresh VPS. Its job for this demo is:

  • Install the required tooling (Go, LND, etc.).
  • Set up a stand‑alone Lightning node on Signet.

Before Otto can setup a node for us, we’ll need to give him some instructions. Thankfully there is already a blog post, largely written for bots, that contains all the instructions and links to the necessary tools that Otto will need.
The Agents Are Here and They Want to Transact: Powering the AI Economy with Lightning https://lightning.engineering/posts/2026-02-11-ln-agent-tools/

Below is the prompt we gave Otto.

`Otto I would like to give you the ability to buy things online with Lightning.

Please read this blog post as it contains instructions for how to set up an LND based Lightning node https://lightning.engineering/posts/2026-02-11-ln-agent-tools/

Please run the instructions to set this up on Signet.`

Why Signet?

Signet is a public testing network that mimics Bitcoin’s mainnet behavior while allowing us to obtain free test coins. It’s perfect for trying out new software without the risk of losing real money.

Otto’s Conversation – Step‑by‑Step
Below is a cleaned‑up version of the dialogue between me (the human operator) and Otto.

Me: “Please set up a node on Signet using this blog post…”
Otto: “I can set up a lightweight Lightning node on Signet. The safest way is a remote signer with a tightly scoped pay‑only macaroon and a hard budget cap. Shall I proceed?”
Me: “As we will be running on a testing network we don’t need to set up the remote signer now.”
Otto: “Do you want a true remote signer on a second machine (recommended) or a single‑machine stand‑alone node? Since we’re on Signet, a stand‑alone is acceptable.”
Me: “Stand‑alone is fine for now.”
Otto: “What is the maximum spend budget? (e.g., 50 k sats)”
Me: “We’ll come back to this before switching to mainnet.”
Otto: “Do you want to control the node via an LNC pairing phrase (good for remote access) or just local CLI access inside the container?”
Me: “Local CLI only for now please.”
Otto: “Great. I’ll install the required tooling (LND, go‑lang), configure a Signet node”
Me: “Proceed.”
Otto: “Installing… Done. LND version 20 compiled, LND installed and a wallet created. The node is up and synced to chain on Signet.”

What Otto Actually Did

  1. Installed Go – required for building Lit‑d from source.
  2. Installed LND – the Lightning Network Daemon from Lightning Labs.
  3. Created a Stand‑alone Signet Wallet – no remote signer was set up (we’ll explore that later).
  4. Started LND – the node synced to the Signet blockchain, confirming it’s up‑to‑date.
  5. Generated a Taproot (P2TR) address – the modern Bitcoin address type, ready to receive test funds.

Verifying the Node

1. Check the Node Identity
A Lightning node’s public identity key uniquely identifies it on the network. I asked Otto:
“What’s the node’s identity pubkey?”
Otto replied with a long hex string (truncated here):
0287fd4c3...a386
Seeing a valid pubkey confirmed that the node is indeed running on Signet.
2. Inspect the Network Graph
Next I wanted to know whether the node could see other peers:
“How many nodes and channels does our Signet view contain?”
Otto reported:
Nodes: 89
Channels: 194

Those numbers are modest (as the node was new) but non‑zero, meaning our node is actively gathering topology information and can route payments.

Funding the Node (Testnet Coins)
With the node up, the next step is to fund the generated Taproot address. Because we’re on Signet, you can request free test sats from a faucet (e.g., https://signetfaucet.com). Once funded, the node will be ready for L402 (Lightning‑enabled HTTP) purchases.

What Comes Next?
At this point we have a functional Lightning node attached to an AI bot, but we still need to:

  • Set up the pay‑only macaroon with the budget we defined (already baked, but not yet attached to any service).
  • Explore remote‑signer setups for production‑grade security (the bot will eventually run on mainnet, where protecting private keys is critical).

Future posts in this series will cover topics such as:

  • Secure remote signing with a hardware wallet or separate VM.
  • Building a simple Lightning‑enabled web service that Otto can purchase.
  • Using LNC‑connect or other remote‑access methods to manage the node from a workstation.
  • Buying and selling services via L402s!

Takeaways

  • AI agents can be instructed, via natural language, to provision a Lightning node on a fresh VPS.
  • Signet provides a safe sandbox for testing Lightning‑related workflows before moving to Mainnet.
  • Pay‑only macaroons with budget caps give fine‑grained control over how much a bot can spend, an essential security measure.
  • Even a single‑machine setup (no remote signer) is enough for prototyping; production will need tighter isolation.

If you’re a Lightning developer curious about AI, or an AI engineer looking for a real‑world payment layer, the workflow demonstrated here should give you a solid starting point.

Resources
Open‑Claw – https://github.com/open-claw/open-claw
Litd (Lightning in Go) – https://github.com/lightninglabs/litd
LND (Lightning Network Daemon) – https://github.com/lightningnetwork/lnd
Signet Faucet – https://signetfaucet.com
L402 Specification – https://github.com/lightninglabs/l402

Top comments (1)

Collapse
 
sifat_khan_135f8fea18e0f9 profile image
king

hi
hi