@model LightningNodeViewModel @{ Layout = "../Shared/_NavLayout.cshtml"; ViewData.SetActivePageAndTitle(StoreNavPages.Index, "Add lightning node"); }

Lightning Node Connection

The connection string encapsulates the configuration for connecting to your lightning node. BTCPay Server currently supports:

  • Internal node, if you are administrator of the server:
    • Internal Node
  • c-lightning via TCP or unix domain socket connection:
    • type=clightning;server=unix://root/.lightning/lightning-rpc
    • type=clightning;server=tcp://1.1.1.1:27743/
  • Lightning Charge via HTTPS:
    • type=charge;server=https://charge:8080/;api-token=myapitoken...
  • Eclair via HTTPS:
    • type=eclair;server=https://eclair:8080/;password=eclairpassword...
  • LND via the REST proxy:
    • type=lnd-rest;server=https://mylnd:8080/;macaroon=abef263adfe...
    • type=lnd-rest;server=https://mylnd:8080/;macaroon=abef263adfe...;certthumbprint=abef263adfe...

    For the macaroon options you need to provide the admin.macaroon.

    The path to the LND data directory may vary, the following example assume /root/.lnd.

    The macaroon parameter expects the HEX value, it can be obtained using this command:

    xxd -plain /root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon | tr -d '\n'

    You can omit certthumbprint if the certificate is trusted by your machine.

    The certthumbprint can be obtained using this command:

    openssl x509 -noout -fingerprint -sha256 -in /root/.lnd/tls.cert | sed -e 's/.*=//;s/://g'

    If your LND REST server is using HTTP or HTTPS with an untrusted certificate, you can set allowinsecure=true as a fallback.

@if (Model.CanUseInternalNode) {

Use the internal lightning node of this BTCPay Server instance by clicking here.

}
Open Public Node Info Page
@section Scripts { @await Html.PartialAsync("_ValidationScriptsPartial") }