How to use lnbits with your Bleskomat ATM
In this guide you will learn how to configure your Bleskomat ATM to connect with an lnbits custodial wallet account.
- What is lnbits?
- Create a new wallet account
- Enable the Bleskomat extension
- Add a new Bleskomat to your lnbits wallet account
- Configure your Bleskomat ATM
- Fund your lnbits wallet
- Test the setup
What is lnbits?
LNbits is a free and open-source lightning-network wallet/accounts system
The lnbits.com website is a public instance of the lnbits open-source project. It is run by the project's maintainers as a free service to the community. It is recommended only for hobby and experimental use. But it can be useful if you want to get up and running quickly to test your Bleskomat ATM.
This guide will assume you already have access to an lnbits installation - either lnbits.com or your own self-hosted instance. For setup or installation instructions of lnbits, we recommend that you find the latest installation instructions on the official lnbits github.
Create a new wallet account
With lnbits, it is possible to create your own wallet account. You do not need to have your own Lightning Network node to use it. The lnbits instance has its own node or Lightning service provider account as its funding source. So when you use your lnbits wallet to send or receive Lightning payments, lnbits will credit or debit your wallet account in its database and handle the Lightning interactions on your behalf.
The first step toward connecting your Bleskomat ATM to lnbits is to create a new wallet account.
- Open lnbits in your browser
- Type the name of your new wallet
- Click the "Add a new wallet" button to create the new wallet
The new wallet has been created and has 0 sats available to spend. You will need to fund the wallet before your Bleskomat ATM will be able to sell bitcoin. But before you do that, let's finish the rest of the setup process.
Enable the Bleskomat extension
The lnbits project is an open-source initiative, so several developers from the community have created extensions to add extra functionality to lnbits. The Bleskomat team has created and maintains an extension which allows Bleskomat ATM owners and operators to connect their Bleskomat ATM to an lnbits wallet account.
- Find and click the "Manage extensions" button on the left side of the page
- Find and click the "Enable" button for the Bleskomat extension
- Click the "Open" button to open the Bleskomat extension page
Add a new Bleskomat to your lnbits wallet account
Now it's time to connect the Bleskomat ATM to your lnbits wallet account.
- Click the "Add Bleskomat" button at the top
- Select your wallet account from the list at the top of the form
- Fiat Currency - The currency (bills and coins) which your ATM accepts
- Exchange Rate Provider - The exchange rate API to use when fetching BTC to fiat exchange rate
- Fee % - The percent amount deducted from the final BTC amount when sending Lightning payments
- Click the "Add Bleskomat" button at the bottom of the form
- Click the small download icon on the left side of the first list item
A file named "bleskomat.conf" should be downloaded and saved to your computer. This is your Bleskomat ATM's configuration file. It includes the API key information which your ATM will use to create signed lnurl-withdraw QR codes. This is how the lnbits website knows that a request for payment was initiated by your ATM.
Configure your Bleskomat ATM
In order for your Bleskomat ATM to create QR codes that your lnbits wallet account will accept, you must configure it using the file that you downloaded previously.
- Un-plug your Bleskomat ATM from power
- Locate and remove the SD card from the Bleskomat ATM
- Refer to the user manual for specific instructions about how to locate the PCB and SD card
- Insert the SD card into your computer's SD card slot
- The SD card file system should be automatically mounted
- Copy the "bleskomat.conf" file to the SD card
- Un-mount the SD card
- Remove the SD card from your computer
- Insert the SD card back into the Bleskomat ATM
- Plug-in the Bleskomat ATM to power
Fund your lnbits wallet
The final step is to fund the lnbits wallet account so that your lnbits wallet can send Lightning payments on behalf of your Bleskomat ATM.
- Open your lnbits wallet account page
- Click the "Create invoice" button at the top of the page
- Set the amount to whatever you are comfortable with for testing purposes
- Click the "Create invoice" button at the bottom of the form
Pay the invoice by scanning the QR code with a mobile wallet app that has sufficient funds to pay it. Or copy/paste the invoice as text to your Lightning service provider account or Lightning node software.
When your lnbits wallet account is funded, you can move on to testing your setup.
Test the setup
Now let's test the whole setup to make sure it's working as expected.
- Insert a coin or bill into the Bleskomat ATM
- Push the button
- Open a compatible mobile wallet app
- Please see apps for a list of wallet apps which are compatible
- Scan the QR code with the mobile wallet app
- Follow the instructions in the mobile wallet app to complete the Lightning payment
Need additional help?
If you're stuck and would like some extra help to get your Bleskomat ATM setup working, please feel free to reach out to us directly at firstname.lastname@example.org