Back to the Blog

How to run an effective Merchant Lightning Node

This article will explain how a merchant or other point of sale setup, such as a crowdfund, should manage their lightning node backend liquidity. We will be talking about basic goals, initial setup, interaction with point of sale front ends such as BTCPayServer, and how to manage the liquidity. There are three steps to getting your business to accept lightning through your own node.

Step 1: Get your node running and get your inbound liquidity.

Step 2: Connect your node to BTCPayServer.

Step 3: Build a BTCPayServer native shop or alternatively, connect your BTCPayServer to a merchant platform such as Woocommerce or Shopify to enable Bitcoin as a payment option for your customers.

Step 1: Inbound Liquidity 

After you set up your node, whether it be on Voltage, or locally, your node will need inbound liquidity. Inbound liquidity is what will allow your node to receive payments. This is more difficult than obtaining outbound liquidity, which is how you spend out of your node, because in order to obtain inbound, other nodes on the network must allocate their capital to your node. Your peer’s outbound is your inbound, and vice versa. 

You might ask then what incentivizes other nodes to essentially allocate their capital towards giving your node inbound liquidity. The answer is routing fees. For a normal routing node on the network, opening a channel to a merchant node is a great way to earn routing fees for forwarding payments of others. We will also go into later how routing nodes agree to open a channel with another node for an upfront price. This is called selling liquidity. A merchant node can be a primary customer of the liquidity of other routing nodes.

I recommend checking the Voltage blog, “Demystifying inbound liquidity” for more information and the plebnet wiki for many different methods of obtaining inbound liquidity.

For basics on how the lightning network actually functions, check out this short beginner explainer: LN.Guide. The Thunderhub docs series will walk you through the basics of using Thunderhub here. Be sure to acquire the amount of inbound liquidity that matches your store’s needs. For example, if you expect your monthly volume to be $10,000, be sure to get as much inbound as you can to meet that amount. 

How a Channel Changes

Over time, as you get sales, your inbound side will shift to your outbound side, and eventually, your channel that was once heavy inbound, will not be heavy outbound and you will be unable to receive into that channel. When this happens, you have a few options.

 You can close the channel, and then move the funds to cold storage, or wherever you like. You can submarine swap the funds, which means you can keep the channel open and shift the liquidity back to inbound, and receive the outbound back on-chain. To do this you can click Swap in the Thunderhub main menu and fill in the parameters. Or you could leave the channel open, and use the steps you used for the initial setup to acquire more inbound. Your node could eventually turn into a profitable routing node over time if that is what you wished, or you could even begin to sell liquidity if you like.

Management

An initial inbound channel may look similar to this on thunderhub:

This means you have 9.9million satoshis of inbound liquidity. As you receive payments through this channel, the liquidity of the channel will move towards the local side; the side that you own:

In Thunderhub, the blue side represents the side you own, and can send. The green side represents the amount you can receive, which your peer owns. 

Over time your channel may go completely blue, which means that you can no longer receive into that channel, you can only spend out of. To get inbound liquidity back in the channel, feel free to use a service such as BOLTZ, which is built into Thunderhub. BOLTZ allows you to pay through your channel and receive on-chain, thus moving the liquidity back to the inbound side and then receiving your profits to an on-chain address. Access by clicking Swap in the main Thunderhub menu. See the image below:

When opening and managing your channels, consider your expected sales volume. If you expect to sell 5,000,000 sats worth of product per month, you probably would not want to have only 1,000,000 sats of inbound liquidity. Also, be sure to have at least five channels to very well-connected nodes on the network to ensure that the payments of your customers are successful.

A good starting point may look something like this:

Channels are heavy on inbound liquidity and are ready to receive payments.

Step 2: Connecting your Node to BTCPayServer

After your node has a few channels of inbound liquidity, you now need to connect your node up to a point-of-sale style system. Luckily, with Voltage, BTCPayServer is built in, and if you are running a Voltage node, your node will link up with BTCPayServer automatically. If you are running your node externally, you can also connect it to a BTCPayServer running on Voltage. You can also install and run BTCPayServer yourself, although the setup is much more complex.

If you are running BTCPayServer on Voltage check out this guide to get started.

Step 3: Bringing it All Together

On your BTCPayServer dashboard, you can run native applications and customize web stores. Features such as add to cart, descriptions, item photos, etc. are all included. BTCPayServer also shows you all invoices so you can keep track of sales. Your sales will also appear in your node management software (likely Thunderhub) to keep track of sales. For a BTCPayServer native shop app, check out the short guide here.

If you are already running a Shopify store or Woocommerce through WordPress, you can link up your BTCPayServer to your shop with a simple API key. Guides can be found on your BTCPayServer settings page or at How to accept Bitcoin in Shopify | BTCPay Server.

Conclusion

And that’s about it. Three steps, and a little bit of setup at the beginning and you will have a fully sovereign lightning node backend and a great-looking customer-facing front end for your business. If you have never used lightning before it may be a bit intimidating, but once you get the hang of it you will wonder how you ever survived without it. 

As always if there are any questions you have or would like a live demo of the platform or us to work with you to help set up your merchant services and lightning, we can be reached at support@voltage.cloud or on our discord server at https://voltage.cloud/discord

Related

How to run an effective Merchant Lightning Node blog

Start accepting Bitcoin today: BTCPay and its many use cases

BTCPay Server

April, 12 2021

We brought BTCPay Server to Voltage a few weeks ago, empowering anyone to start accepting Bitcoin easier than ever before. Let’s take a look at the seemingly endless...

Read More
How to run an effective Merchant Lightning Node blog

How to Accept Bitcoin and Lightning Network Payments

BTCPay Server

December, 20 2021

Learn how to accept Bitcoin as payment for your business with this guide....

Read More
How to run an effective Merchant Lightning Node blog

Amazon Customers Blocked from Using Visa. Hello Lightning!

Bitcoin Lightning Network

November, 17 2021

Bitcoin fixes this for Amazon. This riff calls Amazon to embrace Lightning....

Read More