How to connect Bleskomat ATM to LND via the Bleskomat Platform

In this guide you will learn how to connect your Bleskomat ATM to your own Lightning Network Daemon (LND) node via the Bleskomat Platform.

What is LND?

Lightning Network Daemon (LND) is one of the original Lightning Network node implementations. It is written in Go and created by Lightning Labs. It is a free and open-source project and its source code repository can be found here.

Setup LND

A complete guide to setting up your own instance of LND can be found here. This comprehensive guide is written directly by the Lightning Labs team. You can follow the instructions up until the "Deposit some Bitcoin" section for now. Once you have reached that point in the LND documentation you can continue to the next step in this guide.

Connect your Bleskomat Platform account to LND

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

  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 "lnd" from the list of "Lightning Backend Types"
    • In the Hostname field enter the IP Address and port number of your lnd node's REST API
    • The TLS Certificate is automatically requested from the service hosted at the Hostname provided above.
      • Important: Check the TLS certificate in the form against the tls.cert file used by your lnd node.
    • In the Macaroon field paste the hexadecimal representation of a macaroon for your lnd node
      • The macaroon should have permissions to pay invoices and check invoice status.
      • Use the command xxd -c 10000 -p -u /path/to/macaroon to print a macaroon file as hexadecimal.
      • It is possible to "bake" custom macaroons with specific permissions using lncli's bakemacaroon command. See Bakery for more details.
    • 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.

Configure your Bleskomat ATM

In order for your Bleskomat ATM to create QR codes that the Bleskomat Platform will accept, you must configure the ATM 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 wallet

The final step is to fund your LND wallet with some sats! Since LND is a Lightning Network node, you are responsible for opening and managing your payment channels. To do this, continue from Part 3 of the LND setup guide.

If you only use your LND node for sending payments via the Bleskomat ATM, then you only need a local balance in your channels. But once your local balance is exhausted and all of your channels' balances are remote, you will need to re-balance these channels. Have a look at the following guides to learn more about this:

Once you have your wallet funded and a channel open, you can try a test payment using your Bleskomat ATM.

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

If this worked, congratulations your Bleskomat ATM is now connected and ready to sell sats!

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