Compare commits

..

1 Commits

Author SHA1 Message Date
nicolas.dorier
5d4ab9e188 Migrate old pregen deployment 2018-09-30 00:00:37 +09:00
245 changed files with 1031 additions and 11132 deletions

View File

@ -1,40 +0,0 @@
version: 2
jobs:
cansetup:
machine:
enabled: true
image: ubuntu-2204:current
steps:
- checkout
- run:
command: |
cd .circleci
sudo ./test-install.sh
# Define in CircleCi Project Variables: $DOCKERHUB_REPO, $DOCKERHUB_USER, $DOCKERHUB_PASS
# Publish jobs require those variables
docker:
docker:
- image: cimg/base:stable
steps:
- setup_remote_docker
- checkout
- run:
command: |
cd docker-compose-generator
docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
docker buildx create --use
DOCKER_BUILDX_OPTS="--platform linux/amd64,linux/arm64,linux/arm/v7 --push"
docker buildx build $DOCKER_BUILDX_OPTS -t $DOCKERHUB_REPO:latest .
workflows:
version: 2
publish:
jobs:
- cansetup:
filters:
branches:
only: master
- docker:
filters:
branches:
only: dcg-latest

View File

@ -1,10 +0,0 @@
#!/bin/bash
echo "Trying to connect to btcpayserver..."
while true; do
if [ "$(curl -sL -w "%{http_code}\\n" "http://localhost/" -o /dev/null)" == "200" ]; then
echo "Successfully contacted BTCPayServer"
break
fi
sleep 1
done

View File

@ -1,29 +0,0 @@
#!/bin/bash
set -e
systemctl stop docker.socket
apt-get remove docker-ce
rm -rf /usr/bin/docker
rm -rf /usr/local/bin/docker-compose
cd ../..
[ -d btcpayserver-docker ] || mv project btcpayserver-docker
cd btcpayserver-docker
export BTCPAY_HOST="btcpay.local"
export REVERSEPROXY_DEFAULT_HOST="btcpay.local"
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_CRYPTO2="ltc"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAYGEN_LIGHTNING="clightning"
source ./btcpay-setup.sh -i
timeout 1m bash .circleci/test-connectivity.sh
# Testing scripts are not crashing and installed
btcpay-up.sh
btcpay-down.sh

8
.gitignore vendored
View File

@ -297,11 +297,3 @@ Production/.env
.vscode/
*docker-compose.generated.yml
Generated/chatwoot_config.env
Generated/error
/Generated/save-images.sh
# DS_Store ignore
.DS_Store

View File

@ -1,4 +1,2 @@
*.yml
nginx.tmpl
*.json
pull-images.sh
*.tmpl

View File

@ -1,2 +0,0 @@
nameserver 127.0.0.1
nameserver 8.8.8.8

View File

@ -1,12 +0,0 @@
ORPort 9001
DirPort 9030
ExitPolicy reject *:*
CookieAuthentication 1
Nickname {{ $.Env.TOR_RELAY_NICKNAME}}
ContactInfo {{ $.Env.TOR_RELAY_EMAIL}}
{{ if $.Env.ADDITIONAL_TORRC_CONFIG }}
{{ $.Env.ADDITIONAL_TORRC_CONFIG}}
{{ end }}

View File

@ -1,34 +0,0 @@
{{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }}
{{ range $name, $containers := groupByMulti $ "Env.HIDDENSERVICE_NAME" "," }}
{{ $firstServicePort := true }}
{{ range $container := $containers }}
{{ range $knownNetwork := $CurrentContainer.Networks }}
{{ range $containerNetwork := $container.Networks }}
{{ if eq $knownNetwork.Name $containerNetwork.Name }}
{{ $containerOrReverseProxyName := coalesce $container.Env.HIDDENSERVICE_REVERSEPROXY $container.Name }}
{{ range $reverseProxyContainer := where $ "Name" $containerOrReverseProxyName }}
{{ range $containerNetwork := where $reverseProxyContainer.Networks "Name" $knownNetwork.Name }}
{{ $port := coalesceempty (index $container.Env (print $name "_HIDDENSERVICE_PORT")) $container.Env.HIDDENSERVICE_PORT "80" }}
{{ $virtualPort := coalesceempty (index $container.Env (print $name "_HIDDENSERVICE_VIRTUAL_PORT")) $container.Env.HIDDENSERVICE_VIRTUAL_PORT $port }}
{{ if ne $containerNetwork.IP "" }}
{{ if $firstServicePort }}
# For the hidden service {{ $name }}
HiddenServiceDir /var/lib/tor/hidden_services/{{ $name }}
{{ $firstServicePort := false }}
{{ end }}
# Redirecting to {{ $containerOrReverseProxyName }}
HiddenServicePort {{ $virtualPort }} {{ $containerNetwork.IP }}:{{ $port }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ if $.Env.ADDITIONAL_TORRC_CONFIG }}
{{ $.Env.ADDITIONAL_TORRC_CONFIG}}
{{ end }}

View File

@ -1,2 +0,0 @@
rpcpassword=none
rpcbind=zebra

View File

@ -1 +0,0 @@
torrc.tmpl

View File

@ -33,9 +33,7 @@ With Powershell:
$env:BTCPAY_ROOTPATH="/test";
$env:BTCPAY_PROTOCOL="http";
$env:BTCPAY_HOST="btcpay.example.com";
$env:BTCPAYGEN_REVERSEPROXY="none";
.\build.ps1
docker-compose -f "Generated/docker-compose.generated.yml" up --remove-orphans -d
docker-compose -f docker-compose.btc.yml up
```
With Linux:
@ -44,9 +42,7 @@ With Linux:
export BTCPAY_ROOTPATH="/test"
export BTCPAY_PROTOCOL="http"
export BTCPAY_HOST="btcpay.example.com"
export BTCPAYGEN_REVERSEPROXY="none"
./build.sh
docker-compose -f "Generated/docker-compose.generated.yml" up --remove-orphans -d
docker-compose -f docker-compose.btc.yml up
```
Then edit your [host file](https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/) with

View File

@ -1 +0,0 @@
torrc.tmpl

View File

