You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bumi 3c8a76a1c1
3 months ago
.github WIP: Docker container 10 months ago
examples Working example 2 years ago
files lowercase sats 3 months ago
icon Add icon to readme and favicon to generated code, fixes #28 9 months ago
ln Drop go rice and switch to go 1.17 7 months ago
lnurl Add Lightning Address support 12 months ago
.gitignore Igrnore tor data-dir 12 months ago
.lndonate Update .lndonate 12 months ago
Dockerfile Drop go rice and switch to go 1.17 7 months ago
LICENSE Create LICENSE 10 months ago Update 3 months ago
app.json Use full path 10 months ago
config.toml.example Simplify configuration and remove nesting 2 years ago
go.mod update dependencies 4 months ago
go.sum update dependencies 4 months ago
lnme-demo.gif Update demo 2 years ago
lnme.go go fmt 3 months ago

LnMe - your friendly payment page

LnMe is a personal Bitcoin Lightning payment page/widget and self-hosted Lightning Address server.


See it in action: - my lightning address:

LnMe focusses on simplicity and ease of deployment. It connects to an existing lightning node (currently LND is supported).

LnMe is one simple executable file that can be deployed anywhere with no dependencies. (on your own node or for example with one click on Heroku)



LnMe connects to your LND node, so a running LND node is required. LnMe can easily run next to LND on the same system or any other hosting provider.

There are no other dependencies. Simply download the binary and run it!

  1. Download the latest release
  2. Run lnme
  3. Done.

Build from source

  1. $ git clone && cd lnme
  2. $ go install
  3. $ go build
  4. $ ./lnme

Running in Docker

LnMe is now available in docker too. You can start LnMe like this: docker run -it --rm A list of existing tags is available here.


LND configuration

To connect to the lnd node the cert, macaroon and address of the lnd node has to be configured. LnMe uses the LND defaults.

  • lnd-address: Host and port of the LND gRPC service. default: localhost:10009
  • lnd-cert-path: Path to the LND TLS cert file. default: ~/.lnd/tls.cert
  • lnd-macaroon-path: Path to the LND macaroon file. default: ~/.lnd/data/chain/bitcoin/mainnet/invoice.macaroon (invoice.macaroon is recommended)

Instead of the path to the macaroon and cert files you can also provide the hex strings:

  • lnd-cert: LND TLS cert as HEX string.
  • lnd-macaroon: LND macaroon HEX string. (invoice.macaroon is recommended)

Other configuration

  • static-path: Path to a folder that you want to serve with LnMe (e.g. /home/bitcoin/lnme/website). Use this if you want to customize your website. default: disabled
  • disable-website: Disable the default LnMe website. Disable the website if you only want to embed the LnMe widget on your existing website.
  • disable-cors: Disable CORS headers. (default: false)
  • disable-ln-address: Disable Lightning Address handling.
  • port: Port to listen on. (default: 1323)
  • request-limit: Limit the allowed requests per second. (default: 5)

Depending on your deployment needs LnMe can be configured using the following options:

  1. Command line flags
  2. Environment variables
  3. Config TOML file


Command line flags:
$ lnme --help
$ lnme --port=4711
$ lnme --disable-website
TOML config file

See config.toml.example for an example file.

$ lnme --config=/path/to/config.toml
Environment variables

All environment variables must be prefixed by LNME_ use _ instead of -


LND Permissions

LnMe needs the following LND permissions:

  • Read/Write permission for invoices
  • Write permission for address (if you want to use the onchain option)

Use the LND macaroon bakery to create a new macaroon for LnMe.

To get the HEX versions of the files use xxd -plain e.g. xxd -plain invoice.macaroon | tr -d '\n'


