LNbits is a Lightning wallet and account system. With the help of LNbits, numerous Lightning walls and sub-wallets can be created and managed.
If you run your own Lightning Node, you manage your Lightning credits on a single account. If you want to record activities separately, a Lightning Accounts system can be useful.
In the private sector, a family Lightning Node can be operated and each family member receives their own Lightning Wallet.
To be able to make and clear payments from different users within one application. These can be game developers, which clear payments and rewards of the players via such a wallet.
Users can receive credits on this wallet for commissions, winnings, referrals or other activities. Micro-cent payments can be made from the wallet balance. Likewise, the user can retrieve the balance at any time and transfer it to an external wallet.
Based on the LNbits Accounting System, any form of business application can be implemented where users need to manage, clear, receive or pay Lightning credits.
LNbits offers such a lightning accounts system. One can share the Lightning account system operated by LNbits via the lnbits.com site. You can also run your own LNbits server on your own technical infrastructure, under your own name and domain.
If you run a hardware node from Raspiblitz, you can activate LNbits on the Raspiblitz with a few clicks. How to enable LNbits on the Raspiblitz is explained at the end of this post.
LNbits Lightning Accounts System
Getting started with LNbits begins with creating your own LNbits wallet. This can be done via the website https://lnbits.com/ or you can use your own LNbits server running on the Raspiblitz or you can set up your own LNbits server with a hosting provider.
There is no registration with email and password, you just choose a name for your own LNbits Wallet. You have to remember or bookmark the url based on it to access your LNbits wallet again later.
In our example, we have given the LNbits wallet the name Coincharge and get the following view:
You can use this wallet to receive Lightning payments (Create Invoice) or to pay yourself via Lightning (Paste request).
You can add more wallets (Add a Wallet) to your account and you are not limited in the number.
For example, you can create a separate Lightning LNbits wallet for each application and thus record the Lightning payment separately for each application.
Those who have developed their own application can access the Lightning Wallet via API. The corresponding keys and API calls are provided.
The LNbits Accounting System offers a wide range of extensions, with the help of which you can create smaller applications yourself and make them available to your users on your own website.
We would like to briefly introduce a few of the LNbits extensions here:
Each of these extensions are activated with one click and contain a short explanation for potential uses and a short API tutorial.
If you run an application in which users are to make and settle payments among themselves, you use the “User Manager” extension. Here, each user can create their own Lightning Wallet and then use it for clearing.
LNbits can be used to create a paywall that can be used to sell digital content against Lightning.
With the help of a WordPress plugin blog posts can be unlocked against Lightning.
There is a WordPress plugin for this, which can be downloaded from https://github.com/lnbits/btcpaywall.
This WordPress plugin you install on your WordPress and embed a payment link within a blog post. When the reader pays the amount via Lightning, the full post can be read. The Lightning credit is made to your own LNbits wallet.
For a detailed tutorial on how to sell blog posts as pay-per-post with Lightning, check out the post: https://coincharge.io/portfolio/zahlung-je-zeitungsartikel-mit-lightning/
But not only texts can be sold via a paywall.
With the extension LNbits Paywall videos, links or software downloads can be marketed.
To do this, activate the paywall extension within LNbits and create a new paywall.
You specify to which of the LNbits wallet the Lightning payments should be credited.
Then the url to which the payer will be redirected after a successful payment.
Then you can add a title and description and the amount you want the user to pay at least.
If the “Remember payments” checkbox is checked, then users will be able to revisit this link at a later time without paying again.
You can find a YouTube tutorial about the paywall of LNbit here:
LNURL – LNURLp and LNURLw
With LNURL, Lightning payments (LNURL Pay) and Lightning withdrawals (Lightning withdraw) can be made from the Lightning Wallet.
You can find an explanation of LNURL under:https://coincharge.io/lnurl/
With the LNURL Withdraw function, you can organize the payment of commissions and credits. One informs a user that a credit is available for him to pick up. He can claim the Lightning credit by scanning the QR code and have it credited to his own Lightning Wallet.
The LNURLw extension can be used to create vouchers that can be made available to a group of users.
With the “Advanced Withdraw Link” function, even more detailed settings can be made.
You set up a Lightning Wallet and equip it with a corresponding Lightning credit.
We loaded the wallet with 1,000sats and selected the appropriate wallet.
The title of the link we call Coincharge Free Lightning.
Up to a maximum of 100sats can be withdrawn and the minimum amount is 20sats.
In total, Coincharge offers 10 users the opportunity to download Satoshi.
Between each collection we set a break of 10 minutes, so that the account is not emptied so quickly.
To ensure that one user does not clear the entire account alone, the “Reduce assmilking” checkbox is checked.
This means that each QR code can only be used once.
A YouTube video explains LNURL Withdraw via LNbits in more detail:
Point of Sale
With the extension TPoS a Lightning Point of Sale terminal can be created.
We set up a wallet for this extension and give the wallet the name CoinCafe.
Then we select our own FIAT currency in which we run our retail store and click on Create TPOS.
You will receive a link to the terminal point of sale:
Bookmark this link on your smartphone. Every time someone wants to pay with Lightning, then you call the link and specify the amount either in Euro or Lightning.
Then click OK and the QR code for payment will be displayed.
The buyer pays and the satoshi are credited to the wallet.
An English YouTube video of the Point of Sale terminal from LNbits can be found here:
With LNbits Event Extension you can sell event tickets for your event via Lightning.
In the input mask you specify when the event will take place, how many tickets are available and how much the entrance fee is.
The buyer can specify his name and email address.
After clicking Submit, the QR code for payment will appear.
After successful payment, the buyer will be shown a new page with the ticket.
This QR code will then be presented at the event. By scanning this QR code, the organizer can verify that the entrance fee of 100sats has also been paid and grant access.
An English YouTube video on how to create an event ticket from LNbits can be found here:
Set up LNbits
One can use the services of LNbits via LNbits.com. This page is definitely recommended to try out the different LNbits Extension for yourself.
If you want to use LNbits professionally, you should run your own LNbits server.
the YouTube video on the right explains how to set up your own LNbits server on your own server and run it under your own domain.
LNbits on the Raspiblitz
If you run your own Raspi flash, you have the possibility to activate LNbits under “Additional Services”.
If the Raspiblitz is operated in its own home network, LNbits must also be available from outside, i.e. via the Internet.
To be able to use LNbits completely, you have to proceed analogously to the activation of the BTCPay server. Instructions are available at Raspiblitz BTCPay Server.
LNbits requires that the LNbits server has a secured https connection. Accordingly, we proceed as follows:
- Activation of Tor (Run behind Tor) on the Raspiblitz via Node Settings & Options
- Activation of LNbits via Additional Apps & Services
- IP2Tor Bridge for LNbits via Subscriptions.
- Create a sub-level domain at DuckDNS with the IP address obtained from IP2Tor.
- Create a Let’s Encrypt certificate for the sub-level domain under Subscription
These individual steps are described in detail in the instructions under Raspiblitz BTCPay Server.
Once you have successfully completed all the steps, you will have your own LNbits server via a secured domain, which is accessible via the Internet.
LNbits offers a variety of interesting Lightning applications through the extension, which you can quickly and easily create and customize to your own needs.
With a little imagination, you will come up with more applications that you can implement and program yourself.
LNbits shows with its numerous applications what can be implemented with Lightning. Just try LNbits yourself and set up a LNbits wallet under LNbits or activate the LNbits service on your Raspiblitz.