massmux.org Labs

massmux.org Labs

Share this post

massmux.org Labs
massmux.org Labs
Setting up Boltz-client on your LND Lightning Node
Copy link
Facebook
Email
Notes
More
User's avatar
Discover more from massmux.org Labs
Tips, Snippets, Notes, Code, HowTos and more about Bitcoin, Lightning Network, Nostr and Financial Freedom. Subscribe Now for free!
Already have an account? Sign in

Setting up Boltz-client on your LND Lightning Node

Automagically receive Lightning transactions on your node from a Bitcoin On-chain payment

Max Musumeci's avatar
Max Musumeci
Jan 12, 2025
1

Share this post

massmux.org Labs
massmux.org Labs
Setting up Boltz-client on your LND Lightning Node
Copy link
Facebook
Email
Notes
More
2
1
Share

We want to run boltz-client using a LND Lightning node running on Voltage. Of course you can use a different installation. What you need is the macaroon and the tls.cert . You can get them from Voltage if you are using such a facility. In this example LND is running on Voltage and we are working on a Debian VPS where we are going to install the Boltz client.

Install the client

Create a directory let’s say boltz-client and put the following docker-compose.yml file


version: "3"
  
services:
    boltzd:
        container_name: boltz-client
        hostname: boltzd-client
        image: boltz/boltz-client:latest
        restart: on-failure
        volumes:
          - ${PWD}/.boltz:/root/.boltz
          - ${PWD}/.lnd:/root/.lnd

get the prebuilt image

docker pull boltz/boltz-client:latest

now create the dirs

mkdir .boltz
mkdir .lnd

Create the file .boltz/boltz.toml with the following content:


# Path to the log file
logfile = ""

# possible values: fatal, error, warn, info, debug, silly
loglevel = "info"

# possible values: "mainnet", "testnet" or "regtest"
network = "mainnet"

# you will have to set this to "cln" or "lnd" if you have configuration values for both
node = "lnd"

[BOLTZ]
# By default the daemon automatically connects to the official Boltz Backend for the network your node is on
# This value is used to overwrite that
 url = "https://api.boltz.exchange"

[DATABASE]
# Path to the SQLite database file
# path = "~/test.db"

[LND]
# Host of the gRPC interface of LND
# host = "127.0.0.1"
host = "yournode.m.voltageapp.io"


# Port of the gRPC interface of LND
 port = 10009

# Path to the data directory of LND
 datadir = "~/.lnd"

# Path to a macaroon file of LND.
# The daemon needs to have permission to read various endpoints, generate addresses and pay invoices
# Not required if datadir is specified
 macaroon = "~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon"

# Path to the TLS certificate of LND
# Not required if datadir is specified
 certificate = "~/.lnd/tls.cert"

[CLN]
# Host of the gRPC interface of CLN
# host = "127.0.0.1"

# Port of the gRPC interface of CLN
# port = 9736

# Path to the data directory of CLN
# datadir = "~/.lightning"

# Paths to TLS certificates and keys of CLN. Not required if datadir is specified
# rootcert = "~/.lightning/bitcoin/ca.pem"
# privatekey = "~/.lightning/bitcoin/client-key.pem"
# certchain =  "~/.lightning/bitcoin/client.pem"

[RPC]
# Host of the gRPC interface
host = "127.0.0.1"

# Port of the gRPC interface
port = 9002

# Whether the REST proxy for the gRPC interface should be disabled
restDisabled = false

# Host of the REST proxy
restHost = "127.0.0.1"

# Port of the REST proxy
restPort = 9003

# Path to the TLS cert for the gRPC and REST interface
tlsCert = ""

# Path to the TLS private key for the gRPC and REST interface
tlsKey = ""

# Whether the macaroon authentication for the gRPC and REST interface should be disabled
noMacaroons = false

# Path to the admin macaroon for the gRPC and REST interface
adminMacaroonPath = ""

# Path to the read-only macaroon for the gRPC and REST interface
readOnlyMacaroonPath = ""

The .lnd/ must contain macaroon and tls.cert coming from your node.

Now you can start your container by running:

docker-compose up -d

