Lightning Nodes

Integrations Tutorial

Integrations Tutorial

This guide walks you through integrating Comet Platform with popular wallets, third-party services, and applications. Whether you're connecting node management tools like ThunderHub, integrating with mobile wallets, or building custom applications, you'll find step-by-step instructions and code examples to get you started.

Estimated reading time: 18 minutes

Note: Bitcoin Core nodes are not currently available on Comet Platform. References to Bitcoin Core in this guide are for future use when the feature becomes available. Currently supported node types: LND Node and LITD (TAPD) Node.

Introduction to Comet Integrations

Comet Platform provides flexible integration options that allow you to connect your nodes with a rich ecosystem of Bitcoin and Lightning Network tools. Whether you need a visual management interface, analytics dashboards, or custom application logic, Comet's open architecture makes integration straightforward.

Integration Methods

Direct Node Access

Connect directly to your LND or Tapd nodes using REST interface with macaroon authentication.

Comet Platform API

Use Comet's Platform API to manage node lifecycle, fetch metrics, and handle operational tasks programmatically.

Webhooks

Configure event-driven integrations that trigger actions in your systems when specific events occur on your nodes.

SDK Libraries

Leverage pre-built SDK libraries (Python, JavaScript, Rust, Go) for rapid application development.

Prerequisites

Before integrating with external tools, ensure you have:

  • An active Comet Platform account

  • At least one deployed node (LND, Tapd, or Bitcoin Core)

  • Node connection details (host, port, macaroon)

  • Basic understanding of your node type and its capabilities

Wallet Integrations

ThunderHub (Web UI)

ThunderHub is a popular web-based Lightning node manager that provides a clean interface for managing channels, making payments, and monitoring your node.

What You'll Need

  • LND node running on Comet Platform

  • Node connection URL (provided in Comet Dashboard)

  • Admin macaroon (fetchable via Comet API)

  • TLS certificate (if required)

Step 1: Fetch Node Connection Details

Log into your Comet Dashboard and navigate to your LND node details page. You'll find:

  • REST Host: your-node-id.comet.platform:8080

  • Connection Instructions: Click "Connect to Node" for detailed info

Step 2: Download Your Admin Macaroon

You can fetch your encrypted macaroon via the dashboard or API:

Via Dashboard:

  1. Go to Node Details → Security → Macaroons

  2. Click "Download Encrypted Macaroon"

  3. Decrypt locally using your password

Via API:

curl -X GET "https://api.comet.platform/v1/nodes/{node_id}/macaroon" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Step 3: Install ThunderHub

ThunderHub can be installed locally or deployed as a container:

Docker Installation:

docker pull apotdevin/thunderhub:latest

docker run -d \
  --name thunderhub \
  -p 3000:3000 \
  -v ~/.thunderhub:/data \
  apotdevin/thunderhub:latest

Local Installation:

git clone https://github.com/apotdevin/thunderhub.git
cd thunderhub
npm install
npm run build

Step 4: Configure ThunderHub

Create a configuration file at ~/.thunderhub/accounts.yaml:

masterPassword: "your-thunderhub-password"
accounts:
  - name: "Comet LND Node"
    serverUrl: "your-node-id.comet.platform:8080"
    macaroonPath: "/path/to/admin.macaroon"
    # certificatePath: "/path/to/tls.cert" --> No needed when using Comet's TLS
    network: "mainnet"  # or "testnet"

Step 5: Start ThunderHub and Connect

npm run start

Navigate to http://localhost:3000 and log in with your master password. Your Comet LND node should appear in the accounts list.

Tips for ThunderHub Integration

  • Use REST API endpoints

  • Enable auto-unlock via Comet webhooks for seamless node restarts

  • Set up ThunderHub's built-in monitoring for channel rebalancing

  • Configure HTTPS if exposing ThunderHub publicly

RTL (Ride The Lightning)

RTL is another popular web interface for LND node management, offering comprehensive Lightning Network operations.

Installation and Setup

Docker Installation:

docker pull shahanafarooqui/rtl:latest

docker run -d \
  --name rtl \
  -p 3001:3000 \
  -v ~/.rtl:/data \
  shahanafarooqui/rtl:latest

Configuration

Create RTL-Config.json:

{
  "multiPass": "your-rtl-password",
  "port": "3000",
  "defaultNodeIndex": 1,
  "nodes": [
    {
      "index": 1,
      "lnNode": "Comet LND Node",
      "lnImplementation": "LND",
      "Authentication": {
        "macaroonPath": "/path/to/admin.macaroon",
        "configPath": ""
      },
      "Settings": {
        "userPersona": "OPERATOR",
        "themeMode": "DAY",
        "themeColor": "PURPLE",
        "logLevel": "INFO",
        "lnServerUrl": "https://your-node-id.comet.platform:8080",
        "fiatConversion": true,
        "currencyUnit": "USD"
      }
    }
  ]
}

Access RTL at http://localhost:3001 and log in with your configured password.

Zeus (Mobile)

Zeus is a powerful mobile Lightning wallet that can connect to your Comet LND node for remote management.