LnMe can connect to your lightning node through Tor. You need to have Tor installed on your system and then simply provide your LND .onion address (don't forget to specify the port).


It is the easiest to run LnMe on the same node as LND. But you can run it anywhere as long as your LND node is accessible. Simply run the binary and make sure the PORT is accessible.

If you run LNMe on a different server you will need your LND address, the LND TLS certificate (HEX) and the macaroon (HEX). (see above)

When getting the HEX of the LND files use xxd -plain YOUR_FILE.cert | tr -d '\n'. For example for the TLS certificate, use xxd -plain tls.cert | tr -d '\n'.

The TLS cert is located in the lnd directory:

  • ~/umbrel/lnd/tls.cert on Umbrel
  • /mnt/hdd/lnd/tls.cert on Raspiblitz
  • Can also be located in ~/.lnd

You should find the macaroon files in the LND data dir (e.g. ~.lnd/data/chain/bitcoin/mainnet/) or see "LND Permissions" how to create a new one.


One click deployment with Heroku:

Deploy on Heroku

Here is a Video Demo of the Heroku deployment

In order to run Tor on Heroku, the Heroku deployment includes a non-official buildpack: This buildpack can be disabled and removed if not needed or desired, through the Settings tab on the Heroku dashboard, or by editing app.json and removing the buildpack.

Lastly, using the Heroku deployment, you can link the app to your own domain by following the directions here:

Deployment Notes

To run LnMe as systemd service have a look at the systemd service example config

I am running LnMe behind a reverse proxy using caddy which comes with fully-managed HTTPS via letsencrypt.

Example Caddyfile: {

$ caddy --config /etc/caddy/Caddyfile

Feature Usage

Lightning Address

The Lightning Address is an Internet Identifier that allows anyone to send you Bitcoin over the Lightning Network. Lightning Address builds on LNURL-pay LnMe handles the necessary requests for you.

For more information check out the website:

Your Lightning Address: {anything}@{your domain}


if you got the Lightning Address enabled you also get a LNURL-pay URL:

https://{your domain}/lnurlp/{anything}

If you need an bech32 encoded version you can use this online tool:

Customize your website

LnMe comes with a default website but you can easily configure and build your own using the the LnMe JavaScript widget or JSON API.

Take a look at the embedded default website for an example and use the --static-path option to configure LnMe to serve your static file.

  1. Create a new folder (e.g. /home/satoshi/my-ln-page)
  2. Create your index.html
  3. Run lnme: `lnme --static-path=/home/satoshi/my-ln-page

Usage with 21 Payment Widgets is a beautiful embeddable payment widget for any existing website.
You can use your LnMe instance with the widget by using your LnMe LNURL with the widget.

Use your bech32 encoded LNURL as Receiver in the widget configuration

JavaScript Widget integration

You can integrate the LnMe widget in your existing website.

1. Add the LnMe JavaScript files


2. Usage

To request a lightning payment simply call request() on a new LnMe({value: value, memo: memo}):

var lnme = new LnMe({ value: 1000, memo: "high5" });

Use it from a plain HTML link:

  onclick="javascript:new LnMe({ value: 1000, memo: 'high5' }).request();return false;"
  >Tip me</a
More advanced JS API:
let lnme = new LnMe({ value: 1000, memo: "high5" });

// get a new invoice and watch for a payment
// promise resolves if the invoice is settled
lnme.requestPayment().then((invoice) => {
  alert("YAY, thanks!");

// create a new invoice
lnme.addInvoice().then((invoice) => {

// periodically watch if an invoice is settled
lnme.watchPayment().then((invoice) => {
  alert("YAY, thanks!");


I wanted a simple way for people to send Lightning payments using my own lightning node. BTCPay Server is too big and hard to run for that and I do not need most of its features.


Use go run to run the service locally:

$ go run lnme.go --address= --cert=/home/bitcoin/lightning/tls.cert --macaroon=/home/bitcoin/lightning/invoice.macaroon


$ go build


Bug reports and pull requests are welcome on GitHub at


If you like this software and it is valuable for you, you can send sats to


Available as open source under the terms of the MIT License.