Thanks for reading massmux.org Labs! Subscribe for free to receive new posts

Create a Onchain to Lightning Swap

Now you can create a new swap from Onchain to Lightning. In this case the swap will receive an onchain transaction and simultaneously issue a corresponding Lightning invoice of the same amount less fees.

dev@lnbits00:~/boltz-client$ docker exec -ti boltz-client boltzcli createswap --any-amount btc
The fees for this service are:
  - Boltz fee: 0.1%
  - Network fee: 453 satoshis

? Do you want to continue? Yes
Please deposit between 25000 and 25000000 satoshis into bc1pwk4w6xxx in the next ~24.0 hours (block height 879106)

Swap ID: zoZXkKI2b2cy
Status: swap.created

Now you should send the amount you want to swap to the above displayed address from Boltz. When you do that you will get

Status: transaction.mempool
Transaction ID: 34b9fa3adb36d391d987c1e29655aa3e32f7617883d225adxxxx
Amount: 350778sat

Status: invoice.set
Invoice: lnbc3499750n1pncgzz3pp5y2gt9jgjul5463cku7trmrf6tcurw6y7asj8ugmhmchufdjxnshqdp92d6kymtpwf5kuefq2dmkzupqveex7mfqgf2yxcqzzsxqyz57csp5hmde9aylmmwknvvafls8rvy9uefejx46kk0nq99pemencjeru3nq9p4gqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqpqysgqremn6xuur8dmq5j2akygxd2v488lv525sjjm0r76f94cyvywjee88sq03l6qputm5apymnad2z6hmxmw64d8s69galsplqqqxxxxxxxxx

Status: transaction.confirmed

Status: invoice.pending

Status: invoice.paid

Status: transaction.claim.pending

Status: transaction.claimed
Paid 453 sat onchain fee and 350 sat boltz fee

Checking the swap will result:

dev@lnbits00:~/boltz-client$ docker exec -ti boltz-client boltzcli listswaps
Type       ID            From  To   State       Status               Send Amount  Boltz Fee  Network Fee  Created At            
SUBMARINE  zoZXkKI2b2cy  BTC   BTC  SUCCESSFUL  transaction.claimed  350778       350        453          2025-01-12T18:21:29Z 

Automagically, when the transaction gets confirmed on the timechain, you will get the incoming payment

💵 Received 0.00349975 for “Submarine Swap from BTC” via WCC-BOUNCER

directly on your node! The magic happened:

If you enjoyed this articol, please share it, like and comment. I am at disposal and interested in your opinion.

Share

DIDIER BOREL's avatar
Andrea's avatar
1 Like∙
1 Restack
1

Share this post

massmux.org Labs
massmux.org Labs
Setting up Boltz-client on your LND Lightning Node
Copy link
Facebook
Email
Notes
More
2
1
Share

Discussion about this post

User's avatar
DIDIER BOREL's avatar
DIDIER BOREL
Jan 20

Massimo is hard core. Not the type of stuff for your weekend bitcoiner ! The bitcoin takeover to reach the bitcoin standard!

Expand full comment
Like (1)
Reply
Share
1 reply by Max Musumeci
1 more comment...
Configuring Password store on Debian
A simple, clean, intuitive and Unix-centric command line based password manager!
Sep 29, 2024 • 
Max Musumeci
11

Share this post

massmux.org Labs
massmux.org Labs
Configuring Password store on Debian
Copy link
Facebook
Email
Notes
More
A dedicated workstation for Bitcoin
Useful resources for this successfully create this setup
Sep 12, 2024 • 
Max Musumeci
9

Share this post

massmux.org Labs
massmux.org Labs
A dedicated workstation for Bitcoin
Copy link
Facebook
Email
Notes
More
3
What's Sats.mobi ?
The Telegram Lightning Wallet with NFC Cards, POS, Scrub and more
Jul 19, 2024 • 
Max Musumeci
8

Share this post

massmux.org Labs
massmux.org Labs
What's Sats.mobi ?
Copy link
Facebook
Email
Notes
More
6

Ready for more?

© 2025 Massimo Musumeci
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Copy link
Facebook
Email
Notes
More

Create your profile

User's avatar

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.