@model LightningNodeViewModel @{ Layout = "_LayoutWalletSetup.cshtml"; ViewData.SetActivePage(StoreNavPages.LightningSettings, "Connect to a Lightning node", Context.GetStoreData().Id); }

@ViewData["Title"]

Please understand that the Lightning Network is still under active development and considered experimental. Before you proceed, take time to familiarize yourself with the risks. More information

@section PageHeadContent { }
@if (Model.CanUseInternalNode) {

Using the BTCPay Server internal node for this store requires no further configuration. Click the save button below to start accepting Bitcoin through the Lightning Network.

} else {

Your instance administrator has disabled the use of the Internal node for non-admin users.

}

BTCPay Server currently supports:

  • type=clightning;server=unix://root/.lightning/lightning-rpc
  • type=clightning;server=tcp://1.1.1.1:27743/

  • type=charge;server=https://charge:8080/;api-token=myapitoken...

  • type=eclair;server=https://eclair:8080/;password=eclairpassword...

  • 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 examples assume /root/.lnd.

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

xxd -p -c 256 /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.

@section PageFootContent { }