# Set Up Lightning Custody Wallets

Source: https://developers.bitgo.com/docs/lightning-set-up-custody-wallets

## Overview

Custody Lightning wallets provide a seamless way to interact with the Lightning Network without managing infrastructure. BitGo handles node operations, signing, channel management, liquidity provisioning, and network connectivity on your behalf. The nodes are professionally monitored and maintained, ensuring reliability and security.

Go Lightning delivers Lightning Network capabilities directly from your Go Account (`ofcbtc`). Unlike Custody Lightning, Go Lightning does not require you to interact with a Lightning node or set up a separate Lightning wallet — BitGo handles all Lightning operations behind the scenes.

Go Lightning uses the same standard endpoints you that you can use for on-chain transactions from . Your Go Account combines Lightning and on-chain balances into a single overall bitcoin balance, and Go Lightning operates at **satoshi** precision (not millisatoshi).

There is no additional setup needed beyond having the Go Lightning license enabled on your enterprise. Once your license is active, you can immediately create Lightning invoices using your existing `ofcbtc` Go Account.

When you receive a Lightning payment, BitGo credits the invoice amount to your overall bitcoin balance — there are no separate Lightning balance fields to manage.

## Prerequisites

* [Get Started](/docs/get-started-intro)
* Sign a custody Lightning license (`custodyLightningWallet` for custody wallets and `custodyGoLightning` for Go Lighting) for your enterprise by contacting support@bitgo.com.

## Cookbook

Need just the steps? Expand the cookbook below to get started:

<Cookbook slug="lightning-set-up-custody-wallets" title="Set Up Lightning Wallets" />

## 1. Create Lightning Wallet

>Endpoint: [Generate Wallet](/reference/expresswalletgenerate)

```shell cURL
export BITGO_EXPRESS_HOST="<YOUR_LOCALHOST>"
export COIN="tlnbtc"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export LABEL="<YOUR_WALLET_NAME>"
export PASSPHRASE="<YOUR_BITGO_LOGIN_PASSPHRASE>"
export PASSCODE_ENCRYPTION_CODE="<YOUR_BITGO_PASSPHRASE_ENCRYPTION_CODE>"
export ENTERPRISE_ID="<YOUR_ENTERPRISE_ID>"

curl -X POST \
http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/generate \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
    "label": "'"$LABEL"'",
    "passphrase": "'"$PASSPHRASE"'",
    "passcodeEncryptionCode": "'"$PASSCODE_ENCRYPTION_CODE"'",
    "enterprise": "'"$ENTERPRISE_ID"'",
    "type": "hot",
    "subType": "lightningCustody"
}'
```
```js JavaScript
const { BitGo } = require('bitgo');

// Fill in with actual access token
const accessToken = '<YOUR_ACCESS_TOKEN>';

// Initialize the SDK
const bitgo = new BitGo({
    accessToken: accessToken,
    env: 'test',
});

// Generate hot wallet
async function createCustodialHotWallet() {
    const newWallet = await bitgo.coin('tlnbtc').wallets().generateWallet({
    label: '<YOUR_WALLET_NAME>',
    passphrase: '<YOUR_BITGO_LOGIN_PASSPHRASE>',
    passcodeEncryptionCode: '<YOUR_BITGO_PASSPHRASE_ENCRYPTION_CODE>',
    enterprise: '<YOUR_ENTERPRISE_ID>',
    subType: 'lightningCustody'
});

    console.log(JSON.stringify(newWallet, undefined, 2));
}
```

#### Step Result

Once you create a Lightning wallet, BitGo creates a Lightning node with a hosting service provider and will initialize the node. This process can take up to 24 hours to complete. BitGo sends you an email notification when the wallet is ready to use.

