How to connect your own node to Alby using Fly.io

At Alby we are giving you the possibility to connect your own bitcoin lightning node to your Alby Account. To make it easier to run the node we are using a service to decouple the signing of the transactions from the node. This guide explains how you can self-host the signer app to send and receive payments in a sovereign way. Your lightning node will be independently deployed by Greenlight.

Step 1: Create an account on Fly.io and add your credit card details (for free).

Fly.io offers a free tier which just provides enough compute resources to host your signer app for your own lightning node. Your card won't be charged as long as you only use your account to host the app.

Step 2: Install the flyctl

Have a look at this page for Windows, macOS and Linux

Step 3: Sign into your fly account via the CLI

To sign in, run

fly auth login

When your browser opens to the Fly.io sign-in screen, enter your user name and password to sign in.

Step 4: Save the config file

# fly.toml app configuration file generated for nwc

app = 'Alby-nwc'
primary_region = 'lax'

[build]
  image = 'ghcr.io/getalby/nostr-wallet-connect-next:latest'

[env]
  DATABASE_URI = '/data/nwc.db'
  WORK_DIR = '/data'

[[mounts]]
  source = 'nwc_data'
  destination = '/data'
  initial_size = '1'

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = false
  auto_start_machines = true
  min_machines_running = 0
  processes = ['app']

[[vm]]
  cpu_kind = 'shared'
  cpus = 1
  memory_mb = 256

Step 5: Launch the app

To launch the signer app, run

fly launch

Make sure you run this command in the directory where you store the config file.

The cli might ask you: Would you like to copy its configuration to the new app? Yes Do you want to tweak these settings before proceeding? No Create .dockerignore from 1 .gitignore files? No

If you see: Watch your deployment at https://fly.io/apps/....the app has been deployed successfully.

Step 6: Access the app

Log into your Fly.io account and you see the new app in the 'Apps' view.

Click on the app to access it on your browser.

Step 7: Setup the app

Select 'Breez' and add the invite code and API key provided by us. You need to choose the BIP39 Mnemonic based on 12-24 words from this list yourself.

At the same time a new bitcoin lightning node is deployed for you by Greenlight.

Step 8: Connect the app to your Alby account

Now you can connect your self-hosted signer application to your Alby Account and use one of many apps out there. Keep using your Alby lightning address and receive all payments in your own wallet.

Step 8a: Click on '+ Connect app' and create a connection string

Step 8b: Navigate to this page and add your newly created connection string

Congrats you successfully connected your own lightning node to your Alby Account. ๐Ÿš€

Last updated

Logo

Your bitcoin & nostr companion // from ๐Ÿ with ๐Ÿงก