From 9ef0cb09832fb1e17d11fc932a2c84e08d06b8d6 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Thu, 22 Oct 2026 16:00:42 +0200 Subject: [PATCH] Docker: pass DONATION_ADDRESS to the server, document it Co-Authored-By: Claude Sonnet 5.5 --- .env.example | 2 ++ DEPLOY.md | 16 ++++++++++++++++ docker-compose.yml | 2 ++ 3 files changed, 20 insertions(+) diff --git a/.env.example b/.env.example index f724e4b..dcad6af 100644 --- a/.env.example +++ b/.env.example @@ -4,6 +4,8 @@ PLM_RPC_USER=username PLM_RPC_PASSWORD=change-me #CACHE_MB=1200 #REPORT_SERVICES=tcp://electrum.example.com:50001 +# address for donations, sent to the clients; not checked by the server, so double-check it +#DONATION_ADDRESS= #ELECTRUMX_TCP_PORT=50001 # Data directory of the host: db/ (database) and ssl/ (certificate). Create it first: mkdir -p ~/.plm-electrumx/db ~/.plm-electrumx/ssl diff --git a/DEPLOY.md b/DEPLOY.md index b198547..197d219 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -173,6 +173,22 @@ Peer discovery is on by default (`PEER_DISCOVERY`, `PEER_ANNOUNCE`). `lib/coins. servers you know there (format: `'host s t'`, for example `'electrum.example.com s50002 t50001'`) and rebuild, or keep the server private with `PEER_DISCOVERY=off` / `PEER_DISCOVERY=self`. +## Donation address + +`DONATION_ADDRESS` in `.env` sets the address the server reports to its clients. It is optional and empty by default +(no address). + +```ini +DONATION_ADDRESS=plm1q...your address... +``` + +- Clients get it with the Electrum protocol call `server.donation_address`; wallets that support it show it to the user. +- A banner file (`BANNER_FILE`, see `docs/environment.rst`) can contain the placeholder `$DONATION_ADDRESS`, which is + replaced with this address. +- The server does **not** check the value, it only passes it on. Check it carefully (for example send a small test + amount) and use an address you are happy to make public, since it is sent to everyone who connects. +- After changing it, apply it with `docker compose up -d` (the container is recreated with the new value). + ## Data directory and first start Create the data directory as the user that runs Docker, before the first start (otherwise Docker creates it as root and diff --git a/docker-compose.yml b/docker-compose.yml index fa62995..9fd8161 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,6 +11,8 @@ services: CACHE_MB: ${CACHE_MB:-1200} # address announced to other servers and clients, if this server is public (tcp://host:50001) REPORT_SERVICES: ${REPORT_SERVICES:-} + # donation address sent to the clients (server.donation_address); empty: none + DONATION_ADDRESS: ${DONATION_ADDRESS:-} # SSL: on by default, with a self-signed certificate generated on the first start (docker-entrypoint.sh) SSL_ENABLED: ${SSL_ENABLED:-true} SSL_HOSTNAME: ${SSL_HOSTNAME:-electrumx}