LNbits – Lightning Wallet and Account System
This post is also available in: German
LNbits is a lightning wallet and account system. LNbits can be used to create and manage numerous Lightning Walles and Sub-Wallets.
If you run your own Lightning Node, you manage your Lightning credit virtually on one account. If you want to record the activities separately, a Lightning Accounts system can be useful.
A family Lightning Node can be operated in the private area and each family member receives his own Lightning Wallet.
To make and settle payments from different users within one application. These can be game developers who settle payments and rewards of the players via such a wallet.
Users can receive credits on this wallet for commissions, profits, recommendations or other activities. Payments in the micro-cent range can be made from the wallet credit. The User can also call up the credit 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 should manage, settle, receive or pay Lightning credits.
LNbits offers such a Lightning accounts system. Man kann über die Seite lnbits.com das von LNbits betriebene Lightning Kontensystem mitbenutzen. But 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 of Raspiblitz, you can activate LNbits on the Raspiblitz with a few clicks. How to activate LNbits on the Raspiblitz is explained at the end of this article.
LNbits Lightning Accounts System
The former LNbits user starts by creating his own LNbits Wallet. This can be done via the website https://lnbits.com/ or you use your own LNbits server running on the Raspiblitz or you set up your own LNbits server at a hosting provider.
There is no registration with email and password, you just choose a name for your LNbits Wallet. You have to remember or bookmark the Url based on it to be able to access your LNbits Wallet again later.
In our example we gave the LNbits Wallet the name Coincharge and get the following view
You have the possibility to accept payments via this Wallet Lightning (Create Invoice) or to pay yourself via Lightning (Paste request).
You can add more wallets (Add a Wallet) to your account and are not limited in 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 variety of extensions that allow you to create small applications yourself and make them available to your users on your own website.
Some of the LNbits Extensions we want to introduce here:
Each of these extensions are activated with one click and contain a short explanation for potential applications and a short API guide.
If you run an application in which the users are to make and settle payments among themselves, you use the extension “User Manager”. Here you can create an individual Lightning Wallet for each user and then use it for billing.
LNbits can be used to create a paywall that can be used to sell digital content with Lightning.
With the help of a WordPress plugin you can unlock blog posts with Lightning.
For this there is a WordPress plugin, which can be downloaded from https://github.com/lnbits/btcpaywall.
You install this WordPress plugin on your WordPress and include a payment link within a blog post. If the reader pays the amount by Lightning, the full article can be read. The Lightning credit occurs on the own LNbits Wallet.
Detailed instructions on how to sell blog posts as pay-per-post with Lightning can be found in the post: https://coincharge.io/en/portfolio/payment-per-newspaper-article-with-bitcoin-lightning/
But not only texts can be sold through a paywall.
With the extension LNbits Paywall videos, links or software downloads can be marketed.
To do so, activate the paywall extension within LNbits and create a new paywall.
You specify on which of the LNbits Wallet the Lightning payments should be credited.
Then the Url, to which the payer will be forwarded after a successful payment.
Then you can add a title and a description and the minimum amount the user should pay.
If the checkbox “Remeber payments” is ticked, users can call up this link again at a later date without having to pay again.
A YouTube guide to the paywall of LNbit can be found here:
LNURL – LNURLp and LNURLw
LNURL can be used to make Lightning payments (LNURL Pay) and Lightning withdrawals from the Lightning Wallet.
An explanation of LNURL can be found at: https://coincharge.io/en/lnurl/
With the LNURL Withdraw function, you can organize the pay-out payment of commissions and credits. A user is informed that a credit balance is available for collection. He can request the Lightning credit by scanning the QR Code and have it credited to his own Lightning Wallet.
With the extension LNURLw vouchers can be created, which can be made available to a user group.
With the “Advanced Withdraw Link” function, detailed settings can be made.
You set up a Lightning Wallet and equip it with a corresponding Lightning credit.
We funded the wallet with 1.000sats and selected the appropriate wallet.
We call the title of the link Coincharge Free Lightning.
You can withdraw up to 100sats and the minimum amount is 20sats.
In total Coincharge offers 10 users the opportunity to download the Satoshi.
Between each pick-up, we set a 10 minute break so that the account is not emptied so quickly.
To ensure that not even one user clears the whole account alone, the checkbox “Reduce assmilking” is checked.
This means that each QR Code can only be used once.
If you have a Lightning Wallet, then go to this page
And pick up the 100sats for free.
A YouTube video explains LNURL Withdraw per 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 the FIAT currency in which we operate our retail store and click 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, you call up the link and enter the amount in either Euros or Lightning.
Then click OK and the QR Code for the payment will be displayed.
The Buyer pays and the Satoshi are credited to the Wallet.
A YouTube video about the point of sale terminal of LNbits can be found here:
With the LNbits Event Extension you can sell event tickets for your event via Lightning.
In the input mask you enter when the event takes place, how many tickets are available and the entrance fee.
The buyer can enter 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 been paid and grant access.
A YouTube video about creating an event ticket from LNbits can be found here:
Set up LNbits
You can use the services of LNbits via LNbits.com This page is definitely recommended to try out the different LNbits Extension by yourself.
If you want to use LNbits professionally, you should run your own LNbits server.
the YouTube video on the left 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 Raspiblitz, you have the possibility to activate LNbits under “Additional Services”.
If the Raspiblitz is operated in your own home network, LNbits must be available from outside, i.e. via the Internet.
In order to be able to use LNbits completely, the same procedure must be followed as for the activation of the BTCPay server. You can find a manual for this under Raspiblitz BTCPay Server.
For LNbits it is necessary that the LNbits server has a secure 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.
- Using the IP address obtained from IP2Tor, create a sub-level domain at DuckDNS
- Create a Let’s Encrypt certificate for the sub-level domain under Subscription
These individual steps are described in detail in the manual under Raspiblitz BTCPay Server.
Once you have successfully completed all steps, you have your own LNbits server via a secure domain, which is accessible via the Internet.
LNbits offers via the extension a variety of interesting Lightning applications, which you can quickly and easily create and adapt to your own needs.
With a bit of imagination, you will come up with further applications that you can implement and program yourself.
LNbits shows with its numerous applications what can be realized with Lightning. Just try LNbits yourself and set up an LNbits Wallet under LNbits or activate the LNbits Service on your Raspiblitz.
This post is also available in: German