Browse Source

Integrate EPS (Electrum Personal Server) (#227)

* Integrate EPS (Electrum Personal Server)

After the ElectrumX integration in the last release, I thought that some people may prefer the Electrum Personal Server (EPS) approach, which can only serve specific pre-determined wallets (using XPUBS).  EPS cannot serve as a server for ad-hoc wallets with connections for many people, that ElectrumX delivers.  The upside pf EPS is that it is much lighter, and doesn't require txindex=1.

I will integrate it with this pull request, but it might take a while, as I have some busy weeks ahead of me.

* Update opt-add-electrum-ps.yml

* Update opt-add-electrum-ps.yml

* Update opt-add-electrum-ps.yml

* Update opt-add-electrum-ps.yml

* fix persistent data directory

* Break up monolithic bitcoind var

* fix bitcoind daemon name

* Update opt-add-electrum-ps.yml

* Update opt-add-electrum-ps.yml

* Update opt-add-electrum-ps.yml

* Fixed image name

* fixed bitcoind rpc login credentials

* Update opt-add-electrum-ps.yml

* Add $BTCPAY_EPS_XPUB

Add $BTCPAY_EPS_XPUB for Electrum Personal Server Integration

* Update opt-add-electrum-ps.yml

* Update opt-add-electrum-ps.yml

* Update README.md

* Update README.md

* Update build.sh

* Update opt-add-electrum-ps.yml

* Update README.md

Co-authored-by: peleion <github@peleion.com>
master
maltokyo 5 years ago
committed by GitHub
parent
commit
cde0756a54
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      README.md
  2. 1
      build.sh
  3. 23
      docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml

6
README.md

@ -119,6 +119,9 @@ Additionally, there are specific environment variables for some addons:
* `LIBREPATRON_HOST`: If libre patron is activated with [opt-add-librepatron](docker-compose-generator/docker-fragments/opt-add-librepatron.yml), the hostname of your libre patron website (eg. `librepatron.example.com`)
* `WOOCOMMERCE_HOST`: If woocommerce is activated with [opt-add-woocommerce](docker-compose-generator/docker-fragments/opt-add-woocommerce.yml), the hostname of your woocommerce website (eg. `store.example.com`)
* `BTCTRANSMUTER_HOST`: If btctransmuter is activated with [opt-add-btctransmuter](docker-compose-generator/docker-fragments/opt-add-btctransmuter.yml), the hostname of your btctransmuter website (eg. `transmuter.example.com`)
* `EPS_XPUB`: If Electrum Personal Server (EPS) is activated with [opt-add-electrum-ps](docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml), you must set the Extended Public Key (XPUB, YPUB or ZPUB) of the wallet you want to use, before first run of the EPS server. If you accidently start EPS without this, it will not work properly as the model of EPS is to monitor only specified wallets.
# Tooling
@ -159,7 +162,8 @@ Available `BTCPAYGEN_ADDITIONAL_FRAGMENTS` currently are:
* [opt-txindex](docker-compose-generator/docker-fragments/opt-txindex.yml), to enable txindex=1 in bitcoin.conf if you require txindexing for Bisq, DOJO, Esplora, etc.
* [opt-unsafe-expose](docker-compose-generator/docker-fragments/opt-unsafe-expose.yml), to unsafely expose bitcoind P2P port 8333 if you require P2P for Bisq, DOJO, Esplora, etc. WARNING: ONLY USE ON TRUSTED LAN OR WITH FIREWALL RULES WHITELISTING SPECIFIC HOSTS
* [opt-add-tor-relay](docker-compose-generator/docker-fragments/opt-add-tor-relay.yml), for a non-exit tor relay. Make sure to have ports 9001 and 9030 accessible externally. [Please read the legal implications of running a tor relay](https://www.eff.org/torchallenge/faq.html) and [what resources are used to operate the relay](https://trac.torproject.org/projects/tor/wiki/TorRelayGuide#RelayRequirements).
* [opt-add-electrumx](docker-compose-generator/docker-fragments/opt-add-electrumx.yml), to integrate a full ElectrumX server (from official source) with BTCPay, using the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet. You can also open port 50002 up to the internet on your router etc, to be part of the ElectrumX network, helping other Electrum wallet users to get connected. The bitcoin option -txindex is mandatory for ElectrumX, and this fragement will enable it on your BTCPay server automatically - NO need to use the fragment opt-txindex.yml.
* [opt-add-electrumx](docker-compose-generator/docker-fragments/opt-add-electrumx.yml), to integrate a full ElectrumX server (from official source) with BTCPay, using the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet. You can also open port 50002 up to the internet on your router etc, to be part of the ElectrumX network, helping other Electrum wallet users to get connected. The bitcoin option `-txindex` is mandatory for ElectrumX, and this fragement will enable it on your BTCPay server automatically - NO need to use the fragment opt-txindex.yml.
* [opt-add-electrum-ps](docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml), to integrate Electrum Personal Server (EPS) with BTCPay (EPS is a single-user alternative to the ElectrumX Server option above). EPS will also use the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet, for your own personal use (i.e. other users cannot use your server to verify transactions). Also, the bitcoin option `-txindex` is NOT mandatory for EPS, and it will run on a pruned node (unlike ElectrumX). You will need to add your XPUB/YPUB/ZPUB as environment variable `EPS_XPUB` before enabling EPS for the first time (see above section on environment variables, and see [full documentation](https://github.com/btcpayserver/btcpayserver-doc/blob/master/ElectrumPersonalServer.md) for details).
You can also create your own [custom fragments](#how-can-i-customize-the-generated-docker-compose-file).

1
build.sh

@ -32,6 +32,7 @@ docker run -v "$(pwd)/Generated:/app/Generated" \
-e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" \
-e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" \
-e "BTCPAY_HOST_SSHAUTHORIZEDKEYS=$BTCPAY_HOST_SSHAUTHORIZEDKEYS" \
-e "EPS_XPUB=$EPS_XPUB" \
--rm $BTCPAYGEN_DOCKER_IMAGE
if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then

23
docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml

@ -0,0 +1,23 @@
version: "3"
services:
bitcoind:
environment:
BITCOIN_EXTRA_ARGS: |
rpcauth=eps:3d1cff5ee81ddeb3ba94483150310e74$$4626aeb95b2a2b066eac8833c1ad936f65cf7492aa836ec8f173ff65ac428a0e
electrum_ps:
image: docker.io/peleion/eps-docker
restart: unless-stopped
ports:
- "50002:50002"
volumes:
- "electrum_ps_datadir:/srv"
environment:
- HOST=bitcoind
- PORT=43782
- RPC_USER=eps
- RPC_PASSWORD=cmhKyeLSco35KVhecK3blYcHFx73xrJ1fOQtjtmiKks
- XPUB=${EPS_XPUB}
volumes:
electrum_ps_datadir:
Loading…
Cancel
Save