How to connect Bleskomat ATM to lnbits

In this guide you will learn how to connect your Bleskomat ATM to an lnbits custodial wallet account via the Bleskomat Platform or a self-hosted lnbits instance.

What is lnbits?

LNbits is a free and open-source lightning-network wallet/accounts system.

The legend.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 legend.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.

  1. Open lnbits in your browser
  2. Type the name of your new wallet
  3. 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.

For the next step there are 2 options, please follow one of the options and then proceed to the section 'Configure your Bleskomat ATM'.

Enable the Bleskomat extension - Option 1

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.

  1. Find and click the "Manage extensions" button on the left side of the page
  2. Find and click the "Enable" button for the Bleskomat extension
  3. 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.

  1. Click the "Add Bleskomat" button at the top
  2. 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
  3. Click the "Add Bleskomat" button at the bottom of the form
  4. 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.

You can now proceed to the Configure your Bleskomat ATM section.

Connect your Bleskomat Platform account to lnbits - Option 2

Let's now connect your Bleskomat Platform account to your lnbits wallet.

  1. Get your lnbits API Key
    • On the home page of your lnbits wallet, click on the API info dropdown menu on the right side of the screen. You will use the Admin key provided here in the next steps of this guide.
  1. Login to your Bleskomat Platform account
    • For first time login:
      • Find the instructions sheet that you received with your Bleskomat ATM
      • Go to p.bleskomat.com/start in your browser
      • Use the login phrase from the sheet to login to your account
      • Complete the Account Settings step to set an email, username, and password
  1. Lightning Configuration
    • Select "lnbits" from the list of "Lightning Backend Types"
    • Copy/paste the API key from earlier into the "Admin Key" input field
    • In the Hostname field you will either use the default if you are utilizing the public instance of lnbits, or your own URL if you are self-hosting
    • Save and complete the initial account setup
  1. Management Interface
    • Click "Devices" on the left side of the account screen
    • You will find one device listed on this page
  1. Click the gear icon on the right side of the listed device
    • This will open the device's settings page
  1. Note the various settings available:
    • Enabled - Whether or not the Bleskomat Platform will process payments on behalf of the ATM
    • Fiat Currency - The currency (bills and coins) which your ATM accepts. Changing this requires re-programming the bill and coin acceptors.
    • Buy Limit - The maximum per trade limit for the ATM
    • 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

Press the "Save" button to save the settings, in the case that you've made any changes.

  1. Download configuration file
    • Click "Devices" on the left side of the account screen to go back to the devices page
    • Click the download icon on the right side of the listed device

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 Bleskomat Platform knows that a request for payment was initiated by your ATM.

You can now proceed to the Configure your Bleskomat ATM section.

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.

  1. Un-plug your Bleskomat ATM from power
  2. 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
  3. Insert the SD card into your computer's SD card slot
    • The SD card file system should be automatically mounted
  4. Copy the "bleskomat.conf" file to the SD card
  5. Un-mount the SD card
  6. Remove the SD card from your computer
  7. Insert the SD card back into the Bleskomat ATM
  8. 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.

  1. Open your lnbits wallet account page
  2. Click the "Create invoice" button at the top of the page
  3. Set the amount to whatever you are comfortable with for testing purposes
  4. 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.

  1. Insert a coin or bill into the Bleskomat ATM
  2. Push the button
  3. Open a compatible mobile wallet app
    • Please see apps for a list of wallet apps which are compatible
  4. Scan the QR code with the mobile wallet app
  5. Follow the instructions in the mobile wallet app to complete the Lightning payment

You should now see a transaction in your lnbits connected wallet.

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 support@bleskomat.com