@ -1,6 +1,6 @@
# How to use docker-compose with NGinx
NGinx acts as a reverse proxy, and takes care of renewing HTTPS certificates for you.
NGinx acts as a reverse proxy, and take care of renewing HTTPS certificates for you.
BTCPay Server deployment using NGinx are typically composed of:
1. One full node per supported cryptocurrency (bitcoind/litecoind)
@ -18,16 +18,17 @@ The relevant environment variables are:
* `NBITCOIN_NETWORK`: The blockchain identifier used by NBitcoin (eg., `regtest`, `testnet`, `mainnet`)
* `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)
* `BTCPAY_LIGHTNING_HOST`: The hostname announced for your node on the lightning network (by default, the `BTCPAY_HOST` will be used)
* `BTCPAY_ROOTPATH`: The root path directory where BTCPay is accessed, more information below. (default: /)
* `LETSENCRYPT_EMAIL`: The email Let's Encrypt will use to notify you about certificate expiration.
* `ACME_CA_URI`: Let's encrypt API endpoint (`staging` for a staging certificate, `production` for a production one)
* `ACME_CA_URI`: Let's encrypt API endpoint (`https://acme-staging.api.letsencrypt.org/directory` for a staging certificate, `https://acme-v01.api.letsencrypt.org/directory` for a production one)
* `LIGHTNING_ALIAS`: Optional, if using the integrated lightning feature, customize the alias of your nodes
* `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)
* `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
If `BTCPAY_HOST` is `btcpay.example.com` and `BTCPAY_ROOTPATH` is `/btcpay`, then you can access the site via `https://btcpay.example.com/btcpay`
Use `docker-compose.btc-ltc.yml` for bitcoin and litecoin support, or `docker-compose.btc.yml` for only bitcoin.
Any unset or empty environment variable will be set for a `regtest` deployment.
The ports mapped on the host are:
@ -46,7 +47,7 @@ docker-compose up \
-e "NBITCOIN_NETWORK=mainnet" \
-e "BTCPAY_HOST=btcpay.example.com" \
-e "LETSENCRYPT_EMAIL=me@example.com" \
-e "ACME_CA_URI=production"
-e "ACME_CA_URI=https://acme-v01.api.letsencrypt.org/directory"
```
For powershell:
@ -56,7 +57,7 @@ docker-compose up `
-e "NBITCOIN_NETWORK=mainnet" `
-e "BTCPAY_HOST=btcpay.example.com" `
-e "LETSENCRYPT_EMAIL=me@example.com" `
-e "ACME_CA_URI=production"
-e "ACME_CA_URI=https://acme-v01.api.letsencrypt.org/directory"
```
See also [The guide for docker noobs](../README.md#fornoobs).

View File

@ -1,290 +1,25 @@
{{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }}
{{ define "upstream" }}
{{ if .Address }}
{{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}}
{{ if and .Container.Node.ID .Address.HostPort }}
# {{ .Container.Node.Name }}/{{ .Container.Name }}
server {{ .Container.Node.Address.IP }}:{{ .Address.HostPort }};
# {{ .Container.Node.Name }}/{{ .Container.Name }}
server {{ .Container.Node.Address.IP }}:{{ .Address.HostPort }};
{{/* If there is no swarm node or the port is not published on host, use container's IP:PORT */}}
{{ else if .Network }}
# {{ .Container.Name }}
server {{ .Network.IP }}:{{ .Address.Port }};
# {{ .Container.Name }}
server {{ .Network.IP }}:{{ .Address.Port }};
{{ end }}
{{ else if .Network }}
# {{ .Container.Name }}
# {{ .Container.Name }}
{{ if .Network.IP }}
server {{ .Network.IP }} down;
server {{ .Network.IP }} down;
{{ else }}
server 127.0.0.1 down;
server 127.0.0.1 down;
{{ end }}
{{ end }}
{{ end }}
{{ define "redirects" }}
{{ if eq $.HostName "btcpay" }}
{{ range $container := $.Containers }}
{{ $serviceName := (index $container.Labels "com.docker.compose.service") }}
{{ if (eq $serviceName "lnd_bitcoin") }}
location ~* ^/(lnrpc|routerrpc|verrpc|walletrpc)\. {
grpc_read_timeout 6000s;
grpc_send_timeout 6000s;
grpc_pass grpcs://lnd_bitcoin:10009;
}
location /lnd-rest/btc/ {
rewrite ^/lnd-rest/btc/(.*) /$1 break;
proxy_pass http://lnd_bitcoin:8080/;
}
{{ end }}
{{ if $container.Env.REAL_IP_HEADER }}
{{ range $containerNetwork := $container.Networks }}
set_real_ip_from {{ $containerNetwork.IP }};
{{ end }}
{{ if (ne $container.Env.REAL_IP_HEADER "X-Real-IP") }}
real_ip_header {{ $container.Env.REAL_IP_HEADER }};
{{ end }}
{{ end }}
{{ if (eq $serviceName "bitcoin_rtl") }}
location /rtl/ {
proxy_pass http://bitcoin_rtl:3000/rtl/;
}
{{ end }}
{{ if (eq $serviceName "joinmarket") }}
location /obwatch/ {
proxy_pass http://joinmarket:62601/;
}
{{ end }}
{{ if (eq $serviceName "bitcoin_thub") }}
location /thub {
proxy_pass http://bitcoin_thub:3000/thub;
}
{{ end }}
{{ if (eq $serviceName "btcqbo") }}
location /btcqbo/ {
proxy_pass http://btcqbo:8001;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
{{ end }}
{{ if (eq $serviceName "clightning_bitcoin_spark") }}
location /spark/btc/ {
proxy_pass http://clightning_bitcoin_spark:9737/;
}
{{ end }}
{{ if (eq $serviceName "clightning_bitcoin_charge") }}
location /lightning-charge/btc/ {
proxy_pass http://clightning_bitcoin_charge:9112/;
}
{{ end }}
{{ if (eq $serviceName "clightning_bitcoin") }}
location /clightning-rest/btc/ {
rewrite ^/clightning-rest/btc/(.*) /$1 break;
proxy_pass http://clightning_bitcoin:3010/;
}
{{ end }}
{{ if (eq $serviceName "clightning_groestlcoin_spark") }}
location /spark/grs/ {
proxy_pass http://clightning_groestlcoin_spark:9739/;
}
{{ end }}
{{ if (eq $serviceName "clightning_groestlcoin_charge") }}
location /lightning-charge/grs/ {
proxy_pass http://clightning_groestlcoin_charge:9112/;
}
{{ end }}
{{ if (eq $serviceName "btctransmuter") }}
location /btctransmuter/ {
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:443;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://btctransmuter;
}
{{ end }}
{{ if (eq $serviceName "bluewallet_lndhub_app") }}
location /bluewallet_lndhub_app/ {
proxy_pass http://bluewallet_lndhub_app:3000/;
sub_filter 'href="../' 'href="/bluewallet_lndhub_app/';
sub_filter 'src="/' 'src="/bluewallet_lndhub_app/';
sub_filter_once off;
}
{{ end }}
{{ if (eq $serviceName "helipad") }}
location /helipad/ {
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:443;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto https;
sub_filter_once off;
sub_filter_types *;
sub_filter 'src="/' 'src="/helipad/';
sub_filter 'href="/' 'href="/helipad/';
sub_filter '/image' '/helipad/image';
sub_filter '/pew' '/helipad/pew';
sub_filter '/boosts' '/helipad/boosts';
sub_filter '/api/v1/helipad' '/helipad/api/v1/helipad';
proxy_pass http://helipad:2112/;
}
{{ end }}
{{ if (eq $serviceName "lnd_lit") }}
location /lit/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://lnd_lit:8080/;
}
location ~* ^/(ln|loop|pool|lit)rpc\. {
proxy_pass http://lnd_lit:8080;
}
{{ end }}
{{ if (eq $serviceName "sphinxrelay") }}
location /sphinxrelay/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://sphinxrelay:3300/;
}
{{ end }}
{{ if (eq $serviceName "tallycoin_connect") }}
location /tallycoin-connect/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://tallycoin_connect:8123/;
}
{{ end }}
{{ if (eq $serviceName "configurator") }}
location /configurator/ {
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:443;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://configurator;
}
{{ end }}
{{ if (eq $serviceName "snapdrop") }}
location /snapdrop/ {
proxy_connect_timeout 300;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:443;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://snapdrop:8080/;
}
location /snapdrop/server {
proxy_connect_timeout 300;
proxy_pass http://snapdrop:8080/server;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-for $remote_addr;
}
{{ end }}
{{ if (eq $serviceName "nnostr-relay") }}
location /nostr {
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $host:443;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Proto https;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://nnostr-relay;
}
{{ end }}
{{ if (eq $serviceName "mempool_web") }}
# https://github.com/mempool/mempool/tree/master/production/nginx
location /mempool/ {
proxy_pass http://mempool_web:8080/;
# Bypass gzip, so that we can apply sub_filter, which does not work with proxy compressed response.
# Details: https://www.nginx.com/resources/wiki/modules/substitutions/#directives
proxy_set_header Accept-Encoding "";
sub_filter_types *;
sub_filter_once off;
sub_filter 'base href="/' 'base href="/mempool/';
sub_filter '/api/' '/mempool/api/';
sub_filter '/resources' '/mempool/resources';
# mainnet API
location /mempool/api/v1/ws {
proxy_pass http://mempool_api:8999;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /mempool/api/v1/ {
proxy_pass http://mempool_api:8999/api/v1/;
}
location /mempool/api/ {
proxy_pass http://mempool_api:8999/api/v1/;
}
}
location ~ "^/[a-z]{2}/mempool" {
rewrite ^/(.*)/mempool $scheme://$server_name/mempool/$1/ redirect;
}
{{ end }}
{{ end }}
{{ end }}
{{ if eq $.HostName "librepatron" }}
{{ range $container := $.Containers }}
{{ $serviceName := (index $container.Labels "com.docker.compose.service") }}
{{ if (eq $serviceName "isso") }}
location /isso {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Script-Name /isso;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass http://isso:8080;
}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the
@ -325,9 +60,7 @@ map $scheme $proxy_x_forwarded_ssl {
https on;
}
gzip on;
gzip_min_length 1000;
gzip_types image/svg+xml text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
log_format vhost '$host $remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
@ -354,12 +87,6 @@ proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
client_header_buffer_size 500k;
large_client_header_buffers 4 500k;
# Mitigate httpoxy attack (see README for details)
proxy_set_header Proxy "";
{{ end }}
@ -371,17 +98,18 @@ server {
{{ if $enable_ipv6 }}
listen [::]:80;
{{ end }}
access_log /var/log/nginx/access.log vhost;
return 503;
}
{{ if (and (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }}
server {
server_name _; # This is just an invalid value which will never trigger on a real hostname.
listen 443 ssl;
listen 443 ssl http2;
{{ if $enable_ipv6 }}
listen [::]:443 ssl;
listen [::]:443 ssl http2;
{{ end }}
http2 on;
access_log /var/log/nginx/access.log vhost;
return 503;
ssl_session_tickets off;
@ -390,11 +118,13 @@ server {
}
{{ end }}
{{ range $host_name, $containers := groupByMulti $ "Env.VIRTUAL_HOST_NAME" "," }}
{{ range $host, $containers := groupByMulti $ "Env.VIRTUAL_HOST" "," }}
{{ $host_name := trim $host_name }}
{{ $upstream_name := $host_name }}
{{ $host := trim $host }}
{{ $is_regexp := hasPrefix "~" $host }}
{{ $upstream_name := when $is_regexp (sha1 $host) $host }}
# {{ $host }}
upstream {{ $upstream_name }} {
{{ range $container := $containers }}
@ -403,7 +133,7 @@ upstream {{ $upstream_name }} {
{{ range $knownNetwork := $CurrentContainer.Networks }}
{{ range $containerNetwork := $container.Networks }}
{{ if (and (ne $containerNetwork.Name "ingress") (or (eq $knownNetwork.Name $containerNetwork.Name) (eq $knownNetwork.Name "host"))) }}
## Can be connected with "{{ $containerNetwork.Name }}" network
## Can be connected with "{{ $containerNetwork.Name }}" network
{{/* If only 1 port exposed, use that */}}
{{ if eq $addrLen 1 }}
@ -416,46 +146,14 @@ upstream {{ $upstream_name }} {
{{ template "upstream" (dict "Container" $container "Address" $address "Network" $containerNetwork) }}
{{ end }}
{{ else }}
# Cannot connect to network of this container
server 127.0.0.1 down;
# Cannot connect to network of this container
server 127.0.0.1 down;
{{ end }}
{{ end }}
{{ end }}
{{ end }}
}
{{ $hiddenReverseProxy := trim (or (first (groupByKeys $containers "Env.HIDDENSERVICE_REVERSEPROXY")) "") }}
{{ if (eq $hiddenReverseProxy "nginx")}}
{{ $hiddenHostName := trim (or (first (groupByKeys $containers "Env.HIDDENSERVICE_NAME")) "") }}
{{ $onionHost := read (printf "/var/lib/tor/hidden_services/%s/hostname" $hiddenHostName) }}
{{ if ne $onionHost "" }}
server {
client_max_body_size 100M;
server_name {{ trim $onionHost }};
listen 80 ;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
{{ if (exists "/etc/nginx/vhost.d/default") }}
include /etc/nginx/vhost.d/default;
{{ end }}
location / {
proxy_pass http://{{ trim $upstream_name }};
}
{{ template "redirects" (dict "HostName" $host_name "Containers" $) }}
}
{{ end }}
{{ end }}
{{ range $host, $containers := groupByMulti $containers "Env.VIRTUAL_HOST" "," }}
{{ $host := trim $host }}
{{ if ne $host "" }}
{{ $default_host := or ($.Env.DEFAULT_HOST) "" }}
{{ $default_server := index (dict $host "" $default_host "default_server") $host }}
@ -477,21 +175,19 @@ server {
{{/* Get the VIRTUAL_ROOT By containers w/ use fastcgi root */}}
{{ $vhost_root := or (first (groupByKeys $containers "Env.VIRTUAL_ROOT")) "/var/www/public" }}
{{/* Get the first cert name defined by containers w/ the same vhost */}}
{{ $certName := (first (groupByKeys $containers "Env.CERT_NAME")) }}
{{ $cert := "" }}
{{ if exists "/etc/nginx/certs" }}
{{/* Get the best matching cert by name for the vhost. */}}
{{ $vhostCert := (closest (dir "/etc/nginx/certs") (printf "%s.crt" $host))}}
{{/* Get the best matching cert by name for the vhost. */}}
{{ $vhostCert := (closest (dir "/etc/nginx/certs") (printf "%s.crt" $host))}}
{{/* vhostCert is actually a filename so remove any suffixes since they are added later */}}
{{ $vhostCert := trimSuffix ".crt" $vhostCert }}
{{ $vhostCert := trimSuffix ".key" $vhostCert }}
{{/* vhostCert is actually a filename so remove any suffixes since they are added later */}}
{{ $vhostCert := trimSuffix ".crt" $vhostCert }}
{{ $vhostCert := trimSuffix ".key" $vhostCert }}
{{/* Use the cert specified on the container or fallback to the best vhost match */}}
{{ $cert = (coalesce $certName $vhostCert) }}
{{ end }}
{{/* Use the cert specified on the container or fallback to the best vhost match */}}
{{ $cert := (coalesce $certName $vhostCert) }}
{{ $is_https := (and (ne $https_method "nohttps") (ne $cert "") (exists (printf "/etc/nginx/certs/%s.crt" $cert)) (exists (printf "/etc/nginx/certs/%s.key" $cert))) }}
@ -504,41 +200,18 @@ server {
{{ if $enable_ipv6 }}
listen [::]:80 {{ $default_server }};
{{ end }}
# Allow acme challenge requests without redirect
location ^~ /.well-known/acme-challenge/ {
auth_basic off;
auth_request off;
allow all;
root /usr/share/nginx/html;
try_files $uri =404;
break;
}
# Redirect all other requests to HTTPS
location / {
return 301 https://$host$request_uri;
}
access_log /var/log/nginx/access.log vhost;
return 301 https://$host$request_uri;
}
{{ end }}
server {
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $proxy_connection;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
client_max_body_size 100M;
server_name {{ $host }};
listen 443 ssl {{ $default_server }};
listen 443 ssl http2 {{ $default_server }};
{{ if $enable_ipv6 }}
listen [::]:443 ssl {{ $default_server }};
listen [::]:443 ssl http2 {{ $default_server }};
{{ end }}
http2 on;
access_log /var/log/nginx/access.log vhost;
{{ if eq $network_tag "internal" }}
# Only allow traffic from internal clients
@ -624,7 +297,15 @@ server {
include /etc/nginx/vhost.d/default_location;
{{ end }}
}
{{ template "redirects" (dict "HostName" $host_name "Containers" $) }}
{{ range $container := $ }}
{{ $serviceName := (index $container.Labels "com.docker.compose.service") }}
{{ if (eq $serviceName "lnd_bitcoin") }}
location /lnrpc.Lightning {
grpc_pass grpcs://lnd_bitcoin:10009;
}
{{ end }}
{{ end }}
}
{{ end }}
@ -632,12 +313,12 @@ server {
{{ if or (not $is_https) (eq $https_method "noredirect") }}
server {
client_max_body_size 100M;
server_name {{ $host }};
listen 80 {{ $default_server }};
{{ if $enable_ipv6 }}
listen [::]:80 {{ $default_server }};
{{ end }}
access_log /var/log/nginx/access.log vhost;
{{ if eq $network_tag "internal" }}
# Only allow traffic from internal clients
@ -671,65 +352,22 @@ server {
include /etc/nginx/vhost.d/default_location;
{{ end }}
}
{{ template "redirects" (dict "HostName" $host_name "Containers" $) }}
}
{{ if (and (not $is_https) (exists "/etc/nginx/certs/default.crt") (exists "/etc/nginx/certs/default.key")) }}
server {
client_max_body_size 100M;
server_name {{ $host }};
listen 443 ssl {{ $default_server }};
listen 443 ssl http2 {{ $default_server }};
{{ if $enable_ipv6 }}
listen [::]:443 ssl {{ $default_server }};
listen [::]:443 ssl http2 {{ $default_server }};
{{ end }}
http2 on;
{{/* Enable usage of self-signed SSL certificate if .local hostname */}}
{{ if hasSuffix "local" $host }}
{{ if eq $network_tag "internal" }}
# Only allow traffic from internal clients
include /etc/nginx/network_internal.conf;
{{ end }}
{{ if (exists (printf "/etc/nginx/vhost.d/%s" $host)) }}
include {{ printf "/etc/nginx/vhost.d/%s" $host }};
{{ else if (exists "/etc/nginx/vhost.d/default") }}
include /etc/nginx/vhost.d/default;
{{ end }}
location / {
{{ if eq $proto "uwsgi" }}
include uwsgi_params;
uwsgi_pass {{ trim $proto }}://{{ trim $upstream_name }};
{{ else if eq $proto "fastcgi" }}
root {{ trim $vhost_root }};
include fastcgi.conf;
fastcgi_pass {{ trim $upstream_name }};
{{ else }}
proxy_pass {{ trim $proto }}://{{ trim $upstream_name }};
{{ end }}
{{ if (exists (printf "/etc/nginx/htpasswd/%s" $host)) }}
auth_basic "Restricted {{ $host }}";
auth_basic_user_file {{ (printf "/etc/nginx/htpasswd/%s" $host) }};
{{ end }}
{{ if (exists (printf "/etc/nginx/vhost.d/%s_location" $host)) }}
include {{ printf "/etc/nginx/vhost.d/%s_location" $host}};
{{ else if (exists "/etc/nginx/vhost.d/default_location") }}
include /etc/nginx/vhost.d/default_location;
{{ end }}
}
{{ template "redirects" (dict "HostName" $host_name "Containers" $) }}
{{ else }}
access_log /var/log/nginx/access.log vhost;
return 500;
{{ end }}
ssl_certificate /etc/nginx/certs/default.crt;
ssl_certificate_key /etc/nginx/certs/default.key;
}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
{{ if $.Env.ADDITIONAL_NGINX_CONFIG }}
{{ $.Env.ADDITIONAL_NGINX_CONFIG}}
{{ end }}
{{ end }}

View File

@ -1,71 +0,0 @@
#!/usr/bin/env bash
set -Eeo pipefail
shopt -s extglob
CURRENT_PGVERSION=""
EXPECTED_PGVERSION="$PG_MAJOR"
if [[ -f "/var/lib/postgresql/data/PG_VERSION" ]]; then
CURRENT_PGVERSION="$(cat /var/lib/postgresql/data/PG_VERSION)"
fi
if [[ "$CURRENT_PGVERSION" != "$EXPECTED_PGVERSION" ]] && \
[[ "$CURRENT_PGVERSION" != "" ]]; then
sed -i "s/$/ $CURRENT_PGVERSION/" /etc/apt/sources.list.d/pgdg.list
if ! apt-get update; then
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/"
exit 1
fi
if ! apt-get install -y --no-install-recommends \
postgresql-$CURRENT_PGVERSION \
postgresql-contrib-$CURRENT_PGVERSION; then
# On arm32, postgres doesn't ship those packages, so we download
# the binaries from an archive we built from the postgres 9.6.20 image's binaries
FALLBACK="https://aois.blob.core.windows.net/public/$CURRENT_PGVERSION-$(uname -m).tar.gz"
FALLBACK_SHARE="https://aois.blob.core.windows.net/public/share-$CURRENT_PGVERSION-$(uname -m).tar.gz"
echo "Failure to install postgresql-$CURRENT_PGVERSION and postgresql-contrib-$CURRENT_PGVERSION trying fallback $FALLBACK"
apt-get install -y wget
pushd . > /dev/null
cd /usr/lib/postgresql
wget $FALLBACK
tar -xvf *.tar.gz
rm -f *.tar.gz
cd /usr/share/postgresql
wget $FALLBACK_SHARE
tar -xvf *.tar.gz
rm -f *.tar.gz
popd > /dev/null
echo "Successfully installed PG utilities via the fallback"
fi
export PGBINOLD="/usr/lib/postgresql/$CURRENT_PGVERSION/bin"
export PGDATABASE="/var/lib/postgresql/data"
export PGDATAOLD="/var/lib/postgresql/data/$CURRENT_PGVERSION"
export PGDATANEW="/var/lib/postgresql/data/$EXPECTED_PGVERSION"
mkdir -p "$PGDATANEW" "$PGDATAOLD"
find "$PGDATABASE" -maxdepth 1 -mindepth 1 \
-not -wholename "$PGDATAOLD" \
-not -wholename "$PGDATANEW" \
-exec mv {} "$PGDATAOLD/" \;
chmod 700 "$PGDATAOLD" "$PGDATANEW"
chown postgres .
chown -R postgres "$PGDATAOLD" "$PGDATANEW" "$PGDATABASE"
if [ ! -s "$PGDATANEW/PG_VERSION" ]; then
PGDATA="$PGDATANEW" eval "gosu postgres initdb $POSTGRES_INITDB_ARGS"
fi
gosu postgres pg_upgrade
rm $PGDATANEW/*.conf
mv $PGDATANEW/* "$PGDATABASE"
mv $PGDATAOLD/*.conf "$PGDATABASE"
rm -r "$PGDATANEW"
./delete_old_cluster.sh
rm ./analyze_new_cluster.sh
fi
if [ -f "docker-entrypoint.sh" ]; then
exec ./docker-entrypoint.sh "$@"
else
exec docker-entrypoint.sh "$@"
fi

442
README.md
View File

@ -1,52 +1,71 @@
[![CircleCI](https://circleci.com/gh/btcpayserver/btcpayserver-docker.svg?style=svg)](https://app.circleci.com/pipelines/github/btcpayserver/btcpayserver-docker)
#### Start accepting Bitcoin today with BTCPayServer! This guide will walk you through the installation.
#### Start accepting Bitcoin today with BTCPay Server! This guide will walk you through the installation.
# One-click deployment
# Introduction
For the easiest and fastest setup, host BTCPayServer on Microsoft Azure:
While [our instructions](https://docs.btcpayserver.org/LunaNodeWebDeployment/) cover how to install BTCPayServer in one click on Azure or Lunanode, BTCPay Server is not limited to those options.
[![Deploy to Azure](https://azuredeploy.net/deploybutton.svg)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fbtcpayserver%2Fbtcpayserver-azure%2Fmaster%2Fazuredeploy.json)
You will find below information about how you can install BTCPay Server easily in any environment having docker available.
You can log into [Azure](https://azure.microsoft.com/en-us/account/) with your Microsoft account.
Final installation steps:
* Fill in the options: Resource Group
* Click 'Purchase' to confirm
* (Wait for deployment)
* View the deployment (in Notifications or Resource Groups)
* Verify you can connect to your instance with a browser: `https://SERVER-AZURE-DNS/`
* At your domain registrar, make sure you have [DNS](https://github.com/btcpayserver/btcpayserver-doc/blob/master/ChangeDomain.md#setting-up-your-dns-record) pointing your domain at your Azure deployment's IP.
* Browse to `https://SERVER-AZURE-DNS/`
* Register a new account (this account will be granted server administrator rights)
* Go to `https://SERVER-AZURE-DNS/server/maintenance`
* Enter your domain name and click on confirm
* (Wait 1 to 5 minutes)
That's it, you can now browse to `https://btcpay.YOUR-DOMAIN/` to create your store!
For advanced users, you can connect via SSH with information on `https://btcpay.YOUR-DOMAIN/server/services/ssh`, then you can:
* Run `docker ps` and `docker logs xxx` to view running processes
* Run `btcpay-down.sh` and `btcpay-up.sh` to stop and start the BTCPayServer
This video by Nicolas also demonstrates the above steps:
[![BTCPay - One Click Setup](http://img.youtube.com/vi/Bxs95BdEMHY/mqdefault.jpg)](https://www.youtube.com/watch?v=Bxs95BdEMHY "BTCPay - One Click Setup")
Approximate Cost (unpruned, Bitcoin-only): **60 USD per month**
After all your nodes have synced and you've confirmed everything works, follow [this guide](https://github.com/btcpayserver/btcpayserver-doc/blob/master/PennyPinching.md) to fine-tune for savings; costs should drop to **30 or 40 USD per month**.
# Architecture
![Architecture](https://github.com/btcpayserver/btcpayserver-doc/raw/master/docs/img/Architecture.png)
![Architecture](https://github.com/btcpayserver/btcpayserver-doc/raw/master/img/Architecture.png)
As you can see, BTCPay depends on several pieces of infrastructure, mainly:
* A lightweight block explorer (NBXplorer),
* A database (PostgreSQL),
* A database (PostgreSQL or SQLite),
* A full node (eg. Bitcoin Core)
There can be more dependencies if you support more than just standard Bitcoin transactions, including:
* [Core Lightning (CLN)](https://github.com/ElementsProject/lightning)
* [C-Lightning](https://github.com/ElementsProject/lightning)
* [LitecoinD](https://github.com/litecoin-project/litecoin) and other coin daemons
* And more...
Note: The setup process can be time consuming, but is heavily automated to make it a fun and easy experience.
Take a look at how BTCPay works in a video below.
[![](https://img.youtube.com/vi/nr0UNbz3AoQ/hqdefault.jpg)](https://www.youtube.com/watch?v=nr0UNbz3AoQ)
Here is a presentation of the global architecture at Advancing Bitcoin conference.
[![BTCPay - Architecture overview](https://i3.ytimg.com/vi/Up0dvorzSNM/maxresdefault.jpg)](https://www.youtube.com/watch?v=Up0dvorzSNM "BTCPay - Architecture overview")
# Full installation (for technical users)
You can also install BTCPay Server on your own machine or VPS instance.
You can also install BTCPayServer on your own machine or VPS instance.
The officially supported setup is driven by Docker (and Docker-Compose).
First, make sure you have a domain name pointing to your host `A record`, with ports `443` and `80` externally accessible. For Lightning Network, port `9735` is required (`9736` if you use Litecoin Lightning). Otherwise, you will have to set a domain manually by running `changedomain.sh`.
First, make sure you have a domain name pointing to your host (CNAME), with ports `443` and `80` externally accessible (and perhaps additional ports like `9735` and `9736` for Bitcoin and Litecoin lightning). Otherwise, you will have to set it manually by running `changedomain.sh`.
Let's assume your domain is `btcpay.EXAMPLE.com`.
Let's assume it is `btcpay.EXAMPLE.com`.
The setup below assumes you want to support Bitcoin, Core Lightning (CLN), HTTPS automatically configured by Nginx. It also enables node pruning, which you can [modify](#generated-docker-compose) or ignore if you have enough disk space for a full node. Finally, your domain is `btcpay.EXAMPLE.com` should reflect your actual domain name.
[Environment variables](#environment-variables) can be tailored to your needs. Some variables require additional storage space.
If you want to support Litecoin, Bitcoin, and C-Lightning, and want HTTPS automatically configured by Nginx:
```bash
# Login as root
@ -64,10 +83,9 @@ cd btcpayserver-docker
export BTCPAY_HOST="btcpay.EXAMPLE.com"
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-s"
export BTCPAYGEN_CRYPTO2="ltc"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAYGEN_LIGHTNING="clightning"
export BTCPAY_ENABLE_SSH=true
. ./btcpay-setup.sh -i
exit
@ -80,76 +98,49 @@ exit
* Make sure BTCPay starts at reboot via upstart or systemd
* Setup environment variables to use BTCPay utilities
* Add BTCPay utilities in /usr/bin
* Start BTCPay Server
* Start BTCPay
Video below guides you step by step on how to set up BTCPay Server on a VPS with Docker.
You can read [the article](https://medium.com/@BtcpayServer/hosting-btcpay-server-for-cheap-2b27761fdb9d) for step by step instructions.
[![](https://img.youtube.com/vi/x6hqTFgHqhA/hqdefault.jpg)](https://www.youtube.com/watch?v=x6hqTFgHqhA)
[![Docker automated build](https://img.shields.io/docker/automated/nicolasdorier/btcpayserver.svg)](https://hub.docker.com/r/nicolasdorier/btcpayserver/)
Check out this video if you're interested in learning more about setting up [BTCPay with Docker Compose](https://www.youtube.com/playlist?list=PLH4m2oS2ratfaprAFx9E3ZDjwxNKvCk4e).
[![Docker automated build](https://img.shields.io/docker/automated/btcpayserver/btcpayserver.svg)](https://hub.docker.com/r/btcpayserver/btcpayserver/)
# Environment variables
`btcpay-setup.sh` will use the following environment variables:
* `BTCPAY_HOST`: The hostname of your website (eg. `btcpay.example.com`)
* `BTCPAY_ADDITIONAL_HOSTS`: Optional, specify additional domains to your BTCPayServer with https support if enabled. (eg. example2.com,example3.com)
* `REVERSEPROXY_HTTP_PORT`: The public port the reverse proxy binds to for HTTP traffic (default: 80)
* `REVERSEPROXY_HTTPS_PORT`: The public port the reverse proxy binds to for HTTPS traffic (default: 443)
* `REVERSEPROXY_DEFAULT_HOST`: Optional, if using a reverse proxy nginx, specify which website should be presented if the server is accessed by its IP or by an unrecognized domain name.
* `NOREVERSEPROXY_HTTP_PORT`: Optional, if not using a reverse proxy, specify which port should be opened for HTTP traffic. (default: 80)
* `NBITCOIN_NETWORK`: The type of network to use (eg. `mainnet`, `testnet`, or `regtest`. Default: `mainnet`)
* `LIGHTNING_ALIAS`: An alias for your lightning network node, if used
* `BTCPAYGEN_CRYPTO1`: First supported crypto currency (eg. `btc`, `ltc`, `none`. Default: `btc`)
* `BTCPAYGEN_CRYPTO1`: First supported crypto currency (eg. `btc`, `ltc`. Default: `btc`)
* `BTCPAYGEN_CRYPTO2`: Second supported crypto currency (eg. `btc`, `ltc`. Default: `(empty)`)
* `BTCPAYGEN_CRYPTON`: N'th supported crypto currency where N is 9 at maximum. (eg. `btc`, `ltc`. Default: `(empty)`)
* `BTCPAYGEN_REVERSEPROXY`: Specify reverse proxy to use; NGinx has HTTPS support. (eg. `nginx`, `traefik`, `(empty)`. Default: `nginx`)
* `BTCPAYGEN_LIGHTNING`: Lightning network implementation to use (eg. `clightning`, `lnd`, `phoenixd` Default: `(empty)`)
* `BTCPAYGEN_REVERSEPROXY`: Specify reverse proxy to use; NGinx has HTTPS support. (eg. `nginx`, `(empty)`. Default: `nginx`)
* `BTCPAYGEN_LIGHTNING`: Lightning network implementation to use (eg. `clightning`, `(empty)`)
* `BTCPAYGEN_SUBNAME`: The subname of the generated docker-compose file, where the full name is `Generated/docker-compose.SUBNAME.yml` (Default: `generated`)
* `BTCPAYGEN_ADDITIONAL_FRAGMENTS`: Semicolon-separated list of additional fragments you want to use (eg. `opt-save-storage`)
* `LETSENCRYPT_EMAIL`: An email will be sent to this address if certificate expires and fails to renew automatically (eg. `me@example.com`)
* `ACME_CA_URI`: The API endpoint to ask for HTTPS certificate (Default: `production`)
* `BTCPAY_ENABLE_SSH`: Optional, gives BTCPay Server SSH access to the host by allowing it to edit authorized_keys of the host, it can be used for managing the authorized_keys or updating BTCPay Server directly through the website. (Default: false)
* `BTCPAYGEN_DOCKER_IMAGE`: Optional, Specify which generator image to use if you have customized the C# generator. Set to `btcpayserver/docker-compose-generator:local` to build the generator locally at runtime.
* `BTCPAY_IMAGE`: Optional, Specify which btcpayserver image to use if you have a customized btcpayserver.
* `BTCPAY_UPDATE_CLEAN`: Clean (prune) all old BTCPayServer images after an update. WARNING: also removes all non-BTCPayServer images! (default: true)
* `BTCPAYGEN_EXCLUDE_FRAGMENTS`: Semicolon-separated list of fragments you want to forcefully exclude (eg. `litecoin-clightning`)
* `TOR_RELAY_NICKNAME`: If tor relay is activated with opt-add-tor-relay, the relay nickname
* `TOR_RELAY_EMAIL`: If tor relay is activated with opt-add-tor-relay, the email for Tor to contact you regarding your relay
Additionally, there are specific environment variables for some addons:
* `LIBREPATRON_HOST`: If libre patron is activated with [opt-add-librepatron](docker-compose-generator/docker-fragments/opt-add-librepatron.yml), the hostname of your libre patron website (eg. `librepatron.example.com`)
* `ZAMMAD_HOST`: If zammad is activated with [opt-add-zammad](docker-compose-generator/docker-fragments/opt-add-zammad.yml), the hostname of your zammad website (eg. `zammad.example.com`)
* `WOOCOMMERCE_HOST`: If woocommerce is activated with [opt-add-woocommerce](docker-compose-generator/docker-fragments/opt-add-woocommerce.yml), the hostname of your woocommerce website (eg. `store.example.com`)
* `EPS_XPUB`: If Electrum Personal Server (EPS) is activated with [opt-add-electrum-ps](docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml), you must set the Extended Public Key (XPUB, YPUB or ZPUB) of the wallet you want to use, before first run of the EPS server. If you accidentally start EPS without this, it will not work properly as the model of EPS is to monitor only specified wallets.
* If Bitcoin Wallet Tracker is activated with [opt-add-bwt](docker-compose-generator/docker-fragments/opt-add-bwt.yml), you can use `BWT_XPUB`/`BWT_XPUB_*` (to set your XPUB/YPUB/ZPUB), `BWT_DESCRIPTOR`/`BWT_DESCRIPTOR_*` (for script descriptors), `BWT_RESCAN_SINCE` (set to the wallet creation date in YYYY-MM-DD to speed up the rescan), `BWT_BITCOIND_WALLET` and `BWT_GAP_LIMIT`.
* `LND_WTCLIENT_SWEEP_FEE`: If LND watchtower is activated with [opt-lnd-wtclient](docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml), you can use `LND_WTCLIENT_SWEEP_FEE` to change the sweep fee used in constructing the justice transaction (default is 10 sat/byte)
* `FIREFLY_HOST`: If fireflyiii is activated with [opt-add-fireflyiii](docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml), the hostname of your fireflyiii website (eg. `firefly.example.com`)
* `CLOUDFLARE_TUNNEL_TOKEN`: Used to expose your instance to clearnet with a Cloudflare Argo Tunnel (if cloudflare tunnel is activated with [opt-add-cloudflared](docker-compose-generator/docker-fragments/opt-add-cloudflared.yml), for setup instructions [see documentation](docs/cloudflare-tunnel.md))
* `ACME_CA_URI`: The API endpoint to ask for HTTPS certificate (Default: `https://acme-v01.api.letsencrypt.org/directory`)
* `BTCPAY_HOST_SSHKEYFILE`: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server. This key will be copied to BTCPay's data directory
* `BTCPAY_SSHTRUSTEDFINGERPRINTS`: Optional, BTCPay will ensure that it is connecting to the expected SSH server by checking the host's public key against these fingerprints
# Tooling
A wide variety of useful scripts are available once BTCPay is installed:
* `bitcoin-cli.sh`: Access your Bitcoin node instance (for RPC)
* `bitcoin-lightning-cli.sh`: Access your CLN node instance (for RPC)
* `changedomain.sh`: Change the domain of your BTCPayServer (remember to disable 2FA/U2F first, as you risk being unable to log in to your account)
* `bitcoin-lightning-cli.sh`: Access your C-Lightning node instance (for RPC)
* `changedomain.sh`: Change the domain of your BTCPayServer
* `btcpay-update.sh`: Update BTCPayServer to the latest version
* `btcpay-up.sh`: Run `docker-compose up`
* `btcpay-down.sh`: Run `docker-compose down`
* `btcpay-setup.sh`: Change the settings of your server
* `btcpay-clean.sh`: Purge any unused docker images
* `. ./btcpay-setup.sh`: Information about additional parameters
* `. ./btcpay-setup.sh -i`: Set up your BTCPayServer
* `btcpay-restart.sh`: Restart your BTCPayServer
* `switch-node.sh default|bitcoincore|bitcoinknots`: Switch your Bitcoin node implementation
# Under the hood
## Generated docker-compose
## Generated docker-compose <a id="generated-docker-compose"></a>
When you run `btcpay-setup.sh`, your environment variables are used by [build.sh](build.sh) (or [build.ps1](build.ps1)) to generate a docker-compose adapted for your needs. For the full list of options, see: [Environment variables](#environment-variables)
@ -161,60 +152,15 @@ Available `BTCPAYGEN_ADDITIONAL_FRAGMENTS` currently are:
* [opt-save-storage-s](docker-compose-generator/docker-fragments/opt-save-storage-s.yml) will keep around 6 months of blocks (prune BTC for 50 GB)
* [opt-save-storage-xs](docker-compose-generator/docker-fragments/opt-save-storage-xs.yml) will keep around 3 months of blocks (prune BTC for 25 GB)
* [opt-save-storage-xxs](docker-compose-generator/docker-fragments/opt-save-storage-xxs.yml) will keep around 2 weeks of blocks (prune BTC for 5 GB) (lightning not supported)
* [opt-lnd-autocompact](docker-compose-generator/docker-fragments/opt-lnd-autocompact.yml) will activate auto compacting of LND database.
* [opt-lnd-autopilot](docker-compose-generator/docker-fragments/opt-lnd-autopilot.yml) will activate auto pilot on LND. (5 channels, 60% of allocation)
* [opt-lnd-keysend](docker-compose-generator/docker-fragments/opt-lnd-keysend.yml) will activate keysend on LND.
* [opt-lnd-wtclient](docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml) will activate the watchtower client on LND. `LND_WTCLIENT_SWEEP_FEE` can be used to override the default 10 sat/byte justice transaction fee
* [opt-lnd-watchtower](docker-compose-generator/docker-fragments/opt-lnd-watchtower.yml) will activate the LND watchtower RPC
* [opt-save-memory](docker-compose-generator/docker-fragments/opt-save-memory.yml) will decrease the default dbcache at the expense of longer synchronization time. (Useful if your machine is less than 2GB)
* [opt-more-memory](docker-compose-generator/docker-fragments/opt-more-memory.yml) will increase the default dbcache to make synchronization faster (Useful if your machine is has around 4GB)
* [opt-add-btcqbo](docker-compose-generator/docker-fragments/opt-add-btcqbo.yml) will allow you to create an invoice on Quickbooks which include a way for your customer to pay on BTCPay Server (More information on this [github repository](https://github.com/JeffVandrewJr/btcqbo/), this add-on is maintained by [JeffVandrewJr](https://github.com/JeffVandrewJr), see more on [this video](https://www.youtube.com/watch?v=srgwL9ozg6c))
* [opt-add-librepatron](docker-compose-generator/docker-fragments/opt-add-librepatron.yml), for a self-hosted Patreon alternative backed by BTCPay (More information on this [github repository](https://github.com/JeffVandrewJr/patron), this add-on is maintained by [JeffVandrewJr](https://github.com/JeffVandrewJr).
* [opt-add-woocommerce](docker-compose-generator/docker-fragments/opt-add-woocommerce.yml), for a self-hosted woocommerce with BTCPay Server plugin pre installed.
* [opt-add-tor](docker-compose-generator/docker-fragments/opt-add-tor.yml), for exposing BTCPayServer, Woocommerce, your lightning nodes as hidden services and accept onion peers for your full node. Warning: This options is for working around NAT and firewall problems as well as to help protect your customer's privacy. This will not protect your privacy against a targeted attack against you.
* [opt-add-btctransmuter](docker-compose-generator/docker-fragments/opt-add-btctransmuter.yml), for a self-hosted IFTTT style service for crypto services such as fiat settlement. (More information on this [github repository](https://github.com/btcpayserver/btcTransmuter/)
* [opt-txindex](docker-compose-generator/docker-fragments/opt-txindex.yml), to enable txindex=1 in bitcoin.conf if you require txindexing for Bisq, DOJO, etc.
* [opt-expose-unsafe](docker-compose-generator/docker-fragments/opt-expose-unsafe.yml), to unsafely expose bitcoind P2P port 8333 if you require P2P for Bisq, DOJO, Esplora, etc. WARNING: ONLY USE ON TRUSTED LAN OR WITH FIREWALL RULES WHITELISTING SPECIFIC HOSTS
* [opt-add-tor-relay](docker-compose-generator/docker-fragments/opt-add-tor-relay.yml), for a non-exit tor relay. Make sure to have port 9001 accessible externally. [Please read the legal implications of running a tor relay](https://community.torproject.org/relay/community-resources/eff-tor-legal-faq) and [what resources are used to operate the relay](https://trac.torproject.org/projects/tor/wiki/TorRelayGuide#RelayRequirements).
* [opt-add-electrumx](docker-compose-generator/docker-fragments/opt-add-electrumx.yml), to integrate a full ElectrumX server (from official source) with BTCPay, using the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet. You can also open port 50002 up to the internet on your router etc, to be part of the ElectrumX network, helping other Electrum wallet users to get connected. The bitcoin option `-txindex` is mandatory for ElectrumX, and this fragment will enable it on your BTCPay server automatically - No need to use the fragment opt-txindex.yml.
* [opt-add-electrum-ps](docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml), to integrate Electrum Personal Server (EPS) with BTCPay (EPS is a single-user alternative to the ElectrumX Server option above). EPS will also use the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet, for your own personal use (i.e. other users cannot use your server to verify transactions). Also, the bitcoin option `-txindex` is NOT mandatory for EPS, and it will run on a pruned node (unlike ElectrumX). You will need to add your XPUB/YPUB/ZPUB as environment variable `EPS_XPUB` before enabling EPS for the first time (see above section on environment variables, and see [full documentation](https://docs.btcpayserver.org/ElectrumPersonalServer/) for details).
* [opt-add-electrum-bwt](docker-compose-generator/docker-fragments/opt-add-bwt.yml), to integrate the [Bitcoin Wallet Tracker](https://github.com/bwt-dev/bwt) Electrum server, which uses a personal wallet index model similar to that of EPS. You will need to set `BWT_XPUB` with your XPUB/YPUB/ZPUB (see environment variables section). The server will only be available locally and through an onion service.
* [opt-add-configurator](docker-compose-generator/docker-fragments/opt-add-configurator.yml), to integrate the [BTCPay Server Configurator](https://install.btcpayserver.org) to manage your BTCPay deployment through a UI, and to allow new deployments elsewhere easily.
* [opt-add-pihole](docker-compose-generator/docker-fragments/opt-add-pihole.yml) ([See the documentation](docs/pihole.md))
* [opt-add-ndlc](docker-compose-generator/docker-fragments/opt-add-ndlc.yml) ([See the documentation](docs/ndlc.md))
* [opt-add-lightning-terminal](docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml) for [Lightning Terminal/LiT](https://github.com/lightninglabs/lightning-terminal). Maintained by [dennisreimann](https://github.com/dennisreimann).
* [opt-add-mempool](docker-compose-generator/docker-fragments/opt-add-mempool.yml) for [Mempool](https://github.com/mempool/mempool). Maintained by [dennisreimann](https://github.com/dennisreimann).
* [opt-add-sphinxrelay](docker-compose-generator/docker-fragments/opt-add-sphinxrelay.yml) for [Sphinx Relay](https://github.com/stakwork/sphinx-relay). Maintained by [dennisreimann](https://github.com/dennisreimann).
* [opt-add-tallycoin-connect](docker-compose-generator/docker-fragments/opt-add-tallycoin-connect.yml) for [Tallycoin Connect](https://github.com/djbooth007/tallycoin_connect). Maintained by [dennisreimann](https://github.com/dennisreimann).
* [opt-add-thunderhub](docker-compose-generator/docker-fragments/opt-add-thunderhub.yml) for a LND Lightning Node Manager in your Browser. Maintained by [apotdevin](https://github.com/apotdevin).
* [opt-add-teos](docker-compose-generator/docker-fragments/opt-add-teos.yml) for [The Eye Of Satoshi](https://github.com/talaia-labs/python-teos), a BOLT13 Lightning Watchtower. Use port 9814 on your server or Tor to connect.
* [opt-add-chatwoot](docker-compose-generator/docker-fragments/opt-add-chatwoot.yml) for open source chat support system. ([See the documentation](docs/chatwoot.md))
* [opt-add-zammad](docker-compose-generator/docker-fragments/opt-add-zammad.yml) for [Zammad](https://zammad.com/features), a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails
* [opt-monero-expose](docker-compose-generator/docker-fragments/opt-monero-expose.yml) to expose monero node's RPC port at 127.0.0.1:18081 to connect your own wallet. Use f.e. ssh port forwarding to forward to your own computer.
* [opt-add-fireflyiii](docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml) ([See the documentation](docs/fireflyiii.md))
* [opt-add-joinmarket](docker-compose-generator/docker-fragments/opt-add-joinmarket.yml) ([See the documentation](docs/joinmarket.md))
* [opt-add-helipad](docker-compose-generator/docker-fragments/opt-add-helipad.yml) for [Podcastindex.org Helipad](https://github.com/Podcastindex-org/helipad). Requires LND.
* [opt-add-nostr-relay](docker-compose-generator/docker-fragments/opt-add-nostr-relay.yml) for [Nostr Relay](https://github.com/kukks/Nnostr).
* [opt-add-cloudflared](docker-compose-generator/docker-fragments/opt-add-cloudflared.yml) to expose your local server on clearnet painlessly ([see documentation](docs/cloudflare-tunnel.md)).
* [opt-add-snapdrop](docker-compose-generator/docker-fragments/opt-add-snapdrop.yml) to install [Snapdrop](https://snapdrop.net/). You can then browse to `/snapdrop` of your server to access it.
* [opt-add-ltcmweb](docker-compose-generator/docker-fragments/opt-add-ltcmweb.yml) to add the support service for the Litecoin MWEB payment method plugin.
* [opt-add-shopify](docker-compose-generator/docker-fragments/opt-add-shopify.yml) to install the [Shopify App Deployer](https://github.com/btcpayserver/shopify-app). Used by the [BTCPay Server Shopify plugin](https://github.com/btcpayserver/btcpayserver-shopify-plugin).
* [opt-add-nolimits](docker-compose-generator/docker-fragments/opt-add-nolimits.yml) to remove OP_RETURN limits and min relay tx fee from your bitcoin node.
You can also create your own [custom fragments](#how-can-i-customize-the-generated-docker-compose-file).
If you want to add an option to `BTCPAYGEN_ADDITIONAL_FRAGMENTS` and re-configure your install:
```bash
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-lnd-autopilot"
. btcpay-setup.sh -i
```
For example, if you want `btc` and `ltc` support with `nginx` and `clightning` inside `Generated/docker-compose.custom.yml`:
Note: The first run might take a while, but following runs are instantaneous.
On Windows (run in [powershell](https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell)):
On Windows (run in [powershell](https://docs.microsoft.com/en-us/powershell/scripting/setup/starting-windows-powershell?view=powershell-6)):
```powershell
Invoke-Command {
@ -260,8 +206,7 @@ Next, you will need to configure the runtime environment variables for `Generate
`/etc/profile.d/btcpay-env.sh` ensures that your environment variables are correctly setup when you login, so you can use the tools:
```bash
#!/bin/bash
export COMPOSE_HTTP_TIMEOUT="180"
export BTCPAYGEN_OLD_PREGEN="false"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_CRYPTO2=""
export BTCPAYGEN_CRYPTO3=""
@ -271,20 +216,21 @@ export BTCPAYGEN_CRYPTO6=""
export BTCPAYGEN_CRYPTO7=""
export BTCPAYGEN_CRYPTO8=""
export BTCPAYGEN_CRYPTO9=""
export BTCPAYGEN_LIGHTNING="lnd"
export BTCPAYGEN_LIGHTNING="clightning"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-s;opt-add-nolimits"
export BTCPAYGEN_EXCLUDE_FRAGMENTS=";bitcoin"
export BTCPAY_DOCKER_COMPOSE="/root/btcpayserver-docker/Generated/docker-compose.generated.yml"
export BTCPAY_BASE_DIRECTORY="/root"
export BTCPAY_ENV_FILE="/root/.env"
export BTCPAY_HOST_SSHKEYFILE=""
export BTCPAY_ENABLE_SSH=true
export PIHOLE_SERVERIP=""
if cat "$BTCPAY_ENV_FILE" &> /dev/null; then
while IFS= read -r line; do
! [[ "$line" == "#"* ]] && [[ "$line" == *"="* ]] && export "$line"
done < "$BTCPAY_ENV_FILE"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS=""
export BTCPAY_DOCKER_COMPOSE="/var/lib/waagent/custom-script/download/0/btcpayserver-docker/Production/docker-compose.generated.yml"
export BTCPAY_BASE_DIRECTORY="/var/lib/waagent/custom-script/download/0"
export BTCPAY_ENV_FILE="/var/lib/waagent/custom-script/download/0/.env"
export BTCPAY_HOST_SSHKEYFILE="/root/.ssh/id_rsa_btcpay"
if cat $BTCPAY_ENV_FILE &> /dev/null; then
export BTCPAY_HOST="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p')"
export LETSENCRYPT_EMAIL="$(cat $BTCPAY_ENV_FILE | sed -n 's/^LETSENCRYPT_EMAIL=\(.*\)$/\1/p')"
export NBITCOIN_NETWORK="$(cat $BTCPAY_ENV_FILE | sed -n 's/^NBITCOIN_NETWORK=\(.*\)$/\1/p')"
export LIGHTNING_ALIAS="$(cat $BTCPAY_ENV_FILE | sed -n 's/^LIGHTNING_ALIAS=\(.*\)$/\1/p')"
export ACME_CA_URI="$(cat $BTCPAY_ENV_FILE | sed -n 's/^ACME_CA_URI=\(.*\)$/\1/p')"
export BTCPAY_SSHKEYFILE="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_SSHKEYFILE=\(.*\)$/\1/p')"
export BTCPAY_SSHTRUSTEDFINGERPRINTS="$(cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_SSHTRUSTEDFINGERPRINTS=\(.*\)$/\1/p')"
fi
```
@ -300,9 +246,9 @@ Requires=docker.service network-online.target
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" && . helpers.sh && btcpay_up'
ExecStop=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" && . helpers.sh && btcpay_down'
ExecReload=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker" && . helpers.sh && btcpay_restart'
ExecStart=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd "$(dirname $BTCPAY_ENV_FILE)" && docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d'
ExecStop=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd "$(dirname $BTCPAY_ENV_FILE)" && docker-compose -f "$BTCPAY_DOCKER_COMPOSE" stop'
ExecReload=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd "$(dirname $BTCPAY_ENV_FILE)" && docker-compose -f "$BTCPAY_DOCKER_COMPOSE" restart'
[Install]
WantedBy=multi-user.target
@ -312,7 +258,7 @@ WantedBy=multi-user.target
```ini
BTCPAY_HOST=btcpay.EXAMPLE.com
ACME_CA_URI=production
ACME_CA_URI=https://acme-v01.api.letsencrypt.org/directory
NBITCOIN_NETWORK=mainnet
LETSENCRYPT_EMAIL=me@EXAMPLE.com
BTCPAY_SSHTRUSTEDFINGERPRINTS=SHA256:eSCD7NtQ/Q6IBl2iRB9caAQ3lDZd8s8iUL6SdeNnhpA
@ -324,103 +270,23 @@ BTCPAY_SSHKEYFILE=/datadir/id_rsa
1. Add support for your crypto to [NBitcoin](https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins), [NBxplorer](https://github.com/dgarage/NBXplorer), and [BTCPayServer](https://github.com/btcpayserver/btcpayserver). (Use examples from other coins)
2. Create your own docker image ([Example for BTC](https://hub.docker.com/r/nicolasdorier/docker-bitcoin/))
3. Create a docker-compose fragment ([Example for BTC](docker-compose-generator/docker-fragments/bitcoin.yml))
4. Add your `CryptoDefinition` ([Example for BTC](docker-compose-generator/src/CryptoDefinition.cs))
4. Add your CryptoDefinition ([Example for BTC](docker-compose-generator/src/CryptoDefinition.cs))
`build.sh` is using a pre-built image of the `docker-compose generator` on [docker hub](https://hub.docker.com/r/btcpayserver/docker-compose-generator/).
If you modify the code source of `docker-compose generator` (for example, the `CryptoDefinition` [Example for BTC](docker-compose-generator/src/CryptoDefinition.cs)), you need to configure `build.sh` to use your own image by setting the environment variable `BTCPAYGEN_DOCKER_IMAGE` to `btcpayserver/docker-compose-generator:local`.
When testing your coin, **DO NOT USE `build.sh`**, since it uses a pre-built docker image.
Instead, install [.NET Core 2.1 SDK](https://www.microsoft.com/net/download/windows) and run:
```bash
cd docker-compose-generator
BTCPAYGEN_DOCKER_IMAGE="btcpayserver/docker-compose-generator:local"
BTCPAYGEN_CRYPTO1="EXAMPLE-COIN"
BTCPAYGEN_SUBNAME="test"
cd docker-compose-generator/src
dotnet run
```
Or on powershell:
```powershell
cd docker-compose-generator
$BTCPAYGEN_DOCKER_IMAGE="btcpayserver/docker-compose-generator:local"
```
Then run `./build.sh` or `. .\build.ps1`.
This will generate your docker-compose in the `Generated` folder, which you can then run and test.
Note that BTCPayServer developers will not spend excessive time testing your image, so make sure it works.
# Support
| Image | Version | x64 | arm32v7 | arm64v8 | links |
|---|---|:-:|:-:|:-:|:-:|
| btcpayserver/docker-compose-generator | latest | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile) | [Github](https://github.com/btcpayserver/btcpayserver-docker) - [DockerHub](https://hub.docker.com/r/btcpayserver/docker-compose-generator) |
| btcpayserver/lightning | v26.06.1 | [✔️](https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v26.06.1/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v26.06.1/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v26.06.1/Dockerfile) | [Github](https://github.com/btcpayserver/lightning) - [DockerHub](https://hub.docker.com/r/btcpayserver/lightning) |
| shahanafarooqui/rtl | v0.15.4 | [✔️](https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.4/Dockerfile) | [✔️](https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.4/Dockerfile) | [✔️](https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.4/Dockerfile) | [Github](https://github.com/Ride-The-Lightning/RTL) - [DockerHub](https://hub.docker.com/r/shahanafarooqui/rtl) |
| btcpayserver/lnd | v0.19.3-beta-1 | [✔️](https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.19.3-beta-1/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.19.3-beta-1/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.19.3-beta-1/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/lnd) - [DockerHub](https://hub.docker.com/r/btcpayserver/lnd) |
| btcpayserver/bitcoin | 29.2 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/29.2/Bitcoin/29.2/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/29.2/Bitcoin/29.2/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/29.2/Bitcoin/29.2/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/bitcoin) |
| btcpayserver/bitcoinknots | 29.3.knots20260508 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/BitcoinKnots/29.3.knots20260508/BitcoinKnots/29.3.knots20260508/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/BitcoinKnots/29.3.knots20260508/BitcoinKnots/29.3.knots20260508/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/BitcoinKnots/29.3.knots20260508/BitcoinKnots/29.3.knots20260508/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/bitcoinknots) |
| btcpayserver/btcpayserver | 2.4.0 | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver/v2.4.0/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver/v2.4.0/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver/v2.4.0/Dockerfile) | [Github](https://github.com/btcpayserver/btcpayserver) - [DockerHub](https://hub.docker.com/r/btcpayserver/btcpayserver) |
| btcpayserver/monero | 0.18.4.3 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.4.3/Monero/0.18.4.3/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.4.3/Monero/0.18.4.3/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.4.3/Monero/0.18.4.3/Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/monero) |
| nicolasdorier/nbxplorer | 2.6.8 | [✔️](https://raw.githubusercontent.com/dgarage/nbxplorer/v2.6.8/Dockerfile) | [✔️](https://raw.githubusercontent.com/dgarage/nbxplorer/v2.6.8/Dockerfile) | [✔️](https://raw.githubusercontent.com/dgarage/nbxplorer/v2.6.8/Dockerfile) | [Github](https://github.com/dgarage/nbxplorer) - [DockerHub](https://hub.docker.com/r/nicolasdorier/nbxplorer) |
| btcpayserver/letsencrypt-nginx-proxy-companion | 2.2.9-2 | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile) | [Github](https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion) - [DockerHub](https://hub.docker.com/r/btcpayserver/letsencrypt-nginx-proxy-companion) |
| nginx | 1.25.3-bookworm | [✔️](https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile) | [✔️](https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile) | [✔️](https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile) | [Github](https://github.com/nginxinc/docker-nginx) - [DockerHub](https://hub.docker.com/_/nginx) |
| btcpayserver/docker-gen | 0.10.7 | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine) | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine) | [✔️](https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine) | [Github](https://github.com/btcpayserver/docker-gen) - [DockerHub](https://hub.docker.com/r/btcpayserver/docker-gen) |
| btcpayserver/btctransmuter | 0.0.59 | [✔️](https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/amd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/btctransmuter) - [DockerHub](https://hub.docker.com/r/btcpayserver/btctransmuter) |
| btcpayserver/cloudflared | 2024.8.2-4 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2024.8.2-4/Cloudflared/2024.8.2/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2024.8.2-4/Cloudflared/2024.8.2/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2024.8.2-4/Cloudflared/2024.8.2/Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/cloudflared) |
| btcpayserver/btcpayserver-configurator | 0.0.21 | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/amd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/btcpayserver-configurator) - [DockerHub](https://hub.docker.com/r/btcpayserver/btcpayserver-configurator) |
| btcpayserver/eps | 0.2.2 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/eps) |
| btcpayserver/joinmarket | 0.9.10 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/joinmarket) |
| nicolasdorier/ndlc-cli | 1.0.1 | [✔️](https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/amd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm64v8.Dockerfile) | [Github](https://github.com/dgarage/ndlc) - [DockerHub](https://hub.docker.com/r/nicolasdorier/ndlc-cli) |
| pihole/pihole | 2025.03.0 | [✔️](https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2025.03.0/src/Dockerfile) | [✔️](https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2025.03.0/src/Dockerfile) | [✔️](https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2025.03.0/src/Dockerfile) | [Github](https://github.com/pi-hole/docker-pi-hole) - [DockerHub](https://hub.docker.com/r/pihole/pihole) |
| btcpayserver/shopify-app-deployer | 1.8 | [✔️](https://raw.githubusercontent.com/btcpayserver/shopify-app/1.8/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/shopify-app/1.8/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/shopify-app/1.8/Dockerfile) | [Github](https://github.com/btcpayserver/shopify-app) - [DockerHub](https://hub.docker.com/r/btcpayserver/shopify-app-deployer) |
| btcpayserver/snapdrop | 1.2 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/snapdrop) |
| btcpayserver/tor | 0.4.9.10 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.9.10/Tor/0.4.9.10/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.9.10/Tor/0.4.9.10/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.9.10/Tor/0.4.9.10/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/tor) |
| btcpayserver/woocommerce | 3.1.0 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxamd64.Dockerfile) | ️❌ | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/woocommerce) |
| btcpayserver/postgres | 18.1-1 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/18.1-1/Postgres/18.1/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/18.1-1/Postgres/18.1/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/18.1-1/Postgres/18.1/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/postgres) |
| kamigawabul/btglnd | latest | [✔️](https://raw.githubusercontent.com/vutov/lnd/master/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/vutov/lnd) - [DockerHub](https://hub.docker.com/r/kamigawabul/btglnd) |
| kamigawabul/docker-bitcoingold | 0.15.2 | [✔️](https://raw.githubusercontent.com/Vutov/docker-bitcoin/master/bitcoingold/0.15.2/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/Vutov/docker-bitcoin) - [DockerHub](https://hub.docker.com/r/kamigawabul/docker-bitcoingold) |
| acinq/eclair | release-0.7.0 | [✔️](https://raw.githubusercontent.com/ACINQ/eclair/v0.7.0/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/ACINQ/eclair) - [DockerHub](https://hub.docker.com/r/acinq/eclair) |
| chekaz/docker-bitcoinplus | 2.7.0 | [✔️](https://raw.githubusercontent.com/ChekaZ/docker/master/bitcoinplus/2.7.0/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/ChekaZ/docker) - [DockerHub](https://hub.docker.com/r/chekaz/docker-bitcoinplus) |
| dalijolijo/docker-bitcore | 0.90.9.10 | [✔️](https://raw.githubusercontent.com/dalijolijo/btcpayserver-docker-bitcore/master/docker-bitcored/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/dalijolijo/btcpayserver-docker-bitcore) - [DockerHub](https://hub.docker.com/r/dalijolijo/docker-bitcore) |
| btcpayserver/dash | 23.1.2 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/23.1.2/Dash/23.1.2/linuxamd64.Dockerfile) | ️❌ | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/23.1.2/Dash/23.1.2/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/dash) |
| ghcr.io/bisoncraft/decred | 2.1.5 | [✔️](https://raw.githubusercontent.com/bisoncraft/btcpayserver-decred-plugin/v2.1.5/Dockerfile.decred) | ️❌ | ️❌ | [Github](https://github.com/bisoncraft/btcpayserver-decred-plugin) - [DockerHub](https://hub.docker.com/r/ghcr.io/bisoncraft/decred) |
| btcpayserver/dogecoin | 1.14.7 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dogecoin/1.14.7/Dogecoin/1.14.7/linuxamd64.Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/dogecoin) |
| chekaz/docker-feathercoin | 0.16.3 | [✔️](https://raw.githubusercontent.com/ChekaZ/docker/master/feathercoin/0.16.3/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/ChekaZ/docker) - [DockerHub](https://hub.docker.com/r/chekaz/docker-feathercoin) |
| groestlcoin/lightning | v24.08 | [✔️](https://raw.githubusercontent.com/Groestlcoin/lightning/v24.08/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/Groestlcoin/lightning) - [DockerHub](https://hub.docker.com/r/groestlcoin/lightning) |
| groestlcoin/groestlcoin-lightning-charge | version-0.4.22 | [✔️](https://raw.githubusercontent.com/Groestlcoin/groestlcoin-lightning-charge/v0.4.22/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/Groestlcoin/groestlcoin-lightning-charge) - [DockerHub](https://hub.docker.com/r/groestlcoin/groestlcoin-lightning-charge) |
| groestlcoin/groestlcoin-spark | version-0.2.16 | [✔️](https://raw.githubusercontent.com/Groestlcoin/groestlcoin-spark/v0.2.16/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/Groestlcoin/groestlcoin-spark) - [DockerHub](https://hub.docker.com/r/groestlcoin/groestlcoin-spark) |
| groestlcoin/eclair | v0.6.0 | [✔️](https://raw.githubusercontent.com/Groestlcoin/eclair/v0.6.0/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/Groestlcoin/eclair) - [DockerHub](https://hub.docker.com/r/groestlcoin/eclair) |
| groestlcoin/lnd | v0.10.0-grs | [✔️](https://raw.githubusercontent.com/Groestlcoin/lnd/v0.10.0-grs/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/Groestlcoin/lnd) - [DockerHub](https://hub.docker.com/r/groestlcoin/lnd) |
| btcpayserver/groestlcoin | 25.0 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/groestlcoin) |
| btcpayserver/elements | 23.2.3 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/elements) |
| btcpayserver/litecoin | 0.21.5.5 | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.5.5/Litecoin/0.21.5.5/linuxamd64.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.5.5/Litecoin/0.21.5.5/linuxarm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.5.5/Litecoin/0.21.5.5/linuxarm64v8.Dockerfile) | [Github](https://github.com/btcpayserver/dockerfile-deps) - [DockerHub](https://hub.docker.com/r/btcpayserver/litecoin) |
| wakiyamap/docker-monacoin | 0.20.2 | [✔️](https://raw.githubusercontent.com/wakiyamap/docker-bitcoin/master/monacoin/0.20.2/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/wakiyamap/docker-bitcoin) - [DockerHub](https://hub.docker.com/r/wakiyamap/docker-monacoin) |
| redis | 6.2.2-buster | [✔️](https://raw.githubusercontent.com/docker-library/redis/f1a8498333ae3ab340b5b39fbac1d7e1dc0d628c/5.0/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/docker-library/redis) - [DockerHub](https://hub.docker.com/_/redis) |
| jvandrew/btcqbo | 0.3.36 | [✔️](https://raw.githubusercontent.com/JeffVandrewJr/btcqbo/v0.3.36/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/JeffVandrewJr/btcqbo) - [DockerHub](https://hub.docker.com/r/jvandrew/btcqbo) |
| shesek/bwt | 0.2.2-electrum | [✔️](https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/Dockerfile) | [✔️](https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm32v7.Dockerfile) | [✔️](https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm64v8.Dockerfile) | [Github](https://github.com/bwt-dev/bwt) - [DockerHub](https://hub.docker.com/r/shesek/bwt) |
| chatwoot/chatwoot | v1.7.0 | [✔️](https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile) | [✔️](https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile) | [✔️](https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile) | [Github](https://github.com/chatwoot/chatwoot) - [DockerHub](https://hub.docker.com/r/chatwoot/chatwoot) |
| lukechilds/electrumx | latest | [✔️](https://raw.githubusercontent.com/lukechilds/docker-electrumx/master/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/lukechilds/docker-electrumx) - [DockerHub](https://hub.docker.com/r/lukechilds/electrumx) |
| fireflyiii/core | latest | [✔️](https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true) | [✔️](https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true) | [✔️](https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true) | [Github](https://dev.azure.com/Firefly-III/_git/MainImage) - [DockerHub](https://hub.docker.com/r/fireflyiii/core) |
| podcastindexorg/podcasting20-helipad | v0.1.10 | [✔️](https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile) | [✔️](https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile) | [✔️](https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile) | [Github](https://github.com/Podcastindex-org/helipad) - [DockerHub](https://hub.docker.com/r/podcastindexorg/podcasting20-helipad) |
| jvandrew/librepatron | 0.7.39 | [✔️](https://raw.githubusercontent.com/JeffVandrewJr/patron/v0.7.39/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/JeffVandrewJr/patron) - [DockerHub](https://hub.docker.com/r/jvandrew/librepatron) |
| jvandrew/isso | atron.22 | [✔️](https://raw.githubusercontent.com/JeffVandrewJr/isso/patron.22/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/JeffVandrewJr/isso) - [DockerHub](https://hub.docker.com/r/jvandrew/isso) |
| lightninglabs/lightning-terminal | v0.14.1-alpha-path-prefix | [✔️](https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.14.1-alpha/Dockerfile) | ️❌ | [✔️](https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.14.1-alpha/Dockerfile) | [Github](https://github.com/lightninglabs/lightning-terminal) - [DockerHub](https://hub.docker.com/r/lightninglabs/lightning-terminal) |
| hectorchu1/mwebd | latest | [✔️](https://raw.githubusercontent.com/ltcmweb/btcpayserver-ltcmweb-plugin/main/Dockerfile) | [✔️](https://raw.githubusercontent.com/ltcmweb/btcpayserver-ltcmweb-plugin/main/Dockerfile) | [✔️](https://raw.githubusercontent.com/ltcmweb/btcpayserver-ltcmweb-plugin/main/Dockerfile) | [Github](https://github.com/ltcmweb/btcpayserver-ltcmweb-plugin) - [DockerHub](https://hub.docker.com/r/hectorchu1/mwebd) |
| mempool/frontend | v2.5.0 | [✔️](https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile) | [✔️](https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile) | [✔️](https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile) | [Github](https://github.com/mempool/mempool) - [DockerHub](https://hub.docker.com/r/mempool/frontend) |
| mempool/backend | v2.5.0 | [✔️](https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile) | [✔️](https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile) | [✔️](https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile) | [Github](https://github.com/mempool/mempool) - [DockerHub](https://hub.docker.com/r/mempool/backend) |
| mariadb | 10.11 | [✔️](https://raw.githubusercontent.com/docker-library/mariadb/master/10.11/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/docker-library/mariadb) - [DockerHub](https://hub.docker.com/_/mariadb) |
| kukks/nnostr-relay | v0.0.23 | [✔️](https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile) | [✔️](https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile) | [✔️](https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile) | [Github](https://github.com/kukks/nnostr) - [DockerHub](https://hub.docker.com/r/kukks/nnostr-relay) |
| sphinxlightning/sphinx-relay | v2.2.9 | [✔️](https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile) | [✔️](https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile) | [✔️](https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile) | [Github](https://github.com/stakwork/sphinx-relay) - [DockerHub](https://hub.docker.com/r/sphinxlightning/sphinx-relay) |
| djbooth007/tallycoin_connect | v1.8.0 | [✔️](https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile) | [✔️](https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm32v7) | [✔️](https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm64v8) | [Github](https://github.com/djbooth007/tallycoin_connect) - [DockerHub](https://hub.docker.com/r/djbooth007/tallycoin_connect) |
| benjaminchodroff/rust-teos | latest | [✔️](https://raw.githubusercontent.com/benjaminchodroff/rust-teos/master/docker/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/benjaminchodroff/rust-teos) - [DockerHub](https://hub.docker.com/r/benjaminchodroff/rust-teos) |
| apotdevin/thunderhub | base-0.15.4 | [✔️](https://raw.githubusercontent.com/apotdevin/thunderhub/v0.15.4/Dockerfile) | [✔️](https://raw.githubusercontent.com/apotdevin/thunderhub/v0.15.4/Dockerfile) | [✔️](https://raw.githubusercontent.com/apotdevin/thunderhub/v0.15.4/Dockerfile) | [Github](https://github.com/apotdevin/thunderhub) - [DockerHub](https://hub.docker.com/r/apotdevin/thunderhub) |
| zammad/zammad-docker-compose | zammad-postgresql-3.4.0-4 | [✔️](https://raw.githubusercontent.com/zammad/zammad-docker-compose/ff20084ce2829486076e9781fe27407ca6cc09bb/containers/zammad-postgresql/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/zammad/zammad-docker-compose) - [DockerHub](https://hub.docker.com/r/zammad/zammad-docker-compose) |
| memcached | 1.5.22-alpine | [✔️](https://raw.githubusercontent.com/docker-library/memcached/eb38bf28263b8e5bb7367797cb7b181b65d769bd/alpine/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/docker-library/memcached) - [DockerHub](https://hub.docker.com/_/memcached) |
| acinq/phoenixd | 0.8.0 | [✔️](https://raw.githubusercontent.com/ACINQ/phoenixd/v0.8.0/.docker/Dockerfile) | [✔️](https://raw.githubusercontent.com/ACINQ/phoenixd/v0.8.0/.docker/Dockerfile) | [✔️](https://raw.githubusercontent.com/ACINQ/phoenixd/v0.8.0/.docker/Dockerfile) | [Github](https://github.com/ACINQ/phoenixd) - [DockerHub](https://hub.docker.com/r/acinq/phoenixd) |
| traefik | v2.6 | [✔️](https://raw.githubusercontent.com/containous/traefik-library-image/master/scratch/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/containous/traefik-library-image) - [DockerHub](https://hub.docker.com/_/traefik) |
| chekaz/docker-trezarcoin | 0.13.0 | [✔️](https://raw.githubusercontent.com/ChekaZ/docker/master/trezarcoin/1.2.0/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/ChekaZ/docker) - [DockerHub](https://hub.docker.com/r/chekaz/docker-trezarcoin) |
| romanornr/docker-viacoin | 0.15.2 | [✔️](https://raw.githubusercontent.com/viacoin/docker-viacoin/master/viacoin/0.15.2/docker-viacoin) | ️❌ | ️❌ | [Github](https://github.com/viacoin/docker-viacoin) - [DockerHub](https://hub.docker.com/r/romanornr/docker-viacoin) |
| hhanh00/zcash-walletd | 1.1.5 | [✔️](https://raw.githubusercontent.com/elemental-pay/zcash-walletd/feat/data-config/docker/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/elemental-pay/zcash-walletd) - [DockerHub](https://hub.docker.com/r/hhanh00/zcash-walletd) |
| zfnd/zebra | 3.0.0 | [✔️](https://raw.githubusercontent.com/ZcashFoundation/zebra/main/docker/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/ZcashFoundation/zebra) - [DockerHub](https://hub.docker.com/r/zfnd/zebra) |
| electriccoinco/lightwalletd | v0.4.18 | [✔️](https://raw.githubusercontent.com/zcash/lightwalletd/master/Dockerfile) | ️❌ | ️❌ | [Github](https://github.com/zcash/lightwalletd) - [DockerHub](https://hub.docker.com/r/electriccoinco/lightwalletd) |
# FAQ
## How can I modify my environment?
@ -433,6 +299,39 @@ export BTCPAYGEN_CRYPTO3='btg'
. btcpay-setup.sh -i
```
## I deployed before `btcpay-setup.sh` existed (before May 17), can I migrate to this new system?
Yes, run the following commands to update:
```bash
sudo su -
cd $DOWNLOAD_ROOT/btcpayserver-docker
git checkout 9acb5d8067cb5c46f59858137feb699b41ac9f19
btcpay-update.sh
. ./btcpay-setup.sh -i
git checkout master
btcpay-update.sh
exit
```
## I'm getting an error on Windows: `Cannot create container for service docker: Mount denied`?
If you see this error:
`Cannot create container for service docker: b'Mount denied:\nThe source path "\\\\var\\\\run\\\\docker.sock:/var/run/docker.sock"\nis not a valid Windows path'`.
Run this in [powershell](https://docs.microsoft.com/en-us/powershell/scripting/setup/starting-windows-powershell?view=powershell-6):
```powershell
$Env:COMPOSE_CONVERT_WINDOWS_PATHS=1
```
Then, run `docker-compose -f EXAMPLE.yml up`.
This bug comes from Docker for Windows and is [tracked on Github](https://github.com/docker/for-win/issues/1829).
## How I can prune my node(s)?
This will prune your Bitcoin full node to a maximum of 100GB (of blocks):
@ -457,7 +356,8 @@ First, copy [opt-save-storage](docker-compose-generator/docker-fragments/opt-sav
Modify the new `opt-save-storage.custom.yml` file to your taste:
```diff
@@ -14,8 +14,7 @@ services:
@@ -14,8 +14,7 @@ version: "3"
services:
bitcoind:
environment:
- BITCOIN_EXTRA_ARGS: prune=100000
@ -467,112 +367,6 @@ Modify the new `opt-save-storage.custom.yml` file to your taste:
Then set it up:
```bash
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-save-storage.custom"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage.custom"
. ./btcpay-setup.sh -i
```
## Can I run BTCPay Server on ports other than 80 and 443?
You can change the ports for HTTP and HTTPS by setting the environment variables `REVERSEPROXY_HTTP_PORT` and `REVERSEPROXY_HTTPS_PORT`. This is handy when ports 80 and 443 are already in use on your host, or you want to offload SSL termination with an existing web proxy.
When you set `REVERSEPROXY_HTTP_PORT` to another value than 80, the built-in Let's Encrypt certificate will not work, as Let's Encrypt will try to validate your SSL certificate request by connecting from the internet to your domain on port 80. This validation request should be able to reach BTCPay Server in order to receive the certificate.
If you need to run on a different port, it's best to terminate SSL using another web proxy and forward your traffic.
## Can I offload HTTPS termination?
Yes. Please [see the documentation](https://docs.btcpayserver.org/FAQ/FAQ-Deployment/#can-i-use-an-existing-nginx-server-as-a-reverse-proxy-with-ssl-termination).
## How can I back up my BTCPay Server?
See the [Backup & Restore](https://docs.btcpayserver.org/Docker/backup-restore/) guide in our documentation.
<details>
<summary>For backwards compatibility: Click here for the description of the old backup.sh process</summary>
:::warning
Please consider switching to the [new Backup & Restore process](https://docs.btcpayserver.org/Docker/backup-restore/), because the `backup.sh` will not be maintained anymore.
:::
We provide a backup script that dumps the database and saves the important files:
```bash
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
./backup.sh
```
This will save the backup locally as `/var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz`.
These are the options to customize the backup name and location:
* `BACKUP_TIMESTAMP=true` saves the backup with datetime as part of the file name, so that backups do not get overwritten.
* `BACKUP_PROVIDER=SCP` saves the backup remotely, requires additional `SCP_TARGET` environment variable (see below).
* `BACKUP_PROVIDER=Dropbox` saves the backup to Dropbox, requires additional `DROPBOX_TOKEN` environment variable (see below).
```bash
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
# Backup with custom file name and timestamp:
BACKUP_TIMESTAMP=true ./backup.sh
# Backup via SCP:
BACKUP_PROVIDER=SCP SCP_TARGET=myhost:backups/btcpay ./backup.sh
# Backup to Dropbox:
BACKUP_PROVIDER=Dropbox DROPBOX_TOKEN=myDropboxToken ./backup.sh
```
You can also choose to only dump the database.
This option does not need to stop and restart the docker-containers:
```bash
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
./backup.sh --only-db
```
</details>
## How can I connect to the database?
On the server you can open a database session by connecting via `psql` as the postgres user:
```bash
docker exec -ti $(docker ps -a -q -f "name=postgres_1") psql -U postgres
```
Then, inside `psql` you can select a database and interact with the tables:
```bash
# list databases
\l
# connect to database
\c btcpayservermainnet
# list tables
\dt
# list users
SELECT "Id", "Email" FROM "AspNetUsers";
# end session
\q
```
The main BTCPay Server database tables are part of the `public` schema.
Plugins have their own schema, named after the plugin.
By default, only the tables of the `public` schema are shown.
If you want to also see and select the plugin tables, you need to extend the search path:
```bash
# list plugin schemas
SELECT * FROM pg_catalog.pg_namespace WHERE nspname LIKE 'BTCPayServer.%';
# extend search path
SET search_path TO "BTCPayServer.Plugins.MyPlugin", public;
# table list now also shows the MyPlugin tables
\dt
```
## How do I upgrade my BTCPay Server docker?
Run the script `./btcpay-update.sh` and patiently wait for your server to be upgraded.

View File

@ -1,11 +0,0 @@
#!/bin/bash
[[ $(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"
docker exec generated_fireflyiii_1 php artisan migrate --seed
docker exec generated_fireflyiii_1 php artisan firefly-iii:decrypt-all
docker exec generated_fireflyiii_1 php artisan cache:clear
docker exec generated_fireflyiii_1 php artisan firefly-iii:upgrade-database
docker exec generated_fireflyiii_1 php artisan passport:install
docker exec generated_fireflyiii_1 php artisan cache:clear
exit 0

View File

@ -1,16 +0,0 @@
#!/bin/bash
set -e
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
if [ $yn != "yes" ]; then
exit 0
fi
docker exec btcpayserver_lnd_bitcoin rm -rf /root/.lnd/tls.cert
docker exec btcpayserver_lnd_bitcoin rm -rf /root/.lnd/tls.key
docker stop btcpayserver_lnd_bitcoin
docker start btcpayserver_lnd_bitcoin
echo "LND TLS certificate recreated"

View File

@ -1,30 +0,0 @@
#!/bin/bash
set -e
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
if [ $yn != "yes" ]; then
exit 0
fi
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
if [ $yn != "yes" ]; then
exit 0
fi
read -p "OK, last chance to abort. Type 'yes' to continue! `echo $'\n> '`" yn
if [ $yn != "yes" ]; then
exit 0
fi
btcpay-down.sh
docker volume rm --force generated_lnd_bitcoin_datadir
# very old installations had production_lnd_bitcoin_datadir volume
# https://github.com/btcpayserver/btcpayserver-docker/issues/272
docker volume rm --force production_lnd_bitcoin_datadir
btcpay-up.sh
echo "LND container recreated"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View File

@ -1,26 +0,0 @@
# How to use docker-compose with Traefik
Traefik is a modern reverse proxy aimed towards applications running through container orchestrators.
Some of the benefits of using Traefik over NGinx are:
- Real-time configuration changes - no need to reload the proxy
- Auto discovery and configuration of services through a vast amount of container orchestrators.
- Built-in official support for Let's Encrypt SSL with certificate auto-renewal
- Supports path-based routing without need to [hard-code it in global config](../Production/nginx.tmpl).
## Traefik Specific Environment Variables
- `BTCPAYGEN_REVERSEPROXY` to `traefik`.
- `LETSENCRYPT_EMAIL`: Optional, The email Let's Encrypt will use to notify you about certificate expiration.
- `BTCPAYGEN_ADDITIONAL_FRAGMENTS`: Add `traefik`
- `BTCPAY_ADDITIONAL_HOSTS`: Traefik can not accept list of hosts. Add additional hosts in a new file named e.g. `btcpayserver-traefic.custom.yml`:
```
services:
btcpayserver:
labels:
traefik.http.routers.btcpayserver2.rule: Host(`additional.example.com`)
traefik.http.routers.btcpayserver3.rule: Host(`another-additional.example.com`)
```
![Architecture](Production.png)

View File

@ -1,34 +0,0 @@
entryPoints:
http:
address: :80
http:
redirections:
entrypoint:
to: https
scheme: https
https:
address: :443
http:
tls:
certResolver: default
providers:
docker:
exposedByDefault: false
watch: true
endpoint: unix:///var/run/docker.sock
# Enable only for debug
#api:
# insecure: true
# dashboard: true
log:
level: ERROR # or DEBUG, PANIC, FATAL, WARN, and INFO
certificatesResolvers:
default:
acme:
storage: /data/acme.json
httpChallenge:
entryPoint: http

123
backup.sh
View File

@ -1,123 +0,0 @@
#!/bin/bash
# This script might look like a good idea. Please be aware of these important issues:
#
# - The backup file is not encrypted and it contains your lightning private keys.
# Consider encrypting before uploading or using another backup tool like duplicity.
# - Old channel state is toxic and you can loose all your funds, if you or someone
# else closes a channel based on the backup with old state - and the state changes
# often! If you publish an old state (say from yesterday's backup) on chain, you
# WILL LOSE ALL YOUR FUNDS IN A CHANNEL, because the counterparty will publish a
# revocation key!
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root."
echo "Use the command 'sudo su -' (include the trailing hypen) and try again"
exit 1
fi
case "$BACKUP_PROVIDER" in
"Dropbox")
if [ -z "$DROPBOX_TOKEN" ]; then
echo -e "\033[0;31mSet DROPBOX_TOKEN environment variable and try again.\033[0m"
exit 1
fi
;;
"S3")
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"
if [ -z "$S3_BUCKET" ]; then
echo -e "\033[0;31mSet S3_BUCKET environment variable and try again.\033[0m"
exit 1
fi
if [ -z "$S3_PATH" ]; then
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"
fi
;;
"SCP")
if [ -z "$SCP_TARGET" ]; then
echo -e "\033[0;31mSet SCP_TARGET environment variable and try again.\033[0m"
exit 1
fi
;;
*)
echo "No BACKUP_PROVIDER set. Backing up to local directory."
;;
esac
# preparation
volumes_dir=/var/lib/docker/volumes
backup_dir="$volumes_dir/backup_datadir"
filename="backup.tar.gz"
dumpname="postgres.sql.gz"
if [ "$BACKUP_TIMESTAMP" == true ]; then
timestamp=$(date "+%Y%m%d-%H%M%S")
filename="$timestamp-$filename"
dumpname="$timestamp-$dumpname"
fi
backup_path="$backup_dir/_data/${filename}"
dbdump_path="$backup_dir/_data/${dumpname}"
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
. helpers.sh
# ensure backup dir exists
if [ ! -d "$backup_dir" ]; then
docker volume create backup_datadir
fi
# dump database
echo "Dumping database …"
btcpay_dump_db $dbdump_path
if [[ "$1" == "--only-db" ]]; then
tar -cvzf $backup_path $dbdump_path
else
# stop docker containers, save files and restart
echo "Stopping BTCPay Server …"
btcpay_down
echo "Backing up files …"
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
echo "Restarting BTCPay Server …"
btcpay_up
fi
# post processing
case $BACKUP_PROVIDER in
"Dropbox")
echo "Uploading to Dropbox …"
docker run --name backup --env DROPBOX_TOKEN=$DROPBOX_TOKEN -v backup_datadir:/data jvandrew/btcpay-dropbox:1.0.5 $filename
echo "Deleting local backup …"
rm $backup_path
;;
"S3")
echo "Uploading to S3 …"
docker run --rm -v ~/.aws:/root/.aws -v $backup_path:/aws/$filename amazon/aws-cli s3 cp $filename s3://$S3_BUCKET/$S3_PATH
echo "Deleting local backup …"
rm $backup_path
;;
"SCP")
echo "Uploading via SCP …"
scp $backup_path $SCP_TARGET
echo "Deleting local backup …"
rm $backup_path
;;
*)
echo "Backed up to $backup_path"
;;
esac
# cleanup
rm $dbdump_path
echo "Backup done."

View File

@ -1 +0,0 @@
docker exec -it btcpayserver_beldexd beldex-wallet-cli $args

View File

@ -1,3 +0,0 @@
#!/bin/bash
docker exec -it btcpayserver_beldexd beldex-wallet-cli "$@"

View File

@ -1 +1 @@
docker exec btcpayserver_bgoldd bgold-cli -datadir="/data" $args
docker exec -ti btcpayserver_bgoldd bgold-cli -datadir="/data" $args

View File

@ -1,3 +1,3 @@
#!/bin/bash
docker exec btcpayserver_bgoldd bgold-cli -datadir="/data" "$@"
docker exec -ti btcpayserver_bgoldd bgold-cli -datadir="/data" "$@"

View File

@ -1 +1 @@
docker exec btcpayserver_lnd_bitcoingold lncli $args
docker exec -ti btcpayserver_lnd_bitcoingold lncli $args

View File

@ -1,3 +1,3 @@
#!/bin/bash
docker exec btcpayserver_lnd_bitcoingold lncli "$@"
docker exec -ti btcpayserver_lnd_bitcoingold lncli "$@"

View File

@ -1 +1 @@
docker exec btcpayserver_bitcoind bitcoin-cli -datadir="/data" $args
docker exec -ti btcpayserver_bitcoind bitcoin-cli -datadir="/data" $args

View File

@ -1,3 +1,3 @@
#!/bin/bash
docker exec btcpayserver_bitcoind bitcoin-cli -datadir="/data" "$@"
docker exec -ti btcpayserver_bitcoind bitcoin-cli -datadir="/data" "$@"

View File

@ -1 +0,0 @@
docker exec btcpayserver_eclair_bitcoin eclair-cli -p DwubwWsoo3 "$@" $args

View File

@ -1,3 +0,0 @@
#!/bin/bash
docker exec btcpayserver_eclair_bitcoin eclair-cli -p DwubwWsoo3 "$@"

View File

@ -1 +1 @@
docker exec btcpayserver_clightning_bitcoin lightning-cli $args
docker exec -ti btcpayserver_clightning_bitcoin lightning-cli $args

View File

@ -1,3 +1,3 @@
#!/bin/bash
docker exec btcpayserver_clightning_bitcoin lightning-cli --rpc-file /root/.lightning/lightning-rpc "$@"
docker exec -ti btcpayserver_clightning_bitcoin lightning-cli "$@"

View File

@ -1 +1 @@
docker exec btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon $args
docker exec -ti btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon $args

View File

@ -1,3 +1,3 @@
#!/bin/bash
docker exec btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon "$@"
docker exec -ti btcpayserver_lnd_bitcoin lncli --macaroonpath /root/.lnd/admin.macaroon "$@"

View File

@ -1 +0,0 @@
docker exec btcpayserver_bitcored bitcore-cli -datadir="/data" $args

View File

@ -1,3 +0,0 @@
#!/bin/bash
docker exec btcpayserver_bitcored bitcore-cli -datadir="/data" "$@"

View File

@ -1 +0,0 @@
docker exec btcpayserver_bitcoinplusd bitcoinplus-cli -datadir="/data" $args

View File

@ -1,3 +0,0 @@
#!/bin/bash
docker exec btcpayserver_bitcoinplusd bitcoinplus-cli -datadir="/data" "$@"

View File

@ -1,28 +0,0 @@
#!/bin/bash
query()
{
docker exec $(docker ps -a -q -f "name=postgres_1") psql -U postgres -d btcpayservermainnet -c "$*"
}
case "$1" in
disable-multifactor)
query "DELETE FROM \"U2FDevices\" WHERE \"ApplicationUserId\" = (SELECT \"Id\" FROM \"AspNetUsers\" WHERE upper('$2') = \"NormalizedEmail\")"
query "DELETE FROM \"Fido2Credentials\" WHERE \"ApplicationUserId\" = (SELECT \"Id\" FROM \"AspNetUsers\" WHERE upper('$2') = \"NormalizedEmail\")"
query "UPDATE public.\"AspNetUsers\" SET \"TwoFactorEnabled\"=false WHERE upper('$2') = \"NormalizedEmail\""
;;
set-user-admin)
query "INSERT INTO \"AspNetUserRoles\" Values ( (SELECT \"Id\" FROM \"AspNetUsers\" WHERE upper('$2') = \"NormalizedEmail\"), (SELECT \"Id\" FROM \"AspNetRoles\" WHERE \"NormalizedName\"='SERVERADMIN'))"
;;
reset-server-policy)
query "DELETE FROM \"Settings\" WHERE \"Id\" = 'BTCPayServer.Services.PoliciesSettings'"
;;
*)
echo "Usage: $0 [command]"
echo
echo "Commands:"
echo " disable-multifactor <email>"
echo " set-user-admin <email>"
echo " reset-server-policy"
esac
exit 0

View File

@ -1,156 +0,0 @@
#!/bin/bash -e
set -o pipefail -o errexit
# Please be aware of these important issues:
#
# - Old channel state is toxic and you can loose all your funds, if you or someone
# else closes a channel based on the backup with old state - and the state changes
# often! If you publish an old state (say from yesterday's backup) on chain, you
# WILL LOSE ALL YOUR FUNDS IN A CHANNEL, because the counterparty will publish a
# revocation key!
if [ "$(id -u)" != "0" ]; then
printf "\n🚨 This script must be run as root.\n"
printf "➡️ Use the command 'sudo su -' (include the trailing hypen) and try again.\n\n"
exit 1
fi
# preparation
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OS
BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh"
else
# Linux
BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh"
fi
. "$BASH_PROFILE_SCRIPT"
docker_dir=$(docker volume inspect generated_btcpay_datadir --format="{{.Mountpoint}}" | sed -e "s%/volumes/.*%%g")
postgres_dump_name=postgres.sql.gz
btcpay_dir="$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
backup_dir="$docker_dir/volumes/backup_datadir/_data"
postgres_dump_path="$docker_dir/$postgres_dump_name"
backup_path="$backup_dir/backup.tar.gz"
# ensure backup dir exists
if [ ! -d "$backup_dir" ]; then
mkdir -p $backup_dir
fi
cd $btcpay_dir
. helpers.sh
# Postgres database
postgres_container=$(docker ps -a -q -f "name=postgres_1")
if [ -z "$postgres_container" ]; then
printf "\n"
echo " Postgres container is not up and running. Starting BTCPay Server …"
docker volume create generated_postgres_datadir
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d postgres
printf "\n"
postgres_container=$(docker ps -a -q -f "name=postgres_1")
if [ -z "$postgres_container" ]; then
echo "🚨 Postgres container could not be started or found."
exit 1
fi
fi
printf "\n"
echo " Dumping Postgres database …"
{
docker exec $postgres_container pg_dumpall -c -U postgres | gzip > $postgres_dump_path
echo "✅ Postgres database dump done."
} || {
echo "🚨 Dumping Postgres database failed. Please check the error message above."
exit 1
}
# Optional: MariaDB database
mariadb_container=$(docker ps -a -q -f "name=mariadb_1")
if [ ! -z "$mariadb_container" ]; then
mariadb_dump_name=mariadb.sql.gz
mariadb_dump_path="$docker_dir/$mariadb_dump_name"
# MariaDB container exists and is running - dump it
printf "\n"
echo " Dumping MariaDB database …"
{
docker exec $mariadb_container mysqldump -u root -pwordpressdb -A --add-drop-database | gzip > $mariadb_dump_path
echo "✅ MariaDB database dump done."
} || {
echo "🚨 Dumping MariaDB database failed. Please check the error message above."
exit 1
}
fi
# BTCPay Server backup
printf "\n Stopping BTCPay Server …\n\n"
btcpay_down
printf "\n"
cd $docker_dir
echo " Archiving files in $(pwd)"
{
tar \
--exclude="volumes/backup_datadir" \
--exclude="volumes/generated_btcpay_datadir/_data/host_*" \
--exclude="volumes/generated_bitcoin_datadir/_data" \
--exclude="volumes/generated_litecoin_datadir/_data" \
--exclude="volumes/generated_mwebd_datadir" \
--exclude="volumes/generated_elements_datadir/_data" \
--exclude="volumes/generated_xmr_data/_data" \
--exclude="volumes/generated_bdx_data/_data" \
--exclude="volumes/generated_dogecoin_datadir/_data/blocks" \
--exclude="volumes/generated_dogecoin_datadir/_data/chainstate" \
--exclude="volumes/generated_dash_datadir/_data/blocks" \
--exclude="volumes/generated_dash_datadir/_data/chainstate" \
--exclude="volumes/generated_dash_datadir/_data/indexes" \
--exclude="volumes/generated_dash_datadir/_data/debug.log" \
--exclude="volumes/generated_dash_datadir/_data/evodb" \
--exclude="volumes/generated_mariadb_datadir" \
--exclude="volumes/generated_postgres_datadir" \
--exclude="volumes/generated_electrumx_datadir" \
--exclude="volumes/generated_lnd_bitcoin_datadir/_data/data/graph" \
--exclude="volumes/generated_clightning_bitcoin_datadir/_data/lightning-rpc" \
--exclude="volumes/generated_lwd-cache" \
--exclude="volumes/generated_zebrad-cache" \
--exclude="volumes/generated_zec_data" \
--exclude="**/logs/*" \
-cvzf $backup_path $postgres_dump_name $mariadb_dump_name volumes/generated_*
echo "✅ Archive done."
if [ ! -z "$BTCPAY_BACKUP_PASSPHRASE" ]; then
printf "\n"
echo "🔐 BTCPAY_BACKUP_PASSPHRASE is set, the backup will be encrypted."
{
gpg -o "$backup_path.gpg" --batch --yes -c --passphrase "$BTCPAY_BACKUP_PASSPHRASE" $backup_path
rm $backup_path
backup_path="$backup_path.gpg"
echo "✅ Encryption done."
} || {
echo "🚨 Encrypting failed. Please check the error message above."
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
exit 1
}
fi
} || {
echo "🚨 Archiving failed. Please check the error message above."
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
exit 1
}
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
printf "\n Cleaning up …\n\n"
rm $postgres_dump_path
printf "✅ Backup done => $backup_path\n\n"

View File

@ -1,3 +0,0 @@
#!/bin/bash
docker image prune -af --filter "label!=org.btcpayserver.image=docker-compose-generator"

View File

@ -1,16 +1,6 @@
#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OS
BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh"
. /etc/profile.d/btcpay-env.sh
else
# Linux
BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh"
fi
. "$BASH_PROFILE_SCRIPT"
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
. helpers.sh
btcpay_down
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f $BTCPAY_DOCKER_COMPOSE down

View File

@ -1,16 +1,7 @@
#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OS
BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh"
. /etc/profile.d/btcpay-env.sh
else
# Linux
BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh"
fi
. ${BASH_PROFILE_SCRIPT}
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
. helpers.sh
btcpay_restart
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f $BTCPAY_DOCKER_COMPOSE down
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d

View File

@ -1,182 +0,0 @@
#!/bin/bash -e
set -o pipefail -o errexit
if [ "$(id -u)" != "0" ]; then
printf "\n🚨 This script must be run as root.\n"
printf "➡️ Use the command 'sudo su -' (include the trailing hypen) and try again.\n\n"
exit 1
fi
backup_path=$1
if [ -z "$backup_path" ]; then
printf "\n Usage: btcpay-restore.sh /path/to/backup.tar.gz\n\n"
exit 1
fi
if [ ! -f "$backup_path" ]; then
printf "\n🚨 $backup_path does not exist.\n\n"
exit 1
fi
if [[ "$backup_path" == *.gpg && -z "$BTCPAY_BACKUP_PASSPHRASE" ]]; then
printf "\n🔐 $backup_path is encrypted. Please provide the passphrase to decrypt it."
printf "\n Usage: BTCPAY_BACKUP_PASSPHRASE=t0pSeCrEt btcpay-restore.sh /path/to/backup.tar.gz.gpg\n\n"
exit 1
fi
# preparation
docker_dir=$(docker volume inspect generated_btcpay_datadir --format="{{.Mountpoint}}" | sed -e "s%/volumes/.*%%g")
restore_dir="$docker_dir/volumes/backup_datadir/_data/restore"
postgres_dump_name=postgres.sql.gz
btcpay_dir="$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
# ensure clean restore dir
printf "\n Cleaning restore directory $restore_dir …\n\n"
rm -rf $restore_dir
mkdir -p $restore_dir
if [[ "$backup_path" == *.gpg ]]; then
echo "🔐 Decrypting backup file …"
{
gpg -o "${backup_path%.*}" --batch --yes --passphrase "$BTCPAY_BACKUP_PASSPHRASE" -d $backup_path
backup_path="${backup_path%.*}"
printf "✅ Decryption done.\n\n"
} || {
echo "🚨 Decryption failed. Please check the error message above."
exit 1
}
fi
cd $restore_dir
echo " Extracting files in $(pwd)"
tar -xvf $backup_path -C $restore_dir
# basic control checks
if [ ! -f "$postgres_dump_name" ]; then
printf "\n🚨 $postgres_dump_name does not exist.\n\n"
exit 1
fi
if [ ! -d "volumes" ]; then
printf "\n🚨 volumes directory does not exist.\n\n"
exit 1
fi
if [ -f "mariadb.sql.gz" ]; then
mariadb_dump_name=mariadb.sql.gz
fi
cd $btcpay_dir
. helpers.sh
printf "\n Stopping BTCPay Server …\n\n"
btcpay_down
cd $restore_dir
{
printf "\n Restoring volumes …\n"
# ensure volumes dir exists
if [ ! -d "$docker_dir/volumes" ]; then
mkdir -p $docker_dir/volumes
fi
# copy volume directories over
cp -r volumes/* $docker_dir/volumes/
# ensure datadirs excluded in backup exist
mkdir -p $docker_dir/volumes/generated_postgres_datadir/_data
if [ ! -z "$mariadb_dump_name" ]; then
mkdir -p $docker_dir/volumes/generated_mariadb_datadir/_data
fi
echo "✅ Volume restore done."
} || {
echo "🚨 Restoring volumes failed. Please check the error message above."
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
exit 1
}
# Start Postgres database
{
printf "\n Starting Postgres database container …\n"
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d postgres
sleep 10
postgres_container=$(docker ps -a -q -f "name=postgres_1")
if [ -z "$postgres_container" ]; then
echo "🚨 Postgres database container could not be started or found."
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
exit 1
fi
} || {
echo "🚨 Starting Postgres database container failed. Please check the error message above."
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
exit 1
}
# Optional: Start MariaDB database
if [ ! -z "$mariadb_dump_name" ]; then
{
printf "\n Starting MariaDB database container …\n"
docker-compose -f $BTCPAY_DOCKER_COMPOSE up -d mariadb
sleep 10
mariadb_container=$(docker ps -a -q -f "name=mariadb_1")
if [ -z "$mariadb_container" ]; then
echo "🚨 MariaDB database container could not be started or found."
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
exit 1
fi
} || {
echo "🚨 Starting MariaDB database container failed. Please check the error message above."
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
exit 1
}
fi
cd $restore_dir
# Postgres database
{
printf "\n Restoring Postgres database …"
gunzip -c $postgres_dump_name | docker exec -i $postgres_container psql -U postgres postgres
echo "✅ Postgres database restore done."
} || {
echo "🚨 Restoring Postgres database failed. Please check the error message above."
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
exit 1
}
# Optional: MariaDB database
if [ ! -z "$mariadb_dump_name" ]; then
{
printf "\n Restoring MariaDB database …"
gunzip -c $mariadb_dump_name | docker exec -i $mariadb_container mysql -u root -pwordpressdb
printf "\n✅ MariaDB database restore done."
} || {
echo "🚨 Restoring MariaDB database failed. Please check the error message above."
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
exit 1
}
fi
printf "\n Restarting BTCPay Server …\n\n"
cd $btcpay_dir
btcpay_up
printf "\n Cleaning up …\n\n"
rm -rf $restore_dir
printf "✅ Restore done\n\n"

View File

@ -1,49 +1,22 @@
#!/bin/bash
set +x
if [[ "$0" = "$BASH_SOURCE" ]]; then
if [ "$0" = "$BASH_SOURCE" ]; then
echo "This script must be sourced \". btcpay-setup.sh\""
exit 1
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OS
if [[ $EUID -eq 0 ]]; then
# Running as root is discouraged on Mac OS. Run under the current user instead.
echo "This script should not be run as root."
return
fi
BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh"
# Mac OS doesn't use /etc/profile.d/xxx.sh. Instead we create a new file and load that from ~/.bash_profile
if [[ ! -f "$HOME/.bash_profile" ]]; then
touch "$HOME/.bash_profile"
fi
if [[ -z $(grep ". \"$BASH_PROFILE_SCRIPT\"" "$HOME/.bash_profile") ]]; then
# Line does not exist, add it
echo ". \"$BASH_PROFILE_SCRIPT\"" >> "$HOME/.bash_profile"
fi
else
# Root user is not needed for Mac OS
BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh"
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root after running \"sudo su -\""
return
fi
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root after running \"sudo su -\""
return
fi
# Verify we are in right folder. If we are not, let's go in the parent folder of the current docker-compose.
if ! git rev-parse --git-dir &> /dev/null || [ ! -d "Generated" ]; then
if [[ ! -z $BTCPAY_DOCKER_COMPOSE ]]; then
if ! git -C . rev-parse &> /dev/null || [ ! -d "Generated" ]; then
if [ ! -z $BTCPAY_DOCKER_COMPOSE ]; then
cd $(dirname $BTCPAY_DOCKER_COMPOSE)
cd ..
fi
if ! git rev-parse || [[ ! -d "Generated" ]]; then
if ! git -C . rev-parse || [ ! -d "Generated" ]; then
echo "You must run this script inside the git repository of btcpayserver-docker"
return
fi
@ -55,13 +28,9 @@ Usage:
------
Install BTCPay on this server
This script must be run as root, except on Mac OS
This script must be run as root
-i : Run install and start BTCPay Server
--install-only: Run install only
--docker-unavailable: Same as --install-only, but will also skip install steps requiring docker
--no-startup-register: Do not register BTCPayServer to start via systemctl or upstart
--no-systemd-reload: Do not reload systemd configuration
-i : Run install
This script will:
@ -75,208 +44,80 @@ This script will:
You can run again this script if you desire to change your configuration.
Except BTC and LTC, other crypto currencies are maintained by their own community. Run at your own risk.
Make sure you own a domain with DNS record pointing to your website.
If you want HTTPS setup automatically with Let's Encrypt, leave REVERSEPROXY_HTTP_PORT at it's default value of 80 and make sure this port is accessible from the internet.
Or, if you want to offload SSL because you have an existing web proxy, change REVERSEPROXY_HTTP_PORT to any port you want. You can then forward the traffic. Just don't forget to pass the X-Forwarded-Proto header.
Make sure you own a domain with DNS record pointing to your website and that port 80 is accessible before running this script.
This will be used to properly setup HTTPS via let's encrypt.
Environment variables:
BTCPAY_HOST: The hostname of your website (eg. btcpay.example.com)
BTCPAY_LIGHTNING_HOST: The hostname announced for your node on the lightning network (by default, the BTCPAY_HOST will be used)
REVERSEPROXY_HTTP_PORT: The port the reverse proxy binds to for public HTTP requests. Default: 80
REVERSEPROXY_HTTPS_PORT: The port the reverse proxy binds to for public HTTPS requests. Default: 443
REVERSEPROXY_DEFAULT_HOST: Optional, if using a reverse proxy nginx, specify which website should be presented if the server is accessed by its IP.
LETSENCRYPT_EMAIL: A mail will be sent to this address if certificate expires and fail to renew automatically (eg. me@example.com)
NBITCOIN_NETWORK: The type of network to use (eg. mainnet, testnet or regtest. Default: mainnet)
LIGHTNING_ALIAS: An alias for your lightning network node if used
BTCPAYGEN_CRYPTO1: First supported crypto currency (eg. btc, ltc, btx, btg, grs, ftc, via, doge, mona, dash, none. Default: btc)
BTCPAYGEN_CRYPTO1: First supported crypto currency (eg. btc, ltc, btg, grs, ftc, via, none. Default: btc)
BTCPAYGEN_CRYPTO2: Second supported crypto currency (Default: empty)
BTCPAYGEN_CRYPTON: N th supported crypto currency where N is maximum at maximum 9. (Default: none)
BTCPAYGEN_REVERSEPROXY: Whether to use or not a reverse proxy. NGinx setup HTTPS for you. (eg. nginx, traefik, none. Default: nginx)
BTCPAYGEN_REVERSEPROXY: Whether to use or not a reverse proxy. NGinx setup HTTPS for you. (eg. nginx, none. Default: nginx)
BTCPAYGEN_LIGHTNING: Lightning network implementation to use (eg. clightning, lnd, none)
BTCPAYGEN_ADDITIONAL_FRAGMENTS: Semi colon separated list of additional fragments you want to use (eg. opt-save-storage)
ACME_CA_URI: The API endpoint to ask for HTTPS certificate (default: production)
BTCPAY_ENABLE_SSH: Optional, gives BTCPay Server SSH access to the host by allowing it to edit authorized_keys of the host, it can be used for managing the authorized_keys or updating BTCPay Server directly through the website. (Default: false)
BTCPAYGEN_DOCKER_IMAGE: Allows you to specify a custom docker image for the generator (Default: btcpayserver/docker-compose-generator)
BTCPAY_IMAGE: Allows you to specify the btcpayserver docker image to use over the default version. (Default: current stable version of btcpayserver, eg. btcpayserver/btcpayserver:version)
BTCPAY_UPDATE_CLEAN: Clean (prune) all old BTCPayServer images after an update. WARNING: also removes all non-BTCPayServer images! (default: true)
BTCPAY_PROTOCOL: Allows you to specify the external transport protocol of BTCPayServer. (Default: https)
BTCPAY_ADDITIONAL_HOSTS: Allows you to specify additional domains to your BTCPayServer with https support if enabled. (eg. example2.com,example3.com)
Add-on specific variables:
LIBREPATRON_HOST: If libre patron is activated with opt-add-librepatron, the hostname of your libre patron website (eg. librepatron.example.com)
ZAMMAD_HOST: If zammad is activated with opt-add-zammad, the hostname of your zammad website (eg. zammad.example.com)
WOOCOMMERCE_HOST: If woocommerce is activated with opt-add-woocommerce, the hostname of your woocommerce website (eg. store.example.com)
BTCPAYGEN_EXCLUDE_FRAGMENTS: Semicolon-separated list of fragments you want to forcefully exclude (eg. litecoin-clightning)
TOR_RELAY_NICKNAME: If tor relay is activated with opt-add-tor-relay, the relay nickname
TOR_RELAY_EMAIL: If tor relay is activated with opt-add-tor-relay, the email for Tor to contact you regarding your relay
CHATWOOT_HOST: If chatwoot is activated with opt-add-chatwoot, the hostname of your chatwoot website (eg. store.example.com)
FIREFLY_HOST: If fireflyiii is activated with opt-add-fireflyiii, the hostname of your libre patron website (eg. firefly.example.com)
CLOUDFLARE_TUNNEL_TOKEN: Used to expose your instance to clearnet with a Cloudflare Argo Tunnel
ACME_CA_URI: The API endpoint to ask for HTTPS certificate (default: https://acme-v01.api.letsencrypt.org/directory)
BTCPAY_HOST_SSHKEYFILE: Optional, SSH private key that BTCPay can use to connect to this VM's SSH server. This key will be copied on BTCPay's data directory
END
}
START=""
HAS_DOCKER=true
STARTUP_REGISTER=true
SYSTEMD_RELOAD=true
while (( "$#" )); do
case "$1" in
-i)
START=true
shift 1
;;
--install-only)
START=false
shift 1
;;
--docker-unavailable)
START=false
HAS_DOCKER=false
shift 1
;;
--no-startup-register)
STARTUP_REGISTER=false
shift 1
;;
--no-systemd-reload)
SYSTEMD_RELOAD=false
shift 1
;;
--) # end argument parsing
shift
break
;;
-*|--*=) # unsupported flags
echo "Error: Unsupported flag $1" >&2
display_help
return
;;
*) # preserve positional arguments
PARAMS="$PARAMS $1"
shift
;;
esac
done
# If start does not have a value, stop here
if ! [[ "$START" ]]; then
if [ "$1" != "-i" ]; then
display_help
return
fi
if [[ -z "$BTCPAYGEN_CRYPTO1" ]]; then
if [[ "$OSTYPE" != "darwin"* ]]; then
# Not Mac OS - Mac OS uses it's own env file
if [[ -f "$BASH_PROFILE_SCRIPT" ]]; then
echo "This script must be run as root after running \"sudo su -\""
else
echo "BTCPAYGEN_CRYPTO1 should not be empty"
fi
return
fi
fi
if [ ! -z "$BTCPAY_ADDITIONAL_HOSTS" ] && [[ "$BTCPAY_ADDITIONAL_HOSTS" == *[';']* ]]; then
echo "$BTCPAY_ADDITIONAL_HOSTS should be separated by a , not ;"
return;
fi
if [ ! -z "$BTCPAY_ADDITIONAL_HOSTS" ] && [[ "$BTCPAY_ADDITIONAL_HOSTS" == .onion* ]]; then
echo "$BTCPAY_ADDITIONAL_HOSTS should not contain onion hosts, additional hosts is only for getting https certificates, those are not available to tor addresses"
return;
######### Migration: old pregen environment to new environment ############
if [ ! -z $BTCPAY_DOCKER_COMPOSE ] && [ ! -z $DOWNLOAD_ROOT ] && [ -z $BTCPAYGEN_OLD_PREGEN ]; then
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"
return
fi
#########################################################
[[ $LETSENCRYPT_EMAIL == *@example.com ]] && echo "LETSENCRYPT_EMAIL ends with @example.com, setting to empty email instead" && LETSENCRYPT_EMAIL=""
: "${LETSENCRYPT_EMAIL:=}"
: "${BTCPAYGEN_OLD_PREGEN:=false}"
: "${NBITCOIN_NETWORK:=mainnet}"
: "${BTCPAYGEN_CRYPTO1:=btc}"
: "${BTCPAYGEN_REVERSEPROXY:=nginx}"
: "${BTCPAYGEN_LIGHTNING:=none}"
: "${REVERSEPROXY_DEFAULT_HOST:=none}"
: "${ACME_CA_URI:=production}"
: "${BTCPAY_PROTOCOL:=https}"
: "${BTCPAY_ADDITIONAL_HOSTS:=}"
: "${REVERSEPROXY_HTTP_PORT:=80}"
: "${REVERSEPROXY_HTTPS_PORT:=443}"
: "${BTCPAY_ENABLE_SSH:=false}"
: "${PIHOLE_SERVERIP:=}"
: "${CLOUDFLARE_TUNNEL_TOKEN:=}"
: "${BTCPAY_UPDATE_CLEAN:=true}"
: "${ACME_CA_URI:=https://acme-v01.api.letsencrypt.org/directory}"
OLD_BTCPAY_DOCKER_COMPOSE="$BTCPAY_DOCKER_COMPOSE"
ORIGINAL_DIRECTORY="$(pwd)"
BTCPAY_BASE_DIRECTORY="$(dirname "$(pwd)")"
BTCPAY_DOCKER_COMPOSE="$(pwd)/Generated/docker-compose.generated.yml"
OLD_BTCPAY_DOCKER_COMPOSE=$BTCPAY_DOCKER_COMPOSE
ORIGINAL_DIRECTORY=$(pwd)
BTCPAY_BASE_DIRECTORY="$(dirname $(pwd))"
if [ "$BTCPAYGEN_OLD_PREGEN" == "true" ]; then
if [[ $(dirname $BTCPAY_DOCKER_COMPOSE) == *Production ]]; then
BTCPAY_DOCKER_COMPOSE="$(pwd)/Production/docker-compose.generated.yml"
elif [[ $(dirname $BTCPAY_DOCKER_COMPOSE) == *Production-NoReverseProxy ]]; then
BTCPAY_DOCKER_COMPOSE="$(pwd)/Production-NoReverseProxy/docker-compose.generated.yml"
else
BTCPAY_DOCKER_COMPOSE="$(pwd)/Production/docker-compose.generated.yml"
fi
else # new deployments must be in Generated
BTCPAY_DOCKER_COMPOSE="$(pwd)/Generated/docker-compose.generated.yml"
fi
BTCPAY_ENV_FILE="$BTCPAY_BASE_DIRECTORY/.env"
BTCPAY_SSHKEYFILE=""
BTCPAY_SSHTRUSTEDFINGERPRINTS=""
use_ssh=false
if $BTCPAY_ENABLE_SSH && ! [[ "$BTCPAY_HOST_SSHAUTHORIZEDKEYS" ]]; then
BTCPAY_HOST_SSHAUTHORIZEDKEYS=~/.ssh/authorized_keys
BTCPAY_HOST_SSHKEYFILE=""
fi
if [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then
echo -e "\033[33mWARNING: BTCPAY_HOST_SSHKEYFILE is now deprecated, use instead BTCPAY_ENABLE_SSH=true and run again '. btcpay-setup.sh -i'\033[0m"
BTCPAY_SSHKEYFILE="/datadir/id_rsa"
use_ssh=true
for pubkey in /etc/ssh/ssh_host_*.pub; do
fingerprint="$(ssh-keygen -l -f $pubkey | awk '{print $2}')"
BTCPAY_SSHTRUSTEDFINGERPRINTS="$fingerprint;$BTCPAY_SSHTRUSTEDFINGERPRINTS"
done
fi
if $BTCPAY_ENABLE_SSH && [[ "$BTCPAY_HOST_SSHAUTHORIZEDKEYS" ]]; then
if ! [[ -f "$BTCPAY_HOST_SSHAUTHORIZEDKEYS" ]]; then
mkdir -p "$(dirname $BTCPAY_HOST_SSHAUTHORIZEDKEYS)"
touch $BTCPAY_HOST_SSHAUTHORIZEDKEYS
fi
BTCPAY_SSHAUTHORIZEDKEYS="/datadir/host_authorized_keys"
BTCPAY_SSHKEYFILE="/datadir/host_id_ed25519"
use_ssh=true
fi
# Do not set BTCPAY_SSHTRUSTEDFINGERPRINTS in the setup, since we connect from inside the docker container to the host, this is fine
BTCPAY_SSHTRUSTEDFINGERPRINTS=""
if [[ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]] && [[ "$BTCPAY_HOST" ]]; then
DOMAIN_NAME="$(echo "$BTCPAY_HOST" | grep -E '^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$')"
if [[ ! "$DOMAIN_NAME" ]]; then
echo "BTCPAYGEN_REVERSEPROXY is set to nginx, so BTCPAY_HOST must be a domain name which point to this server, but the current value of BTCPAY_HOST ('$BTCPAY_HOST') is not a valid domain name."
return
fi
BTCPAY_HOST="$DOMAIN_NAME"
fi
# Since opt-txindex requires unpruned node, throw an error if both
# opt-txindex and opt-save-storage-* are enabled together
if [[ "${BTCPAYGEN_ADDITIONAL_FRAGMENTS}" == *opt-txindex* ]] && \
[[ "${BTCPAYGEN_ADDITIONAL_FRAGMENTS}" == *opt-save-storage* ]];then
echo "Error: BTCPAYGEN_ADDITIONAL_FRAGMENTS contains both opt-txindex and opt-save-storage*"
echo "opt-txindex requires an unpruned node, so you cannot use opt-save-storage with it"
return
fi
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
. helpers.sh
btcpay_expand_variables
cd "$ORIGINAL_DIRECTORY"
echo "
-------SETUP-----------
Parameters passed:
BTCPAY_PROTOCOL:$BTCPAY_PROTOCOL
BTCPAY_HOST:$BTCPAY_HOST
BTCPAY_LIGHTNING_HOST: $BTCPAY_LIGHTNING_HOST
BTCPAY_ADDITIONAL_HOSTS:$BTCPAY_ADDITIONAL_HOSTS
REVERSEPROXY_HTTP_PORT:$REVERSEPROXY_HTTP_PORT
REVERSEPROXY_HTTPS_PORT:$REVERSEPROXY_HTTPS_PORT
REVERSEPROXY_DEFAULT_HOST:$REVERSEPROXY_DEFAULT_HOST
LIBREPATRON_HOST:$LIBREPATRON_HOST
ZAMMAD_HOST:$ZAMMAD_HOST
WOOCOMMERCE_HOST:$WOOCOMMERCE_HOST
BTCTRANSMUTER_HOST:$BTCTRANSMUTER_HOST
CHATWOOT_HOST:$CHATWOOT_HOST
BTCPAY_ENABLE_SSH:$BTCPAY_ENABLE_SSH
BTCPAY_HOST_SSHKEYFILE:$BTCPAY_HOST_SSHKEYFILE
LETSENCRYPT_EMAIL:$LETSENCRYPT_EMAIL
NBITCOIN_NETWORK:$NBITCOIN_NETWORK
@ -293,44 +134,36 @@ BTCPAYGEN_CRYPTO9:$BTCPAYGEN_CRYPTO9
BTCPAYGEN_REVERSEPROXY:$BTCPAYGEN_REVERSEPROXY
BTCPAYGEN_LIGHTNING:$BTCPAYGEN_LIGHTNING
BTCPAYGEN_ADDITIONAL_FRAGMENTS:$BTCPAYGEN_ADDITIONAL_FRAGMENTS
BTCPAYGEN_EXCLUDE_FRAGMENTS:$BTCPAYGEN_EXCLUDE_FRAGMENTS
BTCPAY_IMAGE:$BTCPAY_IMAGE
BTCPAY_UPDATE_CLEAN:$BTCPAY_UPDATE_CLEAN
ACME_CA_URI:$ACME_CA_URI
TOR_RELAY_NICKNAME: $TOR_RELAY_NICKNAME
TOR_RELAY_EMAIL: $TOR_RELAY_EMAIL
PIHOLE_SERVERIP: $PIHOLE_SERVERIP
FIREFLY_HOST: $FIREFLY_HOST
----------------------
Additional exported variables:
BTCPAY_DOCKER_COMPOSE=$BTCPAY_DOCKER_COMPOSE
BTCPAY_BASE_DIRECTORY=$BTCPAY_BASE_DIRECTORY
BTCPAY_ENV_FILE=$BTCPAY_ENV_FILE
BTCPAYGEN_OLD_PREGEN=$BTCPAYGEN_OLD_PREGEN
BTCPAY_SSHKEYFILE=$BTCPAY_SSHKEYFILE
BTCPAY_SSHAUTHORIZEDKEYS=$BTCPAY_SSHAUTHORIZEDKEYS
BTCPAY_HOST_SSHAUTHORIZEDKEYS:$BTCPAY_HOST_SSHAUTHORIZEDKEYS
BTCPAY_SSHTRUSTEDFINGERPRINTS:$BTCPAY_SSHTRUSTEDFINGERPRINTS
BTCPAY_CRYPTOS:$BTCPAY_CRYPTOS
BTCPAY_ANNOUNCEABLE_HOST:$BTCPAY_ANNOUNCEABLE_HOST
----------------------
"
if [[ -z "$BTCPAYGEN_CRYPTO1" ]]; then
if [ -z "$BTCPAY_HOST" ]; then
echo "BTCPAY_HOST should not be empty"
return
fi
if [ -z "$BTCPAYGEN_CRYPTO1" ]; then
echo "BTCPAYGEN_CRYPTO1 should not be empty"
return
fi
if [[ "$NBITCOIN_NETWORK" != "mainnet" ]] && [[ "$NBITCOIN_NETWORK" != "testnet" ]] && [[ "$NBITCOIN_NETWORK" != "regtest" ]]; then
if [ "$NBITCOIN_NETWORK" != "mainnet" ] && [ "$NBITCOIN_NETWORK" != "testnet" ] && [ "$NBITCOIN_NETWORK" != "regtest" ]; then
echo "NBITCOIN_NETWORK should be equal to mainnet, testnet or regtest"
fi
# Init the variables when a user log interactively
touch "$BASH_PROFILE_SCRIPT"
# Put the variables in /etc/profile.d when a user log interactively
touch "/etc/profile.d/btcpay-env.sh"
echo "
#!/bin/bash
export COMPOSE_HTTP_TIMEOUT=\"180\"
export BTCPAYGEN_OLD_PREGEN=\"$BTCPAYGEN_OLD_PREGEN\"
export BTCPAYGEN_CRYPTO1=\"$BTCPAYGEN_CRYPTO1\"
export BTCPAYGEN_CRYPTO2=\"$BTCPAYGEN_CRYPTO2\"
export BTCPAYGEN_CRYPTO3=\"$BTCPAYGEN_CRYPTO3\"
@ -343,105 +176,91 @@ export BTCPAYGEN_CRYPTO9=\"$BTCPAYGEN_CRYPTO9\"
export BTCPAYGEN_LIGHTNING=\"$BTCPAYGEN_LIGHTNING\"
export BTCPAYGEN_REVERSEPROXY=\"$BTCPAYGEN_REVERSEPROXY\"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS=\"$BTCPAYGEN_ADDITIONAL_FRAGMENTS\"
export BTCPAYGEN_EXCLUDE_FRAGMENTS=\"$BTCPAYGEN_EXCLUDE_FRAGMENTS\"
export BTCPAY_DOCKER_COMPOSE=\"$BTCPAY_DOCKER_COMPOSE\"
export BTCPAY_BASE_DIRECTORY=\"$BTCPAY_BASE_DIRECTORY\"
export BTCPAY_ENV_FILE=\"$BTCPAY_ENV_FILE\"
export BTCPAY_HOST_SSHKEYFILE=\"$BTCPAY_HOST_SSHKEYFILE\"
export BTCPAY_ENABLE_SSH=$BTCPAY_ENABLE_SSH
export PIHOLE_SERVERIP=\"$PIHOLE_SERVERIP\"
if cat \"\$BTCPAY_ENV_FILE\" &> /dev/null; then
while IFS= read -r line; do
! [[ \"\$line\" == \"#\"* ]] && [[ \"\$line\" == *\"=\"* ]] && export \"\$line\"
done < \"\$BTCPAY_ENV_FILE\"
if cat \$BTCPAY_ENV_FILE &> /dev/null; then
export BTCPAY_HOST=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p')\"
export LETSENCRYPT_EMAIL=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^LETSENCRYPT_EMAIL=\(.*\)$/\1/p')\"
export NBITCOIN_NETWORK=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^NBITCOIN_NETWORK=\(.*\)$/\1/p')\"
export LIGHTNING_ALIAS=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^LIGHTNING_ALIAS=\(.*\)$/\1/p')\"
export ACME_CA_URI=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^ACME_CA_URI=\(.*\)$/\1/p')\"
export BTCPAY_SSHKEYFILE=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_SSHKEYFILE=\(.*\)$/\1/p')\"
export BTCPAY_SSHTRUSTEDFINGERPRINTS=\"\$(cat \$BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_SSHTRUSTEDFINGERPRINTS=\(.*\)$/\1/p')\"
fi
" > ${BASH_PROFILE_SCRIPT}
" > /etc/profile.d/btcpay-env.sh
chmod +x /etc/profile.d/btcpay-env.sh
chmod +x ${BASH_PROFILE_SCRIPT}
echo -e "BTCPay Server environment variables successfully saved in $BASH_PROFILE_SCRIPT\n"
btcpay_update_docker_env
echo -e "BTCPay Server environment variables successfully saved in /etc/profile.d/btcpay-env.sh\n"
# Set .env file
touch $BTCPAY_ENV_FILE
echo "
BTCPAY_HOST=$BTCPAY_HOST
ACME_CA_URI=$ACME_CA_URI
NBITCOIN_NETWORK=$NBITCOIN_NETWORK
LETSENCRYPT_EMAIL=$LETSENCRYPT_EMAIL
LIGHTNING_ALIAS=$LIGHTNING_ALIAS
BTCPAY_SSHTRUSTEDFINGERPRINTS=$BTCPAY_SSHTRUSTEDFINGERPRINTS
BTCPAY_SSHKEYFILE=$BTCPAY_SSHKEYFILE" > $BTCPAY_ENV_FILE
echo -e "BTCPay Server docker-compose parameters saved in $BTCPAY_ENV_FILE\n"
. "$BASH_PROFILE_SCRIPT"
. /etc/profile.d/btcpay-env.sh
if ! [[ -x "$(command -v docker)" ]] || ! [[ -x "$(command -v docker-compose)" ]]; then
if ! [[ -x "$(command -v curl)" ]]; then
apt-get update 2>error
apt-get install -y \
curl \
apt-transport-https \
ca-certificates \
software-properties-common \
2>error
if ! [ -x "$(command -v docker)" ] || ! [ -x "$(command -v docker-compose)" ]; then
apt-get update 2>error
apt-get install -y \
curl \
apt-transport-https \
ca-certificates \
software-properties-common \
2>error
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
if [ $(lsb_release -cs) == "bionic" ]; then
# Bionic not in the repo yet, see https://linuxconfig.org/how-to-install-docker-on-ubuntu-18-04-bionic-beaver
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu artful stable"
else
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
fi
if ! [[ -x "$(command -v docker)" ]]; then
if [[ "$(uname -m)" == "x86_64" ]] || [[ "$(uname -m)" == "armv7l" ]] || [[ "$(uname -m)" == "aarch64" ]]; then
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OS
if ! [[ -x "$(command -v brew)" ]]; then
# Brew is not installed, install it now
echo "Homebrew, the package manager for Mac OS, is not installed. Installing it now..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
if [[ -x "$(command -v brew)" ]]; then
echo "Homebrew is installed, but Docker isn't. Installing it now using brew..."
# Brew is installed, install docker now
# This sequence is a bit strange, but it's what what needed to get it working on a fresh Mac OS X Mojave install
brew cask install docker
brew install docker
brew link docker
fi
else
# Not Mac OS
echo "Trying to install docker..."
curl -fsSL https://get.docker.com -o get-docker.sh
chmod +x get-docker.sh
sh get-docker.sh
rm get-docker.sh
fi
else
echo "Unsupported architecture $(uname -m)"
return
fi
fi
docker_update
apt-get update 2>error
fi
if $HAS_DOCKER; then
if ! [[ -x "$(command -v docker)" ]]; then
echo "Failed to install 'docker'. Please install docker manually, then retry."
if ! [ -x "$(command -v docker)" ]; then
if apt-get install -y docker-ce ; then
echo "Docker installed"
else
echo "Failed to install docker"
return
fi
else
echo -e "docker is already installed\n"
fi
if ! [[ -x "$(command -v docker-compose)" ]]; then
echo "Failed to install 'docker-compose'. Please install docker-compose manually, then retry."
return
fi
# Install docker-compose
if ! [ -x "$(command -v docker-compose)" ]; then
curl -L https://github.com/docker/compose/releases/download/1.17.1/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
else
echo -e "docker-compose is already installed\n"
fi
# Generate the docker compose in BTCPAY_DOCKER_COMPOSE
if $HAS_DOCKER; then
if ! ./build.sh; then
echo "Failed to generate the docker-compose"
return
fi
. ./build.sh
if [ "$BTCPAYGEN_OLD_PREGEN" == "true" ]; then
cp Generated/docker-compose.generated.yml $BTCPAY_DOCKER_COMPOSE
fi
# Schedule for reboot
if $STARTUP_REGISTER && [[ -x "$(command -v systemctl)" ]]; then
# Use systemd
if [[ -e "/etc/init/start_containers.conf" ]]; then
echo -e "Uninstalling upstart script /etc/init/start_containers.conf"
rm "/etc/init/start_containers.conf"
initctl reload-configuration
fi
echo "Adding btcpayserver.service to systemd"
echo "
if [ -x "$(command -v systemctl)" ]; then # Use systemd
if [ -e "/etc/init/start_containers.conf" ]; then
echo -e "Uninstalling upstart script /etc/init/start_containers.conf"
rm "/etc/init/start_containers.conf"
initctl reload-configuration
fi
echo "Adding btcpayserver.service to systemd"
echo "
[Unit]
Description=BTCPayServer service
After=docker.service network-online.target
@ -451,38 +270,21 @@ Requires=docker.service network-online.target
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c '. \"$BASH_PROFILE_SCRIPT\" && cd \"\$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_up'
ExecStop=/bin/bash -c '. \"$BASH_PROFILE_SCRIPT\" && cd \"\$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_down'
ExecReload=/bin/bash -c '. \"$BASH_PROFILE_SCRIPT\" && cd \"\$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_restart'
ExecStart=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d'
ExecStop=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" stop'
ExecReload=/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"\$(dirname \$BTCPAY_ENV_FILE)\" && docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" restart'
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/btcpayserver.service
if ! [[ -f "/etc/docker/daemon.json" ]] && [ -w "/etc/docker" ]; then
echo "{
\"log-driver\": \"json-file\",
\"log-opts\": {\"max-size\": \"5m\", \"max-file\": \"3\"}
}" > /etc/docker/daemon.json
echo "Setting limited log files in /etc/docker/daemon.json"
$SYSTEMD_RELOAD && $START && systemctl restart docker
fi
echo -e "BTCPay Server systemd configured in /etc/systemd/system/btcpayserver.service\n"
if $SYSTEMD_RELOAD; then
systemctl daemon-reload
systemctl enable btcpayserver
if $START; then
echo "BTCPay Server starting... this can take 5 to 10 minutes..."
systemctl start btcpayserver
echo "BTCPay Server started"
fi
else
systemctl --no-reload enable btcpayserver
fi
elif $STARTUP_REGISTER && [[ -x "$(command -v initctl)" ]]; then
# Use upstart
echo "Using upstart"
echo "
echo -e "BTCPay Server systemd configured in /etc/systemd/system/btcpayserver.service\n"
systemctl daemon-reload
systemctl enable btcpayserver
systemctl start btcpayserver
echo "BTCPay Server started"
else # Use upstart
echo "Using upstart"
echo "
# File is saved under /etc/init/start_containers.conf
# After file is modified, update config with : $ initctl reload-configuration
@ -495,40 +297,39 @@ stop on runlevel [!2345]
# respawn # might cause over charge
script
. \"$BASH_PROFILE_SCRIPT\"
cd \"\$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\"
. helpers.sh
btcpay_up
. /etc/profile.d/btcpay-env.sh
cd \"\$(dirname \$BTCPAY_ENV_FILE)\"
docker-compose -f \"\$BTCPAY_DOCKER_COMPOSE\" up -d
end script" > /etc/init/start_containers.conf
echo -e "BTCPay Server upstart configured in /etc/init/start_containers.conf\n"
if $START; then
initctl reload-configuration
fi
initctl reload-configuration
echo "BTCPay Server started"
fi
cd "$(dirname $BTCPAY_ENV_FILE)"
if $HAS_DOCKER && [[ ! -z "$OLD_BTCPAY_DOCKER_COMPOSE" ]] && [[ "$OLD_BTCPAY_DOCKER_COMPOSE" != "$BTCPAY_DOCKER_COMPOSE" ]]; then
if [ ! -z "$OLD_BTCPAY_DOCKER_COMPOSE" ] && [ "$OLD_BTCPAY_DOCKER_COMPOSE" != "$BTCPAY_DOCKER_COMPOSE" ]; then
echo "Closing old docker-compose at $OLD_BTCPAY_DOCKER_COMPOSE..."
docker-compose -f "$OLD_BTCPAY_DOCKER_COMPOSE" down -t "${COMPOSE_HTTP_TIMEOUT:-180}"
docker-compose -f "$OLD_BTCPAY_DOCKER_COMPOSE" down
fi
if $START; then
btcpay_up
elif $HAS_DOCKER; then
btcpay_pull
fi
docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d --remove-orphans
# Give SSH key to BTCPay
if $START && [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then
echo -e "\033[33mWARNING: BTCPAY_HOST_SSHKEYFILE is now deprecated, use instead BTCPAY_ENABLE_SSH=true and run again '. btcpay-setup.sh -i'\033[0m"
if [[ -f "$BTCPAY_HOST_SSHKEYFILE" ]]; then
echo "Copying $BTCPAY_SSHKEYFILE to BTCPayServer container"
docker cp "$BTCPAY_HOST_SSHKEYFILE" $(docker ps --filter "name=_btcpayserver_" -q):$BTCPAY_SSHKEYFILE
fi
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
install_tooling
cd $ORIGINAL_DIRECTORY
for scriptname in *.sh; do
if [ "$scriptname" == "build.sh" -o "$scriptname" == "build-pregen.sh" ] ; then
continue;
fi
echo "Adding symlink of $scriptname to /usr/bin"
chmod +x $scriptname
rm /usr/bin/$scriptname &> /dev/null
ln -s "$(pwd)/$scriptname" /usr/bin
done

View File

@ -1,51 +0,0 @@
#!/bin/bash
set +x
if [[ "$0" = "$BASH_SOURCE" ]]; then
echo "This script must be sourced \". btcpay-teardown.sh\""
exit 1
fi
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root after running \"sudo su -\""
return
fi
# Verify we are in right folder. If we are not, let's go in the parent folder of the current docker-compose.
if ! git rev-parse --git-dir &> /dev/null || [ ! -d "Generated" ]; then
if [[ ! -z $BTCPAY_DOCKER_COMPOSE ]]; then
cd $(dirname $BTCPAY_DOCKER_COMPOSE)
cd ..
fi
if ! git rev-parse || [[ ! -d "Generated" ]]; then
echo "You must run this script inside the git repository of btcpayserver-docker"
return
fi
fi
printf "\n🚨 Running this script will completely erase the BTCPay Server instance. Do you wish to perform this action?\n\n"
read -p "➡️ Confirm by typing 'YES': " confirm
if [[ "$confirm" != "YES"* ]]; then
printf "\n😌 Phew, that was close. Aborting uninstall — thanks for keeping your BTCPay Server!\n\n"
return
else
printf "\n👋 Sad to see you go. Thanks for using BTCPay Server!\n"
fi
BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh"
ORIGINAL_DIRECTORY="$(pwd)"
BTCPAY_BASE_DIRECTORY="$(dirname "$(pwd)")"
printf "\n Stopping BTCPay Server and removing related Docker volumes and networks …\n\n"
docker-compose -f $BTCPAY_DOCKER_COMPOSE down -v
docker system prune -f
printf "\n Removing BTCPay Server files …\n\n"
cd $BTCPAY_BASE_DIRECTORY
rm -rf $ORIGINAL_DIRECTORY
rm $BASH_PROFILE_SCRIPT $BTCPAY_ENV_FILE
printf "\n✅ Teardown done, successfully uninstalled BTCPay Server!\n\n"

View File

@ -1,16 +1,6 @@
#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OS
BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh"
. /etc/profile.d/btcpay-env.sh
else
# Linux
BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh"
fi
. ${BASH_PROFILE_SCRIPT}
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
. helpers.sh
btcpay_up
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f $BTCPAY_DOCKER_COMPOSE up --remove-orphans -d

View File

@ -2,70 +2,54 @@
set -e
if [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OS
BASH_PROFILE_SCRIPT="$HOME/btcpay-env.sh"
. /etc/profile.d/btcpay-env.sh
else
# Linux
BASH_PROFILE_SCRIPT="/etc/profile.d/btcpay-env.sh"
if [ ! -z $BTCPAY_DOCKER_COMPOSE ] && [ ! -z $DOWNLOAD_ROOT ] && [ -z $BTCPAYGEN_OLD_PREGEN ]; then
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"
exit
fi
. ${BASH_PROFILE_SCRIPT}
if [[ $BTCPAY_DOCKER_COMPOSE != *docker-compose.generated.yml ]]; then
echo "You seem to use pre generated docker compose, this is now deprecated.
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"
exit
fi
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
if [[ "$1" != "--skip-git-pull" ]]; then
git pull --force
exec "btcpay-update.sh" --skip-git-pull
return
fi
if [ "$BTCPAYGEN_OLD_PREGEN" == "true" ]; then
btcpay-down.sh
for volume in /var/lib/docker/volumes/production_*/_data; do
volumedest=${volume/production_/generated_}
echo "Copying $volume to $volumedest"
[ -d "$volumedest" ] && rm -rf "$volumedest"
mkdir -p $volumedest
mv $volume $volumedest
rm -rf /var/lib/docker/volumes/production_*
done
BTCPAYGEN_OLD_PREGEN="false"
BTCPAY_DOCKER_COMPOSE="$(pwd)/Generated/docker-compose.generated.yml"
sed -i '/^export BTCPAYGEN_OLD_PREGEN/d' /etc/profile.d/btcpay-env.sh
sed -i '/^export BTCPAY_DOCKER_COMPOSE/d' /etc/profile.d/btcpay-env.sh
echo "export BTCPAYGEN_OLD_PREGEN=\"false\"" >> /etc/profile.d/btcpay-env.sh
echo "export BTCPAY_DOCKER_COMPOSE=\"$BTCPAY_DOCKER_COMPOSE\"" >> /etc/profile.d/btcpay-env.sh
echo "Your setup has been partially updated, you still need to close your SSH session and run btcpay-update.sh again"
exit
fi
if ! [ -f "/etc/docker/daemon.json" ] && [ -w "/etc/docker" ]; then
echo "{
\"log-driver\": \"json-file\",
\"log-opts\": {\"max-size\": \"5m\", \"max-file\": \"3\"}
}" > /etc/docker/daemon.json
echo "Setting limited log files in /etc/docker/daemon.json"
fi
git pull --force
. ./build.sh
. helpers.sh
docker_update
for scriptname in *.sh; do
if [ "$scriptname" == "build.sh" ] || \
[ "$scriptname" == "btcpay-setclocale.sh" ]; then
continue;
fi
echo "Adding symlink of $scriptname to /usr/bin"
chmod +x $scriptname
[ -e /usr/bin/$scriptname ] && rm /usr/bin/$scriptname
ln -s "$(pwd)/$scriptname" /usr/bin
done
if ! ./build.sh; then
echo "Failed to generate the docker-compose"
exit 1
fi
if ! grep -Fxq "export COMPOSE_HTTP_TIMEOUT=\"180\"" "$BASH_PROFILE_SCRIPT"; then
echo "export COMPOSE_HTTP_TIMEOUT=\"180\"" >> "$BASH_PROFILE_SCRIPT"
export COMPOSE_HTTP_TIMEOUT=180
echo "Adding COMPOSE_HTTP_TIMEOUT=180 in btcpay-env.sh"
fi
if [[ "$ACME_CA_URI" == "https://acme-v01.api.letsencrypt.org/directory" ]]; then
original_acme="$ACME_CA_URI"
export ACME_CA_URI="production"
echo "Info: Rewriting ACME_CA_URI from $original_acme to $ACME_CA_URI"
fi
if [[ "$ACME_CA_URI" == "https://acme-staging.api.letsencrypt.org/directory" ]]; then
original_acme="$ACME_CA_URI"
export ACME_CA_URI="staging"
echo "Info: Rewriting ACME_CA_URI from $original_acme to $ACME_CA_URI"
fi
install_tooling
if $BTCPAY_ENABLE_SSH && [[ "$BTCPAY_SSHKEYFILE" == "/datadir/host_id_rsa" ]]; then
BTCPAY_SSHKEYFILE="/datadir/host_id_ed25519"
echo "Info: BTCPAY -> Host SSH connection changed ssh keys from rsa to ed25519"
fi
btcpay_update_docker_env
btcpay_up
set +e
if [ "$BTCPAY_UPDATE_CLEAN" == true ]; then
./btcpay-clean.sh
fi
exit 0
cd "`dirname $BTCPAY_ENV_FILE`"
btcpay-up.sh

View File

@ -1,16 +1,8 @@
# This script will run docker-compose-generator in a container to generate the yml files
If (-not ($BTCPAYGEN_DOCKER_IMAGE)) { $BTCPAYGEN_DOCKER_IMAGE = "btcpayserver/docker-compose-generator" }
If ($BTCPAYGEN_DOCKER_IMAGE -eq "btcpayserver/docker-compose-generator:local"){
docker build docker-compose-generator -f docker-compose-generator/linuxamd64.Dockerfile --tag $BTCPAYGEN_DOCKER_IMAGE
} Else {
docker pull $BTCPAYGEN_DOCKER_IMAGE
}
docker pull btcpayserver/docker-compose-generator
docker run -v "$(Get-Location)\Generated:/app/Generated" `
-v "$(Get-Location)\docker-compose-generator\docker-fragments:/app/docker-fragments" `
-v "$(Get-Location)\docker-compose-generator\crypto-definitions.json:/app/crypto-definitions.json" `
-e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" `
-e "BTCPAYGEN_CRYPTO2=$BTCPAYGEN_CRYPTO2" `
-e "BTCPAYGEN_CRYPTO3=$BTCPAYGEN_CRYPTO3" `
@ -22,11 +14,9 @@ docker run -v "$(Get-Location)\Generated:/app/Generated" `
-e "BTCPAYGEN_CRYPTO9=$BTCPAYGEN_CRYPTO9" `
-e "BTCPAYGEN_REVERSEPROXY=$BTCPAYGEN_REVERSEPROXY" `
-e "BTCPAYGEN_ADDITIONAL_FRAGMENTS=$BTCPAYGEN_ADDITIONAL_FRAGMENTS" `
-e "BTCPAYGEN_EXCLUDE_FRAGMENTS=$BTCPAYGEN_EXCLUDE_FRAGMENTS" `
-e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" `
-e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" `
-e "BTCPAY_HOST_SSHAUTHORIZEDKEYS=$BTCPAY_HOST_SSHAUTHORIZEDKEYS" `
--rm $BTCPAYGEN_DOCKER_IMAGE
--rm btcpayserver/docker-compose-generator
If ($BTCPAYGEN_REVERSEPROXY -eq "nginx") {
Copy-Item ".\Production\nginx.tmpl" -Destination ".\Generated"

View File

@ -1,22 +1,9 @@
#!/bin/bash
set -e
: "${BTCPAYGEN_DOCKER_IMAGE:=btcpayserver/docker-compose-generator}"
if [ "$BTCPAYGEN_DOCKER_IMAGE" == "btcpayserver/docker-compose-generator:local" ]
then
docker build docker-compose-generator -f docker-compose-generator/linuxamd64.Dockerfile --tag $BTCPAYGEN_DOCKER_IMAGE
else
set +e
docker pull $BTCPAYGEN_DOCKER_IMAGE
docker rmi $(docker images btcpayserver/docker-compose-generator --format "{{.Tag}};{{.ID}}" | grep "^<none>" | cut -f2 -d ';') > /dev/null 2>&1
set -e
fi
# This script will run docker-compose-generator in a container to generate the yml files
docker pull btcpayserver/docker-compose-generator
docker run -v "$(pwd)/Generated:/app/Generated" \
-v "$(pwd)/docker-compose-generator/docker-fragments:/app/docker-fragments" \
-v "$(pwd)/docker-compose-generator/crypto-definitions.json:/app/crypto-definitions.json" \
-e "BTCPAYGEN_CRYPTO1=$BTCPAYGEN_CRYPTO1" \
-e "BTCPAYGEN_CRYPTO2=$BTCPAYGEN_CRYPTO2" \
-e "BTCPAYGEN_CRYPTO3=$BTCPAYGEN_CRYPTO3" \
@ -28,16 +15,10 @@ docker run -v "$(pwd)/Generated:/app/Generated" \
-e "BTCPAYGEN_CRYPTO9=$BTCPAYGEN_CRYPTO9" \
-e "BTCPAYGEN_REVERSEPROXY=$BTCPAYGEN_REVERSEPROXY" \
-e "BTCPAYGEN_ADDITIONAL_FRAGMENTS=$BTCPAYGEN_ADDITIONAL_FRAGMENTS" \
-e "BTCPAYGEN_EXCLUDE_FRAGMENTS=$BTCPAYGEN_EXCLUDE_FRAGMENTS" \
-e "BTCPAYGEN_LIGHTNING=$BTCPAYGEN_LIGHTNING" \
-e "BTCPAYGEN_SUBNAME=$BTCPAYGEN_SUBNAME" \
-e "BTCPAY_HOST_SSHAUTHORIZEDKEYS=$BTCPAY_HOST_SSHAUTHORIZEDKEYS" \
-e "EPS_XPUB=$EPS_XPUB" \
--rm $BTCPAYGEN_DOCKER_IMAGE
--rm btcpayserver/docker-compose-generator
if [ "$BTCPAYGEN_REVERSEPROXY" == "nginx" ]; then
cp Production/nginx.tmpl Generated/nginx.tmpl
fi
[[ -f "Generated/pull-images.sh" ]] && chmod +x Generated/pull-images.sh
[[ -f "Generated/save-images.sh" ]] && chmod +x Generated/save-images.sh

View File

@ -11,13 +11,14 @@ export OLD_HOST=`cat $BTCPAY_ENV_FILE | sed -n 's/^BTCPAY_HOST=\(.*\)$/\1/p'`
echo "Changing domain from \"$OLD_HOST\" to \"$NEW_HOST\""
export BTCPAY_HOST="$NEW_HOST"
export ACME_CA_URI="production"
[[ "$OLD_HOST" == "$REVERSEPROXY_DEFAULT_HOST" ]] && export REVERSEPROXY_DEFAULT_HOST="$NEW_HOST"
pushd . > /dev/null
export ACME_CA_URI="https://acme-v01.api.letsencrypt.org/directory"
# Modify environment file
cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
. helpers.sh
btcpay_update_docker_env
btcpay_up
popd > /dev/null
fi
sed -i '/^BTCPAY_HOST/d' "$BTCPAY_ENV_FILE"
sed -i '/^ACME_CA_URI/d' "$BTCPAY_ENV_FILE"
echo "BTCPAY_HOST=$BTCPAY_HOST" >> "$BTCPAY_ENV_FILE"
echo "ACME_CA_URI=$ACME_CA_URI" >> "$BTCPAY_ENV_FILE"
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f "$BTCPAY_DOCKER_COMPOSE" up -d
fi

View File

@ -1,38 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace DockerFileBuildHelper
{
public class DockerFile
{
public string DockerFileName { get; private set; }
public string DockerDirectoryPath { get; private set; }
public string DockerFullPath
{
get
{
if (DockerDirectoryPath == ".")
return $"{DockerFileName}";
else
return $"{DockerDirectoryPath}/{DockerFileName}";
}
}
public static DockerFile Parse(string str)
{
var file = new DockerFile();
var lastPart = str.LastIndexOf('/');
file.DockerFileName = str.Substring(lastPart + 1);
if (lastPart == -1)
{
file.DockerDirectoryPath = ".";
}
else
{
file.DockerDirectoryPath = str.Substring(0, lastPart);
}
return file;
}
}
}

View File

@ -1,12 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
<LangVersion>12</LangVersion>
<StartupObject>DockerFileBuildHelper.Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="YamlDotNet" Version="5.2.1" />
</ItemGroup>
</Project>

View File

@ -1,20 +0,0 @@
namespace DockerFileBuildHelper
{
public class DockerInfo
{
public string DockerFilePath { get; set; }
public string DockerFilePathARM32v7 { get; set; }
public string DockerFilePathARM64v8 { get; set; }
public string DockerHubLink { get; set; }
public string GitLink { get; set; }
public string GitRef { get; set; }
public bool SupportedByUs { get; set; }
public bool Deprecated { get; set; }
public Image Image { get; internal set; }
public string RawLink { get; set; }
public string GetGithubLinkOf(string path)
{
return RawLink ?? $"https://raw.githubusercontent.com/{GitLink.Substring("https://github.com/".Length)}{(GitRef is null ? string.Empty : ("/" + GitRef))}/{path}";
}
}
}

View File

@ -1,19 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using YamlDotNet.RepresentationModel;
namespace DockerFileBuildHelper
{
public static class Extensions
{
public static YamlNode TryGet(this YamlNode node, string key)
{
try
{
return node[key];
}
catch (KeyNotFoundException) { return null; }
}
}
}

View File

@ -1,67 +0,0 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace DockerFileBuildHelper
{
public class Image
{
public string User { get; private set; }
public string Name { get; private set; }
public string Tag { get; private set; }
public string DockerHubLink
{
get
{
return User == string.Empty ?
$"https://hub.docker.com/_/{Name}" :
$"https://hub.docker.com/r/{User}/{Name}";
}
}
public string Source { get; set; }
public static Image Parse(string str)
{
//${BTCPAY_IMAGE: -btcpayserver / btcpayserver:1.0.3.21}
var variableMatch = Regex.Match(str, @"\$\{[^-]+-([^\}]+)\}");
if (variableMatch.Success)
{
str = variableMatch.Groups[1].Value;
}
Image img = new Image();
var match = Regex.Match(str, "([^/]*/)?([^:]+):?(.*)");
if (!match.Success)
throw new FormatException();
img.User = match.Groups[1].Length == 0 ? string.Empty : match.Groups[1].Value.Substring(0, match.Groups[1].Value.Length - 1);
img.Name = match.Groups[2].Value;
img.Tag = match.Groups[3].Value;
if (img.Tag.Contains('@'))
{
img.Tag = img.Tag.Split('@')[0];
}
if (img.Tag == string.Empty)
img.Tag = "latest";
return img;
}
public override string ToString()
{
return ToString(true);
}
public string ToString(bool includeTag)
{
StringBuilder builder = new StringBuilder();
if (!String.IsNullOrWhiteSpace(User))
builder.Append($"{User}/");
builder.Append($"{Name}");
if (includeTag)
{
if (!String.IsNullOrWhiteSpace(Tag))
builder.Append($":{Tag}");
}
return builder.ToString();
}
}
}

View File

@ -1,857 +0,0 @@
using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
using System.Text.RegularExpressions;
using YamlDotNet.RepresentationModel;
using YamlDotNet.Serialization;
using System.Net.Http;
using System.Threading.Tasks;
using System.Text;
namespace DockerFileBuildHelper
{
class Program
{
class Options
{
public string BuildAllScriptOutput { get; set; }
public string READMEOutput { get; set; }
}
static int Main(string[] args)
{
var opts = new Options();
for (int i = 0; i < args.Length; i++)
{
if (args[i] == "-o")
opts.BuildAllScriptOutput = args[i + 1];
if (args[i] == "-omd")
opts.READMEOutput = args[i + 1];
}
return new Program().Run(opts) ? 0 : 1;
}
private bool Run(Options options)
{
var fragmentDirectory = Path.GetFullPath(Path.Combine(FindRoot("contrib"), "..", "docker-compose-generator", "docker-fragments"));
List<Task<bool>> downloading = new List<Task<bool>>();
List<DockerInfo> dockerInfos = new List<DockerInfo>();
foreach (var image in new[]
{
Image.Parse("btcpayserver/docker-compose-generator"),
}.Concat(GetImages(fragmentDirectory)))
{
// TODO: Ask beldex guys
if (image.Name == "beldex")
continue;
Console.WriteLine($"Image: {image.ToString()}");
var info = GetDockerInfo(image);
if (info == null)
{
Console.WriteLine($"Missing image info: {image}");
return false;
}
dockerInfos.Add(info);
downloading.Add(CheckLink(info, info.DockerFilePath));
downloading.Add(CheckLink(info, info.DockerFilePathARM32v7));
downloading.Add(CheckLink(info, info.DockerFilePathARM64v8));
}
Task.WaitAll(downloading.ToArray());
var canDownloadEverything = downloading.All(o => o.Result);
if (!canDownloadEverything)
return false;
var builder = new StringBuilderEx();
builder.AppendLine("#!/bin/bash");
builder.AppendLine();
builder.AppendLine("# This file is automatically generated by the DockerFileBuildHelper tool, run DockerFileBuildHelper/update-repo.sh to update it");
builder.AppendLine("set -e");
builder.AppendLine("DOCKERFILE=\"\"");
builder.AppendLine();
builder.AppendLine();
foreach (var info in dockerInfos)
{
builder.AppendLine($"# Build {info.Image.Name}");
bool mightBeUnavailable = false;
if (info.DockerFilePath != null)
{
var dockerFile = DockerFile.Parse(info.DockerFilePath);
builder.AppendLine($"# {info.GetGithubLinkOf(dockerFile.DockerFullPath)}");
builder.AppendLine($"DOCKERFILE=\"{dockerFile.DockerFullPath}\"");
}
else
{
builder.AppendLine($"DOCKERFILE=\"\"");
mightBeUnavailable = true;
}
if (info.DockerFilePathARM32v7 != null)
{
var dockerFile = DockerFile.Parse(info.DockerFilePathARM32v7);
builder.AppendLine($"# {info.GetGithubLinkOf(dockerFile.DockerFullPath)}");
builder.AppendLine($"[[ \"$(uname -m)\" == \"armv7l\" ]] && DOCKERFILE=\"{dockerFile.DockerFullPath}\"");
}
if (info.DockerFilePathARM64v8 != null)
{
var dockerFile = DockerFile.Parse(info.DockerFilePathARM64v8);
builder.AppendLine($"# {info.GetGithubLinkOf(dockerFile.DockerFullPath)}");
builder.AppendLine($"[[ \"$(uname -m)\" == \"aarch64\" ]] && DOCKERFILE=\"{dockerFile.DockerFullPath}\"");
}
if (mightBeUnavailable)
{
builder.AppendLine($"if [[ \"$DOCKERFILE\" ]]; then");
builder.Indent++;
}
builder.AppendLine($"echo \"Building {info.Image.ToString()}\"");
builder.AppendLine($"git clone {info.GitLink} {info.Image.Name}");
builder.AppendLine($"cd {info.Image.Name}");
builder.AppendLine($"git checkout {info.GitRef}");
builder.AppendLine($"cd \"$(dirname $DOCKERFILE)\"");
builder.AppendLine($"docker build -f \"$DOCKERFILE\" -t \"{info.Image}\" .");
builder.AppendLine($"cd - && cd ..");
if (mightBeUnavailable)
{
builder.Indent--;
builder.AppendLine($"fi");
}
builder.AppendLine();
builder.AppendLine();
}
var script = builder.ToString().Replace("\r\n", "\n");
if (string.IsNullOrEmpty(options.BuildAllScriptOutput))
options.BuildAllScriptOutput = "build-all.sh";
File.WriteAllText(options.BuildAllScriptOutput, script);
Console.WriteLine($"Generated file \"{Path.GetFullPath(options.BuildAllScriptOutput)}\"");
if (!string.IsNullOrEmpty(options.READMEOutput))
{
var readme = File.ReadAllText(options.READMEOutput);
var start = readme.IndexOf("| Image |");
var end = start;
for (; end < readme.Length; end++)
{
if (readme[end] == '\r' && readme[end + 1] == '\n' && readme[end + 2] != '|')
{
end += 2;
break;
}
if (readme[end] == '\n' && readme[end + 1] != '|')
{
end += 1;
break;
}
}
StringBuilder tb = new StringBuilder();
tb.Append(readme.Substring(0, start));
tb.AppendLine("| Image | Version | x64 | arm32v7 | arm64v8 | links |");
tb.AppendLine("|---|---|:-:|:-:|:-:|:-:|");
dockerInfos = dockerInfos.GroupBy(d => d.Image.ToString(false)).Select(c => c.First()).ToList();
RenderTable(tb, dockerInfos.Where(d => d.SupportedByUs));
RenderTable(tb, dockerInfos.Where(d => !d.SupportedByUs));
tb.Append(readme.Substring(end));
// RenderTable(tb, dockerInfos.Where(d => !d.SupportedByUs));
File.WriteAllText(options.READMEOutput, tb.ToString());
}
return true;
}
void RenderTable(StringBuilder tb, IEnumerable<DockerInfo> dockerInfos)
{
dockerInfos = dockerInfos.OrderBy(i => i.Image.Source).ToList();
foreach (var image in dockerInfos)
{
if (image.Deprecated) continue;
tb.Append($"| {image.Image.ToString(false)} | {image.Image.Tag} |");
if (!string.IsNullOrEmpty(image.DockerFilePath))
{
tb.Append($" [✔️]({image.GetGithubLinkOf(image.DockerFilePath)}) |");
}
else
{
tb.Append($" ️❌ |");
}
if (!string.IsNullOrEmpty(image.DockerFilePathARM32v7))
{
tb.Append($" [✔️]({image.GetGithubLinkOf(image.DockerFilePathARM32v7)}) |");
}
else
{
tb.Append($" ️❌ |");
}
if (!string.IsNullOrEmpty(image.DockerFilePathARM64v8))
{
tb.Append($" [✔️]({image.GetGithubLinkOf(image.DockerFilePathARM64v8)}) |");
}
else
{
tb.Append($" ️❌ |");
}
tb.AppendLine($" [Github]({image.GitLink}) - [DockerHub]({image.DockerHubLink}) |");
}
}
HttpClient client = new HttpClient();
private async Task<bool> CheckLink(DockerInfo info, string path)
{
if (path == null)
return true;
var link = info.GetGithubLinkOf(path);
var resp = await client.GetAsync(link);
if (!resp.IsSuccessStatusCode)
{
Console.WriteLine($"\tBroken link detected for image {info.Image} ({link})");
return false;
}
return true;
}
private IEnumerable<Image> GetImages(string fragmentDirectory)
{
var deserializer = new DeserializerBuilder().Build();
var serializer = new SerializerBuilder().Build();
foreach (var file in Directory.EnumerateFiles(fragmentDirectory, "*.yml"))
{
var root = ParseDocument(file);
if (root.TryGet("services") == null)
continue;
foreach (var service in ((YamlMappingNode)root["services"]).Children)
{
var imageStr = service.Value.TryGet("image");
if (imageStr == null)
continue;
var image = Image.Parse(imageStr.ToString());
image.Source = file;
yield return image;
}
}
}
private DockerInfo GetDockerInfo(Image image)
{
DockerInfo dockerInfo = new DockerInfo();
var name = $"{image.User}/{image.Name}";
bool firstTry = true;
retry:
switch (name)
{
case "pihole":
dockerInfo.GitLink = "https://github.com/pi-hole/docker-pi-hole";
dockerInfo.DockerFilePath = $"src/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"src/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"src/Dockerfile";
dockerInfo.GitRef = $"{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "eps":
dockerInfo.DockerFilePath = $"EPS/{NoRevision(image.Tag)}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"EPS/{NoRevision(image.Tag)}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"EPS/{NoRevision(image.Tag)}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"EPS/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "woocommerce":
dockerInfo.DockerFilePath = $"WooCommerce/{NoRevision(image.Tag)}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"WooCommerce/{NoRevision(image.Tag)}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"WooCommerce/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "cloudflared":
dockerInfo.DockerFilePath = $"Cloudflared/{NoRevision(image.Tag)}/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = dockerInfo.DockerFilePath;
dockerInfo.DockerFilePathARM64v8 = dockerInfo.DockerFilePath;
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Cloudflared/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "joinmarket":
dockerInfo.DockerFilePath = $"JoinMarket/{NoRevision(image.Tag)}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"JoinMarket/{NoRevision(image.Tag)}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"JoinMarket/{NoRevision(image.Tag)}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"JoinMarket/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "btglnd":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.GitLink = "https://github.com/vutov/lnd";
dockerInfo.GitRef = "master";
break;
case "docker-compose":
dockerInfo.DockerFilePath = $"docker-compose/{NoRevision(image.Tag)}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"docker-compose/{NoRevision(image.Tag)}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"docker-compose/{NoRevision(image.Tag)}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"docker-compose/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "docker-compose-generator":
dockerInfo.DockerFilePath = "docker-compose-generator/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "docker-compose-generator/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "docker-compose-generator/Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/btcpayserver-docker";
dockerInfo.GitRef = $"dcg-latest";
dockerInfo.SupportedByUs = true;
break;
case "shopify-app-deployer":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/shopify-app";
dockerInfo.GitRef = image.Tag;
dockerInfo.SupportedByUs = true;
break;
case "mwebd":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "Dockerfile";
dockerInfo.GitLink = "https://github.com/ltcmweb/btcpayserver-ltcmweb-plugin";
dockerInfo.GitRef = "main";
dockerInfo.SupportedByUs = false;
break;
case "tallycoin_connect":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Dockerfile.arm32v7";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfile.arm64v8";
dockerInfo.GitLink = "https://github.com/djbooth007/tallycoin_connect";
dockerInfo.GitRef = $"{image.Tag}";
dockerInfo.SupportedByUs = false;
break;
case "lnd_lit":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/lightninglabs/lightning-terminal";
dockerInfo.GitRef = $"{image.Tag}";
dockerInfo.SupportedByUs = false;
break;
case "mempool":
dockerInfo.DockerFilePath = "docker/frontend/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "docker/frontend/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "docker/frontend/Dockerfile";
dockerInfo.GitLink = "https://github.com/mempool/mempool";
dockerInfo.GitRef = $"{image.Tag}";
dockerInfo.SupportedByUs = false;
break;
case "docker-bitcoingold":
dockerInfo.DockerFilePath = $"bitcoingold/{image.Tag}/Dockerfile";
dockerInfo.GitLink = "https://github.com/Vutov/docker-bitcoin";
dockerInfo.GitRef = "master";
break;
case "snapdrop":
dockerInfo.DockerFilePath = $"Snapdrop/{image.Tag}/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Snapdrop/{image.Tag}/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Snapdrop/{image.Tag}/Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Snapdrop/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "lightning":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/lightning";
dockerInfo.GitRef = $"basedon-{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "groestlcoin/lightning":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/Groestlcoin/lightning";
dockerInfo.GitRef = $"{image.Tag}";
break;
case "chatwoot":
dockerInfo.DockerFilePath = $"docker/Dockerfile";
dockerInfo.GitLink = "https://github.com/chatwoot/chatwoot";
dockerInfo.GitRef = $"{image.Tag}";
dockerInfo.SupportedByUs = false;
break;
case "lightning-charge":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "arm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "arm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/ElementsProject/lightning-charge";
dockerInfo.GitRef = NoRevision($"v{image.Tag.Replace("-standalone", "")}");
dockerInfo.SupportedByUs = true;
break;
case "docker-bitcoinplus":
dockerInfo.DockerFilePath = $"bitcoinplus/{image.Tag}/Dockerfile";
dockerInfo.GitLink = "https://github.com/ChekaZ/docker";
dockerInfo.GitRef = "master";
break;
case "groestlcoin-lightning-charge":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/Groestlcoin/groestlcoin-lightning-charge";
dockerInfo.GitRef = $"v{image.Tag.Substring("version-".Length)}";
break;
case "groestlcoin-spark":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/Groestlcoin/groestlcoin-spark";
dockerInfo.GitRef = $"v{image.Tag.Substring("version-".Length)}";
break;
case "librepatron":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/JeffVandrewJr/patron";
dockerInfo.GitRef = $"v{image.Tag}";
break;
case "electrumx":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/lukechilds/docker-electrumx";
dockerInfo.GitRef = $"master";
break;
case "eclair":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/ACINQ/eclair";
dockerInfo.GitRef = $"v{image.Tag.Substring("release-".Length)}";
break;
case "groestlcoin/eclair":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/Groestlcoin/eclair";
dockerInfo.GitRef = $"{image.Tag}";
break;
case "isso":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/JeffVandrewJr/isso";
dockerInfo.GitRef = $"patron.{image.Tag.Substring("atron.".Length)}";
break;
case "mariadb":
// 10.5.8 -> 10.5
var tag = Regex.Match(image.Tag, "\\d*\\.\\d*");
dockerInfo.DockerFilePath = $"{tag.Value}/Dockerfile";
dockerInfo.GitLink = "https://github.com/docker-library/mariadb";
dockerInfo.GitRef = $"master";
break;
case "docker-trezarcoin":
dockerInfo.DockerFilePath = $"trezarcoin/1.2.0/Dockerfile";
dockerInfo.GitLink = "https://github.com/ChekaZ/docker";
dockerInfo.GitRef = "master";
break;
case "phoenixd":
dockerInfo.DockerFilePath = ".docker/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = ".docker/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = ".docker/Dockerfile";
dockerInfo.GitLink = "https://github.com/ACINQ/phoenixd";
dockerInfo.GitRef = $"v{image.Tag}";
dockerInfo.SupportedByUs = false;
break;
case "lightwalletd":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.GitLink = "https://github.com/zcash/lightwalletd";
dockerInfo.GitRef = $"master";
dockerInfo.SupportedByUs = false;
break;
case "zebra":
dockerInfo.DockerFilePath = "docker/Dockerfile";
dockerInfo.GitLink = "https://github.com/ZcashFoundation/zebra";
dockerInfo.GitRef = $"main";
dockerInfo.SupportedByUs = false;
break;
case "zcash-walletd":
dockerInfo.DockerFilePath = "docker/Dockerfile";
dockerInfo.GitLink = "https://github.com/elemental-pay/zcash-walletd";
dockerInfo.GitRef = $"feat/data-config";
dockerInfo.SupportedByUs = false;
break;
case "lnd":
dockerInfo.DockerFilePath = "linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/lnd";
dockerInfo.GitRef = $"basedon-{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "groestlcoin/lnd":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.GitLink = "https://github.com/Groestlcoin/lnd";
dockerInfo.GitRef = $"{image.Tag}";
dockerInfo.SupportedByUs = false;
break;
case "monero":
dockerInfo.DockerFilePath = $"Monero/{NoRevision(image.Tag)}/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Monero/{NoRevision(image.Tag)}/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Monero/{NoRevision(image.Tag)}/Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Monero/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "bitcoin":
{
var tagNoRevision = image.Tag.Split('-').First();
dockerInfo.DockerFilePath = $"Bitcoin/{tagNoRevision}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Bitcoin/{tagNoRevision}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Bitcoin/{tagNoRevision}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Bitcoin/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
}
case "bitcoinknots":
{
var tagNoRevision = image.Tag.Split('-').First();
dockerInfo.DockerFilePath = $"BitcoinKnots/{tagNoRevision}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"BitcoinKnots/{tagNoRevision}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"BitcoinKnots/{tagNoRevision}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"BitcoinKnots/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
}
case "elements":
{
var tagNoRevision = image.Tag.Split('-').First();
dockerInfo.DockerFilePath = $"Elements/{tagNoRevision}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Elements/{tagNoRevision}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Elements/{tagNoRevision}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Elements/{image.Tag}";
break;
}
case "tor":
dockerInfo.DockerFilePath = $"Tor/{image.Tag}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Tor/{image.Tag}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Tor/{image.Tag}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Tor/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "dash":
dockerInfo.DockerFilePath = $"Dash/{image.Tag}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Dash/{image.Tag}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Dash/{image.Tag}";
break;
case "btcpayserver":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/btcpayserver";
dockerInfo.GitRef = $"v{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "rtl":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "Dockerfile";
dockerInfo.GitLink = "https://github.com/Ride-The-Lightning/RTL";
dockerInfo.GitRef = $"{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "nbxplorer":
dockerInfo.DockerFilePath = "Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "Dockerfile";
dockerInfo.GitLink = "https://github.com/dgarage/nbxplorer";
dockerInfo.GitRef = $"v{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "ndlc-cli":
dockerInfo.DockerFilePath = "amd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "arm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "arm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/dgarage/ndlc";
dockerInfo.GitRef = $"releases/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "btctransmuter":
dockerInfo.DockerFilePath = "Dockerfiles/amd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "Dockerfiles/arm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "Dockerfiles/arm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/btctransmuter";
dockerInfo.GitRef = $"v{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "dogecoin":
dockerInfo.DockerFilePath = $"Dogecoin/{image.Tag}/linuxamd64.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Dogecoin/{image.Tag}";
break;
case "docker-bitcore":
dockerInfo.DockerFilePath = "docker-bitcored/Dockerfile";
dockerInfo.GitLink = "https://github.com/dalijolijo/btcpayserver-docker-bitcore";
dockerInfo.GitRef = "master";
break;
case "docker-feathercoin":
dockerInfo.DockerFilePath = $"feathercoin/{image.Tag}/Dockerfile";
dockerInfo.GitLink = "https://github.com/ChekaZ/docker";
dockerInfo.GitRef = "master";
break;
case "btcpayserver/groestlcoin":
dockerInfo.DockerFilePath = $"Groestlcoin/{NoRevision(image.Tag)}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Groestlcoin/{NoRevision(image.Tag)}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Groestlcoin/{NoRevision(image.Tag)}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Groestlcoin/{NoRevision(image.Tag)}";
break;
case "docker-viacoin":
dockerInfo.DockerFilePath = $"viacoin/{image.Tag}/docker-viacoin";
dockerInfo.GitLink = "https://github.com/viacoin/docker-viacoin";
dockerInfo.GitRef = "master";
break;
case "litecoin":
dockerInfo.DockerFilePath = $"Litecoin/{NoRevision(image.Tag)}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Litecoin/{NoRevision(image.Tag)}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Litecoin/{NoRevision(image.Tag)}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Litecoin/{image.Tag}";
break;
case "docker-monacoin":
dockerInfo.DockerFilePath = $"monacoin/{image.Tag}/Dockerfile";
dockerInfo.GitLink = "https://github.com/wakiyamap/docker-bitcoin";
dockerInfo.GitRef = "master";
break;
case "nginx":
dockerInfo.DockerFilePath = $"stable/debian/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"stable/debian/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"stable/debian/Dockerfile";
dockerInfo.GitLink = "https://github.com/nginxinc/docker-nginx";
dockerInfo.GitRef = "1.23.2"; // In reality we are on 1.23.3, but they didn't published yet
dockerInfo.SupportedByUs = true;
break;
case "docker-gen":
dockerInfo.DockerFilePath = $"Dockerfile.alpine";
dockerInfo.DockerFilePathARM32v7 = $"Dockerfile.alpine";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfile.alpine";
dockerInfo.GitLink = "https://github.com/btcpayserver/docker-gen";
dockerInfo.GitRef = $"{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "letsencrypt-nginx-proxy-companion":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion";
dockerInfo.GitRef = $"v{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "btcqbo":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/JeffVandrewJr/btcqbo";
dockerInfo.GitRef = $"v{image.Tag}";
break;
case "redis":
dockerInfo.DockerFilePath = $"5.0/Dockerfile";
dockerInfo.GitLink = "https://github.com/docker-library/redis";
dockerInfo.GitRef = $"f1a8498333ae3ab340b5b39fbac1d7e1dc0d628c";
break;
case "postgres":
dockerInfo.DockerFilePath = $"Postgres/{NoRevision(image.Tag)}/linuxamd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Postgres/{NoRevision(image.Tag)}/linuxarm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Postgres/{NoRevision(image.Tag)}/linuxarm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/dockerfile-deps";
dockerInfo.GitRef = $"Postgres/{image.Tag}";
dockerInfo.SupportedByUs = true;
break;
case "traefik":
dockerInfo.DockerFilePath = $"scratch/Dockerfile";
dockerInfo.GitLink = "https://github.com/containous/traefik-library-image";
dockerInfo.GitRef = $"master";
break;
case "spark-wallet":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"arm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"arm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/shesek/spark-wallet";
dockerInfo.GitRef = $"v{image.Tag.Split('-')[0]}";
dockerInfo.SupportedByUs = true;
break;
case "c-lightning-rest":
dockerInfo.DockerFilePath = $"amd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"arm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"arm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/Ride-The-Lightning/c-lightning-REST";
dockerInfo.GitRef = $"v{image.Tag.Split('-')[0]}";
dockerInfo.SupportedByUs = true;
break;
case "btcpayserver-configurator":
dockerInfo.DockerFilePath = $"Dockerfiles/amd64.Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Dockerfiles/arm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfiles/arm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/btcpayserver/btcpayserver-configurator";
dockerInfo.GitRef = $"v{image.Tag.Split('-')[0]}";
dockerInfo.SupportedByUs = true;
break;
case "thunderhub":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM32v7 = "Dockerfile";
dockerInfo.DockerFilePathARM64v8 = "Dockerfile";
dockerInfo.GitLink = "https://github.com/apotdevin/thunderhub";
dockerInfo.GitRef = $"v{image.Tag.Split('-')[1]}";
dockerInfo.SupportedByUs = false;
break;
case "python-teos":
dockerInfo.DockerFilePath = $"docker/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"docker/arm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"docker/arm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/talaia-labs/python-teos";
dockerInfo.GitRef = $"master";
dockerInfo.SupportedByUs = false;
break;
case "benjaminchodroff/rust-teos":
dockerInfo.DockerFilePath = $"docker/Dockerfile";
dockerInfo.GitLink = "https://github.com/benjaminchodroff/rust-teos";
dockerInfo.GitRef = $"master";
dockerInfo.SupportedByUs = false;
break;
case "zammad/zammad-docker-compose" when image.Tag.StartsWith("zammad-postgresql-"):
dockerInfo.DockerFilePath = $"containers/zammad-postgresql/Dockerfile";
dockerInfo.GitLink = "https://github.com/zammad/zammad-docker-compose";
dockerInfo.GitRef = $"ff20084ce2829486076e9781fe27407ca6cc09bb";
dockerInfo.SupportedByUs = false;
break;
case "zammad/zammad-docker-compose" when image.Tag.StartsWith("zammad-elasticsearch-"):
dockerInfo.DockerFilePath = $"containers/zammad-elasticsearch/Dockerfile";
dockerInfo.GitLink = "https://github.com/zammad/zammad-docker-compose";
dockerInfo.GitRef = $"ff20084ce2829486076e9781fe27407ca6cc09bb";
dockerInfo.SupportedByUs = false;
break;
case "zammad/zammad-docker-compose" when image.Tag.StartsWith("zammad-"):
dockerInfo.DockerFilePath = $"containers/zammad/Dockerfile";
dockerInfo.GitLink = "https://github.com/zammad/zammad-docker-compose";
dockerInfo.GitRef = $"ff20084ce2829486076e9781fe27407ca6cc09bb";
dockerInfo.SupportedByUs = false;
break;
case "memcached" when image.Tag.EndsWith("alpine"):
dockerInfo.DockerFilePath = $"alpine/Dockerfile";
dockerInfo.GitLink = "https://github.com/docker-library/memcached";
dockerInfo.GitRef = $"eb38bf28263b8e5bb7367797cb7b181b65d769bd";
dockerInfo.SupportedByUs = false;
break;
case "bwt":
dockerInfo.DockerFilePath = $"docker/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"docker/arm32v7.Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"docker/arm64v8.Dockerfile";
dockerInfo.GitLink = "https://github.com/bwt-dev/bwt";
dockerInfo.GitRef = $"v{image.Tag.Split('-')[0]}";
break;
case "sphinx-relay":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/stakwork/sphinx-relay";
dockerInfo.GitRef = $"{image.Tag}";
dockerInfo.SupportedByUs = false;
break;
case "lndhub":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/BlueWallet/LndHub";
dockerInfo.GitRef = $"{image.Tag.Split("@")[0]}";
dockerInfo.SupportedByUs = false;
dockerInfo.Deprecated = true;
break;
case "fireflyiii/core":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfile";
dockerInfo.GitLink = "https://dev.azure.com/Firefly-III/_git/MainImage";
dockerInfo.RawLink = "https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true";
dockerInfo.GitRef = null;
break;
case "lightninglabs/lightning-terminal":
dockerInfo.GitLink = "https://github.com/lightninglabs/lightning-terminal";
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfile";
dockerInfo.GitRef = image.Tag.Replace("-path-prefix", "");
break;
case "chatwoot/chatwoot":
dockerInfo.DockerFilePath = $"docker/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"docker/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"docker/Dockerfile";
dockerInfo.GitLink = "https://github.com/chatwoot/chatwoot";
dockerInfo.GitRef = $"{image.Tag}";
break;
case "podcastindexorg/podcasting20-helipad":
dockerInfo.DockerFilePath = $"umbrel/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"umbrel/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"umbrel/Dockerfile";
dockerInfo.GitLink = "https://github.com/Podcastindex-org/helipad";
dockerInfo.GitRef = $"{image.Tag}";
break;
case "kukks/nnostr-relay":
dockerInfo.DockerFilePath = $"Relay/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Relay/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Relay/Dockerfile";
dockerInfo.GitLink = "https://github.com/kukks/nnostr";
dockerInfo.GitRef = $"Relay/{image.Tag}";
break;
case "mempool/frontend":
dockerInfo.DockerFilePath = $"docker/frontend/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"docker/frontend/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"docker/frontend/Dockerfile";
dockerInfo.GitLink = "https://github.com/mempool/mempool";
dockerInfo.GitRef = image.Tag;
break;
case "mempool/backend":
dockerInfo.DockerFilePath = $"docker/backend/Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"docker/backend/Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"docker/backend/Dockerfile";
dockerInfo.GitLink = "https://github.com/mempool/mempool";
dockerInfo.GitRef = image.Tag;
break;
case "timescale/timescaledb":
dockerInfo.DockerFilePath = $"Dockerfile";
dockerInfo.DockerFilePathARM32v7 = $"Dockerfile";
dockerInfo.DockerFilePathARM64v8 = $"Dockerfile";
dockerInfo.GitLink = "https://github.com/timescale/timescaledb-docker";
dockerInfo.GitRef = "main";
break;
case "ghcr.io/bisoncraft/decred":
dockerInfo.DockerFilePath = $"Dockerfile.decred";
//dockerInfo.DockerFilePathARM32v7 = $"Dockerfile.decred";
//dockerInfo.DockerFilePathARM64v8 = $"Dockerfile.decred";
dockerInfo.GitLink = "https://github.com/bisoncraft/btcpayserver-decred-plugin";
dockerInfo.GitRef = $"v{image.Tag}";
break;
default:
if (firstTry)
{
name = $"{image.Name}";
firstTry = false;
goto retry;
}
else
return null;
}
dockerInfo.DockerHubLink = image.DockerHubLink;
dockerInfo.Image = image;
return dockerInfo;
}
string NoRevision(string str)
{
return str.Split('-').First();
}
private YamlMappingNode ParseDocument(string fragment)
{
var input = new StringReader(File.ReadAllText(fragment));
YamlStream stream = new YamlStream();
stream.Load(input);
return (YamlMappingNode)stream.Documents[0].RootNode;
}
private static void DeleteDirectory(string outputDirectory)
{
try
{
Directory.Delete(outputDirectory, true);
}
catch
{
}
}
private static string FindRoot(string rootDirectory)
{
string directory = Directory.GetCurrentDirectory();
int i = 0;
while (true)
{
if (i > 10)
throw new DirectoryNotFoundException(rootDirectory);
if (directory.EndsWith(rootDirectory))
return directory;
directory = Path.GetFullPath(Path.Combine(directory, ".."));
i++;
}
}
}
}

View File

@ -1,23 +0,0 @@
# DockerFile build helper
By default, when you use docker deployment, you are fetching pre-built docker images hosted on dockerhub.
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.
This repository generate a script that you can use to build all images from the sources by yourself.
## How to use?
Install [.NET Core SDK](https://dotnet.microsoft.com/download) and run:
```bash
./run.sh
```
Or using Docker:
```
docker run -it --rm -v `pwd`:/project -w /project/contrib/DockerFileBuildHelper mcr.microsoft.com/dotnet/sdk:2.1 ./run.sh
```
This will build a `build-all.sh` file which you can run locally.
To update the README table and the `build-all-images.sh` script that's checked into git, replace `run.sh` with `update-repo.sh`.

View File

@ -1,45 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DockerFileBuildHelper
{
public class StringBuilderEx
{
StringBuilder _Builder = new StringBuilder();
public StringBuilderEx()
{
}
public int Indent { get; set; }
public void Append(string str)
{
_Builder.Append(GetIndents());
_Builder.Append(str);
}
private string GetIndents()
{
return new String(Enumerable.Range(0, Indent).Select(_ => '\t').ToArray());
}
public void AppendLine(string str)
{
_Builder.Append(GetIndents());
_Builder.AppendLine(str);
}
public override string ToString()
{
return _Builder.ToString();
}
internal void AppendLine()
{
_Builder.AppendLine();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +0,0 @@
#!/bin/bash
dotnet run --no-launch-profile -c Release -- $@

View File

@ -1 +0,0 @@
dotnet run --no-launch-profile -c Release -- -o "../build-all-images.sh" -omd "../../README.md"

View File

@ -1,3 +0,0 @@
#!/bin/bash
dotnet run --no-launch-profile -c Release -- -o "../build-all-images.sh" -omd "../../README.md"

View File

@ -1,244 +0,0 @@
# Fast sync Bitcoin for BTCPay Server
## What problem does Fast Sync solve?
When you start a new BTCPay Server, you need to synchronize your Bitcoin node from the genesis block.
Validating from the genesis blocks takes, in general, 1 or 2 days on affordable servers. (around 10$ per month)
However, synchronization time will take around two weeks on some low-powered devices like a raspberry PI. (and it will linearly increase with time)
Fast Sync provides a solution to decrease the synchronization time dramatically to minutes or a few hours.
:::warning
Current UTXO Set snapshots only work for Bitcoin Core 0.17.0 or higher. Do NOT use these sets on older versions of Bitcoin Core (0.16.3 or lower)
:::
## How does Fast Sync solve the problem?
For Bitcoin software to operate, you do not need all the history of blocks from the genesis.
You need the state of Bitcoin up to a certain block (this state is called `UTXO Set`), and around ~300 blocks before this point.
Fast Sync downloads the UTXO Set at a specific block on an external server, and deploy it on your node. We call this file a `UTXO Set snapshot`.
When your node starts up again, with the `UTXO Set snapshot` it will only need to synchronize from this point to the latest blocks.
## What are the downsides of Fast Sync?
### Malicious UTXO Set
Fast Sync can potentially get abused:
1. The attacker gives you a `UTXO Set snapshot`, which does not follow Bitcoin consensus.
2. The attacker makes a purchase to your store.
3. Nodes following the consensus would not recognize the payment as valid, but your node will.
4. The coins the attacker sent you are just worthless.
Other attacks can completely bring down your node.
### Lightning Network routing issues
As a merchant, you generally do not care about this issue. Merchants are mainly receiving payment, so they don't need to do any routing.
However, if you plan to send payments from your lightning node, you may have issues:
Because you do not have old blocks, your lightning node won't see any channels created prior to the snapshot.
If this is a problem for you, use an older snapshot.
## How to verify that the UTXO Set snapshot follows the consensus?
### If you trust the owner of this repository....
The snapshots recognized as valid by the `btcpayserver-docker` repository you've cloned, can be found on [utxo-sets](utxo-sets).
When you SSH into your new Sync BTCPay Server (by the use of Putty, for example), the first thing you have to do is become `root`.
```bash
sudo su -
```
Before you start the [load-utxo-set.sh](load-utxo-set.sh), you must bring down your BTCPay Server.
In the `btcpayserver-docker` directory you run `btcpay-down.sh` to bring down your instance.
```bash
cd $BTCPAY_BASE_DIRECTORY/btcpayserver-docker
./btcpay-down.sh
```
![BTCPay Server FastSync](../../docs/img/fastsync/btcpayfastsync1.jpg)
After you've shut down BTCPay Server, you now go into the FastSync directory and run the `load-utxo-set.sh` script:
```bash
cd $BTCPAY_BASE_DIRECTORY/btcpayserver-docker/contrib/FastSync
./load-utxo-set.sh
```
The script [load-utxo-set.sh](load-utxo-set.sh) will download the utxo-set from the environment variable `UTXO_DOWNLOAD_LINK`.
If `UTXO_DOWNLOAD_LINK` is empty, `NBITCOIN_NETWORK` (with value set to `mainnet` or `testnet`) will be used to take a default `UTXO_DOWNLOAD_LINK` that we hard coded inside [load-utxo-set.sh](load-utxo-set.sh).
![BTCPay Server FastSync](../../docs/img/fastsync/btcpayfastsync2.jpg)
Once the files are downloaded, the hash will be checked against those in [utxo-sets](utxo-sets).
![BTCPay Server FastSync](../../docs/img/fastsync/btcpayfastsync3.jpg)
After the [load-utxo-set.sh](load-utxo-set.sh) is done, you will be warned, and asked to delete the docker volume `generated_bitcoin_wallet_datadir`.
This will be recreated when we now run the `btcpay-up.sh` script.
```bash
docker volume rm generated_bitcoin_wallet_datadir
```
Now go back to the `btcpayserver-docker` directory, and let's restart your Server with `./btcpay-up.sh` to sync the rest!
```bash
cd $BTCPAY_BASE_DIRECTORY/btcpayserver-docker
./btcpay-up.sh
```
The rest of the Sync will take place on your BTCPay Server until it reaches the latest block height.
You can either follow this process in the UI of the BTCPay Server or run the following command in the CLI. This will show you the latest log output and the current block height of your `Fast Sync` node.
```bash
docker logs --tail -100 btcpayserver_bitcoind
```
![BTCPay Server FastSync](../../docs/img/fastsync/btcpayfastsync4.jpg)
:::warning
**However: This will only prove that the owner of this git repository is honest, and the utxo-sets are verified and correct.**
**Completing those steps does not mean that the UTXO set snapshot is legit. It only means that you trust the owner of this git repository to have verified that it is legit.**
:::
### Don't trust, verify!<a name="donttrust"></a>
If you don't trust anybody, which should be the case as much as possible, then here are the steps to verify that the UTXO set you just loaded is not malicious.
1. You need another node that you own, entirely `under your control`, that `you synchronized from the genesis block`. Let's call this node `Trusty`.
2. In the previous [step](./README.md#if-you-trust-the-owner-of-this-repository) you've set up the `Fast Sync` node. Let's call this `Synchy`.
3. Wait for `Synchy` to be fully synced.
4. Now on, `Synchy` and `Trusty` run the following command at the same time:
If `Synchy` or `Trusty` are both using BTCPay Server, go to the `btcpayserver-docker` directory and use:
```bash
cd $BTCPAY_BASE_DIRECTORY/btcpayserver-docker
./bitcoin-cli.sh gettxoutsetinfo
```
Or use if non BTCPay Server node :
```bash
bitcoin-cli gettxoutsetinfo
```
Running this command might take some time, and nothing will show up in the terminal in the meantime.
5. Verify that the output of `Synchy` and `Trusty` are identical (you can ignore `disk_size`).
![BTCPay Server FastSync](../../docs/img/fastsync/btcpayfastsync6.jpg)
:::warning
**Completing those steps, assuming the software you are running is not malicious, correctly prove that the UTXO set snapshot is legit**.
:::
### If you trust someone else...
This repository contains the signatures of some developers, for example [sigs/NicolasDorier.utxo-sets.asc](sigs/NicolasDorier.utxo-sets.asc) contains the hashes that `NicolasDorier` verified himself.
You need to verify with [KeyBase command line](https://keybase.io/docs/command_line) that the signature is legit:
```bash
keybase pgp verify -i sigs/NicolasDorier.utxo-sets.asc
```
If you don't like command line, you can verify against [keybase verify page](https://keybase.io/verify) by just copying and pasting the content of [sigs/NicolasDorier.utxo-sets.asc](sigs/NicolasDorier.utxo-sets.asc).
You can verify that the handle `NicolasDorier` refers to the person who controls `NicolasDorier` Twitter, GitHub, and Reddit handle on [the keybase profile page](https://keybase.io/NicolasDorier).
:::tip
**Completing those steps does not mean that the UTXO set snapshot is legit**. It only means that you trust the owner of a Keybase account, who has proved access to some social media accounts in the past.
:::
## FAQ
### Can I add my signature to this repository?
If you are a bitcoin developer or public figure, feel free to add your signature. For this, you need:
1. A [keybase account](http://keybase.io) linked to your social media accounts.
2. Follow the steps described in the [Don't trust, verify!](#donttrust) section for each snapshot you want to sign.
3. Create a file with the same format as [utxo-sets](utxo-sets) with the snapshots you validated. (Let's call this file `YOU.utxo-sets`)
4. Run the following command line
```bash
cd $BTCPAY_BASE_DIRECTORY/btcpayserver-docker/contrib/FastSync
keybase pgp sign -i YOU.utxo-sets -c -t -o sigs/YOU.utxo-sets.asc
rm YOU.utxo-sets
git add sigs/YOU.utxo-sets.asc
git commit -m "Add YOU utxo-set signature" --all
```
And make a pull request to `btcpayserver-docker` repository.
### Where can I download UTXO set snapshots
You should not need to do this because [load-utxo-set.sh](load-utxo-set.sh) will do the hard work for you.
But if you want, browse on [this listing](http://utxosets.blob.core.windows.net/public?restype=container&comp=list&include=metadata).
Select the snapshot you want, and download it by querying `http://utxosets.blob.core.windows.net/public/{blobName}`.
### How can I create my own snapshot?
Assuming you have a node running on a docker deployment of BTCPay Server, you need to run [save-utxo-set.sh](save-utxo-set.sh).
This script shows the steps to create an archive of the current UTXO Set
It will:
1. Shutdown BTCPay Server
2. Start bitcoind
3. Prune it to up to 289 blocks from the tip
4. Stop bitcoind
5. Archive in a tarball the blocks and chainstate directories
6. Restart BTCPay
7. If `AZURE_STORAGE_CONNECTION_STRING` is set, then upload to azure storage and make the blob public else print hash and tarball
### How can I do this for my altcoin?
Your altcoin does not need it. Almost nobody uses it compared to bitcoin.
However, if you insist follow what we did for Bitcoin, we can't handhold you on this.
### Do you plan to destroy Bitcoin?
This feature may be controversial because of the risk that almost nobody will follow the [Don't trust, verify!](#donttrust) step.
What if somebody starts spreading a corrupted snapshot on the wild scale?
I think this issue can be mitigated at the social layer. If several people start using social media to spread their `bitcoin-cli getutxosetinfo` every 10 000 blocks, any corrupt snapshot would be soon detected. We plan to make expose the hash via `BTCPayServer` and make it easy for people to share.
### Why you don't just: Make BTCPayServer rely on SPV
All SPV solution brings a systemic risk to Bitcoin. Suppose everybody relies on SPV to accept payment, and miners want to change consensus rules. In that case, you will have no leverage as an individual or a community to decide against.
Even with `UTXO Set snapshots`, you continue to validate consensus rules from the block of the snapshot.
### Why you don't just: Make BTCPayServer rely on an external trusted node
Why not just host BTCPayServer on the raspberry pi, but the full bitcoin node on another machine?
For two reasons:
First, `BTCPayServer` is trying to reduce the technical barriers to operating payments on your own. Running on an external node means that the user needs the technical skills to set it up.
`BTCPayServer` also relies on Bitcoin's RPC, which is not meant to be exposed on the internet. We can't see a simple enough solution that would allow normal people to run an external node elsewhere.
The second reason is reliability: You want your service to be self-contained. If you host a node on another server, and for some reason, this Server goes down, then your `BTCPayServer` hosted on the raspberry PI will also cease to function.

View File

@ -1,120 +0,0 @@
#!/bin/bash
set -e
# This script shows the steps to download and deploy an archive of the current UTXO Set
# It will:
# 1. Download the UTXO Set from UTXO_DOWNLOAD_LINK, if UTXO_DOWNLOAD_LINK is empty, use NBITCOIN_NETWORK to find a default
# 2. Check the tarball against trusted hashes
# 3. Create the container's folders for blocks and chainstate, or empty them if they exists
# 4. Unzip the tarball
# This will download the utxo set and untar it in bitcoin's folder
# Usage: ./load-utxo-set.sh
# This will use the tar to load the utxo in bitcoin's folder
# Usage: ./load-utxo-set.sh utxo-snapshot-bitcoin-mainnet-699714.tar
if ! [ "$0" = "$BASH_SOURCE" ]; then
echo "This script must not be sourced"
exit 1
fi
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root after running \"sudo su -\""
exit 1
fi
if ! [[ "$NBITCOIN_NETWORK" ]]; then
echo "NBITCOIN_NETWORK should be set to mainnet, testnet or regtest"
exit 1
fi
if ! [[ "$BTCPAYGEN_ADDITIONAL_FRAGMENTS" == *"opt-save-storage"* ]]; then
echo "Pruning must be enabled, please update BTCPAYGEN_ADDITIONAL_FRAGMENTS by running:"
echo ""
echo 'BTCPAYGEN_ADDITIONAL_FRAGMENTS="$BTCPAYGEN_ADDITIONAL_FRAGMENTS;opt-save-storage-s"'
echo '. btcpay-setup.sh -i'
exit 1
fi
TAR_FILE="$1"
if ! [[ "$UTXO_DOWNLOAD_LINK" ]]; then
[[ $NBITCOIN_NETWORK == "mainnet" ]] && UTXO_DOWNLOAD_LINK="https://snapshots.btcpay.tech/utxo-snapshot-bitcoin-mainnet-867690.tar"
[[ $NBITCOIN_NETWORK == "testnet" ]] && UTXO_DOWNLOAD_LINK="https://eu2.contabostorage.com/1f50a74c9dc14888a8664415dad3d020:utxosets/utxo-snapshot-bitcoin-testnet-1445586.tar"
fi
if ! [[ "$UTXO_DOWNLOAD_LINK" ]] && ! [[ "$TAR_FILE" ]]; then
echo "No default UTXO_DOWNLOAD_LINK for $NBITCOIN_NETWORK"
exit 1
fi
BITCOIN_DATA_DIR="$(docker volume inspect generated_bitcoin_datadir -f "{{.Mountpoint}}" 2>/dev/null)" || \
BITCOIN_DATA_DIR="/var/lib/docker/volumes/generated_bitcoin_datadir/_data"
[ ! -d "$BITCOIN_DATA_DIR" ] && mkdir -p "$BITCOIN_DATA_DIR"
if [[ "$TAR_FILE" ]]; then
TAR_NAME="$(basename $TAR_FILE)"
else
TAR_NAME="$(basename $UTXO_DOWNLOAD_LINK)"
TAR_FILE="$BITCOIN_DATA_DIR/$TAR_NAME"
fi
TAR_DIR="$(dirname "$TAR_FILE")"
cp "utxo-sets" "$TAR_DIR/utxo-sets"
cd "$TAR_DIR"
IS_DOWNLOADED=false
if [ ! -f "$TAR_FILE" ]; then
echo "Downloading $UTXO_DOWNLOAD_LINK to $TAR_FILE"
wget "$UTXO_DOWNLOAD_LINK" -c -O $TAR_FILE.partial -q --show-progress && mv $TAR_FILE.partial $TAR_FILE
IS_DOWNLOADED=true
else
echo "$TAR_FILE already exists"
fi
grep "$TAR_NAME" "utxo-sets" | tee "utxo-set"
rm "utxo-sets"
if ! sha256sum -c "utxo-set"; then
echo "$TAR_FILE is not trusted"
rm "utxo-set"
cd -
exit 1
fi
rm "utxo-set"
cd -
NETWORK_DIRECTORY=$NBITCOIN_NETWORK
if [[ $NBITCOIN_NETWORK == "mainnet" ]]; then
NETWORK_DIRECTORY="."
fi
if [[ $NBITCOIN_NETWORK == "testnet" ]]; then
NETWORK_DIRECTORY="testnet3"
fi
NETWORK_DIRECTORY="$BITCOIN_DATA_DIR/$NETWORK_DIRECTORY"
[ -d "$NETWORK_DIRECTORY/blocks" ] && ( rm -rf "$NETWORK_DIRECTORY/blocks" || rm -rf $NETWORK_DIRECTORY/blocks/* )
[ -d "$NETWORK_DIRECTORY/chainstate" ] && rm -rf "$NETWORK_DIRECTORY/chainstate"
[ ! -d "$NETWORK_DIRECTORY" ] && mkdir "$NETWORK_DIRECTORY"
echo "Extracting..."
if ! tar -xf "$TAR_FILE" -C "$BITCOIN_DATA_DIR"; then
echo "Failed extracting, did you turned bitcoin off? (btcpay-down.sh)"
exit 1
fi
$IS_DOWNLOADED && rm -f "$TAR_FILE"
BTCPAY_DATA_DIR="$(docker volume inspect generated_btcpay_datadir -f "{{.Mountpoint}}" 2>/dev/null)" || \
BTCPAY_DATA_DIR="/var/lib/docker/volumes/generated_btcpay_datadir/_data"
[ ! -d "$BTCPAY_DATA_DIR" ] && mkdir -p "$BTCPAY_DATA_DIR"
echo "$TAR_NAME" > "$BTCPAY_DATA_DIR/FastSynced"
echo "Successfully downloaded and extracted."
if docker volume inspect generated_bitcoin_wallet_datadir &>/dev/null; then
echo -e '\033[33mWARNING: You need to delete your Bitcoin Core wallet before restarting with "btcpay-up.sh", or bitcoin core will fail to start.\033[0m'
echo -e '\033[33mDo not delete the wallet if you have any funds on it. (For example, this may be the case if you use Eclair or FullyNoded to receive funds)\033[0m'
echo -e '\033[33mHow to proceed: If you agree to delete your Bitcoin Core wallet, run "docker volume rm generated_bitcoin_wallet_datadir"\033[0m'
else
echo "You can now run btcpay again (btcpay-up.sh)"
fi

View File

@ -1,35 +0,0 @@
# This file is internal and meant to be run by save-utxo-set.sh
BITCOIND="bitcoind -datadir=/data"
BITCOIN_CLI="bitcoin-cli -datadir=/data"
$BITCOIND &
BITCOIND_PID=$!
CURRENT_HEIGHT="$($BITCOIN_CLI -rpcwait getblockcount)"
let "PRUNED_HEIGHT=$CURRENT_HEIGHT - 289"
echo "Pruning to $PRUNED_HEIGHT"
$BITCOIN_CLI pruneblockchain "$PRUNED_HEIGHT"
echo "Waiting bitcoind to stop..."
$BITCOIN_CLI stop
wait $BITCOIND_PID
NETWORK_DIRECTORY=$NBITCOIN_NETWORK
if [[ $NBITCOIN_NETWORK == "mainnet" ]]; then
NETWORK_DIRECTORY="."
fi
if [[ $NBITCOIN_NETWORK == "testnet" ]]; then
NETWORK_DIRECTORY="testnet3"
fi
cd /data
TAR_NAME="utxo-snapshot-bitcoin-$NBITCOIN_NETWORK-$PRUNED_HEIGHT.tar"
echo "Creating $TAR_NAME..."
echo "Adding $NETWORK_DIRECTORY/blocks/*"
cd "$NETWORK_DIRECTORY"
tar -cvf "$TAR_NAME" "blocks/"
echo "Adding $NETWORK_DIRECTORY/chainstate/*"
tar -rvf "$TAR_NAME" "chainstate/"
[[ $NBITCOIN_NETWORK == "mainnet" ]] || mv "$TAR_NAME" "/data/$TAR_NAME"
echo "TAR file created to /data/$TAR_NAME"
exit

View File

@ -1,62 +0,0 @@
#!/bin/bash
# This script shows the steps to create an archive of the current UTXO Set
# It will:
# 1. Shutdown BTCPay Server
# 2. Start bitcoind
# 3. Prune it to up to 289 blocks from the tip
# 4. Stop bitcoind
# 5. Archive in a tarball the blocks and chainstate directories
# 6. Restart BTCPay
# 7. If AZURE_STORAGE_CONNECTION_STRING is set, then upload to azure storage and make the blob public, else print hash and tarball
: "${AZURE_STORAGE_CONTAINER:=public}"
if [[ "$AZURE_STORAGE_CONNECTION_STRING" ]] && ! [ -x "$(command -v az)" ]; then
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."
exit
fi
echo "Closing down btcpay... it can take a while"
btcpay-down.sh
for i in /var/lib/docker/volumes/generated_bitcoin_datadir/_data/utxo-snapshot-*; do
echo "Deleting $i"
rm $i
done
rm /var/lib/docker/volumes/generated_bitcoin_datadir/_data/utxo-snapshot-*
# Run only bitcoind and connect to it
SCRIPT="$(cat save-utxo-set-in-bitcoind.sh)"
cd "`dirname $BTCPAY_ENV_FILE`"
docker-compose -f $BTCPAY_DOCKER_COMPOSE run --rm -e "NBITCOIN_NETWORK=$NBITCOIN_NETWORK" bitcoind bash -c "$SCRIPT"
btcpay-up.sh
echo "Calculating the hash of the tar file..."
TAR_FILE="$(echo /var/lib/docker/volumes/generated_bitcoin_datadir/_data/utxo-snapshot-*)"
echo "Tar file of size $(ls -s -h $TAR_FILE)"
TAR_FILE_HASH="$(sha256sum "$TAR_FILE" | cut -d " " -f 1)"
if [[ "$AZURE_STORAGE_CONNECTION_STRING" ]]; then
echo "Uploading to azure..."
# Install az from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest
BLOB_NAME="$(basename -- $TAR_FILE)"
az storage container create --name "$AZURE_STORAGE_CONTAINER" --public-access "blob"
az storage blob upload -f "$TAR_FILE" \
-c "$AZURE_STORAGE_CONTAINER" \
-n "$BLOB_NAME" \
--content-type "application/x-tar"
az storage blob metadata update --container-name "$AZURE_STORAGE_CONTAINER" --name "$BLOB_NAME" --metadata "sha256=$TAR_FILE_HASH"
# Print the sha256sum. Downloaders will need to verify this
STORAGE_URL="$(az storage blob url --container-name "$AZURE_STORAGE_CONTAINER" --name "$BLOB_NAME" --protocol "http")"
echo "You can now download the UTXO on $STORAGE_URL"
echo "Please, after download, verify the sha256 with:"
echo "echo "$TAR_FILE_HASH $BLOB_NAME" | sha256sum -c -"
rm "$TAR_FILE"
else
echo "SHA256: $TAR_FILE_HASH"
echo "File at: $TAR_FILE"
fi

View File

@ -1,24 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar
eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar
8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar
58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar
52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar
0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar
587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar
79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar
58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
-----BEGIN PGP SIGNATURE-----
iQEzBAEBCgAdFiEEnGJq0mr2sgeLfBk5qSc7WtPke0UFAmLNiFgACgkQqSc7WtPk
e0UGsgf+JrVIXjQHnGo8HvbdKWXn+aemaC6SfM0kCdS+Av6Hvg14YVj3LpfVE9if
15ITBG+Q3LP8pO4A5T+RxG1YlfvnhsDP7GyhFiG55ew0H6G68Uf9iLwiBzqiqnqm
gYOcNtVNaDhAP5ocRnyALSxVH7aWgPD68OPL3xsWvKjC85jsM7dkyWGBdzN4tfua
Gp5Kcz1b3oGyvRSm/3syrWx1J/Cht0oO/tK6zVcwEo7Wq4fDOQD7AUZwiviJYbq5
Q1GoBDEmFe/ZHlta9Qx4sIkib5ZeNRX7KOVFJAkAD/hzbFBBpLjwnTRSGwU+Aulh
kRn9K2XG49yyL0tjJuNzEVwZ9Ynh8Q==
=tb07
-----END PGP SIGNATURE-----

View File

@ -1,31 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar
eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar
8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar
58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar
52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar
0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar
587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar
79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar
58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar
725a049bc5a9fd60b05bba4d4825d35115d99f05ab5b7716d4507c295d05172d utxo-snapshot-bitcoin-mainnet-820852.tar
-----BEGIN PGP SIGNATURE-----
wsFcBAEBCAAQBQJletbECRBmGHY+8JGG/gAACiQQAHoG7cXpdfks1sdb5Uzu44jl
ABzgVCcIQ8qpQWuiwqBB/Cux/YW63wU4Ku95KMvOVC6P5Q3Dmil5Q2LEibHFzKjb
/TofEdjKWIcqw2xut7Q3GSnyeMdjhm2fdUH4b3rhkt3Zh8T2BOvi1aWt3CsiaTnd
+UooDXb218db28OKYzGZ9cbfaTueRW2rsX0T7xZhYUmo7ExOfe9xGN7AVljSxSnm
OIammIuqi5uKbB6t+t1p2pl2lr2g/eLyY4iPzFRv3yk7tl9v4Uoj8Ry1+AT1E8+b
p1M0uWj8c9sHbCizr8xW5RkVr7CQrgrNJbol00IfQVyooQI33szMX0jQ5X8Nt6y8
KdwUvT8ZyT2eS1VG4RjH3Oq9V/ZxODPtaA8su8lAWTd10xrsRGKwO/qHYdhISOUC
+NQmT9f6pFX35UH0CSk5T8c0jNTAChZcw7NlDUWQaKj3H63qajnVHnx/NuZCmhCe
5L6ilWsYnqYnfjJX7d0i4ZMUNCXkeBTKZHBasWzEBp3ds8nOsHY5dCFcWkppABNw
ynLkCSDN7TY1a8sTgdEIpNpZ6m2oq3rMhmxVzijcFuXV5eRtIxGY1mZPJTggZQXB
8/1RT8B5EDbl0L9Bq+q8lYL/dDLRKQJH0IA3FKGzPDNcin+d8oWh0Ep1IuYDlRJ8
xY8CXryVjzmbglJvC1Wt
=PNpf
-----END PGP SIGNATURE-----

View File

@ -1,21 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar
-----BEGIN PGP SIGNATURE-----
wsFcBAEBCAAQBQJjtfiOCRDXzmZXIX7aPwAADIsQANT3WzkTcTlKV/t74q+WFRpE
5QkPWuOUsHdQzg5eHYzwjrt3KHO12JmX0efWG0ACb1VrXQtAnJuX8Xzzf04kTELp
UGJfpPdHuqxiW+X+VtHiJBe0EqbLOum11rHaYylWmVK6tK/cId4UIaQv3LWwfRCJ
BGrR4ay6SJtQvNxDs8M0lQdzNohmJnpVxbnAVP78/cBRLoHHrNgzqp0QnDISllfS
m6DvWRX88Ul+xwfaBek3CKR9Z7cV6LyrveLh13VEyPt1KO/sGP0acY/uTCEmUKfY
k5AK75nY4Rk349iVvlptxt2vPOdi6hTfuUF253s51XmBxEJfWswZQtxqdqNMD0m9
7abxv5X+SpfnybpQQmiFj41CNWTmxCe/QPowGIejDwjBZtww5nhwI79uvSIbamwk
tcClQG5agbqhDOB94tqxHZZVqG7OCanLKbuynmyp+4uiQ+zVnB623vP56PrUnNQv
M0fhnNJBQFNARz3XU59/spTzmrso0lnKTGeKyMrN+/i84r+lHd6ynRe7gbVCj3Fh
wshhCKZ64nAQkkJGsHgBxjbz9HZs3sPd5vatPl6sqyxtCyiVdpxN1WEk7FairTHx
MkyiVHYkH7ip/fz0vdmf0DiQpTJ53plTVOQkxLpT0AGruzZtsgVjLYaU07hnzHLD
L8cZ2glroURtcHgwbaPB
=OVeC
-----END PGP SIGNATURE-----

View File

@ -1,20 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
-----BEGIN PGP SIGNATURE-----
wsFcBAEBCAAQBQJi8FGeCRAUIb9sTcmBfwAAJskQACzQmpio4/iDgmBlSYOgcsDn
JXxFX7uiAxf4yr4ujLm7heDZAtA7P9p9ddVHCDsP/xp566RQXDqQQFSW8Jkh87JP
8NZi5lEZMO1dMVXNgucg5MqLQOgE0JhMtpexS0TB4jW1dqcSjUHGU16Aq29MJQzW
aF6egNkicEnc3KX9M5YV43wG0jklFqwkjUyjR1kUJgLoCjG9yzVRlp83oUZtI189
K9XWYLPB4YbO7+S0Gug7OEQFPf0yuQR6vcfJynA1ney0QwIv+2C4JJPd/r1h3g4R
TFQsTmlLBsrseMnCfSRxPv6+tHg4r010lfryDYwSq/N6eaj1AYSKeTDe2xPSBuGt
L8FwPDJCTdXMmSwTas5XYUiTNUkIxa8as/Hqs5+sIDcBxH6zEOfmYuxdoXpOuMpw
du/4Wk05Rd+lU9neSLTQJOxu40/SxRsBemLGfhcWBmzbOFYaPWyVxbBiwvhAliwK
x8vtbk6JFQxIZlgq/N0VJFgEj/jkEiwDxIA6zMXI34UF18lStIHIDzGkrnnUpKEb
erZxOk/tGNAjx/+fahLkQuz6fBY3LARBGlE//vX0+PFbv6R7ILGo1OYERjmYAsjy
Wh7AoVpDu9TBwAolx15oYWgDNI6MTd3VN4/cxVAHqjj4HFEu6BZiBrgFQTg85pnH
bJOZw3b3FWTCz8kJMBpg
=NP2V
-----END PGP SIGNATURE-----

View File

@ -1,23 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar
58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar
79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
-----BEGIN PGP SIGNATURE-----
wsFcBAEBCAAQBQJi0NlnCRBzZKIvLFvMBgAA5nQQADzO5UPHON+QqT+sbWDQMu2V
zKDklR6CguqEtG+PCWg39r5u0E3bDUgsp3qMtw5liquKHWKhGa+D5xLrPYgdU2Ts
91/6Dn4VIxyqcLNQYsw0jg3X6dlFIfKO2ULKULsDqUZRfi1vfeVFXxvPO48qMHel
JMAObUXgCXirVdL4YZ0F40g5Sikv9/YhTIx0Pua5UxArCnCYp6vjmzMsS+84MAC3
INW0ToziTedF7ROWtGSegzP75s11qEdJ9ObxIGhRmV1pvPwouVc0FQscdQ0s9tfc
1E4B0p1i5HuC7BfuEETvP4bpk8idIZkVACJPu6qjEtKuGDtOwxyQvxOyCCFl5RY3
RcFepZdWQjJ0Z2jufFPkowXlAlRAdd8COcDoNtuPigsjNY4MbvCSunQGy00k1dch
0ZGhcf5t0XTO3yWfvfwK0WxAcReiccsgnASq8BifAWIZLrM4GfmBz/wVxltn/fXX
cQPGKFsuBxxNv9ka0wdovClr3eLJZ5fZctQ+TNGzd6/ZmbsjZ0TNLAUjb/K3isTg
yVrl9pry9iv9Yxd4DWLWOuwmS61TfuHMK1NnJHH9vpJoTEu2UKNEl0PfsfDuXnhu
izxT3KpqqMPbrRfFTnmyEgX4Si7b0wqp2OqHIGTt25WyyJoieVNat8PGxCZ7qsS/
+Y+qBlGDmRuWrLvvWxjb
=2tFb
-----END PGP SIGNATURE-----

View File

@ -1,22 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar
eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar
8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar
58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar
52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar
0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar
587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar
79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar
58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar
725a049bc5a9fd60b05bba4d4825d35115d99f05ab5b7716d4507c295d05172d utxo-snapshot-bitcoin-mainnet-820852.tar
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQRQdmI2dt3KIgDgNOtP4h9f/4TJvAUCZxAV6gAKCRBP4h9f/4TJ
vOvTAP4/MPtLjt2jWc8h7hWtc71pP43Q1s7I2/Fo6TqZwqmn4QEAyin+ylkz7OvQ
+Zok4KaPDdHpHJk/ncdS3qKpX7E0iAg=
=UO3X
-----END PGP SIGNATURE-----

View File

@ -1,20 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
-----BEGIN PGP SIGNATURE-----
wsFcBAEBCAAQBQJi0edkCRADBN2I1mxLvwAAqAEQAKzMbFyV2Kn9SN3LP1IaQCcH
cRVyD8sgb5AkHVzdX/ThvzIr/IkHXdt+cR1bIGQWDtLpo7uTsFlvXoU/hqCzI+lf
7EPaGLiGzUNav26d9LFbSqhuve62AkzCJuy63achwE/enOQWvwUZ4QR8sO/PtHDU
h0ci/uWanLxwxrPuK5Zhy7/aQ3MLVgDlbH4suAriUn9LNrQqqVx+8Feiupxwwu7p
8bOstKztrNJvrJLRqo6/tCJBv4ktnR3dSi9kxNwxRVDTjvxic6M7DmVFae1H5wiq
mHkssDxGbCnRHQPUBgr0N58vR+NA/u2c7ojkfkxJRKavHpAxhzYSXQmoqCE5rrKS
+FMmpawDZJiPigId6cbhkoKgmlZLlqYaP41zFbEGpOggkFAQ8kzACbrSUHu7/NRO
KMHMhw0G0BtFc9+PejTQtjLrhhXVO4cLU5NtrsS2ghL+hCaWNl1nkX5PdtMyGK3l
HO8EmJe2G0sp8tzXfIGCSGNr0Nre7oIGvdU00HQ/W72HdsbB6DnlRBXHuLe9+n/7
LLlRLhF/ESqQAZFRnpU8Ei+n8714wIV77vgUZsAZo6MjeydhzQtwoRSDKxc6WMD9
vrVTLfHHVCBI9lTA72Ak+wUxEGkJgu/qljoavBnNn8At8vFxTaTw+hTBc8ZI5K1U
Sg+bMiPa1T1D6QwqfG22
=yu81
-----END PGP SIGNATURE-----

View File

@ -1,21 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEkBNUT2D+8eESG4wviEz9aed8MMQFAmO2tLkACgkQiEz9aed8
MMR2pRAAmn33MR+zOeTnQIYa49jg1OVRVfU81VNFnc6pABNO8s8Z2AYukM4GunSs
SUIItJqiF1O+e2POiZa2tEDWzTAmkCfZ3r+bxJcbis5SLlkBf5fPesQhlwK7QfXK
rAXUwTMLA2T7XJEFkhwYD5A7k21ea8T/ly1kE1eNInci6uPysYLGfYeUIaCSBAuZ
UqmoaqBwKVSu3KyjagAuik1BTphNYqHgidA+3yWiMyHsgPuHjqp4HY+0xHiw/w5x
XZIm1CEzpj2GOjNbaBHp0EOWQ5q4686qRYSAogqSklPvj0MLP6IhchLi+QIJKUEg
yBTt5/8a6Ox81BSHBBVWrhjJYtAaHam4zWC3wv/6BF61BdiXIiV7ova58x8K/Zji
QsIZqNaCZ/KkfB7CZycJ1LKyxELdMaOipbjkgVifUuNf9RL9Vle8zAENR2Mo5Kk/
aATw8VO0Z/IIxuuDeT2w/9ogeoBiv4Bv5PBxRtm5gXQGpZyWYyCeeDukNQp3UKQD
pgSGriyCBkWGzuHMltGXv6N/fndAmWau9W/fRGnVt01IgTNwjliQqkR2FcmfUfBN
a+lFqcerVmTMUxExQKIwPqINqV5y2DE3gOWb4VZ97t8Yx2fPPbFuQ6fzPvhWcbtz
Ffkg9aFpjkP4NFwDkrMG1ItBhXyDEVd/b9m1sqpP1B+YFOyd/mM=
=TDDP
-----END PGP SIGNATURE-----

View File

@ -1,20 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
-----BEGIN PGP SIGNATURE-----
wsFcBAEBCAAQBQJi0LpTCRA2RAJ4cwSb5gAAgMUQAKaeNu4NR8hydLnk4nCJlaSG
zQOXXz5JYT0Sz32yG7jQxundNbOFNEKDh0ggKRUAubmkmYcOR23kXMCn1OAbHROM
PDwvKSzed3M9J1FceSe4GW4zXecWKFuCOwnVXHIbz6AAp8raI5HbZLTLHX6x+VvP
zkyWw2uG5DN0GUv9ytLQ2YVFaoBJK5w+Dw/UQwkzxo6dtc5dcwhsjNv/2PaPPZdn
0qG3vPUGyPhhAZN50YCjfq5LIgSv1vpUipyLRTAcH3a/XWHJxe1/P0tKENlOCa8j
FBAe6kRsVwAeggKrrNOl9paRoAy+zjHqdRQdVe7H9f1L9Vc06EmorelH+9gXv8C+
LZ5A1nf4OSNcGfY+flkfYNO2QZ10q5ttjIgtvfwbkj96/KFSHXG698gwQkYR4BHd
qtF8BTO3bnJa581/blwKjtUpwTEtTVUijlQbo2tSnACVF0MwtYxuqdEjLhk9RbR3
QS9UcKuYq7tvNSZed8GtLDwIW5KMh0kgdoG9gTvD+BKm43YD+l2oFUYCJyZXCqlo
lsiluXRax9fqevGiPVdRyRX5cl/nFVUhTJNmLg8Z5+Lm2D2ZfM84dPW0A/uVTS5b
7cYMmO1olt4qE1WeyOb5T2S8T5QGQ1/BBe0gyQJ9e7u7Pkdm72UhEwCYNeaTnoYR
GXnDDB80H93DUFv4GUoo
=YaXu
-----END PGP SIGNATURE-----

View File

@ -1,34 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar
eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar
8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar
58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar
52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar
0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar
587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar
79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar
58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar
725a049bc5a9fd60b05bba4d4825d35115d99f05ab5b7716d4507c295d05172d utxo-snapshot-bitcoin-mainnet-820852.tar
744c42885df700513331a978b289d9c9d5b27e0cf1147f2f5a287b4492ff940c utxo-snapshot-bitcoin-mainnet-867690.tar
-----BEGIN PGP SIGNATURE-----
Version: Keybase OpenPGP v2.1.13
Comment: https://keybase.io/crypto
wsFcBAABCgAGBQJnPpBHAAoJEHnCM6wrr3jdJEwP/3bSVFvciVH/z78UNbeUFQkE
Jh93IBqWj7hOXy2MfE4w7X8t0uvHNH0TjtQ6bThTdABkYnT8M9oEkry7WoWfFgEb
MQtCZq3jAUVwyuK3TN41KZMLhSqFkV0lEO5ZK6BT6pIUzHrPQfkjQLS0GHslvnWi
xLrdO9wMBhLF40I76DBqeEutGd7HEw26D7QJUp9Mq4mMAQ0/X9uvQgjh/47szR8C
Ip4tH6u/woMffr2IgVsjkfXM4uFLW6rrijyhL5ZIEbgaiz93M6fRBhYxEXpXSSAp
IRS35GoY30aN0a6ZxPaj3UKMyBw4xRbfTtLWJsSJqhbMIq0iWuyLI2HDFHtfH3yy
loRJG0/d1pfsAB5zYRVYjmey4cAI0wjK7eGbJ6uYnKrQ7JO7IWHiSE4PGGgF/4TG
pUhGF6JhXCqoK9pn/ZvFb8lsc6tCoJYtGceGEClpOLSovxw2KQ9R82Dlmf3TK6rv
NW2hyEpyhI9M6WwcKIuhKKrKmi//bwSWF8Rw602IEuyNGLCzChTA6AATI2QGPhBq
QbcBhhu7UblAES9Wgk1e9/gZq8yH7SKtoipICc7rQDV3PURw8o5qJeQHYTxY9kQv
SDTnwZZYWY/2nupHdNrAN2KvtDT0MlufZf4jtE8c7pgxJO/FrucfwIuW0pvLHkg6
J5Rw3AofuAa1ql3kJvOI
=2QeW
-----END PGP SIGNATURE-----

View File

@ -1,20 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
-----BEGIN PGP SIGNATURE-----
wsFcBAEBCAAQBQJi0ENyCRCP0DYsF/YIBQAAaGUQAIYlvPkZqUoQmv2Pv4YgjiRH
dbXUbSzFP2azdDQhiQ4Ju8cMKCvQKXBg0DC3DgvK0yadhb0iaNsut+Qne1uMMfHl
Mu9lmdgMZp86yl8ozp0MJHPEMNJcrP513N5xslMLRRKS+fnCwFa3e9i19NYWJa1N
Cvc9uf16CJMnIQ4TijNJvgAxFz4Y1rJESob3AoZxSX2DglV08rhJhL5uk42szwTw
7GN2oM5BNEdAdqpor59NE0Erl1TsoHIPPzHDecPgXvA4KDa8jfBD722j8PBHWtDq
7XuUcx49MDZxKZzVWriDyuaut2CfKWginO9yc7jVJjXd/JXTSD/x0RR2i6Oh0oPV
03AEthcmDVsKddsNVWqfm4GeYnZw7EXNsMgOnnplz9UIAfSzZFLTfgrUWfGOsisQ
ewSLb2KFoS5NNvmaYDurUz+raB/R1JG2/qMt07yU6rL6dBSbZD1IlaUsD2Jn9XEI
wtmyI3JfA2+H5e9WUL79TOAFi08zpwf9h0U7CFGVqvTEAsWjb4KpARN1PYQ0omY+
6cmEhiKnWSl/Sk+X4tcAbjUNEG3iEqbuB2UN1L1IIql3WqVOZclu+dfpFErSYvqW
G7ni9H3peAZtgJ68N5dvhjkb33fcQ/hNjOaECOJq0LfAJspmyHR0eNmRjsrDWNVb
u18meA/Q/Jzutg0BUpLl
=NNl1
-----END PGP SIGNATURE-----

View File

@ -1,13 +0,0 @@
fab994299273080bf7124c8c45c4ada867974ca747900178496a69e450cf713f utxo-snapshot-bitcoin-mainnet-551636.tar
eabaaa717bb8eeaf603e383dd8642d9d34df8e767fccbd208b0c936b79c82742 utxo-snapshot-bitcoin-testnet-1445586.tar
8e18176138be351707aee95f349dd1debc714cc2cc4f0c76d6a7380988bf0d22 utxo-snapshot-bitcoin-mainnet-565305.tar
58f65fc3e2abc367602c07ab0e7ae4a042e6acf2bc026623c7322d1886f52098 utxo-snapshot-bitcoin-mainnet-585333.tar
52f0fc62dd28d016f49a75c22a6fa0827efc730f882bfa8cbc5ef96736d12100 utxo-snapshot-bitcoin-mainnet-609375.tar
0afe8ca07e0ad2b538f43fc3ada89500b3e8594e8c16e0813c30d25fcff0d5a3 utxo-snapshot-bitcoin-mainnet-651474.tar
587ac27b1929123313f842edbdb798afe116548e2a1bddea46d8d7068a6bc156 utxo-snapshot-bitcoin-mainnet-680891.tar
79d5b28fb140c23602bebaf90e829fc89aef2bb95cb2a5d492cd818f22f01836 utxo-snapshot-bitcoin-mainnet-699714.tar
58b3c9c8a3e5f7b3449521e8d7f8435db2e948918063cb7f5b0e635862e03891 utxo-snapshot-bitcoin-mainnet-720179.tar
83f55203f4fca7d4197ef6261a9d3ce09e1ed308e1ecf969f223eb20038dc1dd utxo-snapshot-bitcoin-mainnet-744358.tar
11b355b08a799e2bef7fffb5dea390d0e23f51ef2c31056fbf8d92e007a3d398 utxo-snapshot-bitcoin-mainnet-769818.tar
725a049bc5a9fd60b05bba4d4825d35115d99f05ab5b7716d4507c295d05172d utxo-snapshot-bitcoin-mainnet-820852.tar
744c42885df700513331a978b289d9c9d5b27e0cf1147f2f5a287b4492ff940c utxo-snapshot-bitcoin-mainnet-867690.tar

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
docker exec btcpayserver_dashd dash-cli -datadir="/data" $args

View File

@ -1,3 +0,0 @@
#!/bin/bash
docker exec btcpayserver_dashd dash-cli -datadir="/data" "$@"

View File

@ -1,5 +1,4 @@
#
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:10.0.201-noble AS builder
FROM microsoft/dotnet:2.1.300-sdk-alpine3.7 AS builder
WORKDIR /source
COPY src/docker-compose-generator.csproj docker-compose-generator.csproj
# Cache some dependencies
@ -7,11 +6,10 @@ RUN dotnet restore
COPY src/. .
RUN dotnet publish --output /app/ --configuration Release
#
FROM mcr.microsoft.com/dotnet/runtime:10.0.5-noble
LABEL org.btcpayserver.image=docker-compose-generator
WORKDIR /datadir
FROM microsoft/dotnet:2.1.0-runtime-alpine3.7
WORKDIR /app
RUN mkdir /datadir
ENV APP_DATADIR=/datadir
VOLUME /datadir

View File

@ -1,122 +0,0 @@
[
{
"Crypto": "ltc",
"CryptoFragment": "litecoin",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "btc",
"CryptoFragment": "bitcoin",
"CLightningFragment": "bitcoin-clightning",
"LNDFragment": "bitcoin-lnd",
"EclairFragment": "bitcoin-eclair",
"PhoenixdFragment": "phoenixd"
},
{
"Crypto": "btx",
"CryptoFragment": "bitcore",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "btg",
"CryptoFragment": "bgold",
"CLightningFragment": null,
"LNDFragment": "bgold-lnd",
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "ftc",
"CryptoFragment": "feathercoin",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "grs",
"CryptoFragment": "groestlcoin",
"CLightningFragment": "groestlcoin-clightning",
"LNDFragment": "groestlcoin-lnd",
"EclairFragment": "groestlcoin-eclair",
"PhoenixdFragment": null
},
{
"Crypto": "via",
"CryptoFragment": "viacoin",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "dash",
"CryptoFragment": "dash",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "doge",
"CryptoFragment": "dogecoin",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "mona",
"CryptoFragment": "monacoin",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "xmr",
"CryptoFragment": "monero",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "bdx",
"CryptoFragment": "beldex",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "lbtc",
"CryptoFragment": "liquid",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "zec",
"CryptoFragment": "zcash",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
},
{
"Crypto": "dcr",
"CryptoFragment": "decred",
"CLightningFragment": null,
"LNDFragment": null,
"EclairFragment": null,
"PhoenixdFragment": null
}
]

View File

@ -1,17 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29519.181
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "docker-compose-generator", "src\docker-compose-generator.csproj", "{0900AF35-48E8-46E2-85B3-BA3847EE0844}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{8C1C711D-DEF1-474C-A9F6-AAE142412528}"
ProjectSection(SolutionItems) = preProject
..\.circleci\config.yml = ..\.circleci\config.yml
linuxamd64.Dockerfile = linuxamd64.Dockerfile
linuxarm32v7.Dockerfile = linuxarm32v7.Dockerfile
linuxarm64v8.Dockerfile = linuxarm64v8.Dockerfile
EndProjectSection
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "docker-compose-generator", "src/docker-compose-generator.csproj", "{0900AF35-48E8-46E2-85B3-BA3847EE0844}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -22,6 +14,9 @@ Global
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0900AF35-48E8-46E2-85B3-BA3847EE0844}.Debug|Any CPU.Build.0 = Debug|Any CPU
@ -36,10 +31,4 @@ Global
{0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|x86.ActiveCfg = Release|Any CPU
{0900AF35-48E8-46E2-85B3-BA3847EE0844}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CADA76A8-7F2E-4132-900B-330F0D2D722B}
EndGlobalSection
EndGlobal

View File

@ -1,31 +0,0 @@
services:
beldexd:
restart: unless-stopped
container_name: btcpayserver_beldexd
image: beldex/beldex:7.0.0
command: beldexd --rpc-bind-ip=0.0.0.0 --confirm-external-bind --rpc-bind-port=19091 --non-interactive --block-notify="/bin/sh ./scripts/notifier.sh -X GET http://btcpayserver:49392/beldexlikedaemoncallback/block?cryptoCode=bdx&hash=%s" --hide-my-port
expose:
- "19091"
volumes:
- "bdx_data:/data"
beldexd_wallet:
restart: unless-stopped
container_name: btcpayserver_beldex_wallet
image: beldex/beldex:7.0.0
command: beldex-wallet-rpc --rpc-bind-ip=0.0.0.0 --disable-rpc-login --confirm-external-bind --rpc-bind-port=19092 --non-interactive --trusted-daemon --daemon-address=beldexd:19091 --wallet-dir=/wallet --tx-notify="/bin/sh ./scripts/notifier.sh -X GET http://btcpayserver:49392/beldexlikedaemoncallback/tx?cryptoCode=bdx&hash=%s"
expose:
- "19092"
volumes:
- "bdx_wallet:/wallet"
depends_on:
- beldexd
btcpayserver:
environment:
BTCPAY_BDX_DAEMON_URI: http://beldexd:19091
BTCPAY_BDX_WALLET_DAEMON_URI: http://beldexd_wallet:19092
BTCPAY_BDX_WALLET_DAEMON_WALLETDIR: /root/bdx_wallet
volumes:
- "bdx_wallet:/root/bdx_wallet"
volumes:
bdx_wallet:
bdx_data:

View File

@ -1,3 +1,5 @@
version: "3"
services:
lnd_bitcoingold:
image: kamigawabul/btglnd:latest
@ -29,12 +31,22 @@ services:
btcpayserver:
environment:
BTCPAY_BTGLIGHTNING: "type=lnd-rest;server=http://lnd_bitcoingold:8080/;macaroonfilepath=/etc/lnd_bitcoingold/admin.macaroon;allowinsecure=true"
BTCPAY_BTCLIGHTNING: "type=lnd-rest;server=http://lnd_bitcoingold:8080/;macaroonfilepath=/etc/lnd_bitcoingold/admin.macaroon;allowinsecure=true"
volumes:
- "lnd_bitcoingold_datadir:/etc/lnd_bitcoingold"
links:
- lnd_bitcoingold
bgoldd:
environment:
BITCOIN_EXTRA_ARGS: |
zmqpubrawtx=tcp://0.0.0.0:28332
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtxlock=tcp://0.0.0.0:28332
zmqpubhashblock=tcp://0.0.0.0:28332
expose:
- "28332"
nginx:
links:
- "lnd_bitcoingold"
@ -47,7 +59,4 @@ services:
- "lnd_bitcoingold_datadir:/lnd"
volumes:
lnd_bitcoingold_datadir:
required:
- "opt-add-zmq"
lnd_bitcoingold_datadir:

View File

@ -1,31 +1,33 @@
version: "3"
services:
bgoldd:
restart: unless-stopped
container_name: btcpayserver_bgoldd
image: kamigawabul/docker-bitcoingold:0.15.2
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bgold_datadir:/data"
restart: unless-stopped
container_name: btcpayserver_bgoldd
image: kamigawabul/docker-bitcoingold:0.15.2
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bgold_datadir:/data"
nbxplorer:
environment:
NBXPLORER_CHAINS: "btg"
NBXPLORER_BTGRPCURL: http://bgoldd:43782/
NBXPLORER_BTGNODEENDPOINT: bgoldd:39388
volumes:
- "bgold_datadir:/root/.bitcoingold"
environment:
NBXPLORER_CHAINS: "btg"
NBXPLORER_BTGRPCURL: http://bgoldd:43782/
NBXPLORER_BTGNODEENDPOINT: bgoldd:39388
links:
- bgoldd
volumes:
- "bgold_datadir:/root/.bitcoingold"
btcpayserver:
environment:
BTCPAY_CHAINS: "btg"
BTCPAY_BTGEXPLORERURL: http://nbxplorer:32838/
environment:
BTCPAY_CHAINS: "btg"
BTCPAY_BTGEXPLORERURL: http://nbxplorer:32838/
volumes:
bgold_datadir:
required:
- "nbxplorer"

View File

@ -1,82 +1,37 @@
version: "3"
services:
clightning_bitcoin:
image: btcpayserver/lightning:v26.06.1
image: nicolasdorier/clightning:v0.6.1
container_name: btcpayserver_clightning_bitcoin
restart: unless-stopped
environment:
LIGHTNINGD_NETWORK: ${NBITCOIN_NETWORK:-regtest}
LIGHTNINGD_CHAIN: btc
LIGHTNINGD_ALIAS: ${LIGHTNING_ALIAS}
LIGHTNINGD_ANNOUNCEADDR: ${BTCPAY_ANNOUNCEABLE_HOST}
LIGHTNINGD_PORT: 9735
LIGHTNINGD_READY_FILE: /root/.nbxplorer/btc_fully_synched
LIGHTNINGD_EXPLORERURL: "http://nbxplorer:32838/"
LIGHTNINGD_OPT: |
bitcoin-datadir=/etc/bitcoin
bitcoin-rpcconnect=bitcoind
database-upgrade=true
rpc-file-mode=0666
clnrest-port=3010
clnrest-protocol=http
clnrest-host=0.0.0.0
grpc-port=9736
announce-addr=${BTCPAY_HOST}:9735
bind-addr=0.0.0.0:9735
network=${NBITCOIN_NETWORK:-regtest}
alias=${LIGHTNING_ALIAS}
chain=btc
volumes:
- "clightning_bitcoin_datadir:/root/.lightning"
- "bitcoin_datadir:/etc/bitcoin"
- "nbxplorer_datadir:/root/.nbxplorer"
ports:
- "9735:9735"
- "3010"
expose:
- "9736"
links:
- nbxplorer
- bitcoind
bitcoin_rtl:
image: shahanafarooqui/rtl:v0.15.4
restart: unless-stopped
environment:
LN_IMPLEMENTATION: CLN
CONFIG_PATH: /root/.lightning/config
LN_SERVER_URL: http://clightning_bitcoin:3010
RUNE_PATH: /root/.lightning/rune.env
RTL_CONFIG_PATH: /data/
BITCOIND_CONFIG_PATH: /etc/bitcoin/bitcoin.conf
RTL_SSO: 1
RTL_COOKIE_PATH: /data/.cookie
LOGOUT_REDIRECT_LINK: /server/services
labels:
traefik.enable: "true"
traefik.http.routers.bitcoin_rtl.rule: Host(`${BTCPAY_HOST}`) && (Path(`/rtl`) || PathPrefix(`/rtl/`))
volumes:
- "clightning_bitcoin_datadir:/root/.lightning"
- "bitcoin_datadir:/etc/bitcoin"
- "clightning_bitcoin_rtl_datadir:/data"
expose:
- "3000"
mempool_api:
environment:
LIGHTNING_ENABLED: "true"
LIGHTNING_BACKEND: "cln"
CLIGHTNING_SOCKET: "/etc/lightning/lightning-rpc"
volumes:
- "clightning_bitcoin_datadir:/etc/lightning"
mempool_web:
environment:
LIGHTNING: "true"
btcpayserver:
environment:
BTCPAY_BTCLIGHTNING: "type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc"
BTCPAY_BTCEXTERNALRTL: "server=/rtl/api/authenticate/cookie;cookiefile=/etc/clightning_bitcoin_rtl/.cookie"
volumes:
- "clightning_bitcoin_datadir:/etc/clightning_bitcoin"
- "clightning_bitcoin_rtl_datadir:/etc/clightning_bitcoin_rtl"
links:
- clightning_bitcoin
volumes:
clightning_bitcoin_datadir:
clightning_bitcoin_rtl_datadir:
exclusive:
- lightning
clightning_bitcoin_datadir:

View File

@ -1,82 +0,0 @@
services:
bitcoind:
environment:
BITCOIN_EXTRA_ARGS: |
rpcauth=eclair:d3a244200d5c946f6bef48e6583ec979$$215049513aef33245dfec8ff3ab5e749458fde51ede931dec04c767c0732d468
eclair_bitcoin:
container_name: btcpayserver_eclair_bitcoin
restart: unless-stopped
stop_signal: SIGINT
image: acinq/eclair:release-0.7.0
environment:
PUBLIC_HOST: ${BTCPAY_HOST}
JAVA_OPTS: |
-Declair.printToConsole
-Declair.headless
-Declair.chain=${NBITCOIN_NETWORK:-regtest}
-Declair.server.binding-ip=0.0.0.0
-Declair.server.public-ips.0=${BTCPAY_HOST}
-Declair.server.port=9735
-Declair.api.enabled=true
-Declair.api.binding-ip=0.0.0.0
-Declair.api.port=8080
-Declair.node-alias=${LIGHTNING_ALIAS}
-Declair.api.password=DwubwWsoo3
-Declair.bitcoind.host=bitcoind
-Declair.bitcoind.rpcport=43782
-Declair.bitcoind.rpcuser=eclair
-Declair.bitcoind.rpcpassword=sFLjcg99Puh4k3CAZCQkLvC-fcoFUFRyKwKcXQKa7dw=
-Declair.bitcoind.zmqblock=tcp://bitcoind:28334
-Declair.bitcoind.zmqtx=tcp://bitcoind:28333
expose:
- "9735" # server port
- "8080" # api port
volumes:
- "bitcoin_datadir:/etc/bitcoin"
- "eclair_bitcoin_datadir:/data"
links:
- bitcoind
bitcoin_rtl:
image: shahanafarooqui/rtl:v0.15.4
restart: unless-stopped
environment:
LN_IMPLEMENTATION: ECL
LN_SERVER_URL: http://eclair_bitcoin:8080
LN_API_PASSWORD: DwubwWsoo3
BITCOIND_CONFIG_PATH: /etc/bitcoin/bitcoin.conf
RTL_SSO: 1
RTL_COOKIE_PATH: /data/.cookie
LOGOUT_REDIRECT_LINK: /server/services
volumes:
- "bitcoin_datadir:/etc/bitcoin"
- "eclair_bitcoin_datadir:/etc/eclair"
- "eclair_bitcoin_rtl_datadir:/data"
expose:
- "3000"
labels:
traefik.enable: "true"
traefik.http.routers.bitcoin_rtl.rule: Host(`${BTCPAY_HOST}`) && (Path(`/rtl`) || PathPrefix(`/rtl/`))
links:
- eclair_bitcoin
btcpayserver:
environment:
BTCPAY_BTCLIGHTNING: "type=eclair;server=http://eclair_bitcoin:8080;password=DwubwWsoo3"
BTCPAY_BTCEXTERNALRTL: "server=/rtl/api/authenticate/cookie;cookiefile=/etc/eclair_bitcoin_rtl/.cookie"
volumes:
- "eclair_bitcoin_datadir:/etc/eclair_bitcoin"
- "eclair_bitcoin_rtl_datadir:/etc/eclair_bitcoin_rtl"
links:
- eclair_bitcoin
volumes:
eclair_bitcoin_datadir:
eclair_bitcoin_rtl_datadir:
incompatible:
- pruning
required:
- "opt-add-zmq"
- "opt-txindex"
exclusive:
- lightning

View File

@ -1,99 +1,58 @@
version: "3"
services:
lnd_bitcoin:
image: btcpayserver/lnd:v0.19.3-beta-1
image: btcpayserver/lnd:0.5-beta
container_name: btcpayserver_lnd_bitcoin
restart: unless-stopped
environment:
LND_CHAIN: "btc"
LND_EXTERNALIP: ${BTCPAY_ANNOUNCEABLE_HOST}
LND_PORT: 9735
LND_ALIAS: ${LIGHTNING_ALIAS}
LND_ENVIRONMENT: "${NBITCOIN_NETWORK:-regtest}"
LND_READY_FILE: /root/.nbxplorer/btc_fully_synched
LND_REST_LISTEN_HOST: http://lnd_bitcoin:8080
LND_HOST_FOR_LOOP: 127.0.0.1:10009
LND_EXPLORERURL: "http://nbxplorer:32838/"
LND_EXTRA_ARGS: |
restlisten=lnd_bitcoin:8080
restlisten=0.0.0.0:8080
rpclisten=127.0.0.1:10008
rpclisten=lnd_bitcoin:10009
rpclisten=127.0.0.1:10009
rpclisten=0.0.0.0:10009
bitcoin.node=bitcoind
bitcoind.rpchost=bitcoind:43782
bitcoind.rpcuser=lnd
bitcoind.rpcpass=afixedpasswordbecauselndsuckswithcookiefile
bitcoind.zmqpubrawblock=tcp://bitcoind:28332
bitcoind.zmqpubrawtx=tcp://bitcoind:28333
externalip=${BTCPAY_HOST}:9735
alias=${LIGHTNING_ALIAS}
adminmacaroonpath=/data/admin.macaroon
invoicemacaroonpath=/data/invoice.macaroon
readonlymacaroonpath=/data/readonly.macaroon
tlsextradomain=lnd_bitcoin
no-rest-tls=1
protocol.wumbo-channels=1
noseedbackup=1
notls=1
ports:
- "9735:9735"
expose:
- "8080"
- "8081"
- "9735"
volumes:
- "lnd_bitcoin_datadir:/data"
- "lndloop_bitcoin_datadir:/root/.loop/${NBITCOIN_NETWORK:-regtest}"
- "bitcoin_datadir:/deps/.bitcoin"
- "nbxplorer_datadir:/root/.nbxplorer"
links:
- nbxplorer
- bitcoind
bitcoin_rtl:
image: shahanafarooqui/rtl:v0.15.4
container_name: generated_lnd_bitcoin_rtl_1
restart: unless-stopped
environment:
LND_SERVER_URL: http://lnd_bitcoin:8080/v1
MACAROON_PATH: /etc/lnd
SWAP_SERVER_URL: https://lnd_bitcoin:8081/v1
SWAP_MACAROON_PATH: /etc/lndloop
RTL_CONFIG_PATH: /data/
LND_CONFIG_PATH: /etc/lnd/lnd.conf
BITCOIND_CONFIG_PATH: /etc/bitcoin/bitcoin.conf
RTL_SSO: 1
RTL_COOKIE_PATH: /data/.cookie
LOGOUT_REDIRECT_LINK: /server/services
volumes:
- "bitcoin_datadir:/etc/bitcoin"
- "lnd_bitcoin_datadir:/etc/lnd"
- "lnd_bitcoin_datadir:/root/.lnd"
- "lndloop_bitcoin_datadir:/etc/lndloop"
- "lnd_bitcoin_rtl_datadir:/data"
expose:
- "3000"
labels:
traefik.enable: "true"
traefik.http.routers.bitcoin_rtl.rule: Host(`${BTCPAY_HOST}`) && (Path(`/rtl`) || PathPrefix(`/rtl/`))
links:
- lnd_bitcoin
btcpayserver:
environment:
BTCPAY_BTCLIGHTNING: "type=lnd-rest;server=http://lnd_bitcoin:8080/;macaroonfilepath=/etc/lnd_bitcoin/admin.macaroon;allowinsecure=true"
BTCPAY_BTCEXTERNALRTL: "server=/rtl/api/authenticate/cookie;cookiefile=/etc/lnd_bitcoin_rtl/.cookie"
BTCPAY_BTCEXTERNALLNDGRPC: "server=/;macaroonfilepath=/etc/lnd_bitcoin/admin.macaroon;macaroondirectorypath=/etc/lnd_bitcoin"
BTCPAY_BTCEXTERNALLNDREST: "server=/lnd-rest/btc/;macaroonfilepath=/etc/lnd_bitcoin/admin.macaroon;macaroondirectorypath=/etc/lnd_bitcoin"
BTCPAY_BTCEXTERNALLNDSEEDBACKUP: "/etc/lnd_bitcoin/data/chain/bitcoin/${NBITCOIN_NETWORK:-regtest}/walletunlock.json"
BTCPAY_BTCEXTERNALLNDGRPC: "type=lnd-grpc;server=${BTCPAY_PROTOCOL:-https}://${BTCPAY_HOST}/;macaroonfilepath=/etc/lnd_bitcoin/admin.macaroon"
volumes:
- "lnd_bitcoin_datadir:/etc/lnd_bitcoin"
- "lnd_bitcoin_rtl_datadir:/etc/lnd_bitcoin_rtl"
links:
- lnd_bitcoin
bitcoind:
environment:
BITCOIN_EXTRA_ARGS: |
# rpcuser=lnd
# rpcpassword=afixedpasswordbecauselndsuckswithcookiefile
# We need to use rpcauth because we also need cookieauth. rpcpassword disabled cookie file auth.
# Be careful if you copy the line below from the docker-compose.yml! A dollar sign is escaped.
rpcauth=lnd:d031f7567c5b02ba95524170e51c77f4$$827ce5412f653d6613c2f480e521eb437c866b999bdeb2ee4f9c41d3b00dff1c
zmqpubrawblock=tcp://0.0.0.0:28332
zmqpubrawtx=tcp://0.0.0.0:28333
expose:
- "28332"
- "28333"
nginx:
links:
- "lnd_bitcoin"
@ -105,29 +64,5 @@ services:
volumes:
- "lnd_bitcoin_datadir:/lnd"
mempool_api:
environment:
LIGHTNING_ENABLED: "true"
LIGHTNING_BACKEND: "lnd"
LND_TLS_CERT_PATH: "/etc/lnd/tls.cert"
LND_MACAROON_PATH: "/etc/lnd/readonly.macaroon"
LND_REST_API_URL: "http://lnd_bitcoin:8080"
LND_TIMEOUT: 1000000
volumes:
- "lnd_bitcoin_datadir:/etc/lnd"
mempool_web:
environment:
LIGHTNING: "true"
volumes:
lnd_bitcoin_datadir:
lndloop_bitcoin_datadir:
lnd_bitcoin_rtl_datadir:
recommended:
- "opt-lnd-grpc"
required:
- "opt-add-zmq"
exclusive:
- lightning
lnd_bitcoin_datadir:

View File

@ -1,46 +1,33 @@
version: "3"
services:
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: btcpayserver/bitcoin:29.2
environment:
BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest}
CREATE_WALLET: "false"
BITCOIN_WALLETDIR: "/walletdata"
# rpcport and rpcbind seems duplicates, but they are not
# rpcport is using by some tooling to automatically get
# the rpcport from the configuration file. Do not remove!
BITCOIN_EXTRA_ARGS: |
rpcport=43782
rpcbind=0.0.0.0:43782
rpcallowip=0.0.0.0/0
port=39388
whitelist=0.0.0.0/0
maxmempool=500
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
- "bitcoin_wallet_datadir:/walletdata"
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: nicolasdorier/docker-bitcoin:0.16.3
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
nbxplorer:
environment:
NBXPLORER_CHAINS: "btc"
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "bitcoin_datadir:/root/.bitcoin"
environment:
NBXPLORER_CHAINS: "btc"
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
links:
- bitcoind
volumes:
- "bitcoin_datadir:/root/.bitcoin"
btcpayserver:
environment:
BTCPAY_CHAINS: "btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
environment:
BTCPAY_CHAINS: "btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
volumes:
bitcoin_datadir:
bitcoin_wallet_datadir:
exclusive:
- bitcoin-node
recommended:
- "opt-mempoolfullrbf"
required:
- "nbxplorer"
bitcoin_datadir:

View File

@ -1,46 +0,0 @@
services:
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: btcpayserver/bitcoin:31.0
environment:
BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest}
CREATE_WALLET: "false"
BITCOIN_WALLETDIR: "/walletdata"
# rpcport and rpcbind seems duplicates, but they are not
# rpcport is using by some tooling to automatically get
# the rpcport from the configuration file. Do not remove!
BITCOIN_EXTRA_ARGS: |
rpcport=43782
rpcbind=0.0.0.0:43782
rpcallowip=0.0.0.0/0
port=39388
whitelist=0.0.0.0/0
maxmempool=500
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
- "bitcoin_wallet_datadir:/walletdata"
nbxplorer:
environment:
NBXPLORER_CHAINS: "btc"
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "bitcoin_datadir:/root/.bitcoin"
btcpayserver:
environment:
BTCPAY_CHAINS: "btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
volumes:
bitcoin_datadir:
bitcoin_wallet_datadir:
exclusive:
- bitcoin-node
recommended:
- "opt-mempoolfullrbf"
required:
- "nbxplorer"

View File

@ -1,46 +0,0 @@
services:
bitcoind:
restart: unless-stopped
container_name: btcpayserver_bitcoind
image: btcpayserver/bitcoinknots:29.3.knots20260508
environment:
BITCOIN_NETWORK: ${NBITCOIN_NETWORK:-regtest}
CREATE_WALLET: "false"
BITCOIN_WALLETDIR: "/walletdata"
# rpcport and rpcbind seems duplicates, but they are not
# rpcport is using by some tooling to automatically get
# the rpcport from the configuration file. Do not remove!
BITCOIN_EXTRA_ARGS: |
rpcport=43782
rpcbind=0.0.0.0:43782
rpcallowip=0.0.0.0/0
port=39388
whitelist=0.0.0.0/0
maxmempool=500
expose:
- "43782"
- "39388"
volumes:
- "bitcoin_datadir:/data"
- "bitcoin_wallet_datadir:/walletdata"
nbxplorer:
environment:
NBXPLORER_CHAINS: "btc"
NBXPLORER_BTCRPCURL: http://bitcoind:43782/
NBXPLORER_BTCNODEENDPOINT: bitcoind:39388
volumes:
- "bitcoin_datadir:/root/.bitcoin"
btcpayserver:
environment:
BTCPAY_CHAINS: "btc"
BTCPAY_BTCEXPLORERURL: http://nbxplorer:32838/
volumes:
bitcoin_datadir:
bitcoin_wallet_datadir:
exclusive:
- bitcoin-node
recommended:
- "opt-mempoolfullrbf"
required:
- "nbxplorer"

View File

@ -1,35 +0,0 @@
services:
bitcoinplusd:
restart: unless-stopped
container_name: btcpayserver_bitcoinplusd
image: chekaz/docker-bitcoinplus:2.7.0
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcoinplus_datadir:/data"
nbxplorer:
environment:
NBXPLORER_CHAINS: "xbc"
NBXPLORER_XBCRPCURL: http://bitcoinplusd:43782/
NBXPLORER_XBCNODEENDPOINT: bitcoinplusd:39388
NBXPLORER_XBCRPCUSER: "NBXPLORER_XBCRPCUSER"
NBXPLORER_XBCRPCPASSWORD: "NBXPLORER_XBCRPCPASS"
links:
- bitcoinplusd
volumes:
- "bitcoinplus_datadir:/root/.bitcoinplus"
btcpayserver:
environment:
BTCPAY_CHAINS: "xbc"
BTCPAY_TZCEXPLORERURL: http://nbxplorer:32838/
volumes:
bitcoinplus_datadir:
required:
- "nbxplorer"

View File

@ -1,34 +0,0 @@
services:
bitcored:
restart: unless-stopped
container_name: btcpayserver_bitcored
image: dalijolijo/docker-bitcore:0.90.9.10
environment:
BITCOIN_EXTRA_ARGS: |
rpcport=43782
${NBITCOIN_NETWORK:-regtest}=1
port=39388
whitelist=0.0.0.0/0
expose:
- "43782"
- "39388"
volumes:
- "bitcore_datadir:/data"
nbxplorer:
environment:
NBXPLORER_CHAINS: "btx"
NBXPLORER_BTXRPCURL: http://bitcored:43782/
NBXPLORER_BTXNODEENDPOINT: bitcored:39388
links:
- bitcored
volumes:
- "bitcore_datadir:/root/.bitcore"
btcpayserver:
environment:
BTCPAY_BTXEXPLORERURL: http://nbxplorer:32838/
BTCPAY_CHAINS: "btx"
volumes:
bitcore_datadir:
required:
- "nbxplorer"

View File

@ -1,14 +0,0 @@
services:
btcpayserver:
environment:
# NGINX settings
VIRTUAL_NETWORK: nginx-proxy
VIRTUAL_PORT: 49392
VIRTUAL_HOST: ${BTCPAY_HOST},${BTCPAY_ADDITIONAL_HOSTS}
VIRTUAL_HOST_NAME: "btcpay"
SSL_POLICY: Mozilla-Modern
# Let's encrypt settings
LETSENCRYPT_HOST: ${BTCPAY_HOST},${BTCPAY_ADDITIONAL_HOSTS}
LETSENCRYPT_EMAIL: ${LETSENCRYPT_EMAIL:-<no value>}

Some files were not shown because too many files have changed in this diff Show More