Setup Instructions

  1. Download Zeus from App Store or Google Play

  2. Prepare Connection Details:

  3. Add Node in Zeus:

  4. Test Connection:

Security Considerations

  • Enable biometric authentication in Zeus settings

  • Configure IP whitelisting in Comet for your mobile IP (if static)

  • Consider creating a custom macaroon with limited permissions for mobile use

Zap (Mobile)

Zap provides a simplified Lightning experience for mobile users.

Connection Steps

  1. Download Zap from App Store

  2. Select "Connect Remote Node"

  3. Choose "LND Node"

  4. Scan QR code or manually enter:

BlueWallet (Mobile)

BlueWallet supports LND node connections via LNDHub or direct REST API.

LNDHub Integration

BlueWallet works best with LNDHub as an intermediary:

  1. Install LNDHub server:

git clone https://github.com/BlueWallet/LndHub.git
cd LndHub
npm install
  1. Configure LNDHub to connect to your Comet LND node:

// config.js
module.exports = {
  lnd: {
    url: 'your-node-id.comet.platform:8080',
    macaroon: 'path/to/admin.macaroon',
  }
};
  1. Start LNDHub and add the connection URL to BlueWallet

Electrum (Desktop)

Electrum is a Bitcoin wallet that can connect to your Bitcoin Core node on Comet Platform.

Configuration

  1. Open Electrum → Tools → Preferences → Server

  2. Enable "Select server manually"

  3. Enter your Bitcoin Core node details:

  4. For authenticated access, configure RPC credentials from Comet Dashboard

Sparrow (Desktop)

Sparrow Wallet offers advanced Bitcoin features and can connect to your Comet Bitcoin Core node.

Setup Instructions

  1. Open Sparrow Wallet → Preferences → Server

  2. Select "Bitcoin Core"

  3. Configure connection:

  4. Test connection and enable features like UTXO selection and transaction broadcasting

Third-Party Service Integrations

Payment Processors

Integrate your Comet Lightning node with payment processing platforms to accept Bitcoin payments.

BTCPay Server Integration

  1. Deploy BTCPay Server (self-hosted or via hosting provider)

  2. Configure Lightning Network settings:

  3. Test payment flow by creating an invoice

Best Practices

Security Best Practices

Use Limited Macaroons: Create macaroons with only the permissions needed for each integration

Enable IP Whitelisting: Restrict node access to known IP addresses

Rotate Credentials: Regularly rotate macaroons and API keys

Use HTTPS: Always use encrypted connections for API calls

Validate Webhooks: Verify webhook signatures to prevent spoofing

Store Secrets Securely: Use environment variables or secret managers for credentials

Performance Best Practices

Cache Node Data: Cache frequently accessed data to reduce API calls

Use Webhooks: Prefer event-driven webhooks over polling

Batch Operations: Group multiple operations when possible

Monitor Rate Limits: Respect API rate limits and implement backoff strategies

Integration Best Practices

Test on Testnet: Always test integrations on testnet before mainnet

Handle Errors Gracefully: Implement retry logic and error handling

Log Everything: Maintain detailed logs for debugging

Monitor Health: Set up monitoring for integration endpoints

Document Your Integration: Keep internal documentation for maintenance

Troubleshooting

Common Integration Issues

Problem: Cannot Connect to Node

  • Verify node is running (check Comet Dashboard)

  • Confirm connection URL and port are correct

  • Check firewall rules and IP whitelisting

  • Verify macaroon is valid and not expired

Problem: Authentication Failures

  • Ensure macaroon is properly formatted (hex for most tools)

  • Verify macaroon permissions are sufficient

  • Check if macaroon was decrypted correctly

  • Confirm TLS certificate matches if required

Problem: Webhook Not Receiving Events

  • Verify webhook URL is publicly accessible

  • Check webhook signature validation logic

  • Review Comet webhook logs in dashboard

  • Test webhook endpoint with curl

  • Ensure events are properly configured

Problem: Slow API Responses

  • Check node resource utilization

  • Review network latency between your app and Comet

  • Optimize queries (reduce unnecessary API calls)

  • Consider upgrading node tier for better performance

  • Implement caching for frequently accessed data

Problem: Payment Invoice Not Settling

  • Verify Lightning channel liquidity

  • Check if invoice has expired

  • Review payment route availability

  • Inspect node logs for error messages

  • Test with a small amount first

Getting Help

If you encounter issues not covered here:

  • Check Documentation: Review our Troubleshooting & FAQs

  • Community Discord: Join our Discord server for community support

  • Support Tickets: Open a support ticket for technical assistance

  • API Status: Check status.comet.platform for service status

Last Updated: January 5, 2026

Questions or feedback? Contact us at support@cometcash.com.

Table of Contents

Copyright © 2025 Comet Cash

Czech Republic VASP License Registration Nº 22053751

info@cometcash.com

All rights reserved.

Copyright © 2025 Comet Cash

Czech Republic VASP License Registration Nº 22053751

info@cometcash.com

All rights reserved.