cln-plugins/donations
dependabot[bot] 79817b5b48 build(deps): bump the all-dependencies group across 2 directories with 3 updates
Updates the requirements on [cachetools](https://github.com/tkem/cachetools), [requests[socks]](https://github.com/psf/requests) and [requests](https://github.com/psf/requests) to permit the latest version.

Updates `cachetools` from 7.1.1 to 7.1.2
- [Changelog](https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst)
- [Commits](https://github.com/tkem/cachetools/compare/v7.1.1...v7.1.2)

Updates `requests[socks]` to 2.34.2
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.33.1...v2.34.2)

Updates `requests` from 2.33.1 to 2.34.2
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.33.1...v2.34.2)

---
updated-dependencies:
- dependency-name: cachetools
  dependency-version: 7.1.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: all-dependencies
- dependency-name: requests[socks]
  dependency-version: 2.34.2
  dependency-type: direct:production
  dependency-group: all-dependencies
- dependency-name: requests
  dependency-version: 2.34.2
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: all-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-25 11:16:40 +02:00
..
templates donations: actual integration test and several fixes/improvements 2026-01-01 16:41:06 +01:00
donations.py donations: update shebang dependency versions 2026-05-12 22:12:19 +02:00
LICENSE Fix donations plugin 2024-02-12 20:40:57 +00:00
pyproject.toml build(deps): bump the all-dependencies group across 2 directories with 3 updates 2026-05-25 11:16:40 +02:00
README.md python plugins: add note for systemd and uv 2025-12-22 15:27:54 +01:00
test_donations.py donations: actual integration test and several fixes/improvements 2026-01-01 16:41:06 +01:00
uv.lock build(deps): bump the all-dependencies group across 2 directories with 3 updates 2026-05-25 11:16:40 +02:00

Installation

You need uv to run this plugin like a binary. After uv is installed you can simply run

lightning-cli plugin start /path/to/donations.py

If you use systemd to start CLN, you must have uv in the PATH that systemd uses, which is likely different than the PATH from your shell. Most uv installation methods install uv into your user's home directory (~/.local/bin or ~/.cargo/bin), which systemd cannot access.

You can either:

Option 1: Install uv system-wide (recommended):

curl -LsSf https://astral.sh/uv/install.sh | sudo env UV_INSTALL_DIR="/usr/local/bin" sh

Option 2: Copy your existing user installation:

sudo cp "$(command -v uv)" /usr/local/bin/uv

Option 3: Configure your systemd service to use a custom PATH (see systemd documentation).

To verify uv is accessible to systemd:

sudo systemd-run --user --wait command -v uv

This should output /usr/local/bin/uv.

For general plugin installation instructions see the repos main README.md

Invoice Service (for Donations) plugin

This plugin enables c-lightning nodes to start one or several small webserver via the command line on specified port. The webserver is based on flask and exposes the invoice API call.

Therefor people can query for an invoice which they can use to pay.

By default the plugin will automatically start a webserver serving the donations page on port 8088.

The following command line options are registered by the plugin and can be used to customize its behavior:

Command line option Description
--donation-autostart Should the donation server start automatically? (default: true)
--donation-web-port Which port should the donation server listen to? (default: 8088)

Once the plugin is active you can run lightning-cli help donationserver to learn about the command line API:

Controls a donationserver with start/stop/restart/list on port.

A Simple HTTP Server is created that can serve a donation webpage and allow to issue invoices. The plugin takes one of the following three commands {start/stop/restart} as the first agument By default the plugin starts the server on port 8088. This can however be changed with the port argument.

This means after starting lightningd together with the plugin you can run: lightning-cli donationserver start and access the server at http://localhost:8088/donation (in case you run your lightning node at localhost)

About the plugin

You can see a demo of the plugin on the authors website:

This plugin was created and is maintained by Rene Pickhardt. Thus Rene Pickhardt is the copyright owner of this plugin. It shall serve as an educational resource on his Youtube channel.

The plugin is licensed like the rest of c-lightning with BSD-MIT license and comes without any warrenty.

If you like my work feel free to support me on patreon.