```shell JSON
{
  "wallet": {
    "id": "67e43de27f977e954022b8eb8693f5a7",
    "users": [
      {
        "user": "6101c3790293df0006fb99bc777152ce",
        "permissions": [
          "admin",
          "spend",
          "view"
        ]
      }
    ],
    "coin": "tlnbtc",
    "label": "Test Custody Lightning Wallet",
    "m": 1,
    "n": 1,
    "keys": [
      "67e43de1551f8a42dadaabb0d2ac2264"
    ],
    "keySignatures": {},
    "enterprise": "65302ca0c3939600075905e213ca20dd",
    "bitgoOrg": "BitGo Inc",
    "tags": [
      "67e43de27f977e954022b8eb8693f5a7",
      "65302ca0c3939600075905e213ca20dd"
    ],
    "disableTransactionNotifications": false,
    "freeze": {},
    "deleted": false,
    "approvalsRequired": 1,
    "isCold": false,
    "coinSpecific": {
      "keys": [
        "67e43de1d19e3a9237bf558bed01f8e6",
        "67e43de1ffc2dfc5c5994239ed002fb5"
      ]
    },
    "admin": {},
    "clientFlags": [],
    "walletFlags": [],
    "allowBackupKeySigning": false,
    "recoverable": true,
    "startDate": "2025-03-26T17:48:18.000Z",
    "type": "hot",
    "buildDefaults": {},
    "customChangeKeySignatures": {},
    "hasLargeNumberOfAddresses": false,
    "hasReceiveTransferPolicy": false,
    "creator": "6101c3790293df0006fb99bc777152ce",
    "subType": "lightningSelfCustody",
    "config": {},
    "inboundBalance": "0",
    "inboundPendingBalance": "0",
    "inboundUnsettledBalance": "0",
    "outboundBalance": "0",
    "outboundPendingBalance": "0",
    "outboundUnsettledBalance": "0",
    "balanceString": "0",
    "confirmedBalanceString": "0",
    "spendableBalanceString": "0",
    "pendingApprovals": []
  },
  "userKeychain": {
    "id": "67e43de1551f8a42dadaabb0d2ac2264",
    "pub": "xpub661MyMwAqRbcFKQKbgT6uA46wmi5FrqrYoJjUzQjnPU5VY6Pk7nyqn2Jg9oHdn4gd1Eh8idDbh6wQ4mWMZ8CXBGBLGvoBbva3MpkDVmbjxL",
    "ethAddress": "0x01e0c185c0652fc9d6b67fcb36149aa67a17fab4",
    "source": "user",
    "type": "independent",
    "encryptedPrv": "{\"iv\":\"9tY/nQ9DsTXp71vypxNVGg==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"v6m97u751w4=\",\"ct\":\"E2d7SNUkJJspAz07uougA3lvih8dA9A0bm7aYt0LVtquUzGZgXji5x5Ez1gaZKb2mESuUOLrDfe8zHOnvDVhYcK015zM1llqxKH5/LOg715AcYKLNoE3hHrZoy4IZlaQV8LntKGX1+pOYlqkjlaZLWNtDMuoB+g=\"}"
  },
  "userAuthKeychain": {
    "id": "67e43de1d19e3a9237bf558bed01f8e6",
    "pub": "xpub661MyMwAqRbcH4SU8XsxRzbNkZWr3zB1Qksxp9b7mqv8f2btQgofwBQixHZFUrUSrtS8r8yH7cs6pMwYQUWuAg13upsCb72v7cnfY5sU7Xx",
    "ethAddress": "0x83c3e1f73925c9013b1ae05da76eb67dbd85e374",
    "source": "user",
    "type": "independent",
    "coinSpecific": {
      "tlnbtc": {
        "purpose": "userAuth",
        "_requestId": "cm8q7x8kj0byf0eys63uk9nsf"
      }
    },
    "encryptedPrv": "{\"iv\":\"7cxr+H0cT7g3xRsACg+Saw==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"4ZJflpV8Mu8=\",\"ct\":\"1R+f4etETgoyLBQ98ErQ7fMq2vZVJjnDev8Fe88BAfcZ9dGpkFfbKBgc6skJn2Qy0GjsCI0G9qFvSbjfAIWxCtkbrZ7KzLnXCnVyWH3SbagyZfOYNs4UgmCbdEoS7bIMF1ZiMzj+phIeeuP/QGaZZYcL9/Z6+Kk=\"}"
  },
  "nodeAuthKeychain": {
    "id": "67e43de1ffc2dfc5c5994239ed002fb5",
    "pub": "xpub661MyMwAqRbcFbNKN8P6pQuaieXxCdj38JniNNoiX8nL2LNf4RTdTvULEuua4pMxjyid6vFH3BiFoXQ1BHJbbxhwnkte7sd4o2jVtwgk9ig",
    "ethAddress": "0x391004935442ad4237ab7adaae31e0056844f4e2",
    "source": "user",
    "type": "independent",
    "coinSpecific": {
      "tlnbtc": {
        "purpose": "nodeAuth",
        "_requestId": "cm8q7x8u90c7d0e0cekte5rum"
      }
    },
    "encryptedPrv": "{\"iv\":\"9JmKBrVJvWtzsyWhoyqMPg==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"kxJFetnXI+U=\",\"ct\":\"hlquksFjZJ9EciSbjModTiHE7R4GoHenxRy6OPKHw9nHS2yTkU3ZyV1wMzqXC+/Yq0ZtPDqV7YOFKQ1r9+GWCCyKi8wdX+ZZS5mul0R2WJSsw7nBiFPuiUyqZlK7vrrt/6ERcobzrJBnqU9QN2TkUpWxPxHStLQ=\"}"
  },
  "responseType": "LightningWalletWithKeychains",
  "encryptedWalletPassphrase": "{\"iv\":\"frevNIUliAXK5eS/YU4uaQ==\",\"v\":1,\"iter\":10000,\"ks\":256,\"ts\":64,\"mode\":\"ccm\",\"adata\":\"\",\"cipher\":\"aes\",\"salt\":\"pwl6aQtPxH0=\",\"ct\":\"/tBwHmRzyEo4dsyX0Zv5LSlh05XITpzqDU5rlA==\"}"
}
```

## Next Steps

* [Create Lightning Invoices](/docs/lightning-create-invoice)
* [Pay Lightning Invoices](/docs/lightning-pay-invoice)

## See Also

* [Blockchain Reference: Bitcoin Lightning Network](https://assets.bitgo.com/coins/bitcoin-lightning)
* [Reference: Lightning Balances](/docs/lightning-balances)
* [Wallets Overview](/docs/wallets-overview)
