├── Production ├── .gitignore ├── Production.png ├── postgres │ └── migrate-docker-entrypoint.sh ├── README.md └── docker-compose.btc.yml ├── Production-NoReverseProxy ├── .gitignore └── README.md ├── Generated ├── zcash.conf ├── .gitignore ├── pihole │ └── resolv.conf ├── torrc-relay.tmpl └── torrc.tmpl ├── docker-compose-generator ├── .editorconfig ├── docker-fragments │ ├── .gitignore │ ├── opt-lnd-grpc.yml │ ├── ethereum.yml │ ├── opt-lnd-keysend.yml │ ├── opt-monero-expose.yml │ ├── opt-lnd-autocompact.yml │ ├── opt-add-nolimits.yml │ ├── opt-expose-unsafe.yml │ ├── liquid-default-prune.yml │ ├── opt-mempoolfullrbf.yml │ ├── btcpayserver-noreverseproxy.yml │ ├── opt-lnd-wtclient.yml │ ├── opt-add-ndlc.yml │ ├── opt-lnd-watchtower.yml │ ├── opt-add-shopify.yml │ ├── opt-add-snapdrop.yml │ ├── opt-add-cloudflared.yml │ ├── opt-add-ltcmweb.yml │ ├── postgres.yml │ ├── btcpayserver-nginx.yml │ ├── opt-lnd-autopilot.yml │ ├── traefik.yml │ ├── opt-add-nostr-relay.yml │ ├── opt-add-electrumx.yml │ ├── nbxplorer.yml │ ├── opt-add-btcqbo.yml │ ├── opt-add-pihole.yml │ ├── opt-add-helipad.yml │ ├── phoenixd.yml │ ├── opt-txindex.yml │ ├── bgold.yml │ ├── viacoin.yml │ ├── opt-add-bwt.yml │ ├── opt-save-storage-xxs.yml │ ├── feathercoin.yml │ ├── bitcore.yml │ ├── zcash.yml │ ├── monacoin.yml │ ├── nginx-https.yml │ ├── opt-save-storage-s.yml │ ├── opt-save-storage-xs.yml │ ├── opt-add-fireflyiii.yml │ ├── opt-save-storage.yml │ ├── opt-add-configurator.yml │ ├── opt-more-memory.yml │ ├── trezarcoin.yml │ ├── bitcoinplus.yml │ ├── litecoin.yml │ ├── dash.yml │ ├── opt-add-zmq.yml │ ├── opt-add-teos.yml │ ├── opt-add-tor-relay.yml │ ├── opt-save-memory.yml │ ├── opt-add-woocommerce.yml │ ├── opt-add-tallycoin-connect.yml │ ├── opt-add-electrum-ps.yml │ ├── opt-add-torq.yml │ ├── nginx.yml │ ├── opt-add-lightning-terminal.yml │ ├── dogecoin.yml │ ├── groestlcoin.yml │ ├── opt-add-sphinxrelay.yml │ ├── opt-add-thunderhub.yml │ ├── opt-add-librepatron.yml │ ├── bitcoin.yml │ ├── bitcoinknots.yml │ ├── monero.yml │ ├── bgold-lnd.yml │ ├── opt-add-joinmarket.yml │ ├── opt-add-btctransmuter.yml │ ├── liquid.yml │ ├── opt-add-bluewallet-lndhub.yml │ ├── btcpayserver.yml │ ├── groestlcoin-eclair.yml │ ├── opt-add-chatwoot.yml │ ├── opt-add-mempool.yml │ ├── groestlcoin-clightning.yml │ ├── zcash-fullnode.yml │ ├── bitcoin-clightning.yml │ ├── bitcoin-eclair.yml │ ├── groestlcoin-lnd.yml │ └── opt-add-zammad.yml ├── src │ ├── YamlBuildException.cs │ ├── CryptoDefinition.cs │ ├── ConsoleUtils.cs │ ├── docker-compose-generator.csproj │ ├── Properties │ │ └── launchSettings.json │ ├── FragmentName.cs │ ├── BuildTimeVariableVisitor.cs │ ├── DockerComposition.cs │ └── Program.cs ├── Dockerfile ├── .dockerignore ├── docker-compose-generator.sln └── crypto-definitions.json ├── pihole.sh ├── bgold-lncli.ps1 ├── groestlcoin-lncli.ps1 ├── bgold-cli.ps1 ├── dash-cli.ps1 ├── bitcoin-cli.ps1 ├── bitcore-cli.ps1 ├── monero-wallet-cli.ps1 ├── viacoin-cli.ps1 ├── bgold-lncli.sh ├── bitcoin-lightning-cli.ps1 ├── bplus-cli.ps1 ├── dogecoin-cli.ps1 ├── litecoin-cli.ps1 ├── monacoin-cli.ps1 ├── trezarcoin-cli.ps1 ├── dash-cli.sh ├── elements-cli.ps1 ├── feathercoin-cli.ps1 ├── groestlcoin-cli.ps1 ├── groestlcoin-lncli.sh ├── litecoin-lightning-cli.ps1 ├── bgold-cli.sh ├── bitcoin-eclair-cli.ps1 ├── groestlcoin-lightning-cli.ps1 ├── bitcoin-cli.sh ├── bitcore-cli.sh ├── bplus-cli.sh ├── contrib ├── DockerFileBuildHelper │ ├── run.sh │ ├── update-repo.ps1 │ ├── update-repo.sh │ ├── DockerFileBuildHelper.csproj │ ├── Extensions.cs │ ├── DockerInfo.cs │ ├── README.md │ ├── StringBuilderEx.cs │ ├── DockerFile.cs │ └── Image.cs └── FastSync │ ├── sigs │ ├── rexh.utxo-sets.asc │ ├── bitkarrot.utxo-sets.asc │ ├── kiwi_.utxo-sets.asc │ ├── sbrooks24.utxo-sets.asc │ ├── baspeters.utxo-sets.asc │ ├── petzsch.utxo-sets.asc │ ├── brittkelly.utxo-sets.asc │ ├── jaonoctus.utxo-sets.asc │ ├── JUnderwood.utxo-sets.asc │ ├── NicolasDorier.utxo-sets.asc │ └── rockstardev.utxo-sets.asc │ ├── save-utxo-set-in-bitcoind.sh │ ├── utxo-sets │ └── save-utxo-set.sh ├── monero-wallet-cli.sh ├── viacoin-cli.sh ├── Traefik ├── Production.png ├── traefik.yml └── README.md ├── bitcoin-lncli.ps1 ├── dogecoin-cli.sh ├── groestlcoin-eclair-cli.ps1 ├── litecoin-cli.sh ├── litecoin-lncli.ps1 ├── monacoin-cli.sh ├── trezarcoin-cli.sh ├── bitcoin-eclair-cli.sh ├── elements-cli.sh ├── feathercoin-cli.sh ├── groestlcoin-cli.sh ├── litecoin-lightning-cli.sh ├── groestlcoin-lightning-cli.sh ├── phoenix-cli.ps1 ├── btcpay-clean.sh ├── docs ├── img │ ├── cloudflarexpose.png │ ├── Cloudflare-Always-Https.png │ ├── Cloudflare-Tunnel-Token.png │ ├── btcpayexposecloudflare1.jpg │ ├── btcpayexposecloudflare2.jpg │ ├── btcpayexposecloudflare3.jpg │ ├── btcpayexposecloudflare4.jpg │ ├── btcpayexposecloudflare5.jpg │ └── fastsync │ │ ├── btcpayfastsync1.jpg │ │ ├── btcpayfastsync2.jpg │ │ ├── btcpayfastsync3.jpg │ │ ├── btcpayfastsync4.jpg │ │ ├── btcpayfastsync5.jpg │ │ └── btcpayfastsync6.jpg ├── fireflyiii.md ├── lightning-terminal.md ├── chatwoot.md ├── tallycoin-connect.md ├── ndlc.md └── pihole.md ├── groestlcoin-eclair-cli.sh ├── bitcoin-lncli.sh ├── litecoin-lncli.sh ├── phoenix-cli.sh ├── publish-stable.ps1 ├── bitcoin-lightning-cli.sh ├── ndlc-cli.sh ├── .circleci ├── test-connectivity.sh ├── test-install.sh └── config.yml ├── btcpay-down.sh ├── btcpay-up.sh ├── btcpay-restart.sh ├── .gitattributes ├── Tools ├── lnd │ ├── lnd_delete_tls.sh │ └── lnd_recreate_volume.sh └── fireflyiii │ └── init.sh ├── changedomain.sh ├── LICENSE ├── btcpay-admin.sh ├── btcpay-setclocale.sh ├── btcpay-teardown.sh ├── btcpay-update.sh ├── jm.sh └── backup.sh /Production/.gitignore: -------------------------------------------------------------------------------- 1 | torrc.tmpl 2 | -------------------------------------------------------------------------------- /Production-NoReverseProxy/.gitignore: -------------------------------------------------------------------------------- 1 | torrc.tmpl 2 | -------------------------------------------------------------------------------- /Generated/zcash.conf: -------------------------------------------------------------------------------- 1 | rpcpassword=none 2 | rpcbind=zebra 3 | -------------------------------------------------------------------------------- /docker-compose-generator/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.cs] 2 | indent_style = tab -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/.gitignore: -------------------------------------------------------------------------------- 1 | *.custom.yml -------------------------------------------------------------------------------- /pihole.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec pihole pihole "$@" 4 | -------------------------------------------------------------------------------- /bgold-lncli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_lnd_bitcoingold lncli $args 2 | -------------------------------------------------------------------------------- /Generated/.gitignore: -------------------------------------------------------------------------------- 1 | *.yml 2 | nginx.tmpl 3 | *.json 4 | pull-images.sh 5 | -------------------------------------------------------------------------------- /Generated/pihole/resolv.conf: -------------------------------------------------------------------------------- 1 | nameserver 127.0.0.1 2 | nameserver 8.8.8.8 3 | -------------------------------------------------------------------------------- /groestlcoin-lncli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_lnd_groestlcoin lncli $args 2 | -------------------------------------------------------------------------------- /bgold-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_bgoldd bgold-cli -datadir="/data" $args 2 | -------------------------------------------------------------------------------- /dash-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_dashd dash-cli -datadir="/data" $args 2 | -------------------------------------------------------------------------------- /bitcoin-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_bitcoind bitcoin-cli -datadir="/data" $args 2 | -------------------------------------------------------------------------------- /bitcore-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_bitcored bitcore-cli -datadir="/data" $args 2 | -------------------------------------------------------------------------------- /monero-wallet-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec -it btcpayserver_monerod monero-wallet-cli $args 2 | -------------------------------------------------------------------------------- /viacoin-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_viacoind viacoin-cli -datadir="/data" $args 2 | -------------------------------------------------------------------------------- /bgold-lncli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_lnd_bitcoingold lncli "$@" 4 | -------------------------------------------------------------------------------- /bitcoin-lightning-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_clightning_bitcoin lightning-cli $args 2 | -------------------------------------------------------------------------------- /bplus-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_bitcoinplusd bitcoinplus-cli -datadir="/data" $args -------------------------------------------------------------------------------- /dogecoin-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_dogecoind dogecoin-cli -datadir="/data" $args 2 | -------------------------------------------------------------------------------- /litecoin-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_litecoind litecoin-cli -datadir="/data" $args 2 | -------------------------------------------------------------------------------- /monacoin-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_monacoind monacoin-cli -datadir="/data" $args 2 | -------------------------------------------------------------------------------- /trezarcoin-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_trezarcoind trezarcoin-cli -datadir="/data" $args -------------------------------------------------------------------------------- /dash-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_dashd dash-cli -datadir="/data" "$@" 4 | -------------------------------------------------------------------------------- /elements-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_elementsd_liquid elements-cli -datadir="/data" $args 2 | -------------------------------------------------------------------------------- /feathercoin-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_feathercoind feathercoin-cli -datadir="/data" $args -------------------------------------------------------------------------------- /groestlcoin-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_groestlcoind groestlcoin-cli -datadir="/data" $args -------------------------------------------------------------------------------- /groestlcoin-lncli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_lnd_groestlcoin lncli "$@" 4 | -------------------------------------------------------------------------------- /litecoin-lightning-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_clightning_litecoin lightning-cli $args 2 | -------------------------------------------------------------------------------- /bgold-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_bgoldd bgold-cli -datadir="/data" "$@" 4 | -------------------------------------------------------------------------------- /bitcoin-eclair-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_eclair_bitcoin eclair-cli -p DwubwWsoo3 "$@" $args 2 | -------------------------------------------------------------------------------- /groestlcoin-lightning-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_clightning_groestlcoin lightning-cli $args 2 | -------------------------------------------------------------------------------- /bitcoin-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_bitcoind bitcoin-cli -datadir="/data" "$@" 4 | -------------------------------------------------------------------------------- /bitcore-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_bitcored bitcore-cli -datadir="/data" "$@" 4 | -------------------------------------------------------------------------------- /bplus-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_bitcoinplusd bitcoinplus-cli -datadir="/data" "$@" -------------------------------------------------------------------------------- /contrib/DockerFileBuildHelper/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dotnet run --no-launch-profile -c Release -- $@ -------------------------------------------------------------------------------- /monero-wallet-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec -it btcpayserver_monerod monero-wallet-cli "$@" 4 | -------------------------------------------------------------------------------- /viacoin-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_viacoind viacoin-cli -datadir="/data" "$@" 4 | -------------------------------------------------------------------------------- /Traefik/Production.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/Traefik/Production.png -------------------------------------------------------------------------------- /bitcoin-lncli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon $args 2 | -------------------------------------------------------------------------------- /dogecoin-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_dogecoind dogecoin-cli -datadir="/data" "$@" 4 | -------------------------------------------------------------------------------- /groestlcoin-eclair-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_eclair_groestlcoin eclair-cli -p DwubwWsoo3 "$@" $args 2 | -------------------------------------------------------------------------------- /litecoin-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_litecoind litecoin-cli -datadir="/data" "$@" 4 | -------------------------------------------------------------------------------- /litecoin-lncli.ps1: -------------------------------------------------------------------------------- 1 | docker exec btcpayserver_lnd_litecoin lncli --macaroonpath /root/.lnd/admin.macaroon $args 2 | -------------------------------------------------------------------------------- /monacoin-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_monacoind monacoin-cli -datadir="/data" "$@" 4 | -------------------------------------------------------------------------------- /trezarcoin-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_trezarcoind trezarcoin-cli -datadir="/data" "$@" -------------------------------------------------------------------------------- /Production/Production.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/Production/Production.png -------------------------------------------------------------------------------- /bitcoin-eclair-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_eclair_bitcoin eclair-cli -p DwubwWsoo3 "$@" 4 | -------------------------------------------------------------------------------- /elements-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_elementsd_liquid elements-cli -datadir="/data" "$@" 4 | -------------------------------------------------------------------------------- /feathercoin-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_feathercoind feathercoin-cli -datadir="/data" "$@" -------------------------------------------------------------------------------- /groestlcoin-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_groestlcoind groestlcoin-cli -datadir="/data" "$@" -------------------------------------------------------------------------------- /litecoin-lightning-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_clightning_litecoin lightning-cli "$@" 4 | -------------------------------------------------------------------------------- /groestlcoin-lightning-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_clightning_groestlcoin lightning-cli "$@" 4 | -------------------------------------------------------------------------------- /phoenix-cli.ps1: -------------------------------------------------------------------------------- 1 | docker exec phoenixd /phoenix/phoenix-cli --http-password ca2e61de4dbab98a0c0ed9a8713ec95b "$@" $args 2 | -------------------------------------------------------------------------------- /btcpay-clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker image prune -af --filter "label!=org.btcpayserver.image=docker-compose-generator" -------------------------------------------------------------------------------- /docs/img/cloudflarexpose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/cloudflarexpose.png -------------------------------------------------------------------------------- /groestlcoin-eclair-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_eclair_groestlcoin eclair-cli -p DwubwWsoo3 "$@" 4 | -------------------------------------------------------------------------------- /bitcoin-lncli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon "$@" 4 | -------------------------------------------------------------------------------- /litecoin-lncli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_lnd_litecoin lncli --macaroonpath /root/.lnd/admin.macaroon "$@" 4 | -------------------------------------------------------------------------------- /phoenix-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec phoenixd /phoenix/phoenix-cli --http-password ca2e61de4dbab98a0c0ed9a8713ec95b "$@" 4 | -------------------------------------------------------------------------------- /publish-stable.ps1: -------------------------------------------------------------------------------- 1 | # Dev script for bumping the stable branch 2 | git checkout stable; git rebase master; git push; git checkout master -------------------------------------------------------------------------------- /contrib/DockerFileBuildHelper/update-repo.ps1: -------------------------------------------------------------------------------- 1 | dotnet run --no-launch-profile -c Release -- -o "../build-all-images.sh" -omd "../../README.md" -------------------------------------------------------------------------------- /docs/img/Cloudflare-Always-Https.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/Cloudflare-Always-Https.png -------------------------------------------------------------------------------- /docs/img/Cloudflare-Tunnel-Token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/Cloudflare-Tunnel-Token.png -------------------------------------------------------------------------------- /docs/img/btcpayexposecloudflare1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/btcpayexposecloudflare1.jpg -------------------------------------------------------------------------------- /docs/img/btcpayexposecloudflare2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/btcpayexposecloudflare2.jpg -------------------------------------------------------------------------------- /docs/img/btcpayexposecloudflare3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/btcpayexposecloudflare3.jpg -------------------------------------------------------------------------------- /docs/img/btcpayexposecloudflare4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/btcpayexposecloudflare4.jpg -------------------------------------------------------------------------------- /docs/img/btcpayexposecloudflare5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/btcpayexposecloudflare5.jpg -------------------------------------------------------------------------------- /docs/img/fastsync/btcpayfastsync1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/fastsync/btcpayfastsync1.jpg -------------------------------------------------------------------------------- /docs/img/fastsync/btcpayfastsync2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/fastsync/btcpayfastsync2.jpg -------------------------------------------------------------------------------- /docs/img/fastsync/btcpayfastsync3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/fastsync/btcpayfastsync3.jpg -------------------------------------------------------------------------------- /docs/img/fastsync/btcpayfastsync4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/fastsync/btcpayfastsync4.jpg -------------------------------------------------------------------------------- /docs/img/fastsync/btcpayfastsync5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/fastsync/btcpayfastsync5.jpg -------------------------------------------------------------------------------- /docs/img/fastsync/btcpayfastsync6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/HEAD/docs/img/fastsync/btcpayfastsync6.jpg -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-lnd-grpc.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | lnd_bitcoin: 5 | expose: 6 | - "10009" 7 | -------------------------------------------------------------------------------- /bitcoin-lightning-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | docker exec btcpayserver_clightning_bitcoin lightning-cli --rpc-file /root/.lightning/lightning-rpc "$@" 4 | -------------------------------------------------------------------------------- /contrib/DockerFileBuildHelper/update-repo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dotnet run --no-launch-profile -c Release -- -o "../build-all-images.sh" -omd "../../README.md" -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/ethereum.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | btcpayserver: 5 | environment: 6 | BTCPAY_CHAINS: "eth" 7 | -------------------------------------------------------------------------------- /ndlc-cli.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | pushd . > /dev/null 4 | cd "$(dirname "$BTCPAY_ENV_FILE")" 5 | docker-compose -f $BTCPAY_DOCKER_COMPOSE run --rm ndlc "$@" 6 | popd > /dev/null 7 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-lnd-keysend.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | lnd_bitcoin: 5 | environment: 6 | LND_EXTRA_ARGS: | 7 | accept-keysend=1 8 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-monero-expose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | monerod: 5 | ports: 6 | - "127.0.0.1:18081:18081" 7 | required: 8 | - "monero" 9 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-lnd-autocompact.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | lnd_bitcoin: 5 | environment: 6 | LND_EXTRA_ARGS: | 7 | db.bolt.auto-compact=true 8 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-nolimits.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bitcoind: 5 | environment: 6 | BITCOIN_EXTRA_ARGS: | 7 | datacarriersize=9999999 8 | minrelaytxfee=0 -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-expose-unsafe.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | # unsafely exposes bitcoind P2P port, for use on trusted LAN only 3 | 4 | services: 5 | bitcoind: 6 | ports: 7 | - "8333:39388" 8 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/liquid-default-prune.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | elementsd_liquid: 5 | environment: 6 | ELEMENTS_EXTRA_ARGS: | 7 | prune=5000 8 | trim_headers=1 9 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-mempoolfullrbf.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | # must not use opt-save-storage 3 | 4 | services: 5 | bitcoind: 6 | environment: 7 | BITCOIN_EXTRA_ARGS: | 8 | mempoolfullrbf=1 -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/btcpayserver-noreverseproxy.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | btcpayserver: 5 | ports: 6 | - "${NOREVERSEPROXY_HTTP_PORT:-80}:49392" 7 | 8 | exclusive: 9 | - proxy 10 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | lnd_bitcoin: 5 | environment: 6 | LND_EXTRA_ARGS: | 7 | wtclient.active=1 8 | wtclient.sweep-fee-rate=${LND_WTCLIENT_SWEEP_FEE:-10} 9 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-ndlc.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | ndlc: 4 | container_name: ndlci_cli 5 | image: nicolasdorier/ndlc-cli:1.0.1 6 | restart: 'no' 7 | volumes: 8 | - "ndlc_cli_datadir:/root/.ndlc" 9 | volumes: 10 | ndlc_cli_datadir: -------------------------------------------------------------------------------- /Generated/torrc-relay.tmpl: -------------------------------------------------------------------------------- 1 | ORPort 9001 2 | DirPort 9030 3 | ExitPolicy reject *:* 4 | CookieAuthentication 1 5 | 6 | Nickname {{ $.Env.TOR_RELAY_NICKNAME}} 7 | ContactInfo {{ $.Env.TOR_RELAY_EMAIL}} 8 | 9 | 10 | {{ if $.Env.ADDITIONAL_TORRC_CONFIG }} 11 | {{ $.Env.ADDITIONAL_TORRC_CONFIG}} 12 | {{ end }} -------------------------------------------------------------------------------- /.circleci/test-connectivity.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Trying to connect to btcpayserver..." 4 | while true; do 5 | if [ "$(curl -sL -w "%{http_code}\\n" "http://localhost/" -o /dev/null)" == "200" ]; then 6 | echo "Successfully contacted BTCPayServer" 7 | break 8 | fi 9 | sleep 1 10 | done -------------------------------------------------------------------------------- /docker-compose-generator/src/YamlBuildException.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DockerGenerator 6 | { 7 | public class YamlBuildException : Exception 8 | { 9 | public YamlBuildException(string message): base(message) 10 | { 11 | 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-lnd-watchtower.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | lnd_bitcoin: 5 | environment: 6 | LND_EXTRA_ARGS: | 7 | watchtower.active=true 8 | watchtower.listen=lnd_bitcoin:9911 9 | watchtower.listen=127.0.0.1:9911 10 | ports: 11 | - "9911:9911" 12 | -------------------------------------------------------------------------------- /btcpay-down.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$OSTYPE" == "darwin"* ]]; then 4 | # Mac OS 5 | BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh" 6 | 7 | else 8 | # Linux 9 | BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh" 10 | fi 11 | 12 | . "$BASH_PROFILE_SCRIPT" 13 | 14 | cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" 15 | . helpers.sh 16 | btcpay_down -------------------------------------------------------------------------------- /btcpay-up.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$OSTYPE" == "darwin"* ]]; then 4 | # Mac OS 5 | BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh" 6 | 7 | else 8 | # Linux 9 | BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh" 10 | fi 11 | 12 | . ${BASH_PROFILE_SCRIPT} 13 | 14 | cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" 15 | . helpers.sh 16 | btcpay_up 17 | -------------------------------------------------------------------------------- /btcpay-restart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [[ "$OSTYPE" == "darwin"* ]]; then 4 | # Mac OS 5 | BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh" 6 | 7 | else 8 | # Linux 9 | BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh" 10 | fi 11 | 12 | . ${BASH_PROFILE_SCRIPT} 13 | 14 | cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" 15 | . helpers.sh 16 | btcpay_restart 17 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-shopify.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | shopify-app-deployer: 4 | image: btcpayserver/shopify-app-deployer:1.5 5 | restart: unless-stopped 6 | init: true 7 | expose: 8 | - "5000" 9 | 10 | btcpayserver: 11 | environment: 12 | BTCPAY_SHOPIFY_PLUGIN_DEPLOYER: "http://shopify-app-deployer:5000/" 13 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-snapdrop.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | 5 | snapdrop: 6 | restart: unless-stopped 7 | image: btcpayserver/snapdrop:1.2 8 | container_name: snapdrop 9 | expose: 10 | - "8080" 11 | 12 | btcpayserver: 13 | environment: 14 | BTCPAY_EXTERNALSERVICES: "Snapdrop:${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/snapdrop;" -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-cloudflared.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | cloudflared: 5 | container_name: 'cloudflared-tunnel' 6 | image: btcpayserver/cloudflared:2024.8.2-4 7 | command: 'tunnel --no-autoupdate run --token ${CLOUDFLARE_TUNNEL_TOKEN}' 8 | restart: 'on-failure' 9 | environment: 10 | REAL_IP_HEADER: Cf-Connecting-Ip 11 | links: 12 | - nginx 13 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-ltcmweb.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | btcpayserver: 5 | environment: 6 | BTCPAY_LTC_MWEB_DAEMON_URI: http://mwebd:12345 7 | mwebd: 8 | restart: unless-stopped 9 | container_name: mwebd 10 | image: hectorchu1/mwebd 11 | volumes: 12 | - "mwebd_datadir:/data" 13 | volumes: 14 | mwebd_datadir: 15 | required: 16 | - "litecoin" 17 | -------------------------------------------------------------------------------- /docker-compose-generator/src/CryptoDefinition.cs: -------------------------------------------------------------------------------- 1 | namespace DockerGenerator 2 | { 3 | public class CryptoDefinition 4 | { 5 | public string Crypto { get; set; } 6 | public string CryptoFragment { get; set; } 7 | public string CLightningFragment { get; set; } 8 | public string LNDFragment { get; set; } 9 | public string EclairFragment { get; set; } 10 | public string PhoenixdFragment { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /contrib/DockerFileBuildHelper/DockerFileBuildHelper.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net8.0 6 | 8 7 | DockerFileBuildHelper.Program 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /docker-compose-generator/src/ConsoleUtils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DockerGenerator 6 | { 7 | public static class ConsoleUtils 8 | { 9 | public static void WriteLine(string message, ConsoleColor color) 10 | { 11 | var old = Console.ForegroundColor; 12 | Console.ForegroundColor = color; 13 | Console.WriteLine(message); 14 | Console.ForegroundColor = old; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/postgres.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | postgres: 5 | restart: unless-stopped 6 | container_name: generated_postgres_1 7 | shm_size: 256mb 8 | image: btcpayserver/postgres:13.18 9 | command: [ "-c", "random_page_cost=1.0", "-c", "shared_preload_libraries=pg_stat_statements" ] 10 | environment: 11 | POSTGRES_HOST_AUTH_METHOD: trust 12 | volumes: 13 | - "postgres_datadir:/var/lib/postgresql/data" 14 | 15 | volumes: 16 | postgres_datadir: 17 | -------------------------------------------------------------------------------- /contrib/DockerFileBuildHelper/Extensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using YamlDotNet.RepresentationModel; 5 | 6 | namespace DockerFileBuildHelper 7 | { 8 | public static class Extensions 9 | { 10 | public static YamlNode TryGet(this YamlNode node, string key) 11 | { 12 | try 13 | { 14 | return node[key]; 15 | } 16 | catch (KeyNotFoundException) { return null; } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/btcpayserver-nginx.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | 5 | btcpayserver: 6 | environment: 7 | # NGINX settings 8 | VIRTUAL_NETWORK: nginx-proxy 9 | VIRTUAL_PORT: 49392 10 | VIRTUAL_HOST: ${BTCPAY_HOST},${BTCPAY_ADDITIONAL_HOSTS} 11 | VIRTUAL_HOST_NAME: "btcpay" 12 | SSL_POLICY: Mozilla-Modern 13 | 14 | # Let's encrypt settings 15 | LETSENCRYPT_HOST: ${BTCPAY_HOST},${BTCPAY_ADDITIONAL_HOSTS} 16 | LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-} 17 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files you want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.c text 7 | *.h text 8 | 9 | # Declare files that will always have CRLF line endings on checkout. 10 | *.sln text eol=crlf 11 | 12 | # Declare files that will always have CRLF line endings on checkout. 13 | *.sh text eol=lf 14 | *.yml text eof=lf 15 | 16 | # Denote all files that are truly binary and should not be modified. 17 | *.png binary 18 | *.jpg binary -------------------------------------------------------------------------------- /docker-compose-generator/src/docker-compose-generator.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | 12 6 | net8.0 7 | $(TargetFrameworkOverride) 8 | DockerGenerator 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-lnd-autopilot.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | lnd_bitcoin: 5 | environment: 6 | LND_EXTRA_ARGS: | 7 | autopilot.active=1 8 | autopilot.maxchannels=5 9 | autopilot.allocation=0.6 10 | lnd_litecoin: 11 | environment: 12 | LND_EXTRA_ARGS: | 13 | autopilot.active=1 14 | autopilot.maxchannels=5 15 | autopilot.allocation=0.6 16 | lnd_bitcoingold: 17 | environment: 18 | LND_EXTRA_ARGS: | 19 | autopilot.active=1 20 | autopilot.maxchannels=5 21 | autopilot.allocation=0.6 22 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/traefik.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | traefik: 5 | restart: unless-stopped 6 | image: traefik:v2.6 7 | container_name: traefik 8 | ports: 9 | - "${REVERSEPROXY_HTTP_PORT:-80}:80" 10 | - "${REVERSEPROXY_HTTPS_PORT:-443}:443" 11 | - "8080:8080" # Dashboard, enable for debug only 12 | volumes: 13 | - "/var/run/docker.sock:/var/run/docker.sock" 14 | - "../Traefik/traefik.yml:/traefik.yml" 15 | - "traefik_data:/data" 16 | volumes: 17 | traefik_data: 18 | 19 | exclusive: 20 | - proxy 21 | required: 22 | - "traefik" 23 | -------------------------------------------------------------------------------- /Tools/lnd/lnd_delete_tls.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | read -p "This script will delete LND's TLS certificate, so that's it's recreated on restart. Please keep in mind that you'll need to update external connections to LND that depend on TLS cert. Type 'yes' to confirm you want to proceed`echo $'\n> '`" yn 6 | if [ $yn != "yes" ]; then 7 | exit 0 8 | fi 9 | 10 | docker exec btcpayserver_lnd_bitcoin rm -rf /root/.lnd/tls.cert 11 | docker exec btcpayserver_lnd_bitcoin rm -rf /root/.lnd/tls.key 12 | 13 | docker stop btcpayserver_lnd_bitcoin 14 | docker start btcpayserver_lnd_bitcoin 15 | 16 | echo "LND TLS certificate recreated" -------------------------------------------------------------------------------- /docker-compose-generator/src/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "profiles": { 3 | "docker-compose-generator": { 4 | "commandName": "Project", 5 | "commandLineArgs": "pregen", 6 | "environmentVariables": { 7 | "BTCPAY_HOST_SSHKEYFILE": "test.rsa", 8 | "BTCPAYGEN_LIGHTNING": "clightning", 9 | "BTCPAYGEN_ADDITIONAL_FRAGMENTS": "opt-save-storage", 10 | "BTCPAYGEN_CRYPTO4": "ftc", 11 | "BTCPAYGEN_CRYPTO3": "btg", 12 | "BTCPAYGEN_CRYPTO2": "ltc", 13 | "BTCPAYGEN_CRYPTO1": "btc", 14 | "BTCPAYGEN_REVERSEPROXY": "nginx" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-nostr-relay.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | nnostr-relay: 4 | restart: unless-stopped 5 | image: kukks/nnostr-relay:v0.0.23 6 | container_name: nnostr-relay 7 | environment: 8 | NOSTR_CONNECTIONSTRINGS__RelayDatabase: User ID=postgres;Host=postgres;Port=5432;Database=nnostr 9 | ASPNETCORE_URLS: "http://0.0.0.0:80" 10 | links: 11 | - postgres 12 | - btcpayserver 13 | volumes: 14 | - "nnostr_datadir:/datadir" 15 | btcpayserver: 16 | environment: 17 | BTCPAY_EXTERNALSERVICES: "Nostr Relay:nostr;" 18 | volumes: 19 | nnostr_datadir: 20 | -------------------------------------------------------------------------------- /Tools/fireflyiii/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | [[ $(docker exec $(docker ps -a -q -f "name=postgres_1") psql -U postgres -tc "SELECT 1 FROM pg_database WHERE datname = 'fireflyiii'") =~ "1" ]] || docker exec $(docker ps -a -q -f "name=postgres_1") psql -U postgres -c "CREATE DATABASE fireflyiii" 5 | docker exec generated_fireflyiii_1 php artisan migrate --seed 6 | docker exec generated_fireflyiii_1 php artisan firefly-iii:decrypt-all 7 | docker exec generated_fireflyiii_1 php artisan cache:clear 8 | docker exec generated_fireflyiii_1 php artisan firefly-iii:upgrade-database 9 | docker exec generated_fireflyiii_1 php artisan passport:install 10 | docker exec generated_fireflyiii_1 php artisan cache:clear 11 | exit 0 -------------------------------------------------------------------------------- /docker-compose-generator/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0.404-bookworm-slim AS builder 3 | WORKDIR /source 4 | COPY src/docker-compose-generator.csproj docker-compose-generator.csproj 5 | # Cache some dependencies 6 | RUN dotnet restore 7 | COPY src/. . 8 | RUN dotnet publish --output /app/ --configuration Release 9 | 10 | # 11 | FROM mcr.microsoft.com/dotnet/runtime:8.0.11-bookworm-slim 12 | LABEL org.btcpayserver.image=docker-compose-generator 13 | WORKDIR /datadir 14 | WORKDIR /app 15 | ENV APP_DATADIR=/datadir 16 | VOLUME /datadir 17 | 18 | ENV INSIDE_CONTAINER=1 19 | 20 | COPY --from=builder "/app" . 21 | 22 | ENTRYPOINT ["dotnet", "docker-compose-generator.dll"] 23 | -------------------------------------------------------------------------------- /Traefik/traefik.yml: -------------------------------------------------------------------------------- 1 | entryPoints: 2 | http: 3 | address: :80 4 | http: 5 | redirections: 6 | entrypoint: 7 | to: https 8 | scheme: https 9 | https: 10 | address: :443 11 | http: 12 | tls: 13 | certResolver: default 14 | 15 | providers: 16 | docker: 17 | exposedByDefault: false 18 | watch: true 19 | endpoint: unix:///var/run/docker.sock 20 | 21 | # Enable only for debug 22 | #api: 23 | # insecure: true 24 | # dashboard: true 25 | 26 | log: 27 | level: ERROR # or DEBUG, PANIC, FATAL, WARN, and INFO 28 | 29 | certificatesResolvers: 30 | default: 31 | acme: 32 | storage: /data/acme.json 33 | httpChallenge: 34 | entryPoint: http 35 | -------------------------------------------------------------------------------- /changedomain.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | . /etc/profile.d/btcpay-env.sh 4 | 5 | export NEW_HOST="$1" 6 | 7 | if [[ "$NEW_HOST" == https:* ]] || [[ "$NEW_HOST" == http:* ]]; then 8 | echo "The domain should not start by http: or https:" 9 | else 10 | export OLD_HOST=`cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p'` 11 | echo "Changing domain from \"$OLD_HOST\" to \"$NEW_HOST\"" 12 | 13 | export BTCPAY_HOST="$NEW_HOST" 14 | export ACME_CA_URI="production" 15 | [[ "$OLD_HOST" == "$REVERSEPROXY_DEFAULT_HOST" ]] && export REVERSEPROXY_DEFAULT_HOST="$NEW_HOST" 16 | pushd . > /dev/null 17 | # Modify environment file 18 | cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" 19 | . helpers.sh 20 | btcpay_update_docker_env 21 | btcpay_up 22 | popd > /dev/null 23 | fi -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-electrumx.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bitcoind: 5 | environment: 6 | BITCOIN_EXTRA_ARGS: | 7 | rpcauth=electrumx:7d8ee47c089e6072635f82b34796e878$$13649d99453ccdf78e85007286422599c00e6953289f41bf8e92961076ba14db 8 | electrumx: 9 | image: lukechilds/electrumx 10 | restart: unless-stopped 11 | expose: 12 | - "50001" 13 | ports: 14 | - "50002:50002" 15 | volumes: 16 | - "electrumx_datadir:/data" 17 | environment: 18 | - DAEMON_URL=electrumx:1VmSUVGBuLNWvZl0LExRDW0tvl6196-47RfXIzS384g=@bitcoind:43782 19 | - COIN=BitcoinSegwit 20 | volumes: 21 | electrumx_datadir: 22 | incompatible: 23 | - pruning 24 | required: 25 | - "opt-txindex" 26 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/nbxplorer.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | 5 | nbxplorer: 6 | restart: unless-stopped 7 | container_name: generated_nbxplorer_1 8 | image: nicolasdorier/nbxplorer:2.5.30-1 9 | expose: 10 | - "32838" 11 | environment: 12 | NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest} 13 | NBXPLORER_BIND: 0.0.0.0:32838 14 | NBXPLORER_TRIMEVENTS: 10000 15 | NBXPLORER_SIGNALFILESDIR: /datadir 16 | NBXPLORER_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Application Name=nbxplorer;MaxPoolSize=20;Database=nbxplorer${NBITCOIN_NETWORK:-regtest} 17 | links: 18 | - postgres 19 | volumes: 20 | - "nbxplorer_datadir:/datadir" 21 | 22 | volumes: 23 | nbxplorer_datadir: 24 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-btcqbo.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | btcqbo: 5 | image: jvandrew/btcqbo:0.3.36 6 | environment: 7 | REFRESH_MINS: 50 8 | REDIS_HOST: "redis" 9 | REDIS_URL: "redis://redis:6379/0" 10 | BTCPAY_HOST: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST} 11 | CALLBACK_URL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/btcqbo/qbologged 12 | expose: 13 | - "8001" 14 | links: 15 | - redis 16 | redis: 17 | image: redis:5.0.2-alpine 18 | expose: 19 | - "6379" 20 | volumes: 21 | - "redis_datadir:/data" 22 | btcpayserver: 23 | environment: 24 | BTCPAY_EXTERNALSERVICES: "Quickbooks Online Connector:btcqbo;" 25 | volumes: 26 | redis_datadir: 27 | -------------------------------------------------------------------------------- /.circleci/test-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | systemctl stop docker.socket 6 | apt-get remove docker-ce 7 | rm -rf /usr/bin/docker 8 | rm -rf /usr/local/bin/docker-compose 9 | 10 | cd ../.. 11 | 12 | [ -d btcpayserver-docker ] || mv project btcpayserver-docker 13 | 14 | cd btcpayserver-docker 15 | 16 | export BTCPAY_HOST="btcpay.local" 17 | export REVERSEPROXY_DEFAULT_HOST="btcpay.local" 18 | export NBITCOIN_NETWORK="mainnet" 19 | export BTCPAYGEN_CRYPTO1="btc" 20 | export BTCPAYGEN_CRYPTO2="ltc" 21 | export BTCPAYGEN_REVERSEPROXY="nginx" 22 | export BTCPAYGEN_LIGHTNING="clightning" 23 | source ./btcpay-setup.sh -i 24 | 25 | timeout 1m bash .circleci/test-connectivity.sh 26 | 27 | # Testing scripts are not crashing and installed 28 | btcpay-up.sh 29 | btcpay-down.sh 30 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-pihole.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | pihole: 4 | restart: unless-stopped 5 | container_name: pihole 6 | image: pihole/pihole:2025.03.0 7 | environment: 8 | FTLCONF_dns_reply_host_IPv4: "${PIHOLE_SERVERIP:-127.0.0.1}" 9 | VIRTUAL_HOST: pi.hole 10 | VIRTUAL_HOST_NAME: "pihole" 11 | FTLCONF_dns_listeningMode: 'all' 12 | expose: 13 | - "53" 14 | - "67" 15 | - "80" 16 | - "443" 17 | ports: 18 | - "53:53/tcp" 19 | - "53:53/udp" 20 | volumes: 21 | - "./pihole/resolv.conf:/etc/resolv.conf:ro" 22 | - "pihole_datadir:/etc/pihole" 23 | volumes: 24 | pihole_datadir: 25 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-helipad.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | helipad: 5 | container_name: helipad 6 | image: podcastindexorg/podcasting20-helipad:v0.1.10 7 | restart: unless-stopped 8 | user: "root" 9 | expose: 10 | - 2112 11 | volumes: 12 | - helipad_datadir:/data 13 | - lnd_bitcoin_datadir:/lnd:ro 14 | environment: 15 | LND_URL: "lnd_bitcoin:10009" 16 | LND_ADMINMACAROON: "/lnd/admin.macaroon" 17 | LND_TLSCERT: "/lnd/tls.cert" 18 | links: 19 | - lnd_bitcoin 20 | 21 | 22 | btcpayserver: 23 | environment: 24 | BTCPAY_EXTERNALSERVICES: "Podcast Index Helipad:${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/helipad;" 25 | 26 | volumes: 27 | helipad_datadir: 28 | 29 | required: 30 | - "bitcoin-lnd" 31 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/phoenixd.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | phoenixd: 5 | image: acinq/phoenixd:0.6.3 6 | container_name: phoenixd 7 | restart: unless-stopped 8 | networks: 9 | - default 10 | command: [ 11 | "--chain=${NBITCOIN_NETWORK:-regtest}", 12 | "--http-password=ca2e61de4dbab98a0c0ed9a8713ec95b" 13 | ] 14 | expose: 15 | - "9740" 16 | volumes: 17 | - "phoenixd_datadir:/phoenix/.phoenix" 18 | 19 | btcpayserver: 20 | environment: 21 | BTCPAY_BTCLIGHTNING: "type=phoenixd;server=http://phoenixd:9740;password=ca2e61de4dbab98a0c0ed9a8713ec95b" 22 | volumes: 23 | - "phoenixd_datadir:/etc/phoenix" 24 | links: 25 | - phoenixd 26 | 27 | volumes: 28 | phoenixd_datadir: 29 | 30 | exclusive: 31 | - lightning -------------------------------------------------------------------------------- /docs/fireflyiii.md: -------------------------------------------------------------------------------- 1 | # Firefly III support 2 | 3 | [Firefly III](https://www.firefly-iii.org/) is a self-hosted financial manager. 4 | It can help you keep track of expenses, income, budgets and everything in between. It supports credit cards, shared household accounts and savings accounts. It’s pretty fancy. You should use it to save and organise money. 5 | 6 | ## How to use 7 | 8 | 1. Connect as root to your server 9 | 2. Configure a domain's DNS to point to your server ip. e.g. `firefly.yourserver.org` 10 | 3. Add fireflyiii as an option to your docker deployment 11 | 12 | ```bash 13 | BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-add-fireflyiii" 14 | FIREFLY_HOST="firefly.yourserver.org" 15 | . btcpay-setup.sh -i 16 | . ./Tools/fireflyiii/init.sh 17 | ``` 18 | 19 | 4. Access Firefly III at `firefly.yourserver.org` and create your admin account. 20 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-txindex.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | # must not use opt-save-storage 3 | 4 | services: 5 | bitcoind: 6 | environment: 7 | BITCOIN_EXTRA_ARGS: | 8 | txindex=1 9 | bgoldd: 10 | environment: 11 | BITCOIN_EXTRA_ARGS: | 12 | txindex=1 13 | feathercoind: 14 | environment: 15 | BITCOIN_EXTRA_ARGS: | 16 | txindex=1 17 | groestlcoind: 18 | environment: 19 | BITCOIN_EXTRA_ARGS: | 20 | txindex=1 21 | litecoind: 22 | environment: 23 | BITCOIN_EXTRA_ARGS: | 24 | txindex=1 25 | viacoind: 26 | environment: 27 | BITCOIN_EXTRA_ARGS: | 28 | txindex=1 29 | monacoind: 30 | environment: 31 | BITCOIN_EXTRA_ARGS: | 32 | txindex=1 33 | nbxplorer: 34 | environment: 35 | NBXPLORER_BTCHASTXINDEX: 1 36 | incompatible: 37 | - pruning 38 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/bgold.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bgoldd: 5 | restart: unless-stopped 6 | container_name: btcpayserver_bgoldd 7 | image: kamigawabul/docker-bitcoingold:0.15.2 8 | environment: 9 | BITCOIN_EXTRA_ARGS: | 10 | rpcport=43782 11 | ${NBITCOIN_NETWORK:-regtest}=1 12 | port=39388 13 | whitelist=0.0.0.0/0 14 | expose: 15 | - "43782" 16 | - "39388" 17 | volumes: 18 | - "bgold_datadir:/data" 19 | nbxplorer: 20 | environment: 21 | NBXPLORER_CHAINS: "btg" 22 | NBXPLORER_BTGRPCURL: http://bgoldd:43782/ 23 | NBXPLORER_BTGNODEENDPOINT: bgoldd:39388 24 | volumes: 25 | - "bgold_datadir:/root/.bitcoingold" 26 | btcpayserver: 27 | environment: 28 | BTCPAY_CHAINS: "btg" 29 | BTCPAY_BTGEXPLORERURL: http://nbxplorer:32838/ 30 | volumes: 31 | bgold_datadir: 32 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/viacoin.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | viacoind: 5 | restart: unless-stopped 6 | container_name: btcpayserver_viacoind 7 | image: romanornr/docker-viacoin:0.15.2 8 | environment: 9 | BITCOIN_EXTRA_ARGS: | 10 | rpcport=43782 11 | ${NBITCOIN_NETWORK:-regtest}=1 12 | port=39388 13 | whitelist=0.0.0.0/0 14 | expose: 15 | - "43782" 16 | - "39388" 17 | volumes: 18 | - "viacoin_datadir:/data" 19 | nbxplorer: 20 | environment: 21 | NBXPLORER_CHAINS: "via" 22 | NBXPLORER_VIARPCURL: http://viacoind:43782/ 23 | NBXPLORER_VIANODEENDPOINT: viacoind:39388 24 | volumes: 25 | - "viacoin_datadir:/root/.viacoin" 26 | btcpayserver: 27 | environment: 28 | BTCPAY_CHAINS: "via" 29 | BTCPAY_VIAEXPLORERURL: http://nbxplorer:32838/ 30 | volumes: 31 | viacoin_datadir: 32 | -------------------------------------------------------------------------------- /contrib/DockerFileBuildHelper/DockerInfo.cs: -------------------------------------------------------------------------------- 1 | namespace DockerFileBuildHelper 2 | { 3 | public class DockerInfo 4 | { 5 | public string DockerFilePath { get; set; } 6 | public string DockerFilePathARM32v7 { get; set; } 7 | public string DockerFilePathARM64v8 { get; set; } 8 | public string DockerHubLink { get; set; } 9 | public string GitLink { get; set; } 10 | public string GitRef { get; set; } 11 | public bool SupportedByUs { get; set; } 12 | public bool Deprecated { get; set; } 13 | public Image Image { get; internal set; } 14 | public string RawLink { get; set; } 15 | public string GetGithubLinkOf(string path) 16 | { 17 | return RawLink ?? $"https://raw.githubusercontent.com/{GitLink.Substring("https://github.com/".Length)}{(GitRef is null ? string.Empty : ("/" + GitRef))}/{path}"; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-bwt.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bwt: 5 | image: shesek/bwt:0.2.2-electrum 6 | restart: unless-stopped 7 | expose: [ "50001" ] 8 | environment: 9 | NETWORK: $NBITCOIN_NETWORK 10 | BITCOIND_URL: http://bitcoind:43782/ 11 | BITCOIND_DIR: /etc/bitcoin 12 | ELECTRUM_ADDR: 0.0.0.0:50001 13 | volumes: 14 | - "bitcoin_datadir:/etc/bitcoin" 15 | - "nbxplorer_datadir:/root/.nbxplorer" 16 | entrypoint: [ "/bin/bash", "-c" ] 17 | command: 18 | - | 19 | while [ ! -f /root/.nbxplorer/btc_fully_synched ]; do sleep 0.5; done 20 | [ "$$NETWORK" == "mainnet" ] && export NETWORK=bitcoin 21 | # accept envirnoment variables with the BWT_ prefix (and strip it) 22 | exec env -S "$$(echo $$(env | grep ^BWT_ | sed "s/^BWT_//g"))" \ 23 | bwt ${BWT_ARGS:-} 24 | 25 | required: [ bitcoind ] 26 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-save-storage-xxs.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | # If you don't use Lightning Network, you want this 3 | # This save about 2 weeks worth of block 4 | 5 | services: 6 | bitcoind: 7 | environment: 8 | BITCOIN_EXTRA_ARGS: prune=5000 9 | bitcored: 10 | environment: 11 | BITCOIN_EXTRA_ARGS: prune=5000 12 | bgoldd: 13 | environment: 14 | BITCOIN_EXTRA_ARGS: prune=5000 15 | feathercoind: 16 | environment: 17 | BITCOIN_EXTRA_ARGS: prune=5000 18 | groestlcoind: 19 | environment: 20 | BITCOIN_EXTRA_ARGS: prune=5000 21 | litecoind: 22 | environment: 23 | BITCOIN_EXTRA_ARGS: prune=5000 24 | viacoind: 25 | environment: 26 | BITCOIN_EXTRA_ARGS: prune=5000 27 | dogecoind: 28 | environment: 29 | DOGECOIN_EXTRA_ARGS: prune=5000 30 | monacoind: 31 | environment: 32 | BITCOIN_EXTRA_ARGS: prune=5000 33 | exclusive: 34 | - pruning 35 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/feathercoin.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | feathercoind: 5 | restart: unless-stopped 6 | container_name: btcpayserver_feathercoind 7 | image: chekaz/docker-feathercoin:0.16.3 8 | environment: 9 | BITCOIN_EXTRA_ARGS: | 10 | rpcport=43782 11 | ${NBITCOIN_NETWORK:-regtest}=1 12 | port=39388 13 | whitelist=0.0.0.0/0 14 | expose: 15 | - "43782" 16 | - "39388" 17 | volumes: 18 | - "feathercoin_datadir:/data" 19 | nbxplorer: 20 | environment: 21 | NBXPLORER_CHAINS: "ftc" 22 | NBXPLORER_FTCRPCURL: http://feathercoind:43782/ 23 | NBXPLORER_FTCNODEENDPOINT: feathercoind:39388 24 | volumes: 25 | - "feathercoin_datadir:/root/.feathercoin" 26 | btcpayserver: 27 | environment: 28 | BTCPAY_CHAINS: "ftc" 29 | BTCPAY_FTCEXPLORERURL: http://nbxplorer:32838/ 30 | volumes: 31 | feathercoin_datadir: 32 | -------------------------------------------------------------------------------- /contrib/DockerFileBuildHelper/README.md: -------------------------------------------------------------------------------- 1 | # DockerFile build helper 2 | 3 | By default, when you use docker deployment, you are fetching pre-built docker images hosted on dockerhub. 4 | While this bring the advantage that deployment is fast and reliable, this also mean that you are ultimately trusting the owner of the docker images. 5 | This repository generate a script that you can use to build all images from the sources by yourself. 6 | 7 | ## How to use? 8 | 9 | Install [.NET Core SDK](https://dotnet.microsoft.com/download) and run: 10 | 11 | ```bash 12 | ./run.sh 13 | ``` 14 | 15 | Or using Docker: 16 | 17 | ``` 18 | docker run -it --rm -v `pwd`:/project -w /project/contrib/DockerFileBuildHelper mcr.microsoft.com/dotnet/sdk:2.1 ./run.sh 19 | ``` 20 | 21 | This will build a `build-all.sh` file which you can run locally. 22 | 23 | To update the README table and the `build-all-images.sh` script that's checked into git, replace `run.sh` with `update-repo.sh`. 24 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/bitcore.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bitcored: 5 | restart: unless-stopped 6 | container_name: btcpayserver_bitcored 7 | image: dalijolijo/docker-bitcore:0.90.9.10 8 | environment: 9 | BITCOIN_EXTRA_ARGS: | 10 | rpcport=43782 11 | ${NBITCOIN_NETWORK:-regtest}=1 12 | port=39388 13 | whitelist=0.0.0.0/0 14 | expose: 15 | - "43782" 16 | - "39388" 17 | volumes: 18 | - "bitcore_datadir:/data" 19 | nbxplorer: 20 | environment: 21 | NBXPLORER_CHAINS: "btx" 22 | NBXPLORER_BTXRPCURL: http://bitcored:43782/ 23 | NBXPLORER_BTXNODEENDPOINT: bitcored:39388 24 | links: 25 | - bitcored 26 | volumes: 27 | - "bitcore_datadir:/root/.bitcore" 28 | btcpayserver: 29 | environment: 30 | BTCPAY_BTXEXPLORERURL: http://nbxplorer:32838/ 31 | BTCPAY_CHAINS: "btx" 32 | 33 | volumes: 34 | bitcore_datadir: 35 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/zcash.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | zcash_walletd: 5 | restart: unless-stopped 6 | init: true 7 | image: hhanh00/zcash-walletd:1.1.5 8 | environment: 9 | NOTIFY_TX_URL: http://btcpayserver:49392/zcashlikedaemoncallback/tx?cryptoCode=zec&hash= 10 | ROCKET_DB_PATH: /data/zec-wallet2.db 11 | CONFIG_PATH: /data/config2.json 12 | LWD_URL: https://zec.rocks:443 13 | expose: 14 | - "8000" 15 | volumes: 16 | - "zec_wallet:/data" 17 | btcpayserver: 18 | environment: 19 | BTCPAY_ZEC_DAEMON_URI: http://zcash_walletd:8000 20 | BTCPAY_ZEC_WALLET_DAEMON_URI: http://zcash_walletd:8000 21 | BTCPAY_ZEC_WALLET_DAEMON_WALLETDIR: /root/zec_wallet 22 | BTCPAY_ZEC_WALLET_DAEMON_CONFIG_PATH: /root/zec_wallet/config2.json 23 | volumes: 24 | - "zec_wallet:/root/zec_wallet" 25 | volumes: 26 | zec_wallet: 27 | zec_data: 28 | 29 | exclusive: 30 | - zcash-node 31 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/monacoin.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | monacoind: 5 | restart: unless-stopped 6 | container_name: btcpayserver_monacoind 7 | image: wakiyamap/docker-monacoin:0.20.2 8 | environment: 9 | BITCOIN_EXTRA_ARGS: | 10 | ${NBITCOIN_NETWORK:-regtest}=1 11 | rpcport=43782 12 | rpcbind=0.0.0.0:43782 13 | rpcallowip=0.0.0.0/0 14 | port=39388 15 | whitelist=0.0.0.0/0 16 | expose: 17 | - "43782" 18 | - "39388" 19 | volumes: 20 | - "monacoin_datadir:/data" 21 | nbxplorer: 22 | environment: 23 | NBXPLORER_CHAINS: "mona" 24 | NBXPLORER_MONARPCURL: http://monacoind:43782/ 25 | NBXPLORER_MONANODEENDPOINT: monacoind:39388 26 | volumes: 27 | - "monacoin_datadir:/root/.monacoin" 28 | btcpayserver: 29 | environment: 30 | BTCPAY_MONAEXPLORERURL: http://nbxplorer:32838/ 31 | BTCPAY_CHAINS: "mona" 32 | 33 | volumes: 34 | monacoin_datadir: 35 | -------------------------------------------------------------------------------- /docs/lightning-terminal.md: -------------------------------------------------------------------------------- 1 | # Lightning Terminal (LiT) 2 | 3 | [Lightning Terminal](https://github.com/lightninglabs/lightning-terminal) (LiT) is a browser-based interface for managing channel liquidity. 4 | It integrates the Lightning Labs services Loop, Poold and Faraday all in one and offers a web UI to manage them. 5 | LND required. 6 | 7 | ## Installation 8 | 9 | To install the Lightning Terminal service, you need to set a password for the login. 10 | 11 | ```bash 12 | # Set password 13 | export LIT_PASSWD="sUpErSeCuRe" 14 | 15 | # Add fragment and run setup 16 | export BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-add-lightning-terminal" 17 | . btcpay-setup.sh -i 18 | ``` 19 | 20 | Afterwards you should see Lightning Terminal appear as a service on the Server Settings > Services page in BTCPay Server. 21 | 22 | ## Troubleshooting 23 | 24 | To see the logs of the Lightning Terminal service, you can run this command: 25 | 26 | ```bash 27 | docker logs -f generated_lnd_lit_1 28 | ``` 29 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/nginx-https.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | letsencrypt-nginx-proxy-companion: 5 | restart: unless-stopped 6 | image: btcpayserver/letsencrypt-nginx-proxy-companion:2.2.9-2 7 | container_name: letsencrypt-nginx-proxy-companion 8 | volumes: 9 | - "/var/run/docker.sock:/var/run/docker.sock:ro" 10 | - "nginx_conf:/etc/nginx/conf.d" 11 | - "nginx_vhost:/etc/nginx/vhost.d" 12 | - "nginx_html:/usr/share/nginx/html" 13 | - "nginx_certs:/etc/nginx/certs:rw" 14 | - "acme:/etc/acme.sh" 15 | environment: 16 | NGINX_DOCKER_GEN_CONTAINER: "nginx-gen" 17 | NGINX_PROXY_CONTAINER: "nginx" 18 | ACME_CA_URI: ${ACME_CA_URI:-production} 19 | links: 20 | - nginx-gen 21 | nginx: 22 | ports: 23 | - "${REVERSEPROXY_HTTPS_PORT:-443}:443" 24 | volumes: 25 | - "nginx_certs:/etc/nginx/certs:ro" 26 | 27 | nginx-gen: 28 | volumes: 29 | - "nginx_certs:/etc/nginx/certs:ro" 30 | volumes: 31 | acme: -------------------------------------------------------------------------------- /contrib/FastSync/sigs/rexh.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 5 | -----BEGIN PGP SIGNATURE----- 6 | 7 | wsFcBAEBCAAQBQJi0LpTCRA2RAJ4cwSb5gAAgMUQAKaeNu4NR8hydLnk4nCJlaSG 8 | zQOXXz5JYT0Sz32yG7jQxundNbOFNEKDh0ggKRUAubmkmYcOR23kXMCn1OAbHROM 9 | PDwvKSzed3M9J1FceSe4GW4zXecWKFuCOwnVXHIbz6AAp8raI5HbZLTLHX6x+VvP 10 | zkyWw2uG5DN0GUv9ytLQ2YVFaoBJK5w+Dw/UQwkzxo6dtc5dcwhsjNv/2PaPPZdn 11 | 0qG3vPUGyPhhAZN50YCjfq5LIgSv1vpUipyLRTAcH3a/XWHJxe1/P0tKENlOCa8j 12 | FBAe6kRsVwAeggKrrNOl9paRoAy+zjHqdRQdVe7H9f1L9Vc06EmorelH+9gXv8C+ 13 | LZ5A1nf4OSNcGfY+flkfYNO2QZ10q5ttjIgtvfwbkj96/KFSHXG698gwQkYR4BHd 14 | qtF8BTO3bnJa581/blwKjtUpwTEtTVUijlQbo2tSnACVF0MwtYxuqdEjLhk9RbR3 15 | QS9UcKuYq7tvNSZed8GtLDwIW5KMh0kgdoG9gTvD+BKm43YD+l2oFUYCJyZXCqlo 16 | lsiluXRax9fqevGiPVdRyRX5cl/nFVUhTJNmLg8Z5+Lm2D2ZfM84dPW0A/uVTS5b 17 | 7cYMmO1olt4qE1WeyOb5T2S8T5QGQ1/BBe0gyQJ9e7u7Pkdm72UhEwCYNeaTnoYR 18 | GXnDDB80H93DUFv4GUoo 19 | =YaXu 20 | -----END PGP SIGNATURE----- 21 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-save-storage-s.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | # If you don't use Lightning Network, use opt-save-store-xxs instead 3 | # This save about 6 months of block, your lightning node won't be able to see channel created 6 months since the time you start it. 4 | 5 | services: 6 | bitcoind: 7 | environment: 8 | BITCOIN_EXTRA_ARGS: prune=50000 9 | bitcored: 10 | environment: 11 | BITCOIN_EXTRA_ARGS: prune=50000 12 | bgoldd: 13 | environment: 14 | BITCOIN_EXTRA_ARGS: prune=50000 15 | feathercoind: 16 | environment: 17 | BITCOIN_EXTRA_ARGS: prune=50000 18 | groestlcoind: 19 | environment: 20 | BITCOIN_EXTRA_ARGS: prune=50000 21 | litecoind: 22 | environment: 23 | BITCOIN_EXTRA_ARGS: prune=50000 24 | viacoind: 25 | environment: 26 | BITCOIN_EXTRA_ARGS: prune=50000 27 | dogecoind: 28 | environment: 29 | DOGECOIN_EXTRA_ARGS: prune=50000 30 | monacoind: 31 | environment: 32 | BITCOIN_EXTRA_ARGS: prune=50000 33 | exclusive: 34 | - pruning 35 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-save-storage-xs.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | # If you don't use Lightning Network, use opt-save-store-xxs instead 3 | # This save about 3 months of block, your lightning node won't be able to see channel created 3 months since the time you start it. 4 | 5 | services: 6 | bitcoind: 7 | environment: 8 | BITCOIN_EXTRA_ARGS: prune=25000 9 | bitcored: 10 | environment: 11 | BITCOIN_EXTRA_ARGS: prune=25000 12 | bgoldd: 13 | environment: 14 | BITCOIN_EXTRA_ARGS: prune=25000 15 | feathercoind: 16 | environment: 17 | BITCOIN_EXTRA_ARGS: prune=25000 18 | groestlcoind: 19 | environment: 20 | BITCOIN_EXTRA_ARGS: prune=25000 21 | litecoind: 22 | environment: 23 | BITCOIN_EXTRA_ARGS: prune=25000 24 | viacoind: 25 | environment: 26 | BITCOIN_EXTRA_ARGS: prune=25000 27 | dogecoind: 28 | environment: 29 | DOGECOIN_EXTRA_ARGS: prune=25000 30 | monacoind: 31 | environment: 32 | BITCOIN_EXTRA_ARGS: prune=25000 33 | exclusive: 34 | - pruning 35 | -------------------------------------------------------------------------------- /contrib/FastSync/sigs/bitkarrot.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 5 | -----BEGIN PGP SIGNATURE----- 6 | 7 | wsFcBAEBCAAQBQJi8FGeCRAUIb9sTcmBfwAAJskQACzQmpio4/iDgmBlSYOgcsDn 8 | JXxFX7uiAxf4yr4ujLm7heDZAtA7P9p9ddVHCDsP/xp566RQXDqQQFSW8Jkh87JP 9 | 8NZi5lEZMO1dMVXNgucg5MqLQOgE0JhMtpexS0TB4jW1dqcSjUHGU16Aq29MJQzW 10 | aF6egNkicEnc3KX9M5YV43wG0jklFqwkjUyjR1kUJgLoCjG9yzVRlp83oUZtI189 11 | K9XWYLPB4YbO7+S0Gug7OEQFPf0yuQR6vcfJynA1ney0QwIv+2C4JJPd/r1h3g4R 12 | TFQsTmlLBsrseMnCfSRxPv6+tHg4r010lfryDYwSq/N6eaj1AYSKeTDe2xPSBuGt 13 | L8FwPDJCTdXMmSwTas5XYUiTNUkIxa8as/Hqs5+sIDcBxH6zEOfmYuxdoXpOuMpw 14 | du/4Wk05Rd+lU9neSLTQJOxu40/SxRsBemLGfhcWBmzbOFYaPWyVxbBiwvhAliwK 15 | x8vtbk6JFQxIZlgq/N0VJFgEj/jkEiwDxIA6zMXI34UF18lStIHIDzGkrnnUpKEb 16 | erZxOk/tGNAjx/+fahLkQuz6fBY3LARBGlE//vX0+PFbv6R7ILGo1OYERjmYAsjy 17 | Wh7AoVpDu9TBwAolx15oYWgDNI6MTd3VN4/cxVAHqjj4HFEu6BZiBrgFQTg85pnH 18 | bJOZw3b3FWTCz8kJMBpg 19 | =NP2V 20 | -----END PGP SIGNATURE----- 21 | -------------------------------------------------------------------------------- /contrib/FastSync/sigs/kiwi_.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 5 | -----BEGIN PGP SIGNATURE----- 6 | 7 | wsFcBAEBCAAQBQJi0edkCRADBN2I1mxLvwAAqAEQAKzMbFyV2Kn9SN3LP1IaQCcH 8 | cRVyD8sgb5AkHVzdX/ThvzIr/IkHXdt+cR1bIGQWDtLpo7uTsFlvXoU/hqCzI+lf 9 | 7EPaGLiGzUNav26d9LFbSqhuve62AkzCJuy63achwE/enOQWvwUZ4QR8sO/PtHDU 10 | h0ci/uWanLxwxrPuK5Zhy7/aQ3MLVgDlbH4suAriUn9LNrQqqVx+8Feiupxwwu7p 11 | 8bOstKztrNJvrJLRqo6/tCJBv4ktnR3dSi9kxNwxRVDTjvxic6M7DmVFae1H5wiq 12 | mHkssDxGbCnRHQPUBgr0N58vR+NA/u2c7ojkfkxJRKavHpAxhzYSXQmoqCE5rrKS 13 | +FMmpawDZJiPigId6cbhkoKgmlZLlqYaP41zFbEGpOggkFAQ8kzACbrSUHu7/NRO 14 | KMHMhw0G0BtFc9+PejTQtjLrhhXVO4cLU5NtrsS2ghL+hCaWNl1nkX5PdtMyGK3l 15 | HO8EmJe2G0sp8tzXfIGCSGNr0Nre7oIGvdU00HQ/W72HdsbB6DnlRBXHuLe9+n/7 16 | LLlRLhF/ESqQAZFRnpU8Ei+n8714wIV77vgUZsAZo6MjeydhzQtwoRSDKxc6WMD9 17 | vrVTLfHHVCBI9lTA72Ak+wUxEGkJgu/qljoavBnNn8At8vFxTaTw+hTBc8ZI5K1U 18 | Sg+bMiPa1T1D6QwqfG22 19 | =yu81 20 | -----END PGP SIGNATURE----- 21 | -------------------------------------------------------------------------------- /contrib/FastSync/sigs/sbrooks24.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 5 | -----BEGIN PGP SIGNATURE----- 6 | 7 | wsFcBAEBCAAQBQJi0ENyCRCP0DYsF/YIBQAAaGUQAIYlvPkZqUoQmv2Pv4YgjiRH 8 | dbXUbSzFP2azdDQhiQ4Ju8cMKCvQKXBg0DC3DgvK0yadhb0iaNsut+Qne1uMMfHl 9 | Mu9lmdgMZp86yl8ozp0MJHPEMNJcrP513N5xslMLRRKS+fnCwFa3e9i19NYWJa1N 10 | Cvc9uf16CJMnIQ4TijNJvgAxFz4Y1rJESob3AoZxSX2DglV08rhJhL5uk42szwTw 11 | 7GN2oM5BNEdAdqpor59NE0Erl1TsoHIPPzHDecPgXvA4KDa8jfBD722j8PBHWtDq 12 | 7XuUcx49MDZxKZzVWriDyuaut2CfKWginO9yc7jVJjXd/JXTSD/x0RR2i6Oh0oPV 13 | 03AEthcmDVsKddsNVWqfm4GeYnZw7EXNsMgOnnplz9UIAfSzZFLTfgrUWfGOsisQ 14 | ewSLb2KFoS5NNvmaYDurUz+raB/R1JG2/qMt07yU6rL6dBSbZD1IlaUsD2Jn9XEI 15 | wtmyI3JfA2+H5e9WUL79TOAFi08zpwf9h0U7CFGVqvTEAsWjb4KpARN1PYQ0omY+ 16 | 6cmEhiKnWSl/Sk+X4tcAbjUNEG3iEqbuB2UN1L1IIql3WqVOZclu+dfpFErSYvqW 17 | G7ni9H3peAZtgJ68N5dvhjkb33fcQ/hNjOaECOJq0LfAJspmyHR0eNmRjsrDWNVb 18 | u18meA/Q/Jzutg0BUpLl 19 | =NNl1 20 | -----END PGP SIGNATURE----- 21 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | fireflyiii: 5 | image: fireflyiii/core:latest 6 | container_name: generated_fireflyiii_1 7 | environment: 8 | - APP_ENV=local 9 | - APP_KEY=MustBe32DropDbAndChangeItIfUWant 10 | - APP_URL=http://${FIREFLY_HOST} 11 | - TRUSTED_PROXIES=** 12 | - DB_CONNECTION=pgsql 13 | - DB_HOST=postgres 14 | - DB_PORT=5432 15 | - DB_DATABASE=fireflyiii 16 | - DB_USERNAME=postgres 17 | - DB_PASSWORD= 18 | - VIRTUAL_HOST_NAME=fireflyiii 19 | - VIRTUAL_HOST=${FIREFLY_HOST} 20 | - VIRTUAL_PORT=8080 21 | - LETSENCRYPT_HOST=${FIREFLY_HOST} 22 | - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL:-} 23 | expose: 24 | - 8080 25 | volumes: 26 | - firefly_iii_export:/var/www/firefly-iii/storage/export 27 | - firefly_iii_upload:/var/www/firefly-iii/storage/upload 28 | depends_on: 29 | - postgres 30 | 31 | volumes: 32 | firefly_iii_export: 33 | firefly_iii_upload: -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-save-storage.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | # If you don't use Lightning Network, use opt-save-store-xxs instead 3 | # This save about 1 years of block, your lightning node won't be able to see channel created 1 year since the time you start it. 4 | 5 | services: 6 | bitcoind: 7 | environment: 8 | BITCOIN_EXTRA_ARGS: prune=100000 9 | bitcored: 10 | environment: 11 | BITCOIN_EXTRA_ARGS: prune=100000 12 | bgoldd: 13 | environment: 14 | BITCOIN_EXTRA_ARGS: prune=100000 15 | feathercoind: 16 | environment: 17 | BITCOIN_EXTRA_ARGS: prune=100000 18 | groestlcoind: 19 | environment: 20 | BITCOIN_EXTRA_ARGS: prune=100000 21 | litecoind: 22 | environment: 23 | BITCOIN_EXTRA_ARGS: prune=100000 24 | viacoind: 25 | environment: 26 | BITCOIN_EXTRA_ARGS: prune=100000 27 | dogecoind: 28 | environment: 29 | DOGECOIN_EXTRA_ARGS: prune=100000 30 | monacoind: 31 | environment: 32 | BITCOIN_EXTRA_ARGS: prune=100000 33 | exclusive: 34 | - pruning 35 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-configurator.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | configurator: 5 | restart: unless-stopped 6 | image: btcpayserver/btcpayserver-configurator:0.0.21 7 | environment: 8 | CONFIGURATOR_SSHCONNECTION: "root@host.docker.internal" 9 | CONFIGURATOR_SSHKEYFILE: ${BTCPAY_SSHKEYFILE} 10 | CONFIGURATOR_SSHAUTHORIZEDKEYS: ${BTCPAY_SSHAUTHORIZEDKEYS} 11 | CONFIGURATOR_ROOTPATH: "${BTCPAY_ROOTPATH:-/}configurator" 12 | CONFIGURATOR_COOKIEFILEPATH: "/usr/local/etc/configurator/cookie" 13 | volumes: 14 | - "configurator_passworddir:/usr/local/etc/configurator" 15 | - "$?:${BTCPAY_SSHAUTHORIZEDKEYS}" 16 | - "btcpay_datadir:/datadir" 17 | expose: 18 | - "80" 19 | btcpayserver: 20 | environment: 21 | BTCPAY_EXTERNALCONFIGURATOR: "cookiefilepath=/usr/local/etc/configurator/cookie;server=/configurator" 22 | volumes: 23 | - "configurator_passworddir:/usr/local/etc/configurator" 24 | 25 | volumes: 26 | configurator_passworddir: 27 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-more-memory.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | # If your machine has more than 1GB of memory dedicated for bitcoind, use this 3 | 4 | services: 5 | bitcoind: 6 | environment: 7 | BITCOIN_EXTRA_ARGS: | 8 | dbcache=1024 9 | bgoldd: 10 | environment: 11 | BITCOIN_EXTRA_ARGS: | 12 | dbcache=1024 13 | dogecoind: 14 | environment: 15 | DOGECOIN_EXTRA_ARGS: | 16 | dbcache=1024 17 | feathercoind: 18 | environment: 19 | BITCOIN_EXTRA_ARGS: | 20 | dbcache=1024 21 | groestlcoind: 22 | environment: 23 | BITCOIN_EXTRA_ARGS: | 24 | dbcache=1024 25 | litecoind: 26 | environment: 27 | BITCOIN_EXTRA_ARGS: | 28 | dbcache=1024 29 | viacoind: 30 | environment: 31 | BITCOIN_EXTRA_ARGS: | 32 | dbcache=1024 33 | monacoind: 34 | environment: 35 | BITCOIN_EXTRA_ARGS: | 36 | dbcache=1024 37 | elementsd_liquid: 38 | environment: 39 | ELEMENTS_EXTRA_ARGS: | 40 | dbcache=1024 41 | exclusive: 42 | - memory 43 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/trezarcoin.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | trezarcoind: 5 | restart: unless-stopped 6 | container_name: btcpayserver_trezarcoind 7 | image: chekaz/docker-trezarcoin:0.13.0 8 | environment: 9 | BITCOIN_EXTRA_ARGS: | 10 | rpcport=43782 11 | ${NBITCOIN_NETWORK:-regtest}=1 12 | port=39388 13 | whitelist=0.0.0.0/0 14 | expose: 15 | - "43782" 16 | - "39388" 17 | volumes: 18 | - "trezarcoin_datadir:/data" 19 | nbxplorer: 20 | environment: 21 | NBXPLORER_CHAINS: "tzc" 22 | NBXPLORER_TZCRPCURL: http://trezarcoind:43782/ 23 | NBXPLORER_TZCNODEENDPOINT: trezarcoind:39388 24 | NBXPLORER_TZCRPCUSER: "NBXPLORER_TZCRPCUSER" 25 | NBXPLORER_TZCRPCPASSWORD: "NBXPLORER_TZCRPCPASS" 26 | links: 27 | - trezarcoind 28 | volumes: 29 | - "trezarcoin_datadir:/root/.trezarcoin" 30 | btcpayserver: 31 | environment: 32 | BTCPAY_CHAINS: "tzc" 33 | BTCPAY_TZCEXPLORERURL: http://nbxplorer:32838/ 34 | volumes: 35 | trezarcoin_datadir: 36 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/bitcoinplus.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bitcoinplusd: 5 | restart: unless-stopped 6 | container_name: btcpayserver_bitcoinplusd 7 | image: chekaz/docker-bitcoinplus:2.7.0 8 | environment: 9 | BITCOIN_EXTRA_ARGS: | 10 | rpcport=43782 11 | ${NBITCOIN_NETWORK:-regtest}=1 12 | port=39388 13 | whitelist=0.0.0.0/0 14 | expose: 15 | - "43782" 16 | - "39388" 17 | volumes: 18 | - "bitcoinplus_datadir:/data" 19 | nbxplorer: 20 | environment: 21 | NBXPLORER_CHAINS: "xbc" 22 | NBXPLORER_XBCRPCURL: http://bitcoinplusd:43782/ 23 | NBXPLORER_XBCNODEENDPOINT: bitcoinplusd:39388 24 | NBXPLORER_XBCRPCUSER: "NBXPLORER_XBCRPCUSER" 25 | NBXPLORER_XBCRPCPASSWORD: "NBXPLORER_XBCRPCPASS" 26 | links: 27 | - bitcoinplusd 28 | volumes: 29 | - "bitcoinplus_datadir:/root/.bitcoinplus" 30 | btcpayserver: 31 | environment: 32 | BTCPAY_CHAINS: "xbc" 33 | BTCPAY_TZCEXPLORERURL: http://nbxplorer:32838/ 34 | volumes: 35 | bitcoinplus_datadir: 36 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/litecoin.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | litecoind: 5 | restart: unless-stopped 6 | container_name: btcpayserver_litecoind 7 | image: btcpayserver/litecoin:0.21.2.1-2 8 | environment: 9 | BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest} 10 | BITCOIN_WALLETDIR: "/walletdata" 11 | BITCOIN_EXTRA_ARGS: | 12 | rpcport=43782 13 | rpcbind=0.0.0.0:43782 14 | rpcallowip=0.0.0.0/0 15 | port=39388 16 | whitelist=0.0.0.0/0 17 | expose: 18 | - "43782" 19 | - "39388" 20 | volumes: 21 | - "litecoin_datadir:/data" 22 | - "litecoin_wallet_datadir:/walletdata" 23 | nbxplorer: 24 | environment: 25 | NBXPLORER_CHAINS: "ltc" 26 | NBXPLORER_LTCRPCURL: http://litecoind:43782/ 27 | NBXPLORER_LTCNODEENDPOINT: litecoind:39388 28 | volumes: 29 | - "litecoin_datadir:/root/.litecoin" 30 | btcpayserver: 31 | environment: 32 | BTCPAY_LTCEXPLORERURL: http://nbxplorer:32838/ 33 | BTCPAY_CHAINS: "ltc" 34 | 35 | volumes: 36 | litecoin_datadir: 37 | litecoin_wallet_datadir: -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 btcpayserver 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/dash.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | dashd: 5 | restart: unless-stopped 6 | container_name: btcpayserver_dashd 7 | image: btcpayserver/dash:22.0.0 8 | environment: 9 | # rpcport and rpcbind seems duplicates, but they are not 10 | # rpcport is using by some tooling to automatically get 11 | # the rpcport from the configuration file. Do not remove! 12 | BITCOIN_EXTRA_ARGS: | 13 | ${NBITCOIN_NETWORK:-regtest}=1 14 | port=9999 15 | rpcport=9998 16 | rpcbind=0.0.0.0:9998 17 | rpcallowip=0.0.0.0/0 18 | whitelist=0.0.0.0/0 19 | expose: 20 | - "9998" 21 | - "9999" 22 | volumes: 23 | - "dash_datadir:/data" 24 | nbxplorer: 25 | environment: 26 | NBXPLORER_CHAINS: "dash" 27 | NBXPLORER_DASHRPCURL: http://dashd:9998/ 28 | NBXPLORER_DASHNODEENDPOINT: dashd:9999 29 | volumes: 30 | - "dash_datadir:/root/.dashcore" 31 | btcpayserver: 32 | environment: 33 | BTCPAY_CHAINS: "dash" 34 | BTCPAY_DASHEXPLORERURL: http://nbxplorer:32838/ 35 | volumes: 36 | dash_datadir: 37 | -------------------------------------------------------------------------------- /Tools/lnd/lnd_recreate_volume.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | read -p "This script will delete and recreate your LND Bitcoin container. YOU CAN'T UNDO THIS OPERATION, ALL FUNDS THAT YOU CURRENTLY HAVE ON THIS LND WILL BE LOST! Type 'yes' to proceed only after you've transfered all your funds from this LND instance `echo $'\n> '`" yn 6 | if [ $yn != "yes" ]; then 7 | exit 0 8 | fi 9 | 10 | read -p "Only proceed if you've removed all the funds from LND Bitcoin container! This LND instance will be completely deleted and all data from it unrecoverable. Type 'yes' to proceed only if you are 100% sure `echo $'\n> '`" yn 11 | if [ $yn != "yes" ]; then 12 | exit 0 13 | fi 14 | 15 | read -p "OK, last chance to abort. Type 'yes' to continue! `echo $'\n> '`" yn 16 | if [ $yn != "yes" ]; then 17 | exit 0 18 | fi 19 | 20 | btcpay-down.sh 21 | 22 | docker volume rm --force generated_lnd_bitcoin_datadir 23 | 24 | # very old installations had production_lnd_bitcoin_datadir volume 25 | # https://github.com/btcpayserver/btcpayserver-docker/issues/272 26 | docker volume rm --force production_lnd_bitcoin_datadir 27 | 28 | btcpay-up.sh 29 | 30 | echo "LND container recreated" 31 | -------------------------------------------------------------------------------- /contrib/DockerFileBuildHelper/StringBuilderEx.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | 6 | namespace DockerFileBuildHelper 7 | { 8 | public class StringBuilderEx 9 | { 10 | StringBuilder _Builder = new StringBuilder(); 11 | public StringBuilderEx() 12 | { 13 | 14 | } 15 | 16 | public int Indent { get; set; } 17 | 18 | public void Append(string str) 19 | { 20 | _Builder.Append(GetIndents()); 21 | _Builder.Append(str); 22 | } 23 | 24 | private string GetIndents() 25 | { 26 | return new String(Enumerable.Range(0, Indent).Select(_ => '\t').ToArray()); 27 | } 28 | 29 | public void AppendLine(string str) 30 | { 31 | _Builder.Append(GetIndents()); 32 | _Builder.AppendLine(str); 33 | } 34 | 35 | public override string ToString() 36 | { 37 | return _Builder.ToString(); 38 | } 39 | 40 | internal void AppendLine() 41 | { 42 | _Builder.AppendLine(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /contrib/FastSync/sigs/baspeters.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 5 | 11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar 6 | -----BEGIN PGP SIGNATURE----- 7 | 8 | wsFcBAEBCAAQBQJjtfiOCRDXzmZXIX7aPwAADIsQANT3WzkTcTlKV/t74q+WFRpE 9 | 5QkPWuOUsHdQzg5eHYzwjrt3KHO12JmX0efWG0ACb1VrXQtAnJuX8Xzzf04kTELp 10 | UGJfpPdHuqxiW+X+VtHiJBe0EqbLOum11rHaYylWmVK6tK/cId4UIaQv3LWwfRCJ 11 | BGrR4ay6SJtQvNxDs8M0lQdzNohmJnpVxbnAVP78/cBRLoHHrNgzqp0QnDISllfS 12 | m6DvWRX88Ul+xwfaBek3CKR9Z7cV6LyrveLh13VEyPt1KO/sGP0acY/uTCEmUKfY 13 | k5AK75nY4Rk349iVvlptxt2vPOdi6hTfuUF253s51XmBxEJfWswZQtxqdqNMD0m9 14 | 7abxv5X+SpfnybpQQmiFj41CNWTmxCe/QPowGIejDwjBZtww5nhwI79uvSIbamwk 15 | tcClQG5agbqhDOB94tqxHZZVqG7OCanLKbuynmyp+4uiQ+zVnB623vP56PrUnNQv 16 | M0fhnNJBQFNARz3XU59/spTzmrso0lnKTGeKyMrN+/i84r+lHd6ynRe7gbVCj3Fh 17 | wshhCKZ64nAQkkJGsHgBxjbz9HZs3sPd5vatPl6sqyxtCyiVdpxN1WEk7FairTHx 18 | MkyiVHYkH7ip/fz0vdmf0DiQpTJ53plTVOQkxLpT0AGruzZtsgVjLYaU07hnzHLD 19 | L8cZ2glroURtcHgwbaPB 20 | =OVeC 21 | -----END PGP SIGNATURE----- 22 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-zmq.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bitcoind: 5 | environment: 6 | BITCOIN_EXTRA_ARGS: | 7 | zmqpubrawblock=tcp://0.0.0.0:28332 8 | zmqpubrawtx=tcp://0.0.0.0:28333 9 | zmqpubhashblock=tcp://0.0.0.0:28334 10 | expose: 11 | - "28332" 12 | - "28333" 13 | - "28334" 14 | litecoind: 15 | environment: 16 | BITCOIN_EXTRA_ARGS: | 17 | zmqpubrawblock=tcp://0.0.0.0:28332 18 | zmqpubrawtx=tcp://0.0.0.0:28333 19 | expose: 20 | - "28332" 21 | - "28333" 22 | groestlcoind: 23 | environment: 24 | BITCOIN_EXTRA_ARGS: | 25 | zmqpubrawtx=tcp://0.0.0.0:21441 26 | zmqpubrawblock=tcp://0.0.0.0:21441 27 | zmqpubrawtxlock=tcp://0.0.0.0:21441 28 | zmqpubhashblock=tcp://0.0.0.0:21441 29 | expose: 30 | - "21441" 31 | bgoldd: 32 | environment: 33 | BITCOIN_EXTRA_ARGS: | 34 | zmqpubrawtx=tcp://0.0.0.0:28332 35 | zmqpubrawblock=tcp://0.0.0.0:28332 36 | zmqpubrawtxlock=tcp://0.0.0.0:28332 37 | zmqpubhashblock=tcp://0.0.0.0:28332 38 | expose: 39 | - "28332" 40 | -------------------------------------------------------------------------------- /docs/chatwoot.md: -------------------------------------------------------------------------------- 1 | # Chatwoot support 2 | 3 | [Chatwoot](https://www.chatwoot.com/) is a customer support tool for instant messaging channels which can help businesses provide exceptional customer support. 4 | 5 | ## How to use 6 | 7 | 1. Connect as root to your server 8 | 2. create chatwoot configuration file where `{CONFIG DATA HERE}` is replaced by settings from [here](https://www.chatwoot.com/docs/environment-variables) 9 | 10 | ```bash 11 | sudo su - 12 | cd btcpayserver-docker 13 | cat >> Generated/chatwoot-config.env <} 13 | VIRTUAL_HOST: ${WOOCOMMERCE_HOST} 14 | VIRTUAL_HOST_NAME: "woocommerce" 15 | expose: 16 | - "80" 17 | links: 18 | - mariadb 19 | volumes: 20 | - "woocommerce_html:/var/www/html" 21 | 22 | mariadb: 23 | image: mariadb:10.11 24 | container_name : generated_mariadb_1 25 | environment: 26 | MYSQL_ROOT_PASSWORD: wordpressdb 27 | MYSQL_DATABASE: wordpress 28 | MYSQL_USER: wordpress 29 | MYSQL_PASSWORD: wordpress 30 | expose: 31 | - "3306" 32 | volumes: 33 | - "mariadb_datadir:/var/lib/mysql" 34 | 35 | btcpayserver: 36 | environment: 37 | BTCPAY_EXTERNALSERVICES: "WooCommerce:${BTCPAY_PROTOCOL:-https}://${WOOCOMMERCE_HOST};" 38 | volumes: 39 | woocommerce_html: 40 | mariadb_datadir: 41 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-tallycoin-connect.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | btcpayserver: 4 | environment: 5 | BTCPAY_EXTERNALSERVICES: "Tallycoin Connect:${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/tallycoin-connect/;" 6 | volumes: 7 | - "tallycoin_connect_datadir:/etc/tallycoin_connect_datadir" 8 | tallycoin_connect: 9 | image: "djbooth007/tallycoin_connect:v1.8.0" 10 | container_name: generated_tallycoin_connect_1 11 | restart: unless-stopped 12 | expose: 13 | - "8123" 14 | volumes: 15 | - "tallycoin_connect_datadir:/tallycoin_connect" 16 | - "lnd_bitcoin_datadir:/tallycoin_connect/lnd:ro" 17 | environment: 18 | PUBLIC_URL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/tallycoin-connect/ 19 | TALLYCOIN_APIKEY: "${TALLYCOIN_APIKEY}" 20 | TALLYCOIN_PASSWD: "${TALLYCOIN_PASSWD}" 21 | TALLYCOIN_PASSWD_CLEARTEXT: "${TALLYCOIN_PASSWD_CLEARTEXT}" 22 | LND_SOCKET: "lnd_bitcoin:10009" 23 | LND_MACAROON_PATH: /tallycoin_connect/lnd/admin.macaroon 24 | LND_TLSCERT_PATH: /tallycoin_connect/lnd/tls.cert 25 | PORT: 8123 26 | links: 27 | - lnd_bitcoin 28 | volumes: 29 | tallycoin_connect_datadir: 30 | required: 31 | - "bitcoin-lnd" 32 | - "opt-lnd-grpc" 33 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bitcoind: 5 | environment: 6 | BITCOIN_EXTRA_ARGS: | 7 | rpcauth=eps:3d1cff5ee81ddeb3ba94483150310e74$$4626aeb95b2a2b066eac8833c1ad936f65cf7492aa836ec8f173ff65ac428a0e 8 | electrum_ps: 9 | image: btcpayserver/eps:0.2.2 10 | restart: unless-stopped 11 | ports: 12 | - "50002:50002" 13 | environment: 14 | READY_FILE: /root/.nbxplorer/btc_fully_synched 15 | EPS_CONFIG: | 16 | [bitcoin-rpc] 17 | host = bitcoind 18 | port = 43782 19 | rpc_user = eps 20 | rpc_password = cmhKyeLSco35KVhecK3blYcHFx73xrJ1fOQtjtmiKks 21 | poll_interval_listening = 600 22 | poll_interval_connected = 5 23 | initial_import_count = 1000 24 | gap_limit = 25 25 | wallet_filename = 26 | [electrum-server] 27 | host = 0.0.0.0 28 | port = 50002 29 | broadcast_method = own-node 30 | ip_whitelist = * 31 | disable_mempool_fee_histogram = false 32 | [master-public-keys] 33 | wallet = ${EPS_XPUB} 34 | volumes: 35 | - "electrum_ps_datadir:/data" 36 | - "nbxplorer_datadir:/root/.nbxplorer" 37 | volumes: 38 | electrum_ps_datadir: 39 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-torq.yml: -------------------------------------------------------------------------------- 1 | version: "3.7" 2 | services: 3 | torq: 4 | user: "root:root" 5 | image: "lncapital/torq:0.20.3" 6 | restart: unless-stopped 7 | depends_on: 8 | - "torq_db" 9 | command: 10 | - --db.host 11 | - torq_db 12 | - --db.password 13 | - torq_db_password 14 | - --lnd.url 15 | - lnd_bitcoin:10009 16 | - --lnd.macaroon-path 17 | - /lnd/admin.macaroon 18 | - --lnd.tls-path 19 | - /lnd/tls.cert 20 | - --torq.cookie-path 21 | - /data/.cookie 22 | - start 23 | volumes: 24 | - "lnd_bitcoin_datadir:/lnd:ro" 25 | - "lnd_bitcoin_torq_datadir:/data" 26 | links: 27 | - lnd_bitcoin 28 | torq_db: 29 | image: "timescale/timescaledb:latest-pg14" 30 | environment: 31 | POSTGRES_PASSWORD: torq_db_password 32 | volumes: 33 | - torq_datadir:/var/lib/postgresql/data 34 | 35 | btcpayserver: 36 | environment: 37 | BTCPAY_BTCEXTERNALTORQ: "server=/torq/cookie-login;cookiefile=/etc/lnd_bitcoin_torq/.cookie" 38 | volumes: 39 | - "lnd_bitcoin_torq_datadir:/etc/lnd_bitcoin_torq" 40 | 41 | volumes: 42 | torq_datadir: 43 | lnd_bitcoin_torq_datadir: 44 | required: 45 | - "bitcoin-lnd" 46 | - "opt-lnd-grpc" 47 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/nginx.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | nginx: 5 | restart: unless-stopped 6 | image: nginx:1.25.3-bookworm 7 | container_name: nginx 8 | ports: 9 | - "${REVERSEPROXY_HTTP_PORT:-80}:80" 10 | volumes: 11 | - "nginx_conf:/etc/nginx/conf.d" 12 | - "nginx_vhost:/etc/nginx/vhost.d" 13 | - "nginx_html:/usr/share/nginx/html" 14 | nginx-gen: 15 | restart: unless-stopped 16 | image: btcpayserver/docker-gen:0.10.7 17 | container_name: nginx-gen 18 | environment: 19 | DEFAULT_HOST: ${REVERSEPROXY_DEFAULT_HOST:-none} 20 | volumes: 21 | - "/var/run/docker.sock:/tmp/docker.sock:ro" 22 | - "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro" 23 | - "nginx_conf:/etc/nginx/conf.d" 24 | - "nginx_vhost:/etc/nginx/vhost.d" 25 | - "nginx_html:/usr/share/nginx/html" 26 | entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf 27 | links: 28 | - btcpayserver 29 | - nginx 30 | volumes: 31 | nginx_conf: 32 | nginx_vhost: 33 | nginx_html: 34 | nginx_certs: 35 | 36 | exclusive: 37 | - proxy 38 | required: 39 | - "btcpayserver-nginx" 40 | recommended: 41 | - "nginx-https" 42 | -------------------------------------------------------------------------------- /Traefik/README.md: -------------------------------------------------------------------------------- 1 | # How to use docker-compose with Traefik 2 | 3 | Traefik is a modern reverse proxy aimed towards applications running through container orchestrators. 4 | 5 | Some of the benefits of using Traefik over NGinx are: 6 | 7 | - Real-time configuration changes - no need to reload the proxy 8 | - Auto discovery and configuration of services through a vast amount of container orchestrators. 9 | - Built-in official support for Let's Encrypt SSL with certificate auto-renewal 10 | - Supports path-based routing without need to [hard-code it in global config](../Production/nginx.tmpl). 11 | 12 | ## Traefik Specific Environment Variables 13 | 14 | - `BTCPAYGEN_REVERSEPROXY` to `traefik`. 15 | - `LETSENCRYPT_EMAIL`: Optional, The email Let's Encrypt will use to notify you about certificate expiration. 16 | - `BTCPAYGEN_ADDITIONAL_FRAGMENTS`: Add `traefik` 17 | - `BTCPAY_ADDITIONAL_HOSTS`: Traefik can not accept list of hosts. Add additional hosts in a new file named e.g. `btcpayserver-traefic.custom.yml`: 18 | ``` 19 | version: "3" 20 | services: 21 | btcpayserver: 22 | labels: 23 | traefik.http.routers.btcpayserver2.rule: Host(`additional.example.com`) 24 | traefik.http.routers.btcpayserver3.rule: Host(`another-additional.example.com`) 25 | ``` 26 | 27 | ![Architecture](Production.png) 28 | -------------------------------------------------------------------------------- /btcpay-admin.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | query() 3 | { 4 | docker exec $(docker ps -a -q -f "name=postgres_1") psql -U postgres -d btcpayservermainnet -c "$*" 5 | } 6 | 7 | case "$1" in 8 | disable-multifactor) 9 | query "DELETE FROM \"U2FDevices\" WHERE \"ApplicationUserId\" = (SELECT \"Id\" FROM \"AspNetUsers\" WHERE upper('$2') = \"NormalizedEmail\")" 10 | query "DELETE FROM \"Fido2Credentials\" WHERE \"ApplicationUserId\" = (SELECT \"Id\" FROM \"AspNetUsers\" WHERE upper('$2') = \"NormalizedEmail\")" 11 | query "UPDATE public.\"AspNetUsers\" SET \"TwoFactorEnabled\"=false WHERE upper('$2') = \"NormalizedEmail\"" 12 | ;; 13 | set-user-admin) 14 | query "INSERT INTO \"AspNetUserRoles\" Values ( (SELECT \"Id\" FROM \"AspNetUsers\" WHERE upper('$2') = \"NormalizedEmail\"), (SELECT \"Id\" FROM \"AspNetRoles\" WHERE \"NormalizedName\"='SERVERADMIN'))" 15 | ;; 16 | reset-server-policy) 17 | query "DELETE FROM \"Settings\" WHERE \"Id\" = 'BTCPayServer.Services.PoliciesSettings'" 18 | ;; 19 | *) 20 | echo "Usage: $0 [command]" 21 | echo 22 | echo "Commands:" 23 | echo " disable-multifactor " 24 | echo " set-user-admin " 25 | echo " reset-server-policy" 26 | esac 27 | 28 | exit 0 29 | -------------------------------------------------------------------------------- /docs/tallycoin-connect.md: -------------------------------------------------------------------------------- 1 | # Tallycoin Connect 2 | 3 | Set up [Tallycoin Connect](https://github.com/djbooth007/tallycoin_connect) on your BTCPay Server instance to allow for the retrieval of Lightning invoices via [Tallycoin](https://tallyco.in/). 4 | LND required. 5 | 6 | ## Installation 7 | 8 | To install the Tallycoin Connect service, you need to set your Tallycoin API key and a password first. 9 | The password is optional, but as the service will be publicly available, you are strongly advised to require a secure password for the login. 10 | 11 | You can either set `TALLYCOIN_PASSWD_CLEARTEXT` (plain text) or `TALLYCOIN_PASSWD`, which must be a sha256 hash of your login password. 12 | 13 | ```bash 14 | # Set API key and password 15 | export TALLYCOIN_APIKEY="my-tallycoin-api-key" 16 | export TALLYCOIN_PASSWD_CLEARTEXT="sUpErSeCuRe" 17 | 18 | # Add fragment and run setup 19 | BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-add-tallycoin-connect" 20 | . btcpay-setup.sh -i 21 | ``` 22 | 23 | Afterwards you should see Tallycoin Connect appear as a service on the Server Settings > Services page in BTCPay Server. 24 | 25 | ## Troubleshooting 26 | 27 | To see the logs of the Tallycoin Connect service, you can run this command: 28 | 29 | ```bash 30 | docker logs -f generated_tallycoin_connect_1 31 | ``` 32 | -------------------------------------------------------------------------------- /docker-compose-generator/src/FragmentName.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace DockerGenerator 6 | { 7 | public class FragmentName 8 | { 9 | public FragmentName(string fragmentName) 10 | { 11 | if (fragmentName == null) 12 | throw new ArgumentNullException(nameof(fragmentName)); 13 | Name = fragmentName.Trim().ToLowerInvariant(); 14 | if (Name.EndsWith(".yml", StringComparison.OrdinalIgnoreCase)) 15 | Name = Name.Substring(0, Name.Length - 4); 16 | } 17 | public string Name { get; } 18 | 19 | public override bool Equals(object obj) 20 | { 21 | FragmentName item = obj as FragmentName; 22 | if (item == null) 23 | return false; 24 | return Name.Equals(item.Name); 25 | } 26 | public static bool operator ==(FragmentName a, FragmentName b) 27 | { 28 | if (System.Object.ReferenceEquals(a, b)) 29 | return true; 30 | if (((object)a == null) || ((object)b == null)) 31 | return false; 32 | return a.Name == b.Name; 33 | } 34 | 35 | public static bool operator !=(FragmentName a, FragmentName b) 36 | { 37 | return !(a == b); 38 | } 39 | 40 | public override int GetHashCode() 41 | { 42 | return Name.GetHashCode(); 43 | } 44 | public override string ToString() 45 | { 46 | return Name; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | btcpayserver: 4 | environment: 5 | BTCPAY_EXTERNALSERVICES: "Lightning Terminal:${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/lit/;" 6 | lnd_bitcoin: 7 | environment: 8 | LND_EXTRA_ARGS: | 9 | rpcmiddleware.enable=true 10 | lnd_lit: 11 | image: "lightninglabs/lightning-terminal:v0.14.1-alpha-path-prefix" 12 | restart: unless-stopped 13 | expose: 14 | - "8080" 15 | volumes: 16 | - "lnd_lit_datadir:/root/.lit" 17 | - "lnd_bitcoin_datadir:/data/lnd:ro" 18 | links: 19 | - bitcoind 20 | - lnd_bitcoin 21 | command: 22 | - "--insecure-httplisten=0.0.0.0:8080" 23 | - "--network=${NBITCOIN_NETWORK}" 24 | - "--uipassword=${LIT_PASSWD}" 25 | - "--lnd-mode=remote" 26 | - "--remote.lnd.rpcserver=lnd_bitcoin:10009" 27 | - "--remote.lnd.macaroonpath=/data/lnd/admin.macaroon" 28 | - "--remote.lnd.tlscertpath=/data/lnd/tls.cert" 29 | - "--faraday.connect_bitcoin" 30 | - "--faraday.bitcoin.host=bitcoind:43782" 31 | - "--faraday.bitcoin.user=lnd" 32 | - "--faraday.bitcoin.password=afixedpasswordbecauselndsuckswithcookiefile" 33 | volumes: 34 | lnd_lit_datadir: 35 | required: 36 | - "bitcoin-lnd" 37 | - "opt-lnd-grpc" 38 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/dogecoin.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | dogecoind: 5 | restart: unless-stopped 6 | container_name: btcpayserver_dogecoind 7 | image: btcpayserver/dogecoin:1.14.9 8 | environment: 9 | DOGECOIN_EXTRA_ARGS: | 10 | rpcuser=ceiwHEbqWI83 11 | rpcpassword=DwubwWsoo3 12 | ${NBITCOIN_NETWORK:-regtest}=1 13 | server=1 14 | rpcport=22555 15 | port=22556 16 | whitelist=0.0.0.0/0 17 | # Reducing memory usage of dogecoind. Don't try running this container without at least 2 GB of memory 18 | # https://www.reddit.com/r/dogecoin/comments/5wynqe/reducing_memory_usage_of_dogecoind/ 19 | dbcache=50 20 | expose: 21 | - "22555" # RPC 22 | - "22556" # P2P 23 | volumes: 24 | - "dogecoin_datadir:/data" 25 | nbxplorer: 26 | environment: 27 | NBXPLORER_CHAINS: "doge" 28 | NBXPLORER_DOGERPCURL: http://dogecoind:22555/ 29 | NBXPLORER_DOGENODEENDPOINT: dogecoind:22556 30 | NBXPLORER_DOGERPCUSER: ceiwHEbqWI83 31 | NBXPLORER_DOGERPCPASSWORD: DwubwWsoo3 32 | volumes: 33 | - "dogecoin_datadir:/root/.dogecoin" 34 | btcpayserver: 35 | environment: 36 | BTCPAY_CHAINS: "doge" 37 | BTCPAY_DOGEEXPLORERURL: http://nbxplorer:32838/ 38 | volumes: 39 | dogecoin_datadir: 40 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/groestlcoin.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | groestlcoind: 5 | restart: unless-stopped 6 | container_name: btcpayserver_groestlcoind 7 | image: btcpayserver/groestlcoin:25.0 8 | environment: 9 | GROESTLCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest} 10 | GROESTLCOIN_WALLETDIR: "/walletdata" 11 | # rpcport and rpcbind seems duplicates, but they are not 12 | # rpcport is using by some tooling to automatically get 13 | # the rpcport from the configuration file. Do not remove! 14 | GROESTLCOIN_EXTRA_ARGS: | 15 | rpcport=43782 16 | rpcbind=0.0.0.0:43782 17 | rpcallowip=0.0.0.0/0 18 | port=39388 19 | whitelist=0.0.0.0/0 20 | expose: 21 | - "43782" 22 | - "39388" 23 | volumes: 24 | - "groestlcoin_datadir:/data" 25 | - "groestlcoin_wallet_datadir:/walletdata" 26 | nbxplorer: 27 | environment: 28 | NBXPLORER_CHAINS: "grs" 29 | NBXPLORER_GRSRPCURL: http://groestlcoind:43782/ 30 | NBXPLORER_GRSNODEENDPOINT: groestlcoind:39388 31 | volumes: 32 | - "groestlcoin_datadir:/root/.groestlcoin" 33 | btcpayserver: 34 | environment: 35 | BTCPAY_CHAINS: "grs" 36 | BTCPAY_GRSEXPLORERURL: http://nbxplorer:32838/ 37 | volumes: 38 | groestlcoin_datadir: 39 | groestlcoin_wallet_datadir: 40 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-sphinxrelay.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | btcpayserver: 4 | environment: 5 | BTCPAY_EXTERNALSERVICES: "Sphinx Relay:${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/sphinxrelay/app;" 6 | volumes: 7 | - "sphinxrelay_datadir:/etc/sphinxrelay_datadir" 8 | sphinxrelay: 9 | image: "sphinxlightning/sphinx-relay:v2.2.9" 10 | user: "0:0" 11 | restart: unless-stopped 12 | expose: 13 | - "3300" 14 | volumes: 15 | - "sphinxrelay_datadir:/relay/.lnd" 16 | - "lnd_bitcoin_datadir:/relay/lnd:ro" 17 | environment: 18 | NODE_ENV: production 19 | NODE_IP: ${BTCPAY_HOST}/sphinxrelay 20 | NODE_ALIAS: ${LIGHTNING_ALIAS} 21 | LND_IP: lnd_bitcoin 22 | LND_PORT: 10009 23 | PORT: 3300 24 | MACAROON_LOCATION: /relay/lnd/admin.macaroon 25 | ROUTER_MACAROON_LOCATION: /relay/lnd/data/chain/bitcoin/mainnet/router.macaroon 26 | SIGNER_MACAROON_LOCATION: /relay/lnd/data/chain/bitcoin/mainnet/signer.macaroon 27 | TLS_LOCATION: /relay/lnd/tls.cert 28 | LND_LOG_LOCATION: /relay/lnd/logs/bitcoin/mainnet/lnd.log 29 | PUBLIC_URL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/sphinxrelay/ 30 | links: 31 | - lnd_bitcoin 32 | volumes: 33 | sphinxrelay_datadir: 34 | required: 35 | - "bitcoin-lnd" 36 | - "opt-lnd-grpc" 37 | - "opt-lnd-keysend" 38 | -------------------------------------------------------------------------------- /contrib/FastSync/sigs/brittkelly.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar 5 | 58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar 6 | 79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar 7 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 8 | -----BEGIN PGP SIGNATURE----- 9 | 10 | wsFcBAEBCAAQBQJi0NlnCRBzZKIvLFvMBgAA5nQQADzO5UPHON+QqT+sbWDQMu2V 11 | zKDklR6CguqEtG+PCWg39r5u0E3bDUgsp3qMtw5liquKHWKhGa+D5xLrPYgdU2Ts 12 | 91/6Dn4VIxyqcLNQYsw0jg3X6dlFIfKO2ULKULsDqUZRfi1vfeVFXxvPO48qMHel 13 | JMAObUXgCXirVdL4YZ0F40g5Sikv9/YhTIx0Pua5UxArCnCYp6vjmzMsS+84MAC3 14 | INW0ToziTedF7ROWtGSegzP75s11qEdJ9ObxIGhRmV1pvPwouVc0FQscdQ0s9tfc 15 | 1E4B0p1i5HuC7BfuEETvP4bpk8idIZkVACJPu6qjEtKuGDtOwxyQvxOyCCFl5RY3 16 | RcFepZdWQjJ0Z2jufFPkowXlAlRAdd8COcDoNtuPigsjNY4MbvCSunQGy00k1dch 17 | 0ZGhcf5t0XTO3yWfvfwK0WxAcReiccsgnASq8BifAWIZLrM4GfmBz/wVxltn/fXX 18 | cQPGKFsuBxxNv9ka0wdovClr3eLJZ5fZctQ+TNGzd6/ZmbsjZ0TNLAUjb/K3isTg 19 | yVrl9pry9iv9Yxd4DWLWOuwmS61TfuHMK1NnJHH9vpJoTEu2UKNEl0PfsfDuXnhu 20 | izxT3KpqqMPbrRfFTnmyEgX4Si7b0wqp2OqHIGTt25WyyJoieVNat8PGxCZ7qsS/ 21 | +Y+qBlGDmRuWrLvvWxjb 22 | =2tFb 23 | -----END PGP SIGNATURE----- 24 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-thunderhub.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | btcpayserver: 4 | environment: 5 | BTCPAY_BTCEXTERNALTHUNDERHUB: "server=/thub/sso;cookiefile=/etc/lnd_bitcoin_thub_datadir/.cookie" 6 | volumes: 7 | - "lnd_bitcoin_thub_datadir:/etc/lnd_bitcoin_thub_datadir" 8 | bitcoin_thub: 9 | image: apotdevin/thunderhub:base-v0.14.6@sha256:762ce43fe6134246e350277e71ae6d8cf2ff148e04da3769f1be7e47f8a3dc91 10 | container_name: generated_bitcoin_thub_1 11 | restart: unless-stopped 12 | stop_signal: SIGKILL 13 | environment: 14 | NO_VERSION_CHECK: "true" 15 | COOKIE_PATH: "/data/.cookie" 16 | ACCOUNT_CONFIG_PATH: "/data/thubConfig.yaml" 17 | SSO_SERVER_URL: "lnd_bitcoin:10009" 18 | SSO_MACAROON_PATH: "/etc/lnd" 19 | SSO_CERT_PATH: "/etc/lnd/tls.cert" 20 | NO_CLIENT_ACCOUNTS: "true" 21 | LOG_LEVEL: debug 22 | LOGOUT_URL: "/server/services/thunderhub/BTC" 23 | labels: 24 | traefik.enable: "true" 25 | traefik.http.routers.bitcoin_thub.rule: Host(`${BTCPAY_HOST}`) && (Path(`/thub`) || PathPrefix(`/thub/`)) 26 | volumes: 27 | - "lnd_bitcoin_datadir:/etc/lnd" 28 | - "lnd_bitcoin_thub_datadir:/data" 29 | expose: 30 | - "3000" 31 | links: 32 | - lnd_bitcoin 33 | volumes: 34 | lnd_bitcoin_thub_datadir: 35 | required: 36 | - "bitcoin-lnd" 37 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-librepatron.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | librepatron: 4 | container_name: librepatron 5 | restart: unless-stopped 6 | image: jvandrew/librepatron:0.7.39 7 | expose: 8 | - "8006" 9 | volumes: 10 | - data-volume:/var/lib/db 11 | - config-volume:/var/lib/config 12 | environment: 13 | BTCPAY_HOST: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST} 14 | COMMENTS_SUBURI: "1" 15 | SITEURL: ${BTCPAY_PROTOCOL:-https}://${LIBREPATRON_HOST} 16 | SECRET_KEY_LOCATION: /var/lib/db/key 17 | DATABASE_URL: sqlite:////var/lib/db/app.db 18 | VIRTUAL_HOST: ${LIBREPATRON_HOST} 19 | LETSENCRYPT_HOST: ${LIBREPATRON_HOST} 20 | LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-} 21 | VIRTUAL_HOST_NAME: "librepatron" 22 | 23 | isso: 24 | container_name: isso 25 | restart: unless-stopped 26 | image: jvandrew/isso:atron.22 27 | expose: 28 | - "8080" 29 | volumes: 30 | - data-volume:/var/lib/db 31 | - config-volume:/var/lib/config 32 | btcpayserver: 33 | environment: 34 | BTCPAY_EXTERNALSERVICES: "LibrePatron:${BTCPAY_PROTOCOL:-https}://${LIBREPATRON_HOST};" 35 | volumes: 36 | data-volume: 37 | config-volume: 38 | -------------------------------------------------------------------------------- /contrib/FastSync/utxo-sets: -------------------------------------------------------------------------------- 1 | fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar 2 | eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar 3 | 8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar 4 | 58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar 5 | 52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar 6 | 0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar 7 | 587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar 8 | 79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar 9 | 58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar 10 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 11 | 11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar 12 | 725a049bc5a9fd60b05bba4d4825d35115d99f05ab5b7716d4507c295d05172d utxo-snapshot-bitcoin-mainnet-820852.tar 13 | 744c42885df700513331a978b289d9c9d5b27e0cf1147f2f5a287b4492ff940c utxo-snapshot-bitcoin-mainnet-867690.tar -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/bitcoin.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bitcoind: 5 | restart: unless-stopped 6 | container_name: btcpayserver_bitcoind 7 | image: btcpayserver/bitcoin:29.1 8 | environment: 9 | BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest} 10 | CREATE_WALLET: "false" 11 | BITCOIN_WALLETDIR: "/walletdata" 12 | # rpcport and rpcbind seems duplicates, but they are not 13 | # rpcport is using by some tooling to automatically get 14 | # the rpcport from the configuration file. Do not remove! 15 | BITCOIN_EXTRA_ARGS: | 16 | rpcport=43782 17 | rpcbind=0.0.0.0:43782 18 | rpcallowip=0.0.0.0/0 19 | port=39388 20 | whitelist=0.0.0.0/0 21 | maxmempool=500 22 | expose: 23 | - "43782" 24 | - "39388" 25 | volumes: 26 | - "bitcoin_datadir:/data" 27 | - "bitcoin_wallet_datadir:/walletdata" 28 | nbxplorer: 29 | environment: 30 | NBXPLORER_CHAINS: "btc" 31 | NBXPLORER_BTCRPCURL: http://bitcoind:43782/ 32 | NBXPLORER_BTCNODEENDPOINT: bitcoind:39388 33 | volumes: 34 | - "bitcoin_datadir:/root/.bitcoin" 35 | btcpayserver: 36 | environment: 37 | BTCPAY_CHAINS: "btc" 38 | BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/ 39 | volumes: 40 | bitcoin_datadir: 41 | bitcoin_wallet_datadir: 42 | 43 | exclusive: 44 | - bitcoin-node 45 | recommended: 46 | - "opt-mempoolfullrbf" 47 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/bitcoinknots.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bitcoind: 5 | restart: unless-stopped 6 | container_name: btcpayserver_bitcoind 7 | image: btcpayserver/bitcoinknots:29.2.knots20251110 8 | environment: 9 | BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest} 10 | CREATE_WALLET: "false" 11 | BITCOIN_WALLETDIR: "/walletdata" 12 | # rpcport and rpcbind seems duplicates, but they are not 13 | # rpcport is using by some tooling to automatically get 14 | # the rpcport from the configuration file. Do not remove! 15 | BITCOIN_EXTRA_ARGS: | 16 | rpcport=43782 17 | rpcbind=0.0.0.0:43782 18 | rpcallowip=0.0.0.0/0 19 | port=39388 20 | whitelist=0.0.0.0/0 21 | maxmempool=500 22 | expose: 23 | - "43782" 24 | - "39388" 25 | volumes: 26 | - "bitcoin_datadir:/data" 27 | - "bitcoin_wallet_datadir:/walletdata" 28 | nbxplorer: 29 | environment: 30 | NBXPLORER_CHAINS: "btc" 31 | NBXPLORER_BTCRPCURL: http://bitcoind:43782/ 32 | NBXPLORER_BTCNODEENDPOINT: bitcoind:39388 33 | volumes: 34 | - "bitcoin_datadir:/root/.bitcoin" 35 | btcpayserver: 36 | environment: 37 | BTCPAY_CHAINS: "btc" 38 | BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/ 39 | volumes: 40 | bitcoin_datadir: 41 | bitcoin_wallet_datadir: 42 | 43 | exclusive: 44 | - bitcoin-node 45 | recommended: 46 | - "opt-mempoolfullrbf" 47 | -------------------------------------------------------------------------------- /docker-compose-generator/src/BuildTimeVariableVisitor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Text.RegularExpressions; 5 | using YamlDotNet.RepresentationModel; 6 | 7 | namespace DockerGenerator 8 | { 9 | // Replace built time variable ( $? ) in the docker generator 10 | class BuildTimeVariableVisitor : YamlVisitorBase 11 | { 12 | class Context 13 | { 14 | public List ToRemove = new List(); 15 | } 16 | Stack _Contexts = new Stack(); 17 | Context CurrentContext 18 | { 19 | get 20 | { 21 | return _Contexts.TryPeek(out var ctx) ? ctx : null; 22 | } 23 | } 24 | 25 | protected override void VisitChildren(YamlSequenceNode sequence) 26 | { 27 | _Contexts.Push(new Context()); 28 | base.VisitChildren(sequence); 29 | var ctx = _Contexts.Pop(); 30 | foreach (var child in ctx.ToRemove) 31 | { 32 | sequence.Children.Remove(child); 33 | } 34 | } 35 | public override void Visit(YamlScalarNode scalar) 36 | { 37 | bool removeNode = false; 38 | scalar.Value = Regex.Replace(scalar.Value, "\\$<(.*?)>\\?", (match) => 39 | { 40 | var replacedBy = Environment.GetEnvironmentVariable(match.Groups[1].Value); 41 | if (string.IsNullOrEmpty(replacedBy)) 42 | { 43 | removeNode = true; 44 | } 45 | return replacedBy; 46 | }); 47 | if (removeNode) 48 | CurrentContext?.ToRemove.Add(scalar); 49 | base.Visit(scalar); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/monero.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | monerod: 5 | restart: unless-stopped 6 | container_name: btcpayserver_monerod 7 | image: btcpayserver/monero:0.18.4.3 8 | command: monerod --rpc-bind-ip=0.0.0.0 --confirm-external-bind --rpc-bind-port=18081 --non-interactive --block-notify="/bin/sh ./scripts/notifier.sh -X GET http://btcpayserver:49392/monerolikedaemoncallback/block?cryptoCode=xmr&hash=%s" --hide-my-port --prune-blockchain --enable-dns-blocklist 9 | expose: 10 | - "18081" 11 | volumes: 12 | - "xmr_data:/data" 13 | monerod_wallet: 14 | restart: unless-stopped 15 | container_name: btcpayserver_monero_wallet 16 | image: btcpayserver/monero:0.18.4.3 17 | command: monero-wallet-rpc --rpc-bind-ip=0.0.0.0 --disable-rpc-login --confirm-external-bind --rpc-bind-port=18082 --non-interactive --trusted-daemon --daemon-address=monerod:18081 --wallet-file=/wallet/wallet --password-file=/wallet/password --tx-notify="/bin/sh ./scripts/notifier.sh -X GET http://btcpayserver:49392/monerolikedaemoncallback/tx?cryptoCode=xmr&hash=%s" 18 | expose: 19 | - "18082" 20 | volumes: 21 | - "xmr_wallet:/wallet" 22 | depends_on: 23 | - monerod 24 | btcpayserver: 25 | environment: 26 | BTCPAY_XMR_DAEMON_URI: http://monerod:18081 27 | BTCPAY_XMR_WALLET_DAEMON_URI: http://monerod_wallet:18082 28 | BTCPAY_XMR_WALLET_DAEMON_WALLETDIR: /root/xmr_wallet 29 | volumes: 30 | - "xmr_wallet:/root/xmr_wallet" 31 | volumes: 32 | xmr_wallet: 33 | xmr_data: 34 | -------------------------------------------------------------------------------- /btcpay-setclocale.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is meant to fix the locale of btcpayserver database deployed in docker 4 | # This change will make sure requests to postgres are properly using indexes when querying on text Primary keys 5 | # You can run this if you suspect your server is very slow when you have lot's of invoices 6 | 7 | set -e 8 | 9 | BTCPAY_CONTAINER_ID=$(docker ps -a -f 'name = _btcpayserver_1' -q) 10 | POSTGRES_CONTAINER_ID=$(docker ps -a -f 'name = _postgres_1' -q) 11 | 12 | DATABASE_NAME=$(docker inspect $BTCPAY_CONTAINER_ID | grep 'BTCPAY_POSTGRES' | sed -rn 's/.*Database=([a-z]+)",/\1/p') 13 | PG_DUMP="docker exec $POSTGRES_CONTAINER_ID pg_dump" 14 | PG_RESTORE="docker exec $POSTGRES_CONTAINER_ID pg_restore" 15 | PSQL="docker exec $POSTGRES_CONTAINER_ID psql -h localhost -p 5432 -U postgres" 16 | 17 | if [[ "$($PSQL -c "\l $DATABASE_NAME")" != *"en_US.utf8"* ]]; then 18 | echo "Database $DATABASE_NAME already uses locale C" 19 | exit 0 20 | fi 21 | 22 | $PG_DUMP -h localhost -p 5432 -U postgres -F c -b -v -f "/tmp/$DATABASE_NAME.backup" $DATABASE_NAME 23 | $PSQL -c "CREATE DATABASE \"btcpayserver_new\" LC_COLLATE = 'C' TEMPLATE=template0 LC_CTYPE = 'C' ENCODING = 'UTF8'" 24 | $PG_RESTORE -h localhost -p 5432 -U postgres -d btcpayserver_new -v "/tmp/$DATABASE_NAME.backup" 25 | $PSQL -c "SELECT pg_terminate_backend(pid) FROM \"pg_stat_activity\" WHERE datname = '$DATABASE_NAME';" 26 | $PSQL -c "DROP DATABASE \"$DATABASE_NAME\"" 27 | $PSQL -c "ALTER DATABASE \"btcpayserver_new\" RENAME TO \"$DATABASE_NAME\";" 28 | 29 | echo "Database $DATABASE_NAME is now using locale C" 30 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/bgold-lnd.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | lnd_bitcoingold: 5 | image: kamigawabul/btglnd:latest 6 | container_name: btcpayserver_lnd_bitcoingold 7 | restart: unless-stopped 8 | environment: 9 | LND_CHAIN: "btg" 10 | LND_ENVIRONMENT: "${NBITCOIN_NETWORK:-regtest}" 11 | LND_EXTRA_ARGS: | 12 | restlisten=0.0.0.0:8080 13 | rpclisten=127.0.0.1:10008 14 | rpclisten=0.0.0.0:10009 15 | bitcoingold.node=bgoldd 16 | bgoldd.rpchost=bgoldd:43782 17 | bgoldd.zmqpath=tcp://bgoldd:28332 18 | externalip=${BTCPAY_HOST}:9735 19 | alias=${LIGHTNING_ALIAS} 20 | noencryptwallet=1 21 | ports: 22 | - "9735:9735" 23 | expose: 24 | - "8080" 25 | - "9735" 26 | volumes: 27 | - "lnd_bitcoingold_datadir:/data" 28 | - "bgold_datadir:/deps/.bitcoingold" 29 | links: 30 | - bgoldd 31 | 32 | btcpayserver: 33 | environment: 34 | BTCPAY_BTGLIGHTNING: "type=lnd-rest;server=http://lnd_bitcoingold:8080/;macaroonfilepath=/etc/lnd_bitcoingold/admin.macaroon;allowinsecure=true" 35 | volumes: 36 | - "lnd_bitcoingold_datadir:/etc/lnd_bitcoingold" 37 | links: 38 | - lnd_bitcoingold 39 | 40 | nginx: 41 | links: 42 | - "lnd_bitcoingold" 43 | volumes: 44 | - "lnd_bitcoingold_datadir:/lnd" 45 | nginx-gen: 46 | links: 47 | - "lnd_bitcoingold" 48 | volumes: 49 | - "lnd_bitcoingold_datadir:/lnd" 50 | 51 | volumes: 52 | lnd_bitcoingold_datadir: 53 | 54 | required: 55 | - "opt-add-zmq" 56 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-joinmarket.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | joinmarket: 5 | container_name: joinmarket 6 | image: btcpayserver/joinmarket:0.9.10 7 | restart: unless-stopped 8 | environment: 9 | READY_FILE: /root/.nbxplorer/btc_fully_synched 10 | ENSURE_WALLET: 1 11 | jm_gaplimit: 2000 12 | jm_tor_control_host: tor 13 | jm_tor_control_port: 9051 14 | jm_onion_socks5_host: tor 15 | jm_onion_socks5_port: 9050 16 | jm_socks5_host: tor 17 | jm_socks5_port: 9050 18 | jm_network: ${NBITCOIN_NETWORK:-regtest} 19 | jm_rpc_host: bitcoind 20 | jm_rpc_port: 43782 21 | jm_rpc_user: joinmarket 22 | jm_rpc_password: afixedpasswordforjoinmarket 23 | volumes: 24 | - "joinmarket_datadir:/root/.joinmarket" 25 | - "nbxplorer_datadir:/root/.nbxplorer" 26 | - "tor_datadir:/home/tor/.tor" 27 | expose: 28 | - 62601 # obwatch 29 | - 8080 # payjoin server 30 | links: 31 | - bitcoind 32 | 33 | bitcoind: 34 | environment: 35 | BITCOIN_EXTRA_ARGS: | 36 | # rpcuser=joinmarket 37 | # rpcpassword=afixedpasswordforjoinmarket 38 | # We need to use rpcauth because we also need cookieauth. rpcpassword disabled cookie file auth. 39 | # Be careful if you copy the line below from the docker-compose.yml! A dollar sign is escaped. 40 | rpcauth=joinmarket:4b4dbcb712557eb8c8bfd56a2b6a7707$$6497d80877f10dc375829724f369f546b070fc706121a361438a4a1e51025bea 41 | 42 | volumes: 43 | joinmarket_datadir: 44 | 45 | required: 46 | - "opt-add-tor" 47 | -------------------------------------------------------------------------------- /Generated/torrc.tmpl: -------------------------------------------------------------------------------- 1 | {{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }} 2 | 3 | {{ range $name, $containers := groupByMulti $ "Env.HIDDENSERVICE_NAME" "," }} 4 | {{ $firstServicePort := true }} 5 | {{ range $container := $containers }} 6 | {{ range $knownNetwork := $CurrentContainer.Networks }} 7 | {{ range $containerNetwork := $container.Networks }} 8 | {{ if eq $knownNetwork.Name $containerNetwork.Name }} 9 | {{ $containerOrReverseProxyName := coalesce $container.Env.HIDDENSERVICE_REVERSEPROXY $container.Name }} 10 | 11 | {{ range $reverseProxyContainer := where $ "Name" $containerOrReverseProxyName }} 12 | {{ range $containerNetwork := where $reverseProxyContainer.Networks "Name" $knownNetwork.Name }} 13 | {{ $port := coalesceempty (index $container.Env (print $name "_HIDDENSERVICE_PORT")) $container.Env.HIDDENSERVICE_PORT "80" }} 14 | {{ $virtualPort := coalesceempty (index $container.Env (print $name "_HIDDENSERVICE_VIRTUAL_PORT")) $container.Env.HIDDENSERVICE_VIRTUAL_PORT $port }} 15 | {{ if ne $containerNetwork.IP "" }} 16 | {{ if $firstServicePort }} 17 | # For the hidden service {{ $name }} 18 | HiddenServiceDir /var/lib/tor/hidden_services/{{ $name }} 19 | {{ $firstServicePort := false }} 20 | {{ end }} 21 | # Redirecting to {{ $containerOrReverseProxyName }} 22 | HiddenServicePort {{ $virtualPort }} {{ $containerNetwork.IP }}:{{ $port }} 23 | {{ end }} 24 | {{ end }} 25 | {{ end }} 26 | {{ end }} 27 | {{ end }} 28 | {{ end }} 29 | {{ end }} 30 | {{ end }} 31 | 32 | {{ if $.Env.ADDITIONAL_TORRC_CONFIG }} 33 | {{ $.Env.ADDITIONAL_TORRC_CONFIG}} 34 | {{ end }} -------------------------------------------------------------------------------- /contrib/FastSync/sigs/jaonoctus.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA512 3 | 4 | fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar 5 | eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar 6 | 8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar 7 | 58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar 8 | 52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar 9 | 0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar 10 | 587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar 11 | 79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar 12 | 58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar 13 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 14 | 11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar 15 | 725a049bc5a9fd60b05bba4d4825d35115d99f05ab5b7716d4507c295d05172d utxo-snapshot-bitcoin-mainnet-820852.tar 16 | -----BEGIN PGP SIGNATURE----- 17 | 18 | iHUEARYKAB0WIQRQdmI2dt3KIgDgNOtP4h9f/4TJvAUCZxAV6gAKCRBP4h9f/4TJ 19 | vOvTAP4/MPtLjt2jWc8h7hWtc71pP43Q1s7I2/Fo6TqZwqmn4QEAyin+ylkz7OvQ 20 | +Zok4KaPDdHpHJk/ncdS3qKpX7E0iAg= 21 | =UO3X 22 | -----END PGP SIGNATURE----- 23 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-btctransmuter.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | btctransmuter: 5 | restart: unless-stopped 6 | image: btcpayserver/btctransmuter:0.0.59 7 | container_name: btctransmuter 8 | environment: 9 | TRANSMUTER_Database: User ID=postgres;Host=postgres;Port=5432;Database=btctransmuter${NBITCOIN_NETWORK:-regtest} 10 | TRANSMUTER_DatabaseType: postgres 11 | TRANSMUTER_DataProtectionDir: data/keys 12 | TRANSMUTER_DataProtectionApplicationName: btctransmuter 13 | TRANSMUTER_ROOTPATH: "/btctransmuter" 14 | TRANSMUTER_ExtensionsDir: data/extensions 15 | NBXplorer_Cryptos: ${BTCPAY_CRYPTOS} 16 | NBXplorer_Uri: http://nbxplorer:32838/ 17 | NBXplorer_NetworkType: ${NBITCOIN_NETWORK:-regtest} 18 | NBXplorer_UseDefaultCookie: 1 19 | LETSENCRYPT_HOST: ${BTCTRANSMUTER_HOST} 20 | LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-} 21 | VIRTUAL_HOST: ${BTCTRANSMUTER_HOST} 22 | VIRTUAL_HOST_NAME: "btctransmuter" 23 | TRANSMUTER_BTCPayAuthServer: "http://btcpayserver:49392" 24 | labels: 25 | traefik.enable: "true" 26 | traefik.http.routers.btctransmuter.rule: Host(`${BTCPAY_HOST}`) && (Path(`/btctransmuter`) || PathPrefix(`/btctransmuter/`)) 27 | expose: 28 | - "80" 29 | links: 30 | - postgres 31 | - nbxplorer 32 | - btcpayserver 33 | volumes: 34 | - "btctransmuter_datadir:/app/data" 35 | - "nbxplorer_datadir:/root/.nbxplorer" 36 | btcpayserver: 37 | environment: 38 | BTCPAY_EXTERNALSERVICES: "BTC Transmuter:btctransmuter;" 39 | volumes: 40 | btctransmuter_datadir: 41 | -------------------------------------------------------------------------------- /contrib/FastSync/sigs/JUnderwood.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA512 3 | 4 | fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar 5 | eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar 6 | 8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar 7 | 58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar 8 | 52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar 9 | 0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar 10 | 587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar 11 | 79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar 12 | 58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar 13 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 14 | -----BEGIN PGP SIGNATURE----- 15 | 16 | iQEzBAEBCgAdFiEEnGJq0mr2sgeLfBk5qSc7WtPke0UFAmLNiFgACgkQqSc7WtPk 17 | e0UGsgf+JrVIXjQHnGo8HvbdKWXn+aemaC6SfM0kCdS+Av6Hvg14YVj3LpfVE9if 18 | 15ITBG+Q3LP8pO4A5T+RxG1YlfvnhsDP7GyhFiG55ew0H6G68Uf9iLwiBzqiqnqm 19 | gYOcNtVNaDhAP5ocRnyALSxVH7aWgPD68OPL3xsWvKjC85jsM7dkyWGBdzN4tfua 20 | Gp5Kcz1b3oGyvRSm/3syrWx1J/Cht0oO/tK6zVcwEo7Wq4fDOQD7AUZwiviJYbq5 21 | Q1GoBDEmFe/ZHlta9Qx4sIkib5ZeNRX7KOVFJAkAD/hzbFBBpLjwnTRSGwU+Aulh 22 | kRn9K2XG49yyL0tjJuNzEVwZ9Ynh8Q== 23 | =tb07 24 | -----END PGP SIGNATURE----- 25 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/liquid.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | elementsd_liquid: 5 | restart: unless-stopped 6 | container_name: btcpayserver_elementsd_liquid 7 | image: btcpayserver/elements:23.2.3 8 | environment: 9 | ELEMENTS_NETWORK: ${NBITCOIN_NETWORK:-regtest} 10 | ELEMENTS_MAINNET_CHAIN: "liquidv1" 11 | ELEMENTS_WALLETDIR: "/walletdata" 12 | # rpcport and rpcbind seems duplicates, but they are not 13 | # rpcport is using by some tooling to automatically get 14 | # the rpcport from the configuration file. Do not remove! 15 | ELEMENTS_EXTRA_ARGS: | 16 | rpcport=43782 17 | rpcbind=0.0.0.0:43782 18 | rpcallowip=0.0.0.0/0 19 | port=39388 20 | whitelist=0.0.0.0/0 21 | rpcauth=liquid:c8bf1a8961d97f224cb21224aaa8235d$$402f4a8907683d057b8c58a42940b6e54d1638322a42986ae28ebb844e603ae6 22 | validatepegin=0 23 | fallbackfee=0.000001 24 | expose: 25 | - "43782" 26 | - "39388" 27 | volumes: 28 | - "elements_datadir:/data" 29 | - "elements_wallet_datadir:/walletdata" 30 | nbxplorer: 31 | environment: 32 | NBXPLORER_CHAINS: "lbtc" 33 | NBXPLORER_LBTCRPCURL: http://elementsd_liquid:43782/ 34 | NBXPLORER_LBTCNODEENDPOINT: elementsd_liquid:39388 35 | NBXPLORER_LBTCRPCUSER: "liquid" 36 | NBXPLORER_LBTCRPCPASSWORD: "liquid" 37 | volumes: 38 | - "elements_datadir:/root/.elements" 39 | btcpayserver: 40 | environment: 41 | BTCPAY_CHAINS: "lbtc" 42 | BTCPAY_LBTCEXPLORERURL: http://nbxplorer:32838/ 43 | volumes: 44 | elements_datadir: 45 | elements_wallet_datadir: 46 | 47 | recommended: 48 | - "liquid-default-prune" 49 | -------------------------------------------------------------------------------- /btcpay-teardown.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set +x 4 | 5 | if [[ "$0" = "$BASH_SOURCE" ]]; then 6 | echo "This script must be sourced \". btcpay-teardown.sh\"" 7 | exit 1 8 | fi 9 | 10 | if [[ $EUID -ne 0 ]]; then 11 | echo "This script must be run as root after running \"sudo su -\"" 12 | return 13 | fi 14 | 15 | # Verify we are in right folder. If we are not, let's go in the parent folder of the current docker-compose. 16 | if ! git rev-parse --git-dir &> /dev/null || [ ! -d "Generated" ]; then 17 | if [[ ! -z $BTCPAY_DOCKER_COMPOSE ]]; then 18 | cd $(dirname $BTCPAY_DOCKER_COMPOSE) 19 | cd .. 20 | fi 21 | if ! git rev-parse || [[ ! -d "Generated" ]]; then 22 | echo "You must run this script inside the git repository of btcpayserver-docker" 23 | return 24 | fi 25 | fi 26 | 27 | printf "\n🚨 Running this script will completely erase the BTCPay Server instance. Do you wish to perform this action?\n\n" 28 | 29 | read -p "➡️ Confirm by typing 'YES': " confirm 30 | 31 | if [[ "$confirm" != "YES"* ]]; then 32 | printf "\n😌 Phew, that was close. Aborting uninstall — thanks for keeping your BTCPay Server!\n\n" 33 | return 34 | else 35 | printf "\n👋 Sad to see you go. Thanks for using BTCPay Server!\n" 36 | fi 37 | 38 | BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh" 39 | ORIGINAL_DIRECTORY="$(pwd)" 40 | BTCPAY_BASE_DIRECTORY="$(dirname "$(pwd)")" 41 | 42 | printf "\nℹ️ Stopping BTCPay Server and removing related Docker volumes and networks …\n\n" 43 | docker-compose -f $BTCPAY_DOCKER_COMPOSE down -v 44 | docker system prune -f 45 | 46 | printf "\nℹ️ Removing BTCPay Server files …\n\n" 47 | cd $BTCPAY_BASE_DIRECTORY 48 | rm -rf $ORIGINAL_DIRECTORY 49 | rm $BASH_PROFILE_SCRIPT $BTCPAY_ENV_FILE 50 | 51 | printf "\n✅ Teardown done, successfully uninstalled BTCPay Server!\n\n" 52 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-bluewallet-lndhub.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | # DO NOT USE THOSE ARE DEPRECATED 3 | services: 4 | bluewallet_lndhub_redis: 5 | container_name: bluewallet_lndhub_redis 6 | image: "redis:6.2.2-buster@sha256:e10f55f92478715698a2cef97c2bbdc48df2a05081edd884938903aa60df6396" 7 | command: "redis-server --requirepass S7bk49NBp29khUci4Zw28vsBviCnYfZ2QLTEsQNizq9ni5ur" 8 | restart: "on-failure" 9 | stop_grace_period: "1m" 10 | volumes: 11 | - "bluewallet_lndhub_redisdir:/data" 12 | 13 | bluewallet_lndhub_app: 14 | container_name: bluewallet_lndhub_app 15 | image: "bluewalletorganization/lndhub:v1.4.1" 16 | user: "0:0" 17 | depends_on: [ "bluewallet_lndhub_redis" ] 18 | restart: "on-failure" 19 | stop_grace_period: "1m" 20 | volumes: 21 | - "lnd_bitcoin_datadir:/lnd:ro" 22 | environment: 23 | PORT: "3000" 24 | LND_CERT_FILE: "/lnd/tls.cert" 25 | LND_ADMIN_MACAROON_FILE: "/lnd/admin.macaroon" 26 | CONFIG: '{ "rateLimit": 10000, "postRateLimit": 10000, "redis": { "port": 6379, "host": "bluewallet_lndhub_redis", "family": 4, "password": "S7bk49NBp29khUci4Zw28vsBviCnYfZ2QLTEsQNizq9ni5ur", "db": 0 }, "lnd": { "url": "lnd_bitcoin:10009", "password": ""}}' 27 | # overrides to fix file permissions, see original: https://github.com/BlueWallet/LndHub/blob/master/Dockerfile 28 | entrypoint: "bash" 29 | command: -c "cp /lnd/tls.cert /lnd/admin.macaroon /lndhub/ && cd /lndhub && chown lndhub:lndhub admin.macaroon tls.cert && npm start" 30 | 31 | btcpayserver: 32 | environment: 33 | BTCPAY_EXTERNALSERVICES: "Blue Wallet LNDHub:${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/bluewallet_lndhub_app;" 34 | 35 | # use docker native volumes 36 | volumes: 37 | bluewallet_lndhub_redisdir: 38 | 39 | required: 40 | - "bitcoin-lnd" 41 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/btcpayserver.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | btcpayserver: 5 | restart: unless-stopped 6 | container_name: generated_btcpayserver_1 7 | image: ${BTCPAY_IMAGE:-btcpayserver/btcpayserver:2.3.1} 8 | expose: 9 | - "49392" 10 | environment: 11 | # BTCPay settings 12 | BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Application Name=btcpayserver;Database=btcpayserver${NBITCOIN_NETWORK:-regtest} 13 | BTCPAY_EXPLORERPOSTGRES: User ID=postgres;Host=postgres;Port=5432;Application Name=btcpayserver;MaxPoolSize=80;Database=nbxplorer${NBITCOIN_NETWORK:-regtest} 14 | BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} 15 | BTCPAY_BIND: 0.0.0.0:49392 16 | BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} 17 | BTCPAY_SSHCONNECTION: "root@host.docker.internal" 18 | BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS} 19 | BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE} 20 | BTCPAY_SSHAUTHORIZEDKEYS: ${BTCPAY_SSHAUTHORIZEDKEYS} 21 | BTCPAY_DEBUGLOG: btcpay.log 22 | BTCPAY_UPDATEURL: https://api.github.com/repos/btcpayserver/btcpayserver/releases/latest 23 | BTCPAY_DOCKERDEPLOYMENT: "true" 24 | labels: 25 | traefik.enable: "true" 26 | traefik.http.routers.btcpayserver.rule: Host(`${BTCPAY_HOST}`) 27 | # Traefic can not accept list from BTCPAY_ADDITIONAL_HOSTS, see Traefik/README.md 28 | links: 29 | - postgres 30 | volumes: 31 | - "btcpay_datadir:/datadir" 32 | - "nbxplorer_datadir:/root/.nbxplorer" 33 | - "$?:${BTCPAY_SSHAUTHORIZEDKEYS}" 34 | - "btcpay_pluginsdir:/root/.btcpayserver/Plugins" 35 | 36 | volumes: 37 | btcpay_datadir: 38 | btcpay_pluginsdir: 39 | 40 | required: 41 | - "postgres" 42 | - "nbxplorer" 43 | - "btcpayserver" 44 | recommended: 45 | - "opt-add-tor" 46 | -------------------------------------------------------------------------------- /docs/ndlc.md: -------------------------------------------------------------------------------- 1 | # NDLC support 2 | 3 | :::danger Disclaimer 4 | This project is experimental and based on a protocol which is still evolving everyday. 5 | Use with caution. 6 | 7 | I will take no attempt at maintaining backwards compatibility at this stage. 8 | ::: 9 | 10 | ## Introduction 11 | 12 | A DLC can be seen as a smart contract involving two `parties`, a future `event`, a set of outcomes and a `payoff function`. 13 | An `outcome` can be `attested` by an `oracle`. The `oracle` does not need to interact with either party, and its only role is to `attest` the outcome of the event. 14 | 15 | The `payoff function` determines the two parties' profit or loss depending on which outcome get `attested`. 16 | 17 | The `oracle` roles is to define the `event` and `attest` a single outcome of the event. 18 | 19 | Let's call Alice and Bob the two parties of the contract, and Olivia the oracle. 20 | 21 | A DLC will show two transactions on the chain: 22 | 23 | * The Funding Transaction 24 | * The Contract Execution Transaction (CET) 25 | 26 | The `Funding Transaction` is a transaction built by the two parties of the contract, locking their collateral for the contract. 27 | 28 | The `Contract Execution Transaction` (or `CET`) is the transaction distributing the locked collateral according to the `payoff function` for the outcome attested by the oracle. 29 | 30 | The following documentation is also explained in this video. 31 | 32 | [![How to make a DLC with NDLC-CLI](https://img.youtube.com/vi/DakwshnNkho/mqdefault.jpg)](https://www.youtube.com/watch?v=DakwshnNkho) 33 | 34 | ## How to use 35 | 36 | You need to add ndlc's docker fragment to your install with: 37 | 38 | ```bash 39 | BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-add-ndlc" 40 | . btcpay-setup.sh -i 41 | ``` 42 | 43 | You can then use `ndlc-cli.sh` to run use ndlc-cli, for example: 44 | 45 | ```bash 46 | ndlc.sh oracle generate MyOwnOracle 47 | ``` 48 | 49 | Read our documentation on our [GitHub repository](https://github.com/dgarage/NDLC/blob/master/docs/Concepts.md). 50 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/groestlcoin-eclair.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | groestlcoind: 5 | environment: 6 | GROESTLCOIN_EXTRA_ARGS: | 7 | rpcauth=eclair:d3a244200d5c946f6bef48e6583ec979$$215049513aef33245dfec8ff3ab5e749458fde51ede931dec04c767c0732d468 8 | eclair_groestlcoin: 9 | container_name: btcpayserver_eclair_groestlcoin 10 | restart: unless-stopped 11 | stop_signal: SIGINT 12 | image: groestlcoin/eclair:v0.6.0 13 | environment: 14 | PUBLIC_HOST: ${BTCPAY_HOST} 15 | JAVA_OPTS: | 16 | -Xmx256m 17 | -Declair.printToConsole 18 | -Declair.headless 19 | -Declair.chain=${NBITCOIN_NETWORK:-regtest} 20 | -Declair.server.binding-ip=0.0.0.0 21 | -Declair.server.public-ips.0=${BTCPAY_HOST} 22 | -Declair.server.port=9736 23 | -Declair.api.enabled=true 24 | -Declair.api.binding-ip=0.0.0.0 25 | -Declair.api.port=8080 26 | -Declair.node-alias=${LIGHTNING_ALIAS} 27 | -Declair.api.password=DwubwWsoo3 28 | -Declair.bitcoind.host=groestlcoind 29 | -Declair.bitcoind.rpcport=43782 30 | -Declair.bitcoind.rpcuser=eclair 31 | -Declair.bitcoind.rpcpassword=sFLjcg99Puh4k3CAZCQkLvC-fcoFUFRyKwKcXQKa7dw= 32 | -Declair.bitcoind.zmqblock=tcp://groestlcoind:21441 33 | -Declair.bitcoind.zmqtx=tcp://groestlcoind:21441 34 | expose: 35 | - "9736" # server port 36 | - "8080" # api port 37 | volumes: 38 | - "groestlcoin_datadir:/etc/groestlcoin" 39 | - "eclair_groestlcoin_datadir:/data" 40 | links: 41 | - groestlcoind 42 | 43 | btcpayserver: 44 | environment: 45 | BTCPAY_GRSLIGHTNING: "type=eclair;server=http://eclair_groestlcoin:8080;password=DwubwWsoo3" 46 | volumes: 47 | - "eclair_groestlcoin_datadir:/etc/eclair_groestlcoin" 48 | links: 49 | - eclair_groestlcoin 50 | volumes: 51 | eclair_groestlcoin_datadir: 52 | 53 | incompatible: 54 | - pruning 55 | required: 56 | - "opt-add-zmq" 57 | - "opt-txindex" 58 | -------------------------------------------------------------------------------- /docs/pihole.md: -------------------------------------------------------------------------------- 1 | # Pi-Hole support 2 | 3 | [Pi-Hole](https://pi-hole.net/) is a black hole for internet advertisement. 4 | It works as a DNS server which blacklist domains tied to advertisement. If you use it as your main DNS server and it detects your query is trying to resolve a domain belonging to an advertisement company, it will resolve the domain to IP `0.0.0.0`, preventing the advertisement to load on any computer using this DNS server. 5 | 6 | Note that our pi-hole integration is meant to be used in a **local network**. Please do not try to use this option on a VPS. 7 | 8 | ## How to use 9 | 10 | Let's imagine the local IP of your BTCPay Server is `192.168.1.2`. 11 | 12 | 1. Connect as root to your server 13 | 2. Add pihole as an option to your docker deployment 14 | 15 | ```bash 16 | BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-add-pihole" 17 | . btcpay-setup.sh -i 18 | ``` 19 | 20 | 3. If your server has a firewall, make sure it allow incoming traffic to port `53 (UDP)`. 21 | 4. Configure your home router DHCP server to use `192.168.1.2` as primary DNS server. 22 | 23 | 24 | From now everytime a device will connect to your local network, they will automatically use pi-hole as a DNS server. Advertisements will go to a black hole for all devices. 25 | 26 | ## Using the dashboard 27 | 28 | Pi-Hole comes with a very nice admin dashboard to monitor its activity. 29 | It is disabled by default. To enable it, you need to configure `PIHOLE_SERVERIP` to the IP of your server: 30 | 31 | ```bash 32 | PIHOLE_SERVERIP="192.168.1.2" 33 | . btcpay-setup.sh -i 34 | ``` 35 | 36 | If your device is using pi-hole as a DNS server, you should now be able to browse `http://pi.hole/admin` to connect to your dashboard. 37 | 38 | You can find the admin password in the logs of pihole: 39 | 40 | ```bash 41 | docker logs pihole | grep random 42 | ``` 43 | 44 | If the password does not work, you can try to reset the password: 45 | 46 | ```bash 47 | pihole.sh -a -p 48 | docker restart pihole 49 | ``` 50 | 51 | Then running again 52 | 53 | ```bash 54 | docker logs pihole | grep random 55 | ``` 56 | -------------------------------------------------------------------------------- /docker-compose-generator/src/DockerComposition.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Collections.Generic; 4 | using System.Text; 5 | 6 | namespace DockerGenerator 7 | { 8 | public class DockerComposition 9 | { 10 | public HashSet SelectedCryptos 11 | { 12 | get; 13 | set; 14 | } 15 | public string SelectedProxy 16 | { 17 | get; 18 | set; 19 | } 20 | public string SelectedLN 21 | { 22 | get; 23 | set; 24 | } 25 | public string[] AdditionalFragments 26 | { 27 | get; 28 | set; 29 | } = new string[0]; 30 | public string[] ExcludeFragments 31 | { 32 | get; 33 | set; 34 | } = new string[0]; 35 | 36 | public static DockerComposition FromEnvironmentVariables() 37 | { 38 | DockerComposition composition = new DockerComposition(); 39 | composition.SelectedCryptos = new HashSet(); 40 | for(int i = 1; i < 10; i++) 41 | { 42 | var selectedCrypto = Environment.GetEnvironmentVariable("BTCPAYGEN_CRYPTO" + i); 43 | if(string.IsNullOrEmpty(selectedCrypto)) 44 | continue; 45 | composition.SelectedCryptos.Add(selectedCrypto.ToLowerInvariant()); 46 | } 47 | composition.SelectedProxy = (Environment.GetEnvironmentVariable("BTCPAYGEN_REVERSEPROXY") ?? "").ToLowerInvariant(); 48 | composition.SelectedLN = (Environment.GetEnvironmentVariable("BTCPAYGEN_LIGHTNING") ?? "").ToLowerInvariant(); 49 | composition.AdditionalFragments = (Environment.GetEnvironmentVariable("BTCPAYGEN_ADDITIONAL_FRAGMENTS") ?? "").ToLowerInvariant() 50 | .Split(new char[] { ';' , ',' }) 51 | .Where(t => !string.IsNullOrWhiteSpace(t)) 52 | .Select(t => t.EndsWith(".yml") ? t.Substring(0, t.Length - ".yml".Length) : t) 53 | .ToArray(); 54 | composition.ExcludeFragments = (Environment.GetEnvironmentVariable("BTCPAYGEN_EXCLUDE_FRAGMENTS") ?? "").ToLowerInvariant() 55 | .Split(new char[] { ';' , ',' }) 56 | .Where(t => !string.IsNullOrWhiteSpace(t)) 57 | .Select(t => t.EndsWith(".yml") ? t.Substring(0, t.Length - ".yml".Length) : t) 58 | .ToArray(); 59 | return composition; 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-chatwoot.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | chatwoot: 5 | image: chatwoot/chatwoot:v1.7.0 6 | restart: unless-stopped 7 | container_name: chatwoot 8 | env_file: chatwoot-config.env 9 | environment: 10 | FRONTEND_URL: ${BTCPAY_PROTOCOL:-https}://${CHATWOOT_HOST} 11 | FORCE_SSL: "true" 12 | REDIS_URL: redis://redis:6379 13 | POSTGRES_HOST: postgres 14 | POSTGRES_USERNAME: postgres 15 | RAILS_ENV: production 16 | NODE_ENV: production 17 | RAILS_MAX_THREADS: 5 18 | REDIS_PASSWORD: "" 19 | RAILS_LOG_TO_STDOUT: "true" 20 | LOG_LEVEL: info 21 | LOG_SIZE: 500 22 | IOS_APP_ID: 6C953F3RX2.com.chatwoot.app 23 | LETSENCRYPT_HOST: ${CHATWOOT_HOST} 24 | LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-} 25 | VIRTUAL_HOST: ${CHATWOOT_HOST} 26 | VIRTUAL_HOST_NAME: "chatwoot" 27 | VIRTUAL_PORT: 3000 28 | expose: 29 | - "3000" 30 | depends_on: 31 | - postgres 32 | - redis 33 | entrypoint: docker/entrypoints/rails.sh 34 | command: "bundle exec rails s -p 3000 -b 0.0.0.0" 35 | 36 | chatwoot_sidekiq: 37 | image: chatwoot/chatwoot:v1.7.0 38 | restart: unless-stopped 39 | env_file: chatwoot-config.env 40 | environment: 41 | FRONTEND_URL: ${BTCPAY_PROTOCOL:-https}://${CHATWOOT_HOST} 42 | FORCE_SSL: "true" 43 | REDIS_URL: redis://redis:6379 44 | POSTGRES_HOST: postgres 45 | POSTGRES_USERNAME: postgres 46 | RAILS_ENV: production 47 | NODE_ENV: production 48 | RAILS_MAX_THREADS: 5 49 | REDIS_PASSWORD: "" 50 | RAILS_LOG_TO_STDOUT: "true" 51 | LOG_LEVEL: info 52 | LOG_SIZE: 500 53 | IOS_APP_ID: 6C953F3RX2.com.chatwoot.app 54 | depends_on: 55 | - postgres 56 | - redis 57 | command: "bundle exec sidekiq -C config/sidekiq.yml" 58 | redis: 59 | image: redis:5.0.2-alpine 60 | restart: unless-stopped 61 | expose: 62 | - "6379" 63 | volumes: 64 | - "redis_datadir:/data" 65 | btcpayserver: 66 | environment: 67 | BTCPAY_EXTERNALSERVICES: "Chatwoot:${BTCPAY_PROTOCOL:-https}://${CHATWOOT_HOST};" 68 | 69 | volumes: 70 | redis_datadir: -------------------------------------------------------------------------------- /contrib/FastSync/sigs/NicolasDorier.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA256 3 | 4 | fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar 5 | eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar 6 | 8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar 7 | 58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar 8 | 52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar 9 | 0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar 10 | 587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar 11 | 79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar 12 | 58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar 13 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 14 | 11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar 15 | 725a049bc5a9fd60b05bba4d4825d35115d99f05ab5b7716d4507c295d05172d utxo-snapshot-bitcoin-mainnet-820852.tar 16 | -----BEGIN PGP SIGNATURE----- 17 | 18 | wsFcBAEBCAAQBQJletbECRBmGHY+8JGG/gAACiQQAHoG7cXpdfks1sdb5Uzu44jl 19 | ABzgVCcIQ8qpQWuiwqBB/Cux/YW63wU4Ku95KMvOVC6P5Q3Dmil5Q2LEibHFzKjb 20 | /TofEdjKWIcqw2xut7Q3GSnyeMdjhm2fdUH4b3rhkt3Zh8T2BOvi1aWt3CsiaTnd 21 | +UooDXb218db28OKYzGZ9cbfaTueRW2rsX0T7xZhYUmo7ExOfe9xGN7AVljSxSnm 22 | OIammIuqi5uKbB6t+t1p2pl2lr2g/eLyY4iPzFRv3yk7tl9v4Uoj8Ry1+AT1E8+b 23 | p1M0uWj8c9sHbCizr8xW5RkVr7CQrgrNJbol00IfQVyooQI33szMX0jQ5X8Nt6y8 24 | KdwUvT8ZyT2eS1VG4RjH3Oq9V/ZxODPtaA8su8lAWTd10xrsRGKwO/qHYdhISOUC 25 | +NQmT9f6pFX35UH0CSk5T8c0jNTAChZcw7NlDUWQaKj3H63qajnVHnx/NuZCmhCe 26 | 5L6ilWsYnqYnfjJX7d0i4ZMUNCXkeBTKZHBasWzEBp3ds8nOsHY5dCFcWkppABNw 27 | ynLkCSDN7TY1a8sTgdEIpNpZ6m2oq3rMhmxVzijcFuXV5eRtIxGY1mZPJTggZQXB 28 | 8/1RT8B5EDbl0L9Bq+q8lYL/dDLRKQJH0IA3FKGzPDNcin+d8oWh0Ep1IuYDlRJ8 29 | xY8CXryVjzmbglJvC1Wt 30 | =PNpf 31 | -----END PGP SIGNATURE----- 32 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-mempool.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | # reference: https://github.com/mempool/mempool/blob/master/docker/docker-compose.yml 4 | services: 5 | bitcoind: 6 | environment: 7 | BITCOIN_EXTRA_ARGS: | 8 | # We need to use rpcauth because we also need cookieauth. rpcpassword disabled cookie file auth. 9 | # Be careful if you copy the line below from the docker-compose.yml! A dollar sign is escaped. 10 | rpcauth=mempool:d77ee0acf132038f6aaa9d4500d745ec$$72cc78dcf18191c91d10c15ff8f7c3dbbd170c4d3107cca35d71c6bf96af2ed9 11 | mempool_web: 12 | image: mempool/frontend:v2.5.0 13 | restart: on-failure 14 | stop_grace_period: 1m 15 | command: "./wait-for mempool_db:3306 --timeout=720 -- nginx -g 'daemon off;'" 16 | expose: 17 | - "8080" 18 | environment: 19 | FRONTEND_HTTP_PORT: "8080" 20 | BACKEND_MAINNET_HTTP_HOST: "mempool_api" 21 | 22 | mempool_api: 23 | image: mempool/backend:v2.5.0 24 | restart: on-failure 25 | stop_grace_period: 1m 26 | command: "./wait-for-it.sh mempool_db:3306 --timeout=720 --strict -- ./start.sh" 27 | expose: 28 | - "8999" 29 | environment: 30 | MEMPOOL_BACKEND: "electrum" 31 | MEMPOOL_CACHE_DIR: "/backend/cache" 32 | ELECTRUM_HOST: "electrumx" 33 | ELECTRUM_PORT: "50001" 34 | ELECTRUM_TLS_ENABLED: "false" 35 | CORE_RPC_HOST: "bitcoind" 36 | CORE_RPC_PORT: "43782" 37 | CORE_RPC_USERNAME: "mempool" 38 | CORE_RPC_PASSWORD: "mempool" 39 | DATABASE_ENABLED: "true" 40 | DATABASE_HOST: "mempool_db" 41 | DATABASE_DATABASE: "mempool" 42 | DATABASE_USERNAME: "mempool" 43 | DATABASE_PASSWORD: "mempool" 44 | 45 | mempool_db: 46 | image: mariadb:10.11 47 | restart: on-failure 48 | expose: 49 | - "3306" 50 | volumes: 51 | - "mempool_db_datadir:/var/lib/mysql" 52 | environment: 53 | MYSQL_DATABASE: "mempool" 54 | MYSQL_USER: "mempool" 55 | MYSQL_PASSWORD: "mempool" 56 | MYSQL_ROOT_PASSWORD: "admin" 57 | 58 | btcpayserver: 59 | environment: 60 | BTCPAY_EXTERNALSERVICES: "Mempool Explorer:/mempool" 61 | 62 | volumes: 63 | mempool_db_datadir: 64 | 65 | required: 66 | - "opt-add-electrumx" 67 | 68 | incompatible: 69 | - pruning 70 | -------------------------------------------------------------------------------- /docker-compose-generator/.dockerignore: -------------------------------------------------------------------------------- 1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs) 2 | **/[Bb]in/ 3 | **/[Oo]bj/ 4 | node_modules/ 5 | dist/ 6 | 7 | # mstest test results 8 | TestResults 9 | 10 | ## Ignore Visual Studio temporary files, build results, and 11 | ## files generated by popular Visual Studio add-ons. 12 | 13 | # User-specific files 14 | *.suo 15 | *.user 16 | *.sln.docstates 17 | 18 | # Build results 19 | [Dd]ebug/ 20 | [Rr]elease/ 21 | x64/ 22 | *_i.c 23 | *_p.c 24 | *.ilk 25 | *.meta 26 | *.obj 27 | *.pch 28 | *.pdb 29 | *.pgc 30 | *.pgd 31 | *.rsp 32 | *.sbr 33 | *.tlb 34 | *.tli 35 | *.tlh 36 | *.tmp 37 | *.log 38 | *.vspscc 39 | *.vssscc 40 | .builds 41 | 42 | # Visual C++ cache files 43 | ipch/ 44 | *.aps 45 | *.ncb 46 | *.opensdf 47 | *.sdf 48 | 49 | # Visual Studio profiler 50 | *.psess 51 | *.vsp 52 | *.vspx 53 | 54 | # Guidance Automation Toolkit 55 | *.gpState 56 | 57 | # ReSharper is a .NET coding add-in 58 | _ReSharper* 59 | 60 | # NCrunch 61 | *.ncrunch* 62 | .*crunch*.local.xml 63 | 64 | # Installshield output folder 65 | [Ee]xpress 66 | 67 | # DocProject is a documentation generator add-in 68 | DocProject/buildhelp/ 69 | DocProject/Help/*.HxT 70 | DocProject/Help/*.HxC 71 | DocProject/Help/*.hhc 72 | DocProject/Help/*.hhk 73 | DocProject/Help/*.hhp 74 | DocProject/Help/Html2 75 | DocProject/Help/html 76 | 77 | # Click-Once directory 78 | publish 79 | 80 | # Publish Web Output 81 | *.Publish.xml 82 | 83 | # NuGet Packages Directory 84 | packages 85 | 86 | # Windows Azure Build Output 87 | csx 88 | *.build.csdef 89 | 90 | # Windows Store app package directory 91 | AppPackages/ 92 | 93 | # Others 94 | [Bb]in 95 | [Oo]bj 96 | sql 97 | TestResults 98 | [Tt]est[Rr]esult* 99 | *.Cache 100 | ClientBin 101 | [Ss]tyle[Cc]op.* 102 | ~$* 103 | *.dbmdl 104 | Generated_Code #added for RIA/Silverlight projects 105 | 106 | # Backup & report files from converting an old project file to a newer 107 | # Visual Studio version. Backup files are not needed, because we have git ;-) 108 | _UpgradeReport_Files/ 109 | Backup*/ 110 | UpgradeLog*.XML 111 | 112 | src/Rapporteringsregisteret.Web/assets/less/*.css 113 | 114 | MetricResults/ 115 | *.sln.ide/ 116 | 117 | _configs/ 118 | 119 | # vnext stuff 120 | bower_components 121 | output 122 | 123 | .vs 124 | **/launchSettings.json 125 | docker-fragments/ -------------------------------------------------------------------------------- /contrib/DockerFileBuildHelper/Image.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | using System.Text.RegularExpressions; 5 | 6 | namespace DockerFileBuildHelper 7 | { 8 | public class Image 9 | { 10 | public string User { get; private set; } 11 | public string Name { get; private set; } 12 | public string Tag { get; private set; } 13 | 14 | public string DockerHubLink 15 | { 16 | get 17 | { 18 | return User == string.Empty ? 19 | $"https://hub.docker.com/_/{Name}" : 20 | $"https://hub.docker.com/r/{User}/{Name}"; 21 | } 22 | } 23 | 24 | public string Source { get; set; } 25 | 26 | public static Image Parse(string str) 27 | { 28 | //${BTCPAY_IMAGE: -btcpayserver / btcpayserver:1.0.3.21} 29 | var variableMatch = Regex.Match(str, @"\$\{[^-]+-([^\}]+)\}"); 30 | if (variableMatch.Success) 31 | { 32 | str = variableMatch.Groups[1].Value; 33 | } 34 | Image img = new Image(); 35 | var match = Regex.Match(str, "([^/]*/)?([^:]+):?(.*)"); 36 | if (!match.Success) 37 | throw new FormatException(); 38 | img.User = match.Groups[1].Length == 0 ? string.Empty : match.Groups[1].Value.Substring(0, match.Groups[1].Value.Length - 1); 39 | img.Name = match.Groups[2].Value; 40 | img.Tag = match.Groups[3].Value; 41 | if (img.Tag.Contains('@')) 42 | { 43 | img.Tag = img.Tag.Split('@')[0]; 44 | } 45 | if (img.Tag == string.Empty) 46 | img.Tag = "latest"; 47 | return img; 48 | } 49 | public override string ToString() 50 | { 51 | return ToString(true); 52 | } 53 | public string ToString(bool includeTag) 54 | { 55 | StringBuilder builder = new StringBuilder(); 56 | if (!String.IsNullOrWhiteSpace(User)) 57 | builder.Append($"{User}/"); 58 | builder.Append($"{Name}"); 59 | if (includeTag) 60 | { 61 | if (!String.IsNullOrWhiteSpace(Tag)) 62 | builder.Append($":{Tag}"); 63 | } 64 | return builder.ToString(); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /contrib/FastSync/sigs/rockstardev.utxo-sets.asc: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP SIGNED MESSAGE----- 2 | Hash: SHA512 3 | 4 | fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar 5 | eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar 6 | 8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar 7 | 58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar 8 | 52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar 9 | 0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar 10 | 587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar 11 | 79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar 12 | 58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar 13 | 83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar 14 | 11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar 15 | 725a049bc5a9fd60b05bba4d4825d35115d99f05ab5b7716d4507c295d05172d utxo-snapshot-bitcoin-mainnet-820852.tar 16 | 744c42885df700513331a978b289d9c9d5b27e0cf1147f2f5a287b4492ff940c utxo-snapshot-bitcoin-mainnet-867690.tar 17 | -----BEGIN PGP SIGNATURE----- 18 | Version: Keybase OpenPGP v2.1.13 19 | Comment: https://keybase.io/crypto 20 | 21 | wsFcBAABCgAGBQJnPpBHAAoJEHnCM6wrr3jdJEwP/3bSVFvciVH/z78UNbeUFQkE 22 | Jh93IBqWj7hOXy2MfE4w7X8t0uvHNH0TjtQ6bThTdABkYnT8M9oEkry7WoWfFgEb 23 | MQtCZq3jAUVwyuK3TN41KZMLhSqFkV0lEO5ZK6BT6pIUzHrPQfkjQLS0GHslvnWi 24 | xLrdO9wMBhLF40I76DBqeEutGd7HEw26D7QJUp9Mq4mMAQ0/X9uvQgjh/47szR8C 25 | Ip4tH6u/woMffr2IgVsjkfXM4uFLW6rrijyhL5ZIEbgaiz93M6fRBhYxEXpXSSAp 26 | IRS35GoY30aN0a6ZxPaj3UKMyBw4xRbfTtLWJsSJqhbMIq0iWuyLI2HDFHtfH3yy 27 | loRJG0/d1pfsAB5zYRVYjmey4cAI0wjK7eGbJ6uYnKrQ7JO7IWHiSE4PGGgF/4TG 28 | pUhGF6JhXCqoK9pn/ZvFb8lsc6tCoJYtGceGEClpOLSovxw2KQ9R82Dlmf3TK6rv 29 | NW2hyEpyhI9M6WwcKIuhKKrKmi//bwSWF8Rw602IEuyNGLCzChTA6AATI2QGPhBq 30 | QbcBhhu7UblAES9Wgk1e9/gZq8yH7SKtoipICc7rQDV3PURw8o5qJeQHYTxY9kQv 31 | SDTnwZZYWY/2nupHdNrAN2KvtDT0MlufZf4jtE8c7pgxJO/FrucfwIuW0pvLHkg6 32 | J5Rw3AofuAa1ql3kJvOI 33 | =2QeW 34 | -----END PGP SIGNATURE----- 35 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-compose-generator.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.29519.181 5 | MinimumVisualStudioVersion = 15.0.26124.0 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "docker-compose-generator", "src\docker-compose-generator.csproj", "{0900AF35-48E8-46E2-85B3-BA3847EE0844}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{8C1C711D-DEF1-474C-A9F6-AAE142412528}" 9 | ProjectSection(SolutionItems) = preProject 10 | ..\.circleci\config.yml = ..\.circleci\config.yml 11 | linuxamd64.Dockerfile = linuxamd64.Dockerfile 12 | linuxarm32v7.Dockerfile = linuxarm32v7.Dockerfile 13 | linuxarm64v8.Dockerfile = linuxarm64v8.Dockerfile 14 | EndProjectSection 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Debug|x64 = Debug|x64 20 | Debug|x86 = Debug|x86 21 | Release|Any CPU = Release|Any CPU 22 | Release|x64 = Release|x64 23 | Release|x86 = Release|x86 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|x64.ActiveCfg = Debug|Any CPU 29 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|x64.Build.0 = Debug|Any CPU 30 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|x86.ActiveCfg = Debug|Any CPU 31 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|x86.Build.0 = Debug|Any CPU 32 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|x64.ActiveCfg = Release|Any CPU 35 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|x64.Build.0 = Release|Any CPU 36 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|x86.ActiveCfg = Release|Any CPU 37 | {0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|x86.Build.0 = Release|Any CPU 38 | EndGlobalSection 39 | GlobalSection(SolutionProperties) = preSolution 40 | HideSolutionNode = FALSE 41 | EndGlobalSection 42 | GlobalSection(ExtensibilityGlobals) = postSolution 43 | SolutionGuid = {CADA76A8-7F2E-4132-900B-330F0D2D722B} 44 | EndGlobalSection 45 | EndGlobal 46 | -------------------------------------------------------------------------------- /Production-NoReverseProxy/README.md: -------------------------------------------------------------------------------- 1 | # How to use docker-compose without reverse proxy 2 | 3 | ![Architecture](https://github.com/btcpayserver/btcpayserver-doc/raw/master/img/Architecture.png) 4 | 5 | This is the same architecture as [Production](../Production) but without NGINX as a reverse proxy. 6 | It is suited for environment which already expose the host behind a reverse proxy handling HTTPS. 7 | 8 | The relevant environment variables are: 9 | 10 | * `NBITCOIN_NETWORK`: the blockchain identifier used by NBitcoin (eg., `regtest`, `testnet`, `mainnet`) 11 | * `BTCPAY_HOST`: the external url used to access your server from internet. This domain name must point to this machine. 12 | * `BTCPAY_ROOTPATH`: The root path directory where BTCPay is accessed, more information below. (default: /) 13 | * `BTCPAY_PROTOCOL`: the protocol used to access this website from the internet (valid values: `http` and `https`, default: `https`) 14 | * `LIGHTNING_ALIAS`: Optional, if using the integrated lightning feature, customize the alias of your nodes 15 | * `BTCPAY_SSHKEYFILE`: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server (You need to copy the key file on BTCPay's datadir volume) 16 | * `BTCPAY_SSHTRUSTEDFINGERPRINTS`: Optional, BTCPay will ensure that it is connecting to the expected SSH server by checking the host public's key against those fingerprints 17 | 18 | The ports mapped on the host are: 19 | 20 | 1. `80` for the website 21 | 3. `9735` for the bitcoin lightning network node (if used) 22 | 4. `9736` for the litecoin lightning network node (if used) 23 | 24 | Note that you need to set `BTCPAY_PROTOCOL=http` if you want to do some tests locally without https. 25 | 26 | If you forget, you will get an error HTTP 400 when trying to register a new account on the website. 27 | 28 | ## Example: 29 | 30 | With Powershell: 31 | 32 | ``` 33 | $env:BTCPAY_ROOTPATH="/test"; 34 | $env:BTCPAY_PROTOCOL="http"; 35 | $env:BTCPAY_HOST="btcpay.example.com"; 36 | $env:BTCPAYGEN_REVERSEPROXY="none"; 37 | .\build.ps1 38 | docker-compose -f "Generated/docker-compose.generated.yml" up --remove-orphans -d 39 | ``` 40 | 41 | With Linux: 42 | 43 | ``` 44 | export BTCPAY_ROOTPATH="/test" 45 | export BTCPAY_PROTOCOL="http" 46 | export BTCPAY_HOST="btcpay.example.com" 47 | export BTCPAYGEN_REVERSEPROXY="none" 48 | ./build.sh 49 | docker-compose -f "Generated/docker-compose.generated.yml" up --remove-orphans -d 50 | ``` 51 | 52 | Then edit your [host file](https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/) with 53 | 54 | ``` 55 | 127.0.0.1 sampleapi.example.com 56 | ``` 57 | 58 | Then browse `http://btcpay.example.com/test`. 59 | 60 | Note: Chrome seems to block cookie to http://127.0.0.1:80/, which is why it is advised to use a custom domain like this. -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/groestlcoin-clightning.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | clightning_groestlcoin: 5 | image: groestlcoin/lightning:v24.08 6 | container_name: btcpayserver_clightning_groestlcoin 7 | restart: unless-stopped 8 | environment: 9 | LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest} 10 | LIGHTNINGD_CHAIN: grs 11 | LIGHTNINGD_ALIAS: ${LIGHTNING_ALIAS} 12 | LIGHTNINGD_ANNOUNCEADDR: ${BTCPAY_ANNOUNCEABLE_HOST} 13 | LIGHTNINGD_PORT: 9736 14 | LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/" 15 | LIGHTNINGD_OPT: | 16 | groestlcoin-datadir=/etc/groestlcoin 17 | groestlcoin-rpcconnect=groestlcoind 18 | volumes: 19 | - "clightning_groestlcoin_datadir:/root/.lightning" 20 | - "groestlcoin_datadir:/etc/groestlcoin" 21 | - "nbxplorer_datadir:/root/.nbxplorer" 22 | ports: 23 | - "9736:9736" 24 | links: 25 | - groestlcoind 26 | clightning_groestlcoin_charge: 27 | image: groestlcoin/groestlcoin-lightning-charge:version-0.4.22 28 | restart: unless-stopped 29 | environment: 30 | NETWORK: ${NBITCOIN_NETWORK:-regtest} 31 | COOKIE_FILE: /data/.cookie 32 | URL: ${BTCPAY_ROOTPATH:-/}lightning-charge/grs/ 33 | LN_NET_PATH: /etc/lightning 34 | LN_NET: /etc/lightning 35 | volumes: 36 | - "clightning_groestlcoin_datadir:/etc/lightning" 37 | - "clightning_groestlcoin_charge:/data" 38 | expose: 39 | - "9112" 40 | links: 41 | - clightning_groestlcoin 42 | 43 | clightning_groestlcoin_spark: 44 | image: groestlcoin/groestlcoin-spark:version-0.2.16 45 | restart: unless-stopped 46 | environment: 47 | NETWORK: ${NBITCOIN_NETWORK:-regtest} 48 | SPARK_OPT: --no-tls -C /data/.cookie 49 | volumes: 50 | - "clightning_groestlcoin_datadir:/etc/lightning" 51 | - "clightning_groestlcoin_spark:/data" 52 | links: 53 | - clightning_groestlcoin 54 | expose: 55 | - "9736" 56 | 57 | btcpayserver: 58 | environment: 59 | BTCPAY_GRSLIGHTNING: "type=clightning;server=unix://etc/clightning_groestlcoin/lightning-rpc" 60 | BTCPAY_GRSEXTERNALSPARK: "server=/spark/grs;cookiefile=/etc/clightning_groestlcoin_spark/.cookie" 61 | BTCPAY_GRSEXTERNALCHARGE: "server=/lightning-charge/grs/;cookiefilepath=/etc/clightning_groestlcoin_charge/.cookie" 62 | volumes: 63 | - "clightning_groestlcoin_datadir:/etc/clightning_groestlcoin" 64 | - "clightning_groestlcoin_spark:/etc/clightning_groestlcoin_spark" 65 | - "clightning_groestlcoin_charge:/etc/clightning_groestlcoin_charge" 66 | links: 67 | - clightning_groestlcoin 68 | volumes: 69 | clightning_groestlcoin_datadir: 70 | clightning_groestlcoin_charge: 71 | clightning_groestlcoin_spark: 72 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/zcash-fullnode.yml: -------------------------------------------------------------------------------- 1 | services: 2 | zcash_walletd: 3 | restart: unless-stopped 4 | init: true 5 | image: hhanh00/zcash-walletd:1.1.5 6 | environment: 7 | NOTIFY_TX_URL: http://btcpayserver:49392/zcashlikedaemoncallback/tx?cryptoCode=zec&hash= 8 | ROCKET_DB_PATH: /data/zec-wallet2.db 9 | CONFIG_PATH: /data/config2.json 10 | LWD_URL: http://lightwalletd:9067 11 | expose: 12 | - "8000" 13 | volumes: 14 | - "zec_wallet:/data" 15 | 16 | btcpayserver: 17 | environment: 18 | BTCPAY_ZEC_DAEMON_URI: http://zcash_walletd:8000 19 | BTCPAY_ZEC_WALLET_DAEMON_URI: http://zcash_walletd:8000 20 | BTCPAY_ZEC_WALLET_DAEMON_WALLETDIR: /root/zec_wallet 21 | BTCPAY_ZEC_WALLET_DAEMON_CONFIG_PATH: /root/zec_wallet/config2.json 22 | volumes: 23 | - "zec_wallet:/root/zec_wallet" 24 | 25 | zebra: 26 | container_name: zebra 27 | image: zfnd/zebra:3.0.0 28 | platform: linux/amd64 29 | restart: unless-stopped 30 | deploy: 31 | resources: 32 | reservations: 33 | cpus: "4" 34 | memory: 16G 35 | volumes: 36 | - zebrad-cache:/home/zebra/.cache/zebra 37 | tty: true 38 | environment: 39 | - ZEBRA_RPC__LISTEN_ADDR=0.0.0.0:8232 40 | - ZEBRA_RPC__ENABLE_COOKIE_AUTH=false 41 | ports: 42 | - "8232:8232" 43 | 44 | lightwalletd: 45 | image: electriccoinco/lightwalletd:v0.4.18 46 | platform: linux/amd64 47 | depends_on: 48 | zebra: 49 | condition: service_started 50 | restart: unless-stopped 51 | deploy: 52 | resources: 53 | reservations: 54 | cpus: "4" 55 | memory: 16G 56 | environment: 57 | - LWD_GRPC_PORT=9067 58 | - LWD_HTTP_PORT=9068 59 | configs: 60 | - source: lwd_config 61 | target: /etc/lightwalletd/zcash.conf 62 | volumes: 63 | - lwd-cache:/var/lib/lightwalletd/db 64 | #! This setup with `--no-tls-very-insecure` is only for testing purposes. 65 | #! For production environments, follow the guidelines here: 66 | #! https://github.com/zcash/lightwalletd#production-usage 67 | command: > 68 | --no-tls-very-insecure 69 | --grpc-bind-addr=0.0.0.0:9067 70 | --http-bind-addr=0.0.0.0:9068 71 | --zcash-conf-path=/etc/lightwalletd/zcash.conf 72 | --data-dir=/var/lib/lightwalletd/db 73 | --log-file=/dev/stdout 74 | --log-level=7 75 | ports: 76 | - "127.0.0.1:9067:9067" # gRPC 77 | - "127.0.0.1:9068:9068" # HTTP 78 | 79 | configs: 80 | lwd_config: 81 | file: ./zcash.conf 82 | 83 | volumes: 84 | zec_wallet: 85 | zec_data: 86 | zebrad-cache: 87 | driver: local 88 | 89 | lwd-cache: 90 | driver: local 91 | 92 | exclusive: 93 | - zcash-node 94 | -------------------------------------------------------------------------------- /contrib/FastSync/save-utxo-set.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script shows the steps to create an archive of the current UTXO Set 4 | # It will: 5 | # 1. Shutdown BTCPay Server 6 | # 2. Start bitcoind 7 | # 3. Prune it to up to 289 blocks from the tip 8 | # 4. Stop bitcoind 9 | # 5. Archive in a tarball the blocks and chainstate directories 10 | # 6. Restart BTCPay 11 | # 7. If AZURE_STORAGE_CONNECTION_STRING is set, then upload to azure storage and make the blob public, else print hash and tarball 12 | 13 | : "${AZURE_STORAGE_CONTAINER:=public}" 14 | 15 | if [[ "$AZURE_STORAGE_CONNECTION_STRING" ]] && ! [ -x "$(command -v az)" ]; then 16 | echo "You want to upload the utxoset to azure, but az is not installed. See https://docs.microsoft.com/en-us/cli/azure/ to install it." 17 | exit 18 | fi 19 | 20 | echo "Closing down btcpay... it can take a while" 21 | btcpay-down.sh 22 | 23 | for i in /var/lib/docker/volumes/generated_bitcoin_datadir/_data/utxo-snapshot-*; do 24 | echo "Deleting $i" 25 | rm $i 26 | done 27 | 28 | rm /var/lib/docker/volumes/generated_bitcoin_datadir/_data/utxo-snapshot-* 29 | # Run only bitcoind and connect to it 30 | SCRIPT="$(cat save-utxo-set-in-bitcoind.sh)" 31 | cd "`dirname $BTCPAY_ENV_FILE`" 32 | docker-compose -f $BTCPAY_DOCKER_COMPOSE run --rm -e "NBITCOIN_NETWORK=$NBITCOIN_NETWORK" bitcoind bash -c "$SCRIPT" 33 | btcpay-up.sh 34 | 35 | echo "Calculating the hash of the tar file..." 36 | TAR_FILE="$(echo /var/lib/docker/volumes/generated_bitcoin_datadir/_data/utxo-snapshot-*)" 37 | echo "Tar file of size $(ls -s -h $TAR_FILE)" 38 | TAR_FILE_HASH="$(sha256sum "$TAR_FILE" | cut -d " " -f 1)" 39 | 40 | if [[ "$AZURE_STORAGE_CONNECTION_STRING" ]]; then 41 | echo "Uploading to azure..." 42 | # Install az from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest 43 | 44 | BLOB_NAME="$(basename -- $TAR_FILE)" 45 | az storage container create --name "$AZURE_STORAGE_CONTAINER" --public-access "blob" 46 | az storage blob upload -f "$TAR_FILE" \ 47 | -c "$AZURE_STORAGE_CONTAINER" \ 48 | -n "$BLOB_NAME" \ 49 | --content-type "application/x-tar" 50 | 51 | az storage blob metadata update --container-name "$AZURE_STORAGE_CONTAINER" --name "$BLOB_NAME" --metadata "sha256=$TAR_FILE_HASH" 52 | 53 | # Print the sha256sum. Downloaders will need to verify this 54 | STORAGE_URL="$(az storage blob url --container-name "$AZURE_STORAGE_CONTAINER" --name "$BLOB_NAME" --protocol "http")" 55 | echo "You can now download the UTXO on $STORAGE_URL" 56 | echo "Please, after download, verify the sha256 with:" 57 | echo "echo "$TAR_FILE_HASH $BLOB_NAME" | sha256sum -c -" 58 | rm "$TAR_FILE" 59 | else 60 | echo "SHA256: $TAR_FILE_HASH" 61 | echo "File at: $TAR_FILE" 62 | fi 63 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/bitcoin-clightning.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | clightning_bitcoin: 5 | image: btcpayserver/lightning:v25.05 6 | container_name: btcpayserver_clightning_bitcoin 7 | restart: unless-stopped 8 | environment: 9 | LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest} 10 | LIGHTNINGD_CHAIN: btc 11 | LIGHTNINGD_ALIAS: ${LIGHTNING_ALIAS} 12 | LIGHTNINGD_ANNOUNCEADDR: ${BTCPAY_ANNOUNCEABLE_HOST} 13 | LIGHTNINGD_PORT: 9735 14 | LIGHTNINGD_READY_FILE: /root/.nbxplorer/btc_fully_synched 15 | LIGHTNINGD_OPT: | 16 | bitcoin-datadir=/etc/bitcoin 17 | bitcoin-rpcconnect=bitcoind 18 | experimental-offers 19 | database-upgrade=true 20 | rpc-file-mode=0666 21 | clnrest-port=3010 22 | clnrest-protocol=http 23 | clnrest-host=0.0.0.0 24 | grpc-port=9736 25 | volumes: 26 | - "clightning_bitcoin_datadir:/root/.lightning" 27 | - "bitcoin_datadir:/etc/bitcoin" 28 | - "nbxplorer_datadir:/root/.nbxplorer" 29 | ports: 30 | - "9735:9735" 31 | - "3010" 32 | expose: 33 | - "9736" 34 | links: 35 | - bitcoind 36 | 37 | bitcoin_rtl: 38 | image: shahanafarooqui/rtl:v0.15.4 39 | restart: unless-stopped 40 | environment: 41 | LN_IMPLEMENTATION: CLN 42 | CONFIG_PATH: /root/.lightning/config 43 | LN_SERVER_URL: http://clightning_bitcoin:3010 44 | RUNE_PATH: /root/.lightning/rune.env 45 | RTL_CONFIG_PATH: /data/ 46 | BITCOIND_CONFIG_PATH: /etc/bitcoin/bitcoin.conf 47 | RTL_SSO: 1 48 | RTL_COOKIE_PATH: /data/.cookie 49 | LOGOUT_REDIRECT_LINK: /server/services 50 | labels: 51 | traefik.enable: "true" 52 | traefik.http.routers.bitcoin_rtl.rule: Host(`${BTCPAY_HOST}`) && (Path(`/rtl`) || PathPrefix(`/rtl/`)) 53 | volumes: 54 | - "clightning_bitcoin_datadir:/root/.lightning" 55 | - "bitcoin_datadir:/etc/bitcoin" 56 | - "clightning_bitcoin_rtl_datadir:/data" 57 | expose: 58 | - "3000" 59 | 60 | mempool_api: 61 | environment: 62 | LIGHTNING_ENABLED: "true" 63 | LIGHTNING_BACKEND: "cln" 64 | CLIGHTNING_SOCKET: "/etc/lightning/lightning-rpc" 65 | volumes: 66 | - "clightning_bitcoin_datadir:/etc/lightning" 67 | 68 | mempool_web: 69 | environment: 70 | LIGHTNING: "true" 71 | 72 | btcpayserver: 73 | environment: 74 | BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc" 75 | BTCPAY_BTCEXTERNALRTL: "server=/rtl/api/authenticate/cookie;cookiefile=/etc/clightning_bitcoin_rtl/.cookie" 76 | volumes: 77 | - "clightning_bitcoin_datadir:/etc/clightning_bitcoin" 78 | - "clightning_bitcoin_rtl_datadir:/etc/clightning_bitcoin_rtl" 79 | links: 80 | - clightning_bitcoin 81 | volumes: 82 | clightning_bitcoin_datadir: 83 | clightning_bitcoin_rtl_datadir: 84 | exclusive: 85 | - lightning 86 | -------------------------------------------------------------------------------- /docker-compose-generator/crypto-definitions.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "Crypto": "ltc", 4 | "CryptoFragment": "litecoin", 5 | "CLightningFragment": null, 6 | "LNDFragment": null, 7 | "EclairFragment": null, 8 | "PhoenixdFragment": null 9 | }, 10 | { 11 | "Crypto": "btc", 12 | "CryptoFragment": "bitcoin", 13 | "CLightningFragment": "bitcoin-clightning", 14 | "LNDFragment": "bitcoin-lnd", 15 | "EclairFragment": "bitcoin-eclair", 16 | "PhoenixdFragment": "phoenixd" 17 | }, 18 | { 19 | "Crypto": "btx", 20 | "CryptoFragment": "bitcore", 21 | "CLightningFragment": null, 22 | "LNDFragment": null, 23 | "EclairFragment": null, 24 | "PhoenixdFragment": null 25 | }, 26 | { 27 | "Crypto": "btg", 28 | "CryptoFragment": "bgold", 29 | "CLightningFragment": null, 30 | "LNDFragment": "bgold-lnd", 31 | "EclairFragment": null, 32 | "PhoenixdFragment": null 33 | }, 34 | { 35 | "Crypto": "ftc", 36 | "CryptoFragment": "feathercoin", 37 | "CLightningFragment": null, 38 | "LNDFragment": null, 39 | "EclairFragment": null, 40 | "PhoenixdFragment": null 41 | }, 42 | { 43 | "Crypto": "grs", 44 | "CryptoFragment": "groestlcoin", 45 | "CLightningFragment": "groestlcoin-clightning", 46 | "LNDFragment": "groestlcoin-lnd", 47 | "EclairFragment": "groestlcoin-eclair", 48 | "PhoenixdFragment": null 49 | }, 50 | { 51 | "Crypto": "via", 52 | "CryptoFragment": "viacoin", 53 | "CLightningFragment": null, 54 | "LNDFragment": null, 55 | "EclairFragment": null, 56 | "PhoenixdFragment": null 57 | }, 58 | { 59 | "Crypto": "dash", 60 | "CryptoFragment": "dash", 61 | "CLightningFragment": null, 62 | "LNDFragment": null, 63 | "EclairFragment": null, 64 | "PhoenixdFragment": null 65 | }, 66 | { 67 | "Crypto": "doge", 68 | "CryptoFragment": "dogecoin", 69 | "CLightningFragment": null, 70 | "LNDFragment": null, 71 | "EclairFragment": null, 72 | "PhoenixdFragment": null 73 | }, 74 | { 75 | "Crypto": "mona", 76 | "CryptoFragment": "monacoin", 77 | "CLightningFragment": null, 78 | "LNDFragment": null, 79 | "EclairFragment": null, 80 | "PhoenixdFragment": null 81 | }, 82 | { 83 | "Crypto": "xmr", 84 | "CryptoFragment": "monero", 85 | "CLightningFragment": null, 86 | "LNDFragment": null, 87 | "EclairFragment": null, 88 | "PhoenixdFragment": null 89 | }, 90 | { 91 | "Crypto": "lbtc", 92 | "CryptoFragment": "liquid", 93 | "CLightningFragment": null, 94 | "LNDFragment": null, 95 | "EclairFragment": null, 96 | "PhoenixdFragment": null 97 | }, 98 | { 99 | "Crypto": "zec", 100 | "CryptoFragment": "zcash", 101 | "CLightningFragment": null, 102 | "LNDFragment": null, 103 | "EclairFragment": null, 104 | "PhoenixdFragment": null 105 | } 106 | ] 107 | -------------------------------------------------------------------------------- /Production/postgres/migrate-docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -Eeo pipefail 3 | shopt -s extglob 4 | 5 | CURRENT_PGVERSION="" 6 | EXPECTED_PGVERSION="$PG_MAJOR" 7 | if [[ -f "/var/lib/postgresql/data/PG_VERSION" ]]; then 8 | CURRENT_PGVERSION="$(cat /var/lib/postgresql/data/PG_VERSION)" 9 | fi 10 | 11 | if [[ "$CURRENT_PGVERSION" != "$EXPECTED_PGVERSION" ]] && \ 12 | [[ "$CURRENT_PGVERSION" != "" ]]; then 13 | sed -i "s/$/ $CURRENT_PGVERSION/" /etc/apt/sources.list.d/pgdg.list 14 | if ! apt-get update; then 15 | echo "apt-get update failed. Are you using raspberry pi 4? If yes, please follow https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/" 16 | exit 1 17 | fi 18 | if ! apt-get install -y --no-install-recommends \ 19 | postgresql-$CURRENT_PGVERSION \ 20 | postgresql-contrib-$CURRENT_PGVERSION; then 21 | # On arm32, postgres doesn't ship those packages, so we download 22 | # the binaries from an archive we built from the postgres 9.6.20 image's binaries 23 | FALLBACK="https://aois.blob.core.windows.net/public/$CURRENT_PGVERSION-$(uname -m).tar.gz" 24 | FALLBACK_SHARE="https://aois.blob.core.windows.net/public/share-$CURRENT_PGVERSION-$(uname -m).tar.gz" 25 | echo "Failure to install postgresql-$CURRENT_PGVERSION and postgresql-contrib-$CURRENT_PGVERSION trying fallback $FALLBACK" 26 | apt-get install -y wget 27 | pushd . > /dev/null 28 | cd /usr/lib/postgresql 29 | wget $FALLBACK 30 | tar -xvf *.tar.gz 31 | rm -f *.tar.gz 32 | cd /usr/share/postgresql 33 | wget $FALLBACK_SHARE 34 | tar -xvf *.tar.gz 35 | rm -f *.tar.gz 36 | popd > /dev/null 37 | echo "Successfully installed PG utilities via the fallback" 38 | fi 39 | 40 | export PGBINOLD="/usr/lib/postgresql/$CURRENT_PGVERSION/bin" 41 | export PGDATABASE="/var/lib/postgresql/data" 42 | export PGDATAOLD="/var/lib/postgresql/data/$CURRENT_PGVERSION" 43 | export PGDATANEW="/var/lib/postgresql/data/$EXPECTED_PGVERSION" 44 | 45 | mkdir -p "$PGDATANEW" "$PGDATAOLD" 46 | find "$PGDATABASE" -maxdepth 1 -mindepth 1 \ 47 | -not -wholename "$PGDATAOLD" \ 48 | -not -wholename "$PGDATANEW" \ 49 | -exec mv {} "$PGDATAOLD/" \; 50 | 51 | chmod 700 "$PGDATAOLD" "$PGDATANEW" 52 | chown postgres . 53 | chown -R postgres "$PGDATAOLD" "$PGDATANEW" "$PGDATABASE" 54 | if [ ! -s "$PGDATANEW/PG_VERSION" ]; then 55 | PGDATA="$PGDATANEW" eval "gosu postgres initdb $POSTGRES_INITDB_ARGS" 56 | fi 57 | 58 | gosu postgres pg_upgrade 59 | rm $PGDATANEW/*.conf 60 | mv $PGDATANEW/* "$PGDATABASE" 61 | mv $PGDATAOLD/*.conf "$PGDATABASE" 62 | rm -r "$PGDATANEW" 63 | ./delete_old_cluster.sh 64 | rm ./analyze_new_cluster.sh 65 | fi 66 | 67 | if [ -f "docker-entrypoint.sh" ]; then 68 | exec ./docker-entrypoint.sh "$@" 69 | else 70 | exec docker-entrypoint.sh "$@" 71 | fi -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/bitcoin-eclair.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | bitcoind: 5 | environment: 6 | BITCOIN_EXTRA_ARGS: | 7 | rpcauth=eclair:d3a244200d5c946f6bef48e6583ec979$$215049513aef33245dfec8ff3ab5e749458fde51ede931dec04c767c0732d468 8 | eclair_bitcoin: 9 | container_name: btcpayserver_eclair_bitcoin 10 | restart: unless-stopped 11 | stop_signal: SIGINT 12 | image: acinq/eclair:release-0.7.0 13 | environment: 14 | PUBLIC_HOST: ${BTCPAY_HOST} 15 | JAVA_OPTS: | 16 | -Declair.printToConsole 17 | -Declair.headless 18 | -Declair.chain=${NBITCOIN_NETWORK:-regtest} 19 | -Declair.server.binding-ip=0.0.0.0 20 | -Declair.server.public-ips.0=${BTCPAY_HOST} 21 | -Declair.server.port=9735 22 | -Declair.api.enabled=true 23 | -Declair.api.binding-ip=0.0.0.0 24 | -Declair.api.port=8080 25 | -Declair.node-alias=${LIGHTNING_ALIAS} 26 | -Declair.api.password=DwubwWsoo3 27 | -Declair.bitcoind.host=bitcoind 28 | -Declair.bitcoind.rpcport=43782 29 | -Declair.bitcoind.rpcuser=eclair 30 | -Declair.bitcoind.rpcpassword=sFLjcg99Puh4k3CAZCQkLvC-fcoFUFRyKwKcXQKa7dw= 31 | -Declair.bitcoind.zmqblock=tcp://bitcoind:28334 32 | -Declair.bitcoind.zmqtx=tcp://bitcoind:28333 33 | expose: 34 | - "9735" # server port 35 | - "8080" # api port 36 | volumes: 37 | - "bitcoin_datadir:/etc/bitcoin" 38 | - "eclair_bitcoin_datadir:/data" 39 | links: 40 | - bitcoind 41 | 42 | bitcoin_rtl: 43 | image: shahanafarooqui/rtl:v0.15.4 44 | restart: unless-stopped 45 | environment: 46 | LN_IMPLEMENTATION: ECL 47 | LN_SERVER_URL: http://eclair_bitcoin:8080 48 | LN_API_PASSWORD: DwubwWsoo3 49 | BITCOIND_CONFIG_PATH: /etc/bitcoin/bitcoin.conf 50 | RTL_SSO: 1 51 | RTL_COOKIE_PATH: /data/.cookie 52 | LOGOUT_REDIRECT_LINK: /server/services 53 | volumes: 54 | - "bitcoin_datadir:/etc/bitcoin" 55 | - "eclair_bitcoin_datadir:/etc/eclair" 56 | - "eclair_bitcoin_rtl_datadir:/data" 57 | expose: 58 | - "3000" 59 | labels: 60 | traefik.enable: "true" 61 | traefik.http.routers.bitcoin_rtl.rule: Host(`${BTCPAY_HOST}`) && (Path(`/rtl`) || PathPrefix(`/rtl/`)) 62 | links: 63 | - eclair_bitcoin 64 | 65 | btcpayserver: 66 | environment: 67 | BTCPAY_BTCLIGHTNING: "type=eclair;server=http://eclair_bitcoin:8080;password=DwubwWsoo3" 68 | BTCPAY_BTCEXTERNALRTL: "server=/rtl/api/authenticate/cookie;cookiefile=/etc/eclair_bitcoin_rtl/.cookie" 69 | volumes: 70 | - "eclair_bitcoin_datadir:/etc/eclair_bitcoin" 71 | - "eclair_bitcoin_rtl_datadir:/etc/eclair_bitcoin_rtl" 72 | links: 73 | - eclair_bitcoin 74 | volumes: 75 | eclair_bitcoin_datadir: 76 | eclair_bitcoin_rtl_datadir: 77 | 78 | incompatible: 79 | - pruning 80 | required: 81 | - "opt-add-zmq" 82 | - "opt-txindex" 83 | exclusive: 84 | - lightning 85 | -------------------------------------------------------------------------------- /btcpay-update.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [[ "$OSTYPE" == "darwin"* ]]; then 6 | # Mac OS 7 | BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh" 8 | 9 | else 10 | # Linux 11 | BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh" 12 | fi 13 | 14 | . ${BASH_PROFILE_SCRIPT} 15 | 16 | if [ ! -z $BTCPAY_DOCKER_COMPOSE ] && [ ! -z $DOWNLOAD_ROOT ] && [ -z $BTCPAYGEN_OLD_PREGEN ]; then 17 | echo "Your deployment is too old, you need to migrate by following instructions on this link https://github.com/btcpayserver/btcpayserver-docker/tree/master#i-deployed-before-btcpay-setupsh-existed-before-may-17-can-i-migrate-to-this-new-system" 18 | exit 19 | fi 20 | 21 | if [[ $BTCPAY_DOCKER_COMPOSE != *docker-compose.generated.yml ]]; then 22 | echo "Your deployment is too old, you need to migrate by following instructions on this link https://github.com/btcpayserver/btcpayserver-docker/tree/master#i-deployed-before-btcpay-setupsh-existed-before-may-17-can-i-migrate-to-this-new-system" 23 | exit 24 | fi 25 | 26 | cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" 27 | 28 | if [[ "$1" != "--skip-git-pull" ]]; then 29 | git pull --force 30 | exec "btcpay-update.sh" --skip-git-pull 31 | return 32 | fi 33 | 34 | if ! [ -f "/etc/docker/daemon.json" ] && [ -w "/etc/docker" ]; then 35 | echo "{ 36 | \"log-driver\": \"json-file\", 37 | \"log-opts\": {\"max-size\": \"5m\", \"max-file\": \"3\"} 38 | }" > /etc/docker/daemon.json 39 | echo "Setting limited log files in /etc/docker/daemon.json" 40 | fi 41 | 42 | . helpers.sh 43 | docker_update 44 | 45 | if ! ./build.sh; then 46 | echo "Failed to generate the docker-compose" 47 | exit 1 48 | fi 49 | 50 | if [ "$BTCPAYGEN_OLD_PREGEN" == "true" ]; then 51 | cp Generated/docker-compose.generated.yml $BTCPAY_DOCKER_COMPOSE 52 | cp Generated/torrc.tmpl "$(dirname "$BTCPAY_DOCKER_COMPOSE")/torrc.tmpl" 53 | fi 54 | 55 | if ! grep -Fxq "export COMPOSE_HTTP_TIMEOUT=\"180\"" "$BASH_PROFILE_SCRIPT"; then 56 | echo "export COMPOSE_HTTP_TIMEOUT=\"180\"" >> "$BASH_PROFILE_SCRIPT" 57 | export COMPOSE_HTTP_TIMEOUT=180 58 | echo "Adding COMPOSE_HTTP_TIMEOUT=180 in btcpay-env.sh" 59 | fi 60 | 61 | if [[ "$ACME_CA_URI" == "https://acme-v01.api.letsencrypt.org/directory" ]]; then 62 | original_acme="$ACME_CA_URI" 63 | export ACME_CA_URI="production" 64 | echo "Info: Rewriting ACME_CA_URI from $original_acme to $ACME_CA_URI" 65 | fi 66 | 67 | if [[ "$ACME_CA_URI" == "https://acme-staging.api.letsencrypt.org/directory" ]]; then 68 | original_acme="$ACME_CA_URI" 69 | export ACME_CA_URI="staging" 70 | echo "Info: Rewriting ACME_CA_URI from $original_acme to $ACME_CA_URI" 71 | fi 72 | 73 | install_tooling 74 | 75 | if $BTCPAY_ENABLE_SSH && [[ "$BTCPAY_SSHKEYFILE" == "/datadir/host_id_rsa" ]]; then 76 | BTCPAY_SSHKEYFILE="/datadir/host_id_ed25519" 77 | echo "Info: BTCPAY -> Host SSH connection changed ssh keys from rsa to ed25519" 78 | fi 79 | btcpay_update_docker_env 80 | btcpay_up 81 | 82 | set +e 83 | docker image prune -af --filter "label!=org.btcpayserver.image=docker-compose-generator" 84 | -------------------------------------------------------------------------------- /jm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function display_help () { 4 | cat <<-END 5 | Usage: 6 | ------ 7 | 8 | Tooling to setup your joinmarket yield generator 9 | 10 | wallet-tool: Run wallet-tools.py on the wallet 11 | wallet-tool-generate: Generate a new wallet 12 | set-wallet: Set the wallet that the yield generator need to use 13 | bash: Open an interactive bash session in the joinmarket container 14 | receive-payjoin: Receive a payjoin payment 15 | sendpayment: Send a payjoin through coinjoin (password needed) 16 | reset-config: Reset the configuration to its default value 17 | 18 | Example: 19 | * jm.sh wallet-tool-generate 20 | * jm.sh set-wallet wallet.jmdat mypassword 21 | * jm.sh wallet-tool 22 | * jm.sh receive-payjoin 23 | * jm.sh sendpayment
24 | * jm.sh wallet-tool history 25 | * jm.sh reset-config 26 | * jm.sh bash 27 | 28 | See https://github.com/btcpayserver/btcpayserver-docker/tree/master/docs/joinmarket.md for more information. 29 | END 30 | } 31 | 32 | while (( "$#" )); do 33 | case "$1" in 34 | bash) 35 | CMD="$1" 36 | shift 1 37 | break; 38 | ;; 39 | reset-config) 40 | CMD="$1" 41 | shift 1 42 | break; 43 | ;; 44 | wallet-tool) 45 | CMD="$1" 46 | shift 1 47 | break; 48 | ;; 49 | set-wallet) 50 | CMD="$1" 51 | shift 1 52 | break; 53 | ;; 54 | receive-payjoin) 55 | CMD="$1" 56 | shift 1 57 | break; 58 | ;; 59 | sendpayment) 60 | CMD="$1" 61 | shift 1 62 | break; 63 | ;; 64 | wallet-tool-generate) 65 | CMD="$1" 66 | shift 1 67 | break; 68 | ;; 69 | --) # end argument parsing 70 | shift 71 | break 72 | ;; 73 | -*|--*=) # unsupported flags 74 | echo "Error: Unsupported flag $1" >&2 75 | display_help 76 | return 77 | ;; 78 | *) # preserve positional arguments 79 | PARAMS="$PARAMS $1" 80 | shift 81 | ;; 82 | esac 83 | done 84 | 85 | if ! [[ "$CMD" ]]; then 86 | display_help 87 | else 88 | if [[ "$CMD" == "wallet-tool" ]]; then 89 | docker exec joinmarket exec-wrapper.sh unlockwallet wallet-tool.py "$@" 90 | elif [[ "$CMD" == "wallet-tool-generate" ]]; then 91 | docker exec -ti joinmarket exec-wrapper.sh wallet-tool.py generate "$@" 92 | elif [[ "$CMD" == "sendpayment" ]]; then 93 | docker exec -ti joinmarket exec-wrapper.sh unlockwallet nopass sendpayment.py "$@" 94 | elif [[ "$CMD" == "receive-payjoin" ]]; then 95 | docker exec -ti joinmarket exec-wrapper.sh unlockwallet receive-payjoin.py "$@" 96 | elif [[ "$CMD" == "set-wallet" ]]; then 97 | docker exec joinmarket set-wallet.sh "$@" 98 | docker restart joinmarket 99 | elif [[ "$CMD" == "reset-config" ]]; then 100 | docker exec -ti joinmarket bash -c 'rm -f "$CONFIG"' 101 | docker restart joinmarket 102 | elif [[ "$CMD" == "bash" ]]; then 103 | docker exec -ti joinmarket exec-wrapper.sh bash "$@" 104 | else 105 | display_help 106 | fi 107 | fi 108 | -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/groestlcoin-lnd.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | lnd_groestlcoin: 5 | image: groestlcoin/lnd:v0.10.0-grs 6 | container_name: btcpayserver_lnd_groestlcoin 7 | restart: unless-stopped 8 | environment: 9 | LND_CHAIN: "grs" 10 | LND_EXTERNALIP: ${BTCPAY_ANNOUNCEABLE_HOST} 11 | LND_PORT: 9736 12 | LND_ALIAS: ${LIGHTNING_ALIAS} 13 | LND_ENVIRONMENT: "${NBITCOIN_NETWORK:-regtest}" 14 | LND_REST_LISTEN_HOST: http://lnd_groestlcoin:8080 15 | LND_HOST_FOR_LOOP: 127.0.0.1:10009 16 | LND_EXTRA_ARGS: | 17 | restlisten=lnd_groestlcoin:8080 18 | rpclisten=127.0.0.1:10008 19 | rpclisten=lnd_groestlcoin:10009 20 | rpclisten=127.0.0.1:10009 21 | groestlcoin.node=groestlcoind 22 | groestlcoind.rpchost=groestlcoind:43782 23 | groestlcoind.rpcuser=lnd 24 | groestlcoind.rpcpass=afixedpasswordbecauselndsuckswithcookiefile 25 | groestlcoind.zmqpubrawblock=tcp://groestlcoind:21441 26 | groestlcoind.zmqpubrawtx=tcp://groestlcoind:21441 27 | adminmacaroonpath=/data/admin.macaroon 28 | invoicemacaroonpath=/data/invoice.macaroon 29 | readonlymacaroonpath=/data/readonly.macaroon 30 | tlsextradomain=lnd_groestlcoin 31 | no-rest-tls=1 32 | protocol.wumbo-channels=1 33 | ports: 34 | - "9736:9736" 35 | expose: 36 | - "8080" 37 | - "8081" 38 | - "9736" 39 | volumes: 40 | - "lnd_groestlcoin_datadir:/data" 41 | - "groestlcoin_datadir:/deps/.groestlcoin" 42 | - "nbxplorer_datadir:/root/.nbxplorer" 43 | links: 44 | - groestlcoind 45 | 46 | btcpayserver: 47 | environment: 48 | BTCPAY_GRSLIGHTNING: "type=lnd-rest;server=http://lnd_groestlcoin:8080/;macaroonfilepath=/etc/lnd_groestlcoin/admin.macaroon;allowinsecure=true" 49 | BTCPAY_GRSEXTERNALLNDGRPC: "server=/;macaroonfilepath=/etc/lnd_groestlcoin/admin.macaroon;macaroondirectorypath=/etc/lnd_groestlcoin" 50 | BTCPAY_GRSEXTERNALLNDREST: "server=/lnd-rest/grs/;macaroonfilepath=/etc/lnd_groestlcoin/admin.macaroon;macaroondirectorypath=/etc/lnd_groestlcoin" 51 | BTCPAY_GRSEXTERNALLNDSEEDBACKUP: "/etc/lnd_groestlcoin/data/chain/groestlcoin/${NBITCOIN_NETWORK:-regtest}/walletunlock.json" 52 | volumes: 53 | - "lnd_groestlcoin_datadir:/etc/lnd_groestlcoin" 54 | links: 55 | - lnd_groestlcoin 56 | 57 | groestlcoind: 58 | environment: 59 | GROESTLCOIN_EXTRA_ARGS: | 60 | # rpcuser=lnd 61 | # rpcpassword=afixedpasswordbecauselndsuckswithcookiefile 62 | # We need to use rpcauth because we also need cookieauth. rpcpassword disabled cookie file auth. 63 | # Be careful if you copy the line below from the docker-compose.yml! A dollar sign is escaped. 64 | rpcauth=lnd:d031f7567c5b02ba95524170e51c77f4$$827ce5412f653d6613c2f480e521eb437c866b999bdeb2ee4f9c41d3b00dff1c 65 | 66 | nginx: 67 | links: 68 | - "lnd_groestlcoin" 69 | volumes: 70 | - "lnd_groestlcoin_datadir:/lnd" 71 | nginx-gen: 72 | links: 73 | - "lnd_groestlcoin" 74 | volumes: 75 | - "lnd_groestlcoin_datadir:/lnd" 76 | 77 | volumes: 78 | lnd_groestlcoin_datadir: 79 | 80 | required: 81 | - "opt-add-zmq" 82 | -------------------------------------------------------------------------------- /Production/README.md: -------------------------------------------------------------------------------- 1 | # How to use docker-compose with NGinx 2 | 3 | NGinx acts as a reverse proxy, and takes care of renewing HTTPS certificates for you. 4 | BTCPay Server deployment using NGinx are typically composed of: 5 | 6 | 1. One full node per supported cryptocurrency (bitcoind/litecoind) 7 | 2. A lightweight block explorer ([NBxplorer](https://github.com/dgarage/NBXplorer)) 8 | 3. A [BTCPay Server](https://github.com/btcpayserver/btcpayserver) 9 | 4. A database (Postgres) 10 | 5. A reverse proxy (NGINX) 11 | 6. Two containers configuring NGINX as a reverse proxy and renewing SSL certificates. 12 | 13 | ![Architecture](Production.png) 14 | 15 | [The Deploy on Azure Button](https://github.com/btcpayserver/btcpayserver-azure) is using this `docker-compose` under the hood on an Ubuntu machine. You can use it on any docker supporting host. 16 | 17 | The relevant environment variables are: 18 | 19 | * `NBITCOIN_NETWORK`: The blockchain identifier used by NBitcoin (eg., `regtest`, `testnet`, `mainnet`) 20 | * `BTCPAY_HOST`: The external url used to access the NGINX server from internet. This domain name must point to this machine for Let's Encrypt to create your certificate. (typically with a CNAME or A record) 21 | * `BTCPAY_LIGHTNING_HOST`: The hostname announced for your node on the lightning network (by default, the `BTCPAY_HOST` will be used) 22 | * `BTCPAY_ROOTPATH`: The root path directory where BTCPay is accessed, more information below. (default: /) 23 | * `LETSENCRYPT_EMAIL`: The email Let's Encrypt will use to notify you about certificate expiration. 24 | * `ACME_CA_URI`: Let's encrypt API endpoint (`staging` for a staging certificate, `production` for a production one) 25 | * `LIGHTNING_ALIAS`: Optional, if using the integrated lightning feature, customize the alias of your nodes 26 | * `BTCPAY_SSHKEYFILE`: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server (You need to copy the key file on BTCPay's datadir volume) 27 | * `BTCPAY_SSHTRUSTEDFINGERPRINTS`: Optional, BTCPay will ensure that it is connecting to the expected SSH server by checking the host public's key against those fingerprints 28 | 29 | If `BTCPAY_HOST` is `btcpay.example.com` and `BTCPAY_ROOTPATH` is `/btcpay`, then you can access the site via `https://btcpay.example.com/btcpay` 30 | 31 | Any unset or empty environment variable will be set for a `regtest` deployment. 32 | 33 | The ports mapped on the host are: 34 | 35 | 1. `80` for Let's encrypt 36 | 2. `443` for the website 37 | 3. `9735` for the bitcoin lightning network node (if used) 38 | 4. `9736` for the litecoin lightning network node (if used) 39 | 40 | Example for running on `mainnet`: 41 | 42 | For linux: 43 | 44 | ``` 45 | docker-compose up \ 46 | -e "NBITCOIN_NETWORK=mainnet" \ 47 | -e "BTCPAY_HOST=btcpay.example.com" \ 48 | -e "LETSENCRYPT_EMAIL=me@example.com" \ 49 | -e "ACME_CA_URI=production" 50 | ``` 51 | 52 | For powershell: 53 | 54 | ``` 55 | docker-compose up ` 56 | -e "NBITCOIN_NETWORK=mainnet" ` 57 | -e "BTCPAY_HOST=btcpay.example.com" ` 58 | -e "LETSENCRYPT_EMAIL=me@example.com" ` 59 | -e "ACME_CA_URI=production" 60 | ``` 61 | 62 | See also [The guide for docker noobs](../README.md#fornoobs). 63 | 64 | Make sure the domain `btcpay.example.com` point to your server and that port `80` and `443` are open. -------------------------------------------------------------------------------- /docker-compose-generator/docker-fragments/opt-add-zammad.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | zammad-backup: 5 | command: ["zammad-backup"] 6 | depends_on: 7 | - zammad-railsserver 8 | entrypoint: /usr/local/bin/backup.sh 9 | environment: 10 | - BACKUP_SLEEP=86400 11 | - HOLD_DAYS=10 12 | - POSTGRESQL_HOST=postgres 13 | - POSTGRESQL_USER=postgres 14 | - POSTGRESQL_PASSWORD= 15 | image: zammad/zammad-docker-compose:zammad-postgresql-3.4.0-4 16 | links: 17 | - postgres 18 | restart: unless-stopped 19 | volumes: 20 | - zammad-backup:/var/tmp/zammad 21 | - zammad-data:/opt/zammad 22 | zammad-elasticsearch: 23 | environment: 24 | - discovery.type=single-node 25 | image: zammad/zammad-docker-compose:zammad-elasticsearch-3.4.0-4 26 | restart: unless-stopped 27 | volumes: 28 | - elasticsearch-data:/usr/share/elasticsearch/data 29 | 30 | zammad-init: 31 | command: ["zammad-init"] 32 | depends_on: 33 | - postgres 34 | environment: 35 | - POSTGRESQL_HOST=postgres 36 | - POSTGRESQL_USER=postgres 37 | - POSTGRESQL_PASS= 38 | image: zammad/zammad-docker-compose:zammad-3.4.0-4 39 | links: 40 | - zammad-elasticsearch 41 | - postgres 42 | restart: on-failure 43 | volumes: 44 | - zammad-data:/opt/zammad 45 | 46 | zammad-memcached: 47 | command: memcached -m 256M 48 | image: memcached:1.5.22-alpine 49 | restart: unless-stopped 50 | 51 | zammad-nginx: 52 | command: ["zammad-nginx"] 53 | expose: 54 | - "80" 55 | depends_on: 56 | - zammad-railsserver 57 | image: zammad/zammad-docker-compose:zammad-3.4.0-4 58 | links: 59 | - zammad-railsserver 60 | - zammad-websocket 61 | restart: unless-stopped 62 | environment: 63 | VIRTUAL_HOST: ${ZAMMAD_HOST} 64 | VIRTUAL_HOST_NAME: "zammad" 65 | LETSENCRYPT_HOST: ${ZAMMAD_HOST} 66 | LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-} 67 | volumes: 68 | - zammad-data:/opt/zammad 69 | 70 | zammad-railsserver: 71 | command: ["zammad-railsserver"] 72 | depends_on: 73 | - zammad-memcached 74 | - postgres 75 | image: zammad/zammad-docker-compose:zammad-3.4.0-4 76 | links: 77 | - zammad-elasticsearch 78 | - zammad-memcached 79 | - postgres 80 | restart: unless-stopped 81 | volumes: 82 | - zammad-data:/opt/zammad 83 | 84 | zammad-scheduler: 85 | command: ["zammad-scheduler"] 86 | depends_on: 87 | - zammad-memcached 88 | - zammad-railsserver 89 | image: zammad/zammad-docker-compose:zammad-3.4.0-4 90 | links: 91 | - zammad-elasticsearch 92 | - zammad-memcached 93 | - postgres 94 | restart: unless-stopped 95 | volumes: 96 | - zammad-data:/opt/zammad 97 | 98 | zammad-websocket: 99 | command: ["zammad-websocket"] 100 | depends_on: 101 | - zammad-memcached 102 | - zammad-railsserver 103 | image: zammad/zammad-docker-compose:zammad-3.4.0-4 104 | links: 105 | - postgres 106 | - zammad-memcached 107 | restart: unless-stopped 108 | volumes: 109 | - zammad-data:/opt/zammad 110 | btcpayserver: 111 | environment: 112 | BTCPAY_EXTERNALSERVICES: "Zammad: ${BTCPAY_PROTOCOL:-https}://${ZAMMAD_HOST};" 113 | volumes: 114 | elasticsearch-data: 115 | zammad-backup: 116 | zammad-data: 117 | -------------------------------------------------------------------------------- /docker-compose-generator/src/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text.Json; 6 | using YamlDotNet.Serialization; 7 | 8 | namespace DockerGenerator 9 | { 10 | class Program 11 | { 12 | 13 | static void Main(string[] args) 14 | { 15 | var root = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1" ? FindRoot("app") 16 | : Path.GetFullPath(Path.Combine(FindRoot("docker-compose-generator"), "..")); 17 | 18 | var composition = DockerComposition.FromEnvironmentVariables(); 19 | Console.WriteLine("Crypto: " + string.Join(", ", composition.SelectedCryptos.ToArray())); 20 | Console.WriteLine("Lightning: " + composition.SelectedLN); 21 | Console.WriteLine("ReverseProxy: " + composition.SelectedProxy); 22 | var generatedLocation = Path.GetFullPath(Path.Combine(root, "Generated")); 23 | 24 | var name = Environment.GetEnvironmentVariable("BTCPAYGEN_SUBNAME"); 25 | name = string.IsNullOrEmpty(name) ? "generated" : name; 26 | try 27 | { 28 | new Program().Run(composition, name, generatedLocation); 29 | } 30 | catch (YamlBuildException ex) 31 | { 32 | ConsoleUtils.WriteLine(ex.Message, ConsoleColor.Red); 33 | Environment.ExitCode = 1; 34 | } 35 | } 36 | 37 | private void Run(DockerComposition composition, string name, string output) 38 | { 39 | var root = Environment.GetEnvironmentVariable("INSIDE_CONTAINER") == "1" ? "app" : "docker-compose-generator"; 40 | root = FindRoot(root); 41 | var fragmentLocation = Path.GetFullPath(Path.Combine(root, "docker-fragments")); 42 | var cryptoDefinitionsLocation = Path.GetFullPath(Path.Combine(root, "crypto-definitions.json")); 43 | var cryptoDefinitions = 44 | JsonSerializer.Deserialize(File.ReadAllText(cryptoDefinitionsLocation)); 45 | var fragments = new HashSet(); 46 | switch (composition.SelectedProxy) 47 | { 48 | case "nginx": 49 | fragments.Add("nginx"); 50 | break; 51 | case "traefik": 52 | fragments.Add("traefik"); 53 | break; 54 | case "no-reverseproxy": 55 | case "none": 56 | case "": 57 | fragments.Add("btcpayserver-noreverseproxy"); 58 | break; 59 | } 60 | fragments.Add("btcpayserver"); 61 | 62 | bool hasAltcoins = false; 63 | foreach (var crypto in cryptoDefinitions) 64 | { 65 | if (!composition.SelectedCryptos.Contains(crypto.Crypto)) 66 | continue; 67 | 68 | fragments.Add(crypto.CryptoFragment); 69 | if (crypto.CryptoFragment != "bitcoin") 70 | hasAltcoins = true; 71 | 72 | if (composition.SelectedLN == "clightning" && crypto.CLightningFragment != null) 73 | { 74 | fragments.Add(crypto.CLightningFragment); 75 | } 76 | if (composition.SelectedLN == "lnd" && crypto.LNDFragment != null) 77 | { 78 | fragments.Add(crypto.LNDFragment); 79 | } 80 | if (composition.SelectedLN == "eclair" && crypto.EclairFragment != null) 81 | { 82 | fragments.Add(crypto.EclairFragment); 83 | } 84 | if (composition.SelectedLN == "phoenixd" && crypto.PhoenixdFragment != null) 85 | { 86 | fragments.Add(crypto.PhoenixdFragment); 87 | } 88 | } 89 | 90 | foreach (var fragment in composition.AdditionalFragments) 91 | { 92 | fragments.Add(fragment); 93 | } 94 | var def = new DockerComposeDefinition(name, fragments.Select(f => new FragmentName(f)).ToHashSet()) 95 | { 96 | ExcludeFragments = composition.ExcludeFragments.Select(f => new FragmentName(f)).ToHashSet() 97 | }; 98 | def.FragmentLocation = fragmentLocation; 99 | def.BuildOutputDirectory = output; 100 | def.Build(); 101 | } 102 | 103 | private static string FindRoot(string rootDirectory) 104 | { 105 | string directory = Directory.GetCurrentDirectory(); 106 | int i = 0; 107 | while (true) 108 | { 109 | if (i > 10) 110 | throw new DirectoryNotFoundException(rootDirectory); 111 | if (directory.EndsWith(rootDirectory)) 112 | return directory; 113 | directory = Path.GetFullPath(Path.Combine(directory, "..")); 114 | i++; 115 | } 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script might look like a good idea. Please be aware of these important issues: 4 | # 5 | # - The backup file is not encrypted and it contains your lightning private keys. 6 | # Consider encrypting before uploading or using another backup tool like duplicity. 7 | # - Old channel state is toxic and you can loose all your funds, if you or someone 8 | # else closes a channel based on the backup with old state - and the state changes 9 | # often! If you publish an old state (say from yesterday's backup) on chain, you 10 | # WILL LOSE ALL YOUR FUNDS IN A CHANNEL, because the counterparty will publish a 11 | # revocation key! 12 | 13 | if [ "$(id -u)" != "0" ]; then 14 | echo "This script must be run as root." 15 | echo "Use the command 'sudo su -' (include the trailing hypen) and try again" 16 | exit 1 17 | fi 18 | 19 | case "$BACKUP_PROVIDER" in 20 | "Dropbox") 21 | if [ -z "$DROPBOX_TOKEN" ]; then 22 | echo -e "\033[0;31mSet DROPBOX_TOKEN environment variable and try again.\033[0m" 23 | exit 1 24 | fi 25 | ;; 26 | 27 | "S3") 28 | echo -e "\033[1;33mUsing S3 backup provider. Make sure you have ran 'aws configure' on your root user and configured an AMI with access to your bucket.\033[0m" 29 | if [ -z "$S3_BUCKET" ]; then 30 | echo -e "\033[0;31mSet S3_BUCKET environment variable and try again.\033[0m" 31 | exit 1 32 | fi 33 | 34 | if [ -z "$S3_PATH" ]; then 35 | echo -e "\033[1;33mUsing bucket root for backup, set S3_PATH if you want to backup into a specific folder (Make sure it ends with a trailing slash).\033[0m" 36 | fi 37 | ;; 38 | 39 | "SCP") 40 | if [ -z "$SCP_TARGET" ]; then 41 | echo -e "\033[0;31mSet SCP_TARGET environment variable and try again.\033[0m" 42 | exit 1 43 | fi 44 | ;; 45 | 46 | *) 47 | echo "No BACKUP_PROVIDER set. Backing up to local directory." 48 | ;; 49 | esac 50 | 51 | # preparation 52 | volumes_dir=/var/lib/docker/volumes 53 | backup_dir="$volumes_dir/backup_datadir" 54 | filename="backup.tar.gz" 55 | dumpname="postgres.sql.gz" 56 | 57 | if [ "$BACKUP_TIMESTAMP" == true ]; then 58 | timestamp=$(date "+%Y%m%d-%H%M%S") 59 | filename="$timestamp-$filename" 60 | dumpname="$timestamp-$dumpname" 61 | fi 62 | 63 | backup_path="$backup_dir/_data/${filename}" 64 | dbdump_path="$backup_dir/_data/${dumpname}" 65 | 66 | cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" 67 | . helpers.sh 68 | 69 | # ensure backup dir exists 70 | if [ ! -d "$backup_dir" ]; then 71 | docker volume create backup_datadir 72 | fi 73 | 74 | # dump database 75 | echo "Dumping database …" 76 | btcpay_dump_db $dbdump_path 77 | 78 | if [[ "$1" == "--only-db" ]]; then 79 | tar -cvzf $backup_path $dbdump_path 80 | else 81 | # stop docker containers, save files and restart 82 | echo "Stopping BTCPay Server …" 83 | btcpay_down 84 | 85 | echo "Backing up files …" 86 | tar --exclude="$backup_path" --exclude="$volumes_dir/generated_bitcoin_datadir/*" --exclude="$volumes_dir/generated_litecoin_datadir/*" --exclude="$volumes_dir/generated_postgres_datadir/*" --exclude="$volumes_dir/**/logs/*" -cvzf $backup_path $dbdump_path $volumes_dir 87 | 88 | echo "Restarting BTCPay Server …" 89 | btcpay_up 90 | fi 91 | 92 | # post processing 93 | case $BACKUP_PROVIDER in 94 | "Dropbox") 95 | echo "Uploading to Dropbox …" 96 | docker run --name backup --env DROPBOX_TOKEN=$DROPBOX_TOKEN -v backup_datadir:/data jvandrew/btcpay-dropbox:1.0.5 $filename 97 | echo "Deleting local backup …" 98 | rm $backup_path 99 | ;; 100 | 101 | "S3") 102 | echo "Uploading to S3 …" 103 | docker run --rm -v ~/.aws:/root/.aws -v $backup_path:/aws/$filename amazon/aws-cli s3 cp $filename s3://$S3_BUCKET/$S3_PATH 104 | echo "Deleting local backup …" 105 | rm $backup_path 106 | ;; 107 | 108 | "SCP") 109 | echo "Uploading via SCP …" 110 | scp $backup_path $SCP_TARGET 111 | echo "Deleting local backup …" 112 | rm $backup_path 113 | ;; 114 | 115 | *) 116 | echo "Backed up to $backup_path" 117 | ;; 118 | esac 119 | 120 | # cleanup 121 | rm $dbdump_path 122 | 123 | echo "Backup done." 124 | -------------------------------------------------------------------------------- /Production/docker-compose.btc.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | nginx: 4 | restart: unless-stopped 5 | image: nginx:stable 6 | container_name: nginx 7 | ports: 8 | - "80:80" 9 | - "443:443" 10 | volumes: 11 | - "nginx_conf:/etc/nginx/conf.d" 12 | - "nginx_vhost:/etc/nginx/vhost.d" 13 | - "nginx_html:/usr/share/nginx/html" 14 | - "nginx_certs:/etc/nginx/certs:ro" 15 | links: 16 | - btcpayserver 17 | nginx-gen: 18 | restart: unless-stopped 19 | image: btcpayserver/docker-gen:0.7.5 20 | container_name: nginx-gen 21 | volumes: 22 | - "/var/run/docker.sock:/tmp/docker.sock:ro" 23 | - "./nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro" 24 | - "nginx_conf:/etc/nginx/conf.d" 25 | - "nginx_vhost:/etc/nginx/vhost.d" 26 | - "nginx_html:/usr/share/nginx/html" 27 | - "nginx_certs:/etc/nginx/certs:ro" 28 | entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf 29 | links: 30 | - nginx 31 | letsencrypt-nginx-proxy-companion: 32 | restart: unless-stopped 33 | image: jrcs/letsencrypt-nginx-proxy-companion 34 | container_name: letsencrypt-nginx-proxy-companion 35 | volumes: 36 | - "/var/run/docker.sock:/var/run/docker.sock:ro" 37 | - "nginx_conf:/etc/nginx/conf.d" 38 | - "nginx_vhost:/etc/nginx/vhost.d" 39 | - "nginx_html:/usr/share/nginx/html" 40 | - "nginx_certs:/etc/nginx/certs:rw" 41 | environment: 42 | NGINX_DOCKER_GEN_CONTAINER: "nginx-gen" 43 | NGINX_PROXY_CONTAINER: "nginx" 44 | ACME_CA_URI: ${ACME_CA_URI:-staging} 45 | links: 46 | - nginx-gen 47 | btcpayserver: 48 | restart: unless-stopped 49 | image: nicolasdorier/btcpayserver:1.0.2.106 50 | expose: 51 | - "49392" 52 | environment: 53 | BTCPAY_POSTGRES: User ID=postgres;Host=postgres;Port=5432;Database=btcpayserver${NBITCOIN_NETWORK:-regtest} 54 | BTCPAY_NETWORK: ${NBITCOIN_NETWORK:-regtest} 55 | BTCPAY_BIND: 0.0.0.0:49392 56 | BTCPAY_EXTERNALURL: ${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/ 57 | BTCPAY_ROOTPATH: ${BTCPAY_ROOTPATH:-/} 58 | BTCPAY_SSHTRUSTEDFINGERPRINTS: ${BTCPAY_SSHTRUSTEDFINGERPRINTS} 59 | BTCPAY_SSHKEYFILE: ${BTCPAY_SSHKEYFILE} 60 | VIRTUAL_NETWORK: nginx-proxy 61 | VIRTUAL_PORT: 49392 62 | VIRTUAL_HOST: ${BTCPAY_HOST} 63 | VIRTUAL_HOST_NAME: "btcpay" 64 | SSL_POLICY: Mozilla-Modern 65 | LETSENCRYPT_HOST: ${BTCPAY_HOST} 66 | LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-} 67 | BTCPAY_CHAINS: "btc" 68 | BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/ 69 | links: 70 | - nbxplorer 71 | - postgres 72 | volumes: 73 | - "btcpay_datadir:/datadir" 74 | - "nbxplorer_datadir:/root/.nbxplorer" 75 | nbxplorer: 76 | restart: unless-stopped 77 | image: nicolasdorier/nbxplorer:1.0.2.31 78 | expose: 79 | - "32838" 80 | environment: 81 | NBXPLORER_NETWORK: ${NBITCOIN_NETWORK:-regtest} 82 | NBXPLORER_BIND: 0.0.0.0:32838 83 | NBXPLORER_CHAINS: "btc" 84 | NBXPLORER_BTCRPCURL: http://bitcoind:43782/ 85 | NBXPLORER_BTCNODEENDPOINT: bitcoind:39388 86 | volumes: 87 | - "nbxplorer_datadir:/datadir" 88 | - "bitcoin_datadir:/root/.bitcoin" 89 | links: 90 | - bitcoind 91 | postgres: 92 | restart: unless-stopped 93 | image: postgres:9.6.5 94 | volumes: 95 | - "postgres_datadir:/var/lib/postgresql/data" 96 | bitcoind: 97 | restart: unless-stopped 98 | container_name: btcpayserver_bitcoind 99 | image: nicolasdorier/docker-bitcoin:0.16.3 100 | environment: 101 | BITCOIN_EXTRA_ARGS: | 102 | rpcport=43782 103 | ${NBITCOIN_NETWORK:-regtest}=1 104 | port=39388 105 | whitelist=0.0.0.0/0 106 | zmqpubrawblock=tcp://0.0.0.0:28332 107 | zmqpubrawtx=tcp://0.0.0.0:28333 108 | expose: 109 | - "43782" 110 | - "39388" 111 | - "28332" 112 | - "28333" 113 | volumes: 114 | - "bitcoin_datadir:/data" 115 | volumes: 116 | nginx_conf: 117 | nginx_vhost: 118 | nginx_html: 119 | nginx_certs: 120 | postgres_datadir: 121 | btcpay_datadir: 122 | nbxplorer_datadir: 123 | bitcoin_datadir: 124 | --------------------------------------------------------------------------------