Connect Your Bleskomat ATM to BlueWallet via Bleskomat Platform

BlueWallet and LNDhub

BlueWallet is a mobile wallet app which is free and open-source. The on-chain part of BlueWallet is non-custodial and allows the user to hold their own private keys, but the Lightning Network implementation is custodial by default. The developers of the BlueWallet app run an instance of a server software named LNDhub to provide separate custodial Lightning accounts to their users. It is possible to run your own instance of the LNDhub software – see self-host your own LNDhub.

LNDhub is a free and open-source project which acts as a wrapper for the Lightning Network Daemon (LND). It allows a group of users to run different accounts with only one node in a trust-minimized setup. Ideal for hosted shared services or groups, families and friends that want to share their own node.

For more information please visit the LNDhub website and a live demo can be found here.

BlueWallet app install and setup

The first step is to install BlueWallet onto your iOS or Android device. Once you have the app downloaded, run it. If you don’t already have a Lightning wallet, click “Add now” then choose “Lightning”. On the next screen, you can choose to name your new wallet and you can see the LNDhub URL which you will use. By default the BlueWallet team’s LNDhub instance will be used (e.g. “lndhub.io”).

Once you’ve created a new Lightning wallet, keep the screen open because you will need the connection details and secret during the next steps in this guide.

Self-host your own LNDhub

This step is optional and is only necessary if you don’t want to use the publicly available instance provided by the BlueWallet team.

Installing LNDhub takes a bit of work. Detailed instructions can be found on their GitHub repository and this guide for a RaspberryPi might also be useful. Please note that your own lnd is required.

Once you’ve finished the setup of your own LNDhub, you can configure your BlueWallet app to connect to it. Click on the three dots in the top right corner of the app to open the settings. Then tap Network then Lightning Settings, which will take you to the screen where you will input your LNDhub URL. This could be a local network connection, a VPN or even a TOR hidden service. After entering this URL hit the blue Save button and you should now be connected to your LNDhub. You can now navigate back to the main screen and create a new Lightning wallet using your LNDhub backend.

Connect your Bleskomat Platform account to LNDhub

Let’s now connect your Bleskomat Platform account to your LNDhub 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 “lndhub” from the list of “Lightning Backend Types”
    • In your BlueWallet app, copy the connection details and secret which you obtained from the “BlueWallet app install and setup” section earlier
    • Back in the Bleskomat Platform, paste the connection details and secret into the Secret field
    • 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 wallet. In your BlueWallet app, open the wallet which you created in a previous step. Click the “Receive” button in that wallet, enter the amount of sats you would like to fund your wallet, and then tap “Create Invoice”. You can now copy the invoice information and send sats via any Lightning wallet.

Once the Lightning invoice has been paid, 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

You should see a new outgoing transaction appear in your BlueWallet wallet. Congratulations, your Bleskomat ATM is now connected and ready to sell sats!