️ LND Lightning Notification Client
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] a5090fef02
chore(deps): bump google.golang.org/grpc from 1.80.0 to 1.81.0 (#83)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.80.0 to 1.81.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.80.0...v1.81.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.81.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-04 21:42:04 +02:00
.github chore: update golangci 2026-04-26 18:08:04 +02:00
.vscode chore: replace gosec with golangci-lint 2025-11-09 18:19:57 +01:00
assets chore: update gopher 2025-10-27 18:00:18 +01:00
internal feat: add alias changed event 2026-02-01 20:54:28 +01:00
pkg feat: pending htlcs (#53) 2025-12-06 18:58:21 +01:00
.gitignore chore: update goreleaser 2025-10-05 16:41:17 +02:00
.golangci.yml fix: update golangci config 2025-11-12 20:52:01 +01:00
.goreleaser.dev.yml chore: update dev release 2025-10-27 18:39:24 +01:00
.goreleaser.yml chore: reduce binary size for linux builds 2025-10-24 10:36:26 +02:00
CHANGELOG.md docs: update changelog dates 2026-04-26 18:24:26 +02:00
config.example.yaml feat: add alias changed event 2026-02-01 20:54:28 +01:00
Dockerfile feat: improve sat formatting + add gosec 2025-10-05 12:26:01 +02:00
go.mod chore(deps): bump google.golang.org/grpc from 1.80.0 to 1.81.0 (#83) 2026-05-04 21:42:04 +02:00
go.sum chore(deps): bump google.golang.org/grpc from 1.80.0 to 1.81.0 (#83) 2026-05-04 21:42:04 +02:00
LICENSE chore: update license copyright date 2026-04-26 18:25:08 +02:00
main.go feat: add version to status message 2025-11-12 21:11:54 +01:00
README.md feat: add alias changed event 2026-02-01 20:54:28 +01:00
TEMPLATES.md feat: add alias changed event 2026-02-01 20:54:28 +01:00

LND Notify

A notification system for Lightning Network nodes that monitors and notifies about important events.

This project is heavily inspired by balanceofsatoshis, but with the aim of offering much greater customisation and a wider range of notification destinations.

CI License

Table of Contents

Features

  • Real-time monitoring of LND node events
  • Configurable notifications for:
    • Payment forward
    • Channel Opening (pending)
    • Channel Open
    • Channel Closing (pending)
    • Channel Close
    • Channel Backup (Multi) (File uploads only supported via ntfy at the moment)
    • Channel Status Change (Up/Down)
    • Settled Invoice
    • Failed HTLCs
    • Payment Succeeded
    • Rebalancing Succeeded
    • On-Chain Transactions
    • On-Chain Sync Lost
    • TLS Certificate Expiry
    • Wallet State Change
    • LND Health Status
    • LND Update Available
    • Channel Fee Change
    • HTLC Expiration Warning
    • Alias Changed
  • Multiple notification providers support via shoutrrr
  • Customizable message templates (see all template variables)
  • Customizable notification formatting (e.g., number formatting based on locale)
  • Notification batching with configurable intervals
  • Event filtering

Prerequisites

  • Running LND node with gRPC access
  • LND TLS certificate
  • LND readonly macaroon file
  • Basic Understanding of Linux, Docker and Docker Compose

Installation

🐳 Run with Docker

Docker-Compose

vim docker-compose.yml
services:
  lndnotify:
    image: ghcr.io/primexz/lndnotify:latest
    container_name: lndnotify
    volumes:
      - HOST_LND_PATH:/root/.lnd:ro
      - ./lndnotify/config.yaml:/data/config.yaml
    command: -config /data/config.yaml
    networks:
      - LND_NETWORK
    restart: always
  • Adjust HOST_LND_PATHand LND_NETWORK
  • Add config.yaml file to the lndnotify directory and adjust the configuration

💻 Run without Docker

git clone https://github.com/Primexz/lndnotify.git
cd lndnotify
go build .
./lndnotify

Configuration

Tip

The full configuration options can be found in the example config file.

Create a basic configuration file config.yaml:

# LND connection settings
lnd:
  host: "localhost"
  port: 10009
  tls_cert_path: "~/.lnd/tls.cert"
  macaroon_path: "~/.lnd/data/chain/bitcoin/mainnet/readonly.macaroon"

# Notification settings
notifications:
  providers:
    - url: "discord://token@channel?SplitLines=false"  # Discord webhook URL
      name: "main-discord"
  formatting:
    locale: "en-US"  # Language for number formatting (e.g. "en-US" for English, "de-DE" for German)

# Event settings
events:
  backup_events: true
  channel_events: true
  failed_htlc_events: true
  forward_events: true
  invoice_events: true
  keysend_events: true
  payment_events: true
  rebalancing_events: true
  status_events: true
  on_chain_events: true
  chain_sync_events: true
  channel_status_events: true
  tls_cert_expiry_events: true
  peer_events: false
  wallet_state_events: true
  health_event: true
  lnd_update_events: true
  channel_fee_events: true
  htlc_expiration_events: true
  alias_changed_events: true

# Event-specific configuration
event_config:
  failed_htlc_event:
    min_amount: 0
  forward_event:
    min_amount: 0
  invoice_event:
    min_amount: 0
  payment_event:
    min_amount: 0
  rebalancing_event:
    min_amount: 0
  on_chain_event:
    min_amount: 0
  chain_lost_event:
    threshold: 5m 
    warning_interval: 15m 
  channel_status_event:
    min_downtime: 10m


Notification Batching

LND Notify supports batching notifications to reduce the frequency of messages while ensuring important events are still delivered promptly. This is particularly useful for high-traffic nodes that might generate many notifications.

When batching is enabled, notifications are collected and sent together based on two criteria:

  • Time-based flushing: Notifications are sent after a configurable interval (default: 5 seconds)
  • Size-based flushing: Notifications are sent immediately when the batch reaches a maximum size (default: 10 notifications)

Configuration

notifications:
  batching:
    enabled: true  # Enable notification batching
    flush_interval: "5s"  # Send batched notifications every 5 seconds
    max_size: 10  # Send immediately when 10 notifications are queued

Notification Providers

The program uses shoutrrr for notifications, which supports various services:

  • Discord: discord://token@channel
  • Telegram: telegram://token@telegram?channels=channel-1
  • Slack: slack://token@channel
  • Generic Webhook: generic://example.com/webhook

To see the full list of supported providers, check out the official documentation.

Usage

lndnotify -config config.yaml

Development

Building from Source

git clone https://github.com/Primexz/lndnotify.git
cd lndnotify
go install ./cmd/lndnotify

Contributing

Note

This project uses Conventional Commits for commit messages. Please follow the guidelines when contributing.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License.