LNbits
LNbits is a Lightning wallet and account system. With the help of LNbits, numerous Lightning walls and sub-wallets can be created and managed.
In addition, there are numerous Lightning applications (extensions) with which Lightning business models can be implemented. Lightning payment receipts generated from the Extensions are credited to the Lightning Wallets.
You can run your own LNbits server or share the one from Lnbits.
At the address https://legend.lnbits.com LNbits operates its own LNbits system, which can be shared. This is a very easy way to get started learning about LNbits.
However, you can also run the LNbits system on your own server and at your own address. You can set up a LNbits server at a hoster or run it as a hardware node under Umbrel or Raspiblitz.
The interesting thing about an LNbits server is the variety of different applications that can be used as an LNbits extension.
In this article we present the LNbits basic system and refer to some LNbits extensions, which are presented in detail in separate descriptions.
On our Coincharge YouTube channel we have created a German language video about LNbits.
LNbits Lightning Wallet & Accounts System
Those who operate their own Lightning Node manage their Lightning credits on a single account, so to speak. All Lightning deposits and withdrawals are credited/debited through the one account.
But now, if you have multiple applications or users, you want to record these payments separately. For this purpose, an account system is useful, with which corresponding sub-accounts can be created underneath a main account.
With these sub-accounts (wallets here), you can give each family member their own account or assign a separate wallet for each individual application.
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.
We introduce LNbits using the Legend.LNbits system. This is the LNbits system operated by LNbits itself and can be used and tried out for testing purposes.
We go to the website https://legend.lnbits.com/ and create our own wallet first.
There is no registration by 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.
LNbits Applications & Extensions
The LNbits system has a variety of applications and extensions that interact with the LNbits Wallet System.
These extensions are Lightning applications that can be integrated to one’s website and the incoming Lightning payments are credited to the wallet.
There is now such a large number of Lightning applications that it is impossible to present them all here.
We focus on the applications that are most important for payment processing.
BTC Paywall
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 detailed instructions on how to sell blog posts as pay-per-post using Lightning, see the post: Payment per Newspaper Article via 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.
For the user it looks like the screenshot on the right.
For detailed instructions on how to integrate an LNbits paywall on your WordPress site, check out the post: BTC Paywall for WordPress by LNbits.
Bitcoin coupons and vouchers
Want to convince someone about Bitcoin Lightning or give away some sats? Then you can create a Bitcoin voucher, deposit a few sats on it. The recipient can then download and credit the deposited Sats to their own Lightning Wallet.
The conversion is done via LNURL. You can find an explanation of LNURL under:https://coincharge.io/lnurl/
In our case, we use the LNURL variants for Lightning payments (LNURL Pay) and Lightning withdrawals (Lightning withdraw).
To create a Lightning voucher, the LNbits extensions LNURLp are needed to load the voucher and LNURLw is needed to withdraw the voucher balance.
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.
TPoS – Point of Sale
With the extension TPoS a Lightning Point of Sale terminal can be created.
This is a website that you can open from your smartphone to accept Lightning payments in your store.
We set up a wallet for this extension and give the wallet the name CoinCafe.
Then we select EUR as FIAT currency.
For example, if we run a restaurant and expect tips, then we can create and deposit a separate tip wallet. In order to make it easier for the customer to tip when paying, we set the percentage surcharges from 5% to 20% on the invoice amount.
You will receive a link to the terminal point of sale:
https://legend.lnbits.com/tpos/CnRwfyehNRYJuUyhRjrU98
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.
LNPoS – Hardware Lightning PoS Terminal
The LNPoS is a hardware Lightning terminal for receiving Lightning and Bitcoin payments in-store.
With the LNPoS Bitcoin PoS Terminal, merchants can receive Bitcoin and Lightning payments and also sell Bitcoin just like at a Bitcoin ATM.
The LNPoS functions:
- LNURLPoS – for offline Lightning payments
- OnChain – for on-chain payments
- LNURLATM – for offline Lightning payments
The Bitcoin terminal can also be used offline. It can also be used in places where there is no internet connection, such as outdoor events, festivals or flea markets.
We present the LNPoS in detail in a separate article. In this post there are detailed building instructions and how to set up and configure a LNPoS. LNPoS – Hardware Lightning PoS Terminal
The instructions are also available as a video on the Coincharge YouTube channel. Watch the video (German language): Bitcoin per LNPoS akzeptieren
Cashu – Lightning eCash Wallet and Mint System
Cashu is an ecash wallet and mint system for Bitcoin Lightning.
Cashu is an extension at LNbits. With the help of Cashu, the operator of an LNbits server can create his own Mint (Lightning Bank).
Such a Lightning Bank can be made available to friends and acquaintances who do not want to (or cannot) run their own Lightning Node. Operators of a Lightning Bank can also become platform operators, communities and banks that offer this Lightning service to their own customers and members.
We present the Cashu extension for the LNbits server in a detailed post at: Cashu – Lightning eCash Wallet and Mint System in more detail. With this guide you can create and run your own Mint system for your friends and family.
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 summary
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.
Leave a Reply
Your email is safe with us.