| name | lnbits-admin |
| description | LNbits server administration via its REST API. Use when: managing wallets, extensions, node channels/peers through LNbits, or checking LNbits server status. Requires LNbits admin or super-user API key. NOT for: making payments (use bitcoin-lightning skill), direct node CLI (use lnd-node-ops skill). |
| when_to_use | Use when the user wants to manage LNbits โ check server info, manage node via LNbits Node API, or administer wallets and extensions. |
| metadata | {"openclaw":{"emoji":"๐ฆ","requires":{"bins":["curl"]}}} |
LNbits Administration
Manage an LNbits server via its REST API.
When to Use
โ
USE this skill when:
- Checking LNbits node info and status
- Managing channels through LNbits Node API
- Connecting/disconnecting peers via LNbits
- Viewing payments and invoices through LNbits
- Updating channel fee policies via LNbits
- Checking node rank (1ML)
โ DON'T use this skill when:
- Making or receiving lightning payments โ use bitcoin-lightning skill
- Direct lncli node management โ use lnd-node-ops skill
- Advanced rebalancing or accounting โ use bos-node-ops skill
- Writing LNbits extension code โ refer to LNbits developer docs
Configuration
LNBITS_URL="https://your-lnbits-instance.com"
ADMIN_KEY="your-admin-api-key"
INVOICE_KEY="your-invoice-api-key"
SUPER_USER_KEY="your-super-user-key"
Node API (requires admin or super-user key)
Node Info
curl -s -H "X-Api-Key: $ADMIN_KEY" \
"$LNBITS_URL/node/api/v1/info"
curl -s "$LNBITS_URL/node/public/api/v1/info"
curl -s -H "X-Api-Key: $ADMIN_KEY" \
"$LNBITS_URL/node/api/v1/rank"
Channel Management (super-user only)
curl -s -H "X-Api-Key: $ADMIN_KEY" \
"$LNBITS_URL/node/api/v1/channels"
curl -s -H "X-Api-Key: $ADMIN_KEY" \
"$LNBITS_URL/node/api/v1/channels/$CHANNEL_ID"
curl -s -X POST -H "X-Api-Key: $SUPER_USER_KEY" \
-H "Content-Type: application/json" \
-d '{"peer_id": "<pubkey>@<host>:<port>", "funding_amount": 1000000}' \
"$LNBITS_URL/node/api/v1/channels"
curl -s -X POST -H "X-Api-Key: $SUPER_USER_KEY" \
-H "Content-Type: application/json" \
-d '{"peer_id": "<pubkey>@<host>:<port>", "funding_amount": 1000000, "push_amount": 50000, "fee_rate": 5}' \
"$LNBITS_URL/node/api/v1/channels"
curl -s -X DELETE -H "X-Api-Key: $SUPER_USER_KEY" \
"$LNBITS_URL/node/api/v1/channels?short_id=$SHORT_ID&funding_txid=$TXID&output_index=$INDEX"
curl -s -X DELETE -H "X-Api-Key: $SUPER_USER_KEY" \
"$LNBITS_URL/node/api/v1/channels?short_id=$SHORT_ID&force=true"
curl -s -X PUT -H "X-Api-Key: $SUPER_USER_KEY" \
-H "Content-Type: application/json" \
-d '{"fee_ppm": 100, "fee_base_msat": 1000}' \
"$LNBITS_URL/node/api/v1/channels/$CHANNEL_ID"
Peer Management (super-user only)
curl -s -H "X-Api-Key: $ADMIN_KEY" \
"$LNBITS_URL/node/api/v1/peers"
curl -s -X POST -H "X-Api-Key: $SUPER_USER_KEY" \
-H "Content-Type: application/json" \
-d '{"uri": "<pubkey>@<host>:<port>"}' \
"$LNBITS_URL/node/api/v1/peers"
curl -s -X DELETE -H "X-Api-Key: $SUPER_USER_KEY" \
"$LNBITS_URL/node/api/v1/peers/$PEER_ID"
Payments & Invoices
curl -s -H "X-Api-Key: $ADMIN_KEY" \
"$LNBITS_URL/node/api/v1/payments"
curl -s -H "X-Api-Key: $ADMIN_KEY" \
"$LNBITS_URL/node/api/v1/invoices"
Permission Levels
| Endpoint | Admin key | Super-user key |
|---|
| GET /info | โ
| โ
|
| GET /channels | โ
| โ
|
| POST /channels (open) | โ | โ
|
| DELETE /channels (close) | โ | โ
|
| PUT /channels (fees) | โ | โ
|
| GET /peers | โ
| โ
|
| POST /peers (connect) | โ | โ
|
| DELETE /peers (disconnect) | โ | โ
|
| GET /payments | โ
| โ
|
| GET /invoices | โ
| โ
|
| GET /rank | โ
| โ
|
LNbits NWC Extension
LNbits has a Nostr Wallet Connect extension that generates NWC URIs for wallet access:
- Enable the NWC extension in LNbits admin
- Create a new NWC connection in the extension
- Copy the
nostrwalletconnect:// URI
- Set it in metiq agent config as
extra.nwc.uri
This bridges LNbits wallets to the agent's NWC tools โ the preferred integration path.
Safety Notes
โ ๏ธ API key security:
- Never expose super-user keys in logs or agent responses
- Use admin keys for read operations, super-user only for mutations
- Rotate keys if compromised
โ ๏ธ Node operations through LNbits:
- LNbits Node API wraps the underlying node (LND, CLN, etc.)
- Channel open/close are real on-chain operations with real costs
- Always confirm with the user before opening channels or changing fees