Giter Site home page Giter Site logo

btcpayserver-docker's Introduction

CircleCI

Start accepting Bitcoin today with BTCPay Server! This guide will walk you through the installation.

Introduction

While our instructions cover how to install BTCPayServer in one click on Azure or Lunanode, BTCPay Server is not limited to those options.

You will find below information about how you can install BTCPay Server easily in any environment having docker available.

Architecture

Architecture

As you can see, BTCPay depends on several pieces of infrastructure, mainly:

  • A lightweight block explorer (NBXplorer),
  • A database (PostgreSQL),
  • A full node (eg. Bitcoin Core)

There can be more dependencies if you support more than just standard Bitcoin transactions, including:

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.

Here is a presentation of the global architecture at Advancing Bitcoin conference.

BTCPay - Architecture overview

Full installation (for technical users)

You can also install BTCPay Server 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.

Let's assume your domain 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 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 can be tailored to your needs. Some variables require additional storage space.

# Login as root
sudo su -

# Create a folder for BTCPay
mkdir BTCPayServer
cd BTCPayServer

# Clone this repository
git clone https://github.com/btcpayserver/btcpayserver-docker
cd btcpayserver-docker

# Run btcpay-setup.sh with the right parameters
export BTCPAY_HOST="btcpay.EXAMPLE.com"
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-s"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAYGEN_LIGHTNING="clightning"
export BTCPAY_ENABLE_SSH=true
. ./btcpay-setup.sh -i

exit

btcpay-setup.sh will then:

  • Install Docker
  • Install Docker-Compose
  • 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

Video below guides you step by step on how to set up BTCPay Server on a VPS with Docker.

Check out this video if you're interested in learning more about setting up BTCPay with Docker Compose.

Docker automated build

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. 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, Default: (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. [email protected])
  • 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.
  • 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, 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)
  • EPS_XPUB: If Electrum Personal Server (EPS) is activated with opt-add-electrum-ps, 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, 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, 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, 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, for setup instructions see documentation)

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)
  • 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

Under the hood

Generated docker-compose

When you run btcpay-setup.sh, your environment variables are used by build.sh (or build.ps1) to generate a docker-compose adapted for your needs. For the full list of options, see: Environment variables

By default, the generated file is Generated/docker-compose.generated.yml, constructed from the relevant Docker fragments for your setup.

Available BTCPAYGEN_ADDITIONAL_FRAGMENTS currently are:

You can also create your own custom fragments.

If you want to add an option to BTCPAYGEN_ADDITIONAL_FRAGMENTS and re-configure your install:

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):

Invoke-Command {
    $BTCPAYGEN_CRYPTO1="btc"
    $BTCPAYGEN_CRYPTO2="ltc"
    $BTCPAYGEN_REVERSEPROXY="nginx"
    $BTCPAYGEN_LIGHTNING="clightning"
    $BTCPAYGEN_SUBNAME="custom"
    . .\build.ps1
}

On Linux:

BTCPAYGEN_CRYPTO1="btc" \
BTCPAYGEN_CRYPTO2="ltc" \
BTCPAYGEN_REVERSEPROXY="nginx" \
BTCPAYGEN_LIGHTNING="clightning" \
BTCPAYGEN_SUBNAME="custom" \
./build.sh

Next, you will need to configure the runtime environment variables for Generated/docker-compose.custom.yml:

Again, what does btcpay-setup.sh do?

btcpay-setup.sh is a utility which does the following:

  1. Makes sure docker and docker-compose are installed on your system
  2. Generates a docker-compose via ./build.sh
  3. Sets up an Environment File to configure your docker-compose
  4. Sets up environment variables so the tools described in Tooling can work
  5. Adds symlinks of those tools into /usr/bin
  6. Makes sure BTCPay restarts on reboot via upstart or systemd
  7. Starts BTCPay via docker-compose

Overview of files generated by btcpay-setup.sh

/etc/profile.d/btcpay-env.sh ensures that your environment variables are correctly setup when you login, so you can use the tools:

export BTCPAYGEN_OLD_PREGEN="false"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_CRYPTO2=""
export BTCPAYGEN_CRYPTO3=""
export BTCPAYGEN_CRYPTO4=""
export BTCPAYGEN_CRYPTO5=""
export BTCPAYGEN_CRYPTO6=""
export BTCPAYGEN_CRYPTO7=""
export BTCPAYGEN_CRYPTO8=""
export BTCPAYGEN_CRYPTO9=""
export BTCPAYGEN_LIGHTNING="clightning"
export BTCPAYGEN_REVERSEPROXY="nginx"
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 $(grep -v '^#' "$BTCPAY_ENV_FILE" | xargs)
fi

/etc/systemd/system/btcpayserver.service ensures that you can control btcpay via systemctl, and that BTCPayServer starts on reboot:

[Unit]
Description=BTCPayServer service
After=docker.service network-online.target
Requires=docker.service network-online.target

[Service]
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'

[Install]
WantedBy=multi-user.target

.env ($BTCPAY_ENV_FILE) contains environment variables passed to the containers managed by your docker-compose:

BTCPAY_HOST=btcpay.EXAMPLE.com
ACME_CA_URI=production
NBITCOIN_NETWORK=mainnet
LETSENCRYPT_EMAIL[email protected]
BTCPAY_SSHTRUSTEDFINGERPRINTS=SHA256:eSCD7NtQ/Q6IBl2iRB9caAQ3lDZd8s8iUL6SdeNnhpA
BTCPAY_SSHKEYFILE=/datadir/id_rsa

How can I add an altcoin to BTCPayServer?

  1. Add support for your crypto to NBitcoin, NBxplorer, and BTCPayServer. (Use examples from other coins)
  2. Create your own docker image (Example for BTC)
  3. Create a docker-compose fragment (Example for BTC)
  4. Add your CryptoDefinition (Example for BTC)

build.sh is using a pre-built image of the docker-compose generator on docker hub. If you modify the code source of docker-compose generator (for example, the CryptoDefinition Example for BTC), 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.

cd docker-compose-generator
BTCPAYGEN_DOCKER_IMAGE="btcpayserver/docker-compose-generator:local"

Or on 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 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/lightning v24.05 ✔️ ✔️ ✔️ Github - DockerHub
shahanafarooqui/rtl 0.15.0 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/lnd v0.18.1-beta ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/bitcoin 26.0 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/btcpayserver 1.13.5$<BTCPAY_BUILD_CONFIGURATION>? ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/monero 0.18.3.3 ✔️ ✔️ ✔️ Github - DockerHub
nicolasdorier/nbxplorer 2.5.6 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/letsencrypt-nginx-proxy-companion 2.2.9-2 ✔️ ✔️ ✔️ Github - DockerHub
nginx 1.25.3-bookworm ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/docker-gen 0.10.7 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/btctransmuter 0.0.59 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/cloudflared 2023.10.0 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/btcpayserver-configurator 0.0.21 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/eps 0.2.2 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/joinmarket 0.9.5 ✔️ ✔️ ✔️ Github - DockerHub
nicolasdorier/ndlc-cli 1.0.1 ✔️ ✔️ ✔️ Github - DockerHub
pihole/pihole 2023.05.2 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/snapdrop 1.2 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/tor 0.4.8.10 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/woocommerce 3.1.0 ✔️ ️❌ ✔️ Github - DockerHub
btcpayserver/postgres 13.13 ✔️ ✔️ ✔️ Github - DockerHub
kamigawabul/btglnd latest ✔️ ️❌ ️❌ Github - DockerHub
kamigawabul/docker-bitcoingold 0.15.2 ✔️ ️❌ ️❌ Github - DockerHub
acinq/eclair release-0.7.0 ✔️ ️❌ ️❌ Github - DockerHub
chekaz/docker-bitcoinplus 2.7.0 ✔️ ️❌ ️❌ Github - DockerHub
dalijolijo/docker-bitcore 0.90.9.10 ✔️ ️❌ ️❌ Github - DockerHub
btcpayserver/dash 20.1.0 ✔️ ️❌ ✔️ Github - DockerHub
btcpayserver/dogecoin 1.14.7 ✔️ ️❌ ️❌ Github - DockerHub
chekaz/docker-feathercoin 0.16.3 ✔️ ️❌ ️❌ Github - DockerHub
groestlcoin/lightning v23.05 ✔️ ️❌ ️❌ Github - DockerHub
groestlcoin/groestlcoin-lightning-charge version-0.4.22 ✔️ ️❌ ️❌ Github - DockerHub
groestlcoin/groestlcoin-spark version-0.2.16 ✔️ ️❌ ️❌ Github - DockerHub
groestlcoin/eclair v0.6.0 ✔️ ️❌ ️❌ Github - DockerHub
groestlcoin/lnd v0.10.0-grs ✔️ ️❌ ️❌ Github - DockerHub
btcpayserver/groestlcoin 25.0 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/elements 23.2.1 ✔️ ✔️ ✔️ Github - DockerHub
btcpayserver/litecoin 0.21.2.1-2 ✔️ ✔️ ✔️ Github - DockerHub
wakiyamap/docker-monacoin 0.20.2 ✔️ ️❌ ️❌ Github - DockerHub
redis 6.2.2-buster ✔️ ️❌ ️❌ Github - DockerHub
jvandrew/btcqbo 0.3.36 ✔️ ️❌ ️❌ Github - DockerHub
shesek/bwt 0.2.2-electrum ✔️ ✔️ ✔️ Github - DockerHub
chatwoot/chatwoot v1.7.0 ✔️ ✔️ ✔️ Github - DockerHub
lukechilds/electrumx latest ✔️ ️❌ ️❌ Github - DockerHub
fireflyiii/core latest ✔️ ✔️ ✔️ Github - DockerHub
podcastindexorg/podcasting20-helipad v0.1.10 ✔️ ✔️ ✔️ Github - DockerHub
jvandrew/librepatron 0.7.39 ✔️ ️❌ ️❌ Github - DockerHub
jvandrew/isso atron.22 ✔️ ️❌ ️❌ Github - DockerHub
lightninglabs/lightning-terminal v0.12.3-alpha-path-prefix ✔️ ️❌ ✔️ Github - DockerHub
mempool/frontend v2.5.0 ✔️ ✔️ ✔️ Github - DockerHub
mempool/backend v2.5.0 ✔️ ✔️ ✔️ Github - DockerHub
mariadb 10.11 ✔️ ️❌ ️❌ Github - DockerHub
kukks/nnostr-relay v0.0.23 ✔️ ✔️ ✔️ Github - DockerHub
sphinxlightning/sphinx-relay v2.2.9 ✔️ ✔️ ✔️ Github - DockerHub
djbooth007/tallycoin_connect v1.8.0 ✔️ ✔️ ✔️ Github - DockerHub
benjaminchodroff/rust-teos latest ✔️ ️❌ ️❌ Github - DockerHub
apotdevin/thunderhub base-v0.13.29 ✔️ ✔️ ✔️ Github - DockerHub
lncapital/torq 0.20.3 ✔️ ✔️ ✔️ Github - DockerHub
timescale/timescaledb latest-pg14 ✔️ ✔️ ✔️ Github - DockerHub
zammad/zammad-docker-compose zammad-postgresql-3.4.0-4 ✔️ ️❌ ️❌ Github - DockerHub
memcached 1.5.22-alpine ✔️ ️❌ ️❌ Github - DockerHub
traefik v2.6 ✔️ ️❌ ️❌ Github - DockerHub
chekaz/docker-trezarcoin 0.13.0 ✔️ ️❌ ️❌ Github - DockerHub
romanornr/docker-viacoin 0.15.2 ✔️ ️❌ ️❌ Github - DockerHub

FAQ

How can I modify my environment?

As root, run . btcpay-setup.sh; this will show you the environment variable it is expecting. For example, if you support btc and ltc already, and want to add btg:

export BTCPAYGEN_CRYPTO3='btg'
. btcpay-setup.sh -i

I deployed before btcpay-setup.sh existed (before May 17, 2018), can I migrate to this new system?

Yes, run the following commands to update:

sudo su -

cd $DOWNLOAD_ROOT/btcpayserver-docker
git checkout master
git pull
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:

$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.

How I can prune my node(s)?

This will prune your Bitcoin full node to a maximum of 100GB (of blocks):

export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage"
. ./btcpay-setup.sh -i

Other options are documented here.

How can I customize the generated docker-compose file?

In some instances, you might want to customize your environment in more detail. While you could modify Generated/docker-compose.generated.yml manually, your changes would be overwritten the next time you run btcpay-update.sh.

Luckily, you can leverage BTCPAYGEN_ADDITIONAL_FRAGMENTS for this!

Let's enable pruning to 60 GB, for example:

First, copy opt-save-storage into the the docker fragment folder as opt-save-storage.custom.yml. Important: the file must end with .custom.yml, or there will be git conflicts whenever you run btcpay-update.sh.

Modify the new opt-save-storage.custom.yml file to your taste:

@@ -14,8 +14,7 @@ version: "3"
 services:
   bitcoind:
     environment:
-       BITCOIN_EXTRA_ARGS: prune=100000
+       BITCOIN_EXTRA_ARGS: prune=60000

Then set it up:

export BTCPAYGEN_ADDITIONAL_FRAGMENTS="$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.

How can I back up my BTCPay Server?

See the Backup & Restore guide in our documentation.

For backwards compatibility: Click here for the description of the old backup.sh process

:::warning Please consider switching to the new Backup & Restore process, because the backup.sh will not be maintained anymore. ::: We provide a backup script that dumps the database and saves the important files:

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).
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:

cd "$BTCPAY_BASE_DIRECTORY/btcpayserver-docker"
./backup.sh --only-db

How can I connect to the database?

On the server you can open a database session by connecting via psql as the postgres user:

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:

# 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:

# 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.

btcpayserver-docker's People

Contributors

apotdevin avatar astupidmoose avatar bas02 avatar britttttk avatar ch4ot1c avatar dennisreimann avatar eskyee avatar gruve-p avatar jeffvandrewjr avatar jooray avatar junderw avatar kukks avatar m3dwards avatar maltokyo avatar ndeet avatar nicolasdorier avatar pavlenex avatar petzsch avatar riccardomasutti avatar rockstardev avatar rsafier avatar sethforprivacy avatar shesek avatar snogcel avatar strophy avatar vutov avatar wakiyamap avatar wiz avatar woutersamaey avatar xpayserver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

btcpayserver-docker's Issues

BTCPayServer Repos

How would you feel about btcpayserver-docker and btcpayserver-azure being merged into a singular repo: btcpayserver-deploy? Each platform would have its own directory, in addition to a toplevel docs/ directory.

That way, btcpayserver/btcpayserver can stay as-is (./build.sh-driven build), and also have internals-specific docs in a docs/ dir.

I like the current layout with WooCommerce / Drupal Commerce / Magento / WHMCS / Prestashop as 'plugin' repos; their default configuration(s) & yet another docs/ can also be in each of these repos. I think they should all have the suffix -plugin.

This all could also make the btcpayserver-docs repo obsolete... But perhaps it can be reorganized / repurposed.

updating

Current Version is BTCPayServer v1.0.3.54
Tried it with Server Settings > Maintenance > Update "The server might restart soon if an update is available..." but version stays the same.
Then via ssh with
sudo su -
btcpay-update.sh

Updating c02d7c4..52d987a
error: Your local changes to the following files would be overwritten by merge:
Production/nginx.tmpl
docker-compose-generator/docker-fragments/bitcoin-clightning.yml
docker-compose-generator/docker-fragments/bitcoin-lnd.yml
docker-compose-generator/docker-fragments/btcpayserver.yml
docker-compose-generator/docker-fragments/groestlcoin-clightning.yml
docker-compose-generator/docker-fragments/groestlcoin.yml
docker-compose-generator/docker-fragments/litecoin-lnd.yml
Please commit your changes or stash them before you merge.
Aborting

How do i commit/stash changes? (what changes are meant by the way?), couldn't find anything in the FAQs.

[Feature Request] Database Backups

It would be nice to be able to easily backup and restore a BTCPay instance.

The backup could be just a shell script that executes this command that @lightbo_lt uses: https://chat.btcpayserver.org/btcpayserver/pl/bi15ze9iipgrueaw7zcj4pmd4r Maybe that could even run as like a cron job.

I'm not a PostgreSQL expert so I'm not sure exactly how the restore side of that would work, but if you've got the dump from the command above there must be a way straightforward way to restore it.

BTCPay generates bitcoin addresses with big gap limit

Hello!

UPDATE: first message here about problem when i didn't understand a root of problem. From second message here i described a problem.

I installed BTCPay and tested Lightning & Bitcoin

After first installation there everything worked fine. I had put "xpub" key, i sent bitcoins and created by BTCPay addresses were valid. I redeemed bitcoins from wallet (Mycelium)
But after i made reconfiguration (#50) of lighting node. I reconfigured lighting but i didn't change bitcoin settings and not tested addresses again.

Now i see in bitcoin configuration right XPUB key but now it has suffix as -[legacy]
Now i see under xpub field there "No ledger wallet detected. If you own one, use chrome, open the app, and refresh this page" but invoices are created and bitcoin addresses too. But now bitcoin addresses are not valid for my wallet (for xpub).

I sent $132 to invoice created by me for deponstration to people but now i cannot understand what deriviation path was used for this (1CRacBeizMMwoNZ9BAMTqPRPxihxnuXLCH). If i will know path i will be able to get private key from xpriv key by (https://iancoleman.io/bip39/) tool. I tried many times other paths but i cannot get same address (1CRacBeizMMwoNZ9BAMTqPRPxihxnuXLCH)

What i see there in BTCPay ("Manage Store" -> "General settings" -> Derivation Scheme -> Modify -> DerivationScheme field):

xpub6CpyqzBEEhGepbeMk5FXsNawsDzgckrpH7oS3AJj4YQdhmQnFJxfPov3j3iRUTrPMF1SBbPvb9evsgUdALjjy7RxaDv1VeM16GeYGtX1fLX-[legacy]

If i press Continue button i didn't see stage of verification of addresses. I see only green message "Derivation scheme for BTC has been modified." in Profile.

I checked this xpub. It's valid without "-[legacy]" suffix and it's BIP32 m/0 path. Last valid address generated by BTCPay there was 19CFM9nQFKLN1TqiK3BxKC9rKmxgyvGkLe (path is m/0/3). BTCPay should generate address 18nTz4zEVTMpaEFsQitnpqHFdWD3QvGQCF (now there is transaction but i sent from other wallet). But BTCPay generated as 1CRacBeizMMwoNZ9BAMTqPRPxihxnuXLCH

And some strange now. In Manage wallet in Transaction tab i see invalid address transaction https://www.smartbit.com.au/tx/688b6db41bab71dca303c871ea616f35986b60bb943660cef89c1aea3439d232 and i see later my other transaction from other wallet to valid address (https://www.smartbit.com.au/tx/e187f74d29d5b36ab3377f03a9fe604b2c162a77757847c4724439063083f053) of same xpub key! So inside BTCPay operates as valid addresses and as invalid ones from one xpub key.

Please help me if possible to understand how can i get private key for 1CRacBeizMMwoNZ9BAMTqPRPxihxnuXLCH

Thanks

[suggestion] mount an already synched blockchain directory inside the docker

I installed BTCPay on a very custom setup and wrote this article about my experience so far.
Since I already run a Bitcoin full node on the same machine, I would like to use the already synched blockchain directly with BTCPay.
@NicolasDorier suggested that I use the docker cp command to copy the data from my existent node to the volume created inside the docker, but I think it could be even better if I can directly mount the existing .bitcoin directory inside the docker compose.
What do you think ?

Additional Fragments ignore networks section

Added a custom fragment with a

networks:
  web:
    external: true

and included it in the ADDITIONAL FRAGMENTS var

but the generated docker compose did not include it and the generator did no throw any exceptions

Payment request HELP needed

I tried to create a payment request and it resulted in a link:

https://btcpay.elmit.comment-requests/hub?id=PmLR05JB8HY8dAS_nvSlWw

It should be something with btcpay.elmit.com/
I use Docker, where did it go wrong?

I want to use this payment request in a calendar for online teachers. If the time slot is still free then a student can pay this invoice. If it is already occupied, then the time slot would be already be paid and not anymore available. How can I "distinguish" on a web page if the invoice is already paid or not? I would use then different images.

How to update to clightning 0.7?

Clightning has a new release (0.7)
I tried to login and run win the directory bitpayserver-docker/ the command btcpay-update.sh
It gives me again the older 0.63 version of clightning.

What do I need to do to get the newer version?

Cloudflare and ssl

Hi guys pls check the error whit cloudflare because i try point cnam ----> domain and a ---> ip but not work always error 503 nginx

LTC Lightning Node won't sync

My LTC Lightning Node will not sync. For some reason it is downloading the entire LTC LN chain >1M blocks (with BTC LN it starts WhenLightningBecameCool chopping off most of the chain) and once it reaches the end of the chain, it dumps and starts over. It usually takes 2ish days for it to fully sync, so seeing it start over is pretty heartbreaking. I am unsure if this is a problem with LTC CLightning or with BTC Payserver. I can post over there if you want me too.

image

Errors in nginx container when running with BTCPAYGEN_REVERSEPROXY="nginx"

I have encountered errors with the configuration associated with the nginx container when running with BTCPAYGEN_REVERSEPROXY="nginx"

If I run with BTCPAYGEN_REVERSEPROXY="none" all the associated docker containers start and the server is available via the web where it is hosted.

Originally (2019/03/15) the following error was being reported by the nginx container (via docker logs nginx)

nginx: [emerg] invalid number of arguments in "upstream" directive in /etc/nginx/conf.d/default.conf:63
2019/03/15 06:59:34 [emerg] 1#1: invalid number of arguments in "upstream" directive in /etc/nginx/conf.d/default.conf:63

I later pulled the most recent changes from GitHub and when I re-ran the setup command the nginx container continued to fail to start - however due to a different issue (as per docker logs nginx):

2019/03/17 03:31:19 [emerg] 1#1: invalid number of arguments in "server_name" directive in /etc/nginx/conf.d/default.conf:108
nginx: [emerg] invalid number of arguments in "server_name" directive in /etc/nginx/conf.d/default.conf:108

Let me know if you require more information. I can reliably reproduce it by simply re-enabling the nginx reverse proxy.

These are the other environment configuration setting in use (domains have been changed below):

-------SETUP-----------
Parameters passed:
BTCPAY_PROTOCOL:https
BTCPAY_HOST:btcpay.mydomain.com
LIBREPATRON_HOST:
WOOCOMMERCE_HOST:
BTCPAY_HOST_SSHKEYFILE:/root/.ssh/id_rsa_btcpay
LETSENCRYPT_EMAIL:[email protected]
NBITCOIN_NETWORK:mainnet
LIGHTNING_ALIAS:
BTCPAYGEN_CRYPTO1:btc
BTCPAYGEN_CRYPTO2:ltc
BTCPAYGEN_CRYPTO3:
BTCPAYGEN_CRYPTO4:
BTCPAYGEN_CRYPTO5:
BTCPAYGEN_CRYPTO6:
BTCPAYGEN_CRYPTO7:
BTCPAYGEN_CRYPTO8:
BTCPAYGEN_CRYPTO9:
BTCPAYGEN_REVERSEPROXY:nginx
BTCPAYGEN_LIGHTNING:clightning
BTCPAYGEN_ADDITIONAL_FRAGMENTS:opt-save-storage-xs;opt-add-librepatron
BTCPAY_IMAGE:
ACME_CA_URI:https://acme-v01.api.letsencrypt.org/directory
----------------------
Additional exported variables:
BTCPAY_DOCKER_COMPOSE=/root/BTCPayServer/btcpayserver-docker/Generated/docker-compose.generated.yml
BTCPAY_BASE_DIRECTORY=/root/BTCPayServer
BTCPAY_ENV_FILE=/root/BTCPayServer/.env
BTCPAYGEN_OLD_PREGEN=false
BTCPAY_SSHKEYFILE=/datadir/id_rsa
BTCPAY_SSHTRUSTEDFINGERPRINTS:SHA256:...............;
----------------------

AWS - t2.small testing

Hi! I tried to run the server on a t2.small AWS instance (amzn-ami-hvm-2018.03.0.20180412-x86_64-gp2 (ami-6b8cef13)), with 200GB of hard drive space.

  • The setup worked, even though it wasn't a strictly Ubuntu machine (I had already installed docker, lines like apt-key did fail though).
  • The logs appeared in docker logs x for bitcoind, but were very very slow
  • I was able to register and create a store and an app
  • The BTCPayServer GUI showed bitcoind to be syncing, with its progress as far as 3%
  • But, periodically, bitcoind seems to restart, without even saving block DL progress (because it is crashing instead of being bitcoin-cli stopped. I cannot get into the docker logs to view the cause of failure, but it seems to be making the download process go in circles.
  • The cache does sucessfully fill to >200mb, so that doesn't seem to be the problem.

I will try it on an instance with more CPUs maybe?

Error while running docker

I am following the process to run btcpayserver with a docker container as stated here https://github.com/btcpayserver/btcpayserver-docker/tree/master/Regtest but I cannot make it work.

I have docker installed and ran docker-compose up -d within the Regtest directory. Some dependencies where downloaded. Then i ran docker-compose up and the process was started with

Creating network "regtest_default" with the default driver

Then I get some error messages:

nbxplorer_1 | fail: Configuration: Error connecting to RPC server The remote server returned an error: (401) Unauthorized.

Then I get this:

btcpayserver_1 | fail: Configuration: Could not connect to NBXplorer, The operation was canceled.
regtest_btcpayserver_1 exited with code 0
bitcoind_1 | 2017-10-22 04:50:04 Adding fixed seed nodes as DNS doesn't seem to be available.

Finally, I cannot access to btcpay through http://localhost:8080/

Thanks for your help!

docker-compose fails on raspberry pi

I've been trying to get btcpayserver-docker to work on raspberry pi 1 b (armv6) but it keeps failing with:
BTCPay Server starting... this can take 5 to 10 minutes... Job for btcpayserver.service failed because the control process exited with error code. See "systemctl status btcpayserver.service" and "journalctl -xe" for details. BTCPay Server started **ERROR: .IOError: [Errno 2] No such file or directory: '/root/BTCPayServer/btcpayserver-docker/Generated/docker-compose.generated.yml'**

I tried raspbian, kali-linux and now hypriot which has docker working but no luck. It seems the docker-compose-generator doesn't create any files at that directory. Is it possible the image is not built for armv6/armel ? Or is there something else I'm missing?

docker ps gives below. It seems like everything except postgres is restarting with cause 139:
HypriotOS/armv6: pirate@black-pearl in ~ $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES f430ef6dbba2 btcpayserver/btcpayserver:1.0.3.45 "dotnet BTCPayServer…" 2 minutes ago Restarting (139) 5 seconds ago generated_btcpayserver_1 e5264ba13ea1 btcpayserver/lnd:v0.5.1-beta-2 "/docker-entrypoint.…" 11 minutes ago Restarting (139) 16 seconds ago btcpayserver_lnd_bitcoin 228f9372aa0d btcpayserver/bitcoin:0.17.0 "/entrypoint.sh bitc…" 2 hours ago Restarting (139) 3 minutes ago 8332-8333/tcp, 18332-18333/tcp, 18443-18444/tcp, 28332-28333/tcp, 39388/tcp, 43782/tcp btcpayserver_bitcoind 2a4ea19d55ab postgres:9.6.5 "docker-entrypoint.s…" 2 hours ago Up 2 hours 5432/tcp generated_postgres_1 25af99673077 nicolasdorier/nbxplorer:2.0.0.11 "dotnet NBXplorer.dll" 2 hours ago Restarting (139) 27 seconds ago

Getting Infinite error loop and Error 503 when I try to access on browser

I have installed docker-compose, cloned this repository and then cd into the Production directory, once there I ran, docker-compose up, but it didn't work, I got stuck in a loop of errors. Sometimes it hangs for a few seconds in the output below, and then the error loop starts again..

If I try to access http://my_public_ip/ I get a 503 Service Temporarily Unavailable error.

I'm using Google Engine by the way.. I'm not sure if this docker is compatible with Azure only.

nginx-gen                            | 2018/01/05 19:46:50 Received event start for container cdca2f293225
btcpayserver_bitcoind                | 2018-01-05 19:46:50 Adding fixed seed nodes as DNS doesn't seem to be available.
letsencrypt-nginx-proxy-companion    | 2018/01/05 19:46:53 Debounce maxTimer fired
letsencrypt-nginx-proxy-companion    | 2018/01/05 19:46:53 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/update_certs'
nginx-gen                            | 2018/01/05 19:46:55 Debounce minTimer fired
nginx-gen                            | 2018/01/05 19:46:55 Contents of /etc/nginx/conf.d/default.conf did not change. Skipping notification ''

Server not accessible on https

Background

I've deployed the server using docker-compose and the front-end is accessible via http. The issues are the links for the css are expecting https, resulting in the front-end is displaying correctly and nginx returns 500 errors when trying to access https://<domain>

Your environment

  • Ubuntu 18.04 x64

Steps to recreate

apt-get update && apt-get install -y git

git clone https://github.com/btcpayserver/btcpayserver-docker
cd btcpayserver-docker

export BTCPAY_HOST="8.9.5.37"
export NBITCOIN_NETWORK="testnet"
export LIGHTNING_ALIAS="myalias"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAYGEN_LIGHTNING="lnd"

export ACME_CA_URI="https://acme-staging.api.letsencrypt.org/directory"
ssh-keygen -t rsa -f /root/.ssh/id_rsa_btcpay -q -P ""
echo "# Key used by BTCPay Server" >> /root/.ssh/authorized_keys
cat /root/.ssh/id_rsa_btcpay.pub >> /root/.ssh/authorized_keys
export BTCPAY_HOST_SSHKEYFILE=/root/.ssh/id_rsa_btcpay

export BTCPAY_PROTOCOL=https
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-s"

. ./btcpay-setup.sh -i

Expected behaviour

Access the front-end on https.

Actual behaviour

Unable to access the front-end on https and only http which results in broken css links.

[question] I've finished setting up with Docker, but get a 503 Service Temporarily Unavailable

Just finished the installation with docker, followed all the steps to the letter, but get a 503 Service Temporarily Unavailable error when browsing to the server's IP.

Could this be because I am browsing to the servers IP and not the domain name I configured?
My DNS change is not fully propagated yet (may take up to 1 day) and I dont wanna wait :-)

Can I save time by using changedomain.sh?

I can't seam to find any troubleshooting steps on this.

What can I expect when browsing to the IP under normal conditions?

When running docker ps, I can see lots of containers running and at 100% CPU...

IPN sent only for confimed invoices

Hello!
I am running dockerized btcpayserver. 4 days ago i updated btcpay docker container (only btcpayserver) to the latest btcpayserver version regarding to this issue: btcpayserver/btcpay-python#2

While i got python library working, i am getting weird problem - now i have callbacks (IPN) only when payment is confirmed (before it was also paid / expired notifications, now gone).

Attaching screenshots of invoice events:

Lightning payment (paid):

image

Expired invoice:

image

completed on-chain payment:

image

Constant 500 Internal Server Error

Despite having correct configuration settings, and despite restarting everything, I'm still getting 500 Internal Server Error - all HTTP connections are redirected to HTTPS.

Error from docker logs for letsencrypt instance:

Creating/renewal btcpay.nodecheck.io certificates... (btcpay.nodecheck.io)
2019-01-17 08:50:56,081:INFO:simp_le:1479: Generating new certificate private key
2019-01-17 08:51:00,919:ERROR:simp_le:1446: CA marked some of the authorizations as invalid, which likely means it could not access http://example.com/.well-known/acme-challenge/X. Did you set correct path in -d example.com:path or --default_root? Are all your domains accessible from the internet? Please check your domains' DNS entries, your host's network/firewall setup and your webserver config. If a domain's DNS entry has both A and AAAA fields set up, some CAs such as Let's Encrypt will perform the challenge validation over IPv6. If your DNS provider does not answer correctly to CAA records request, Let's Encrypt won't issue a certificate for your domain (see https://letsencrypt.org/docs/caa/). Failing authorizations: https://acme-v01.api.letsencrypt.org/acme/authz/yyuBsA2i8cdTx33AnZk69brkFncK2G9cRPd02eGbsj0
Challenge validation has failed, see error log.

I have never used example.com for configuring this, I had set all the parameters prior to setting it up, and yet it constantly fails. My parameters:

export BTCPAY_HOST="btcpay.nodecheck.io"
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_REVERSEPROXY="nginx"
export BTCPAYGEN_LIGHTNING="lnd"
export BTCPAY_PROTOCOL="https"
export BTCPAY_HOST_SSHKEYFILE="/root/.ssh/id_rsa_btcpay"

What can I do to finally get this working, and get btcpay accessible? Seems to be something with nginx making the 500 errors, so just need to get nginx working properly.

Expand pruning to other crypto nodes

We need to allow pruning to other crypto nodes. Guessing we should add a key to the crypto definition file at this point? We should also duplicate the exisitng btc ones to have fragments starting with btc-* to scale. :)

Wrong Repo's on Debian

May you can check the distro and add the correct repo's?

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"

Thank's 4 the great work!

Additional fragment can't replace image name

export BTCPAYGEN_ADDITIONAL_FRAGMENTS="mybtcpayserver.custom.yml"

mybtcpayserver.custom.yml

version: "3"

services:
  btcpayserver:
    image: xxxxx.dkr.ecr.xx-xxxx-x.amazonaws.com/btcpayserver:latest

. ./btcpay-setup.sh -i

output:

Unhandled Exception: System.InvalidOperationException: Sequence contains more than one matching element
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at DockerGenerator.DockerComposeDefinition.<>c.<Merge>b__16_2(IGrouping`2 group) in /source/DockerComposeDefinition.cs:line 97
   at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.ToArray()
   at DockerGenerator.DockerComposeDefinition.Build() in /source/DockerComposeDefinition.cs:line 82
   at DockerGenerator.Program.Main(String[] args) in /source/Program.cs:line 26

Calling webdocket (ledger) routes from a different origin

I have BTCPay deployed and I am trying to call the ledger route

[Route("{walletId}/send/ledger/ws")]

from a different origin (another web app with different domain). It works fine when I run BTCPay with RegTest profile on my machine but when I deploy it using btcpay-setup.sh for some reason the request always times out and there is no trace of it in nginx logs.

Is this by design? Should I have different config for my nginx?

Bitcoin Core Version

I have btcpayserver-docker installed and running just fine, however, when I view the version of Bitcoin Core installed via the bitcoind --version or bitcoin-cli.sh getnetworkinfo, the install of btcpayserver is only installing v.0.17.0 and not v.0.17.1 which is the latest version of Bitcoin Core. Is there a way to upgrade this as I had a BC full node running before installing btcpayserver and it still shows from the bitcoind program that it is the latest version of v.0.17.1 which is the code base I would prefer for my node to be running. Or is there no way to install an upgrade to Bitcoin Core while running btcpayserver on the same hardware?

[question] Running bitcoind and lnd behind tor

I'm not quite sure this is the right place, but anyway : I used to run my bitcoind node behind tor, and I was wondering if it was possible/easy to run the node in the bctpay docker compose behind tor as well.

Whats the maintenance password?

I believe I followed the instructions to setup. I got informed that BTCpayserver got upgraded yesterday and it is easy to do, just go to Server settings / Maintenance and click upgrade.

It filled in as User btcpayserver and I am puzzled what the password is.
The os does not have a user btcpayserver.

C-lightning takes forever to sync

Issue

I'm on testnet. Everything seems to run fine, bitcoind already synced, but after about 6 hours run c-lightning only catched up to block 319281 and is really slow.

Should I open an issue with c-lightning instead ?

getinfo outputs

Bitcoin-cli getblockchaininfo gives the following :

{
 "chain": "test",
 "blocks": 1363017,
 "headers": 1363017,
 "bestblockhash": "0000000000016f60cfe53ff1af0d4cb265f46f11e51851d8121264e5851a74df",
 "difficulty": 66.18234607252185,
 "mediantime": 1533312925,
 "verificationprogress": 0.9999999961738156,
 "initialblockdownload": false,
 "chainwork": "0000000000000000000000000000000000000000000000857d53010e68d49087",
 "size_on_disk": 15166898774,
 "pruned": false,
 "softforks": [
   {
     "id": "bip34",
     "version": 2,
     "reject": {
       "status": true
     }
   },
   {
     "id": "bip66",
     "version": 3,
     "reject": {
       "status": true
     }
   },
   {
     "id": "bip65",
     "version": 4,
     "reject": {
       "status": true
     }
   }
 ],
 "bip9_softforks": {
   "csv": {
     "status": "active",
     "startTime": 1456790400,
     "timeout": 1493596800,
     "since": 770112
   },
   "segwit": {
     "status": "active",
     "startTime": 1462060800,
     "timeout": 1493596800,
     "since": 834624
   }
 },
 "warnings": "Warning: unknown new rules activated (versionbit 28)"
}

bitcoin-lightning-cli gives the following :

{
  "id": "033179c6fe94edeb5d4047a0a23d615d350a8bc1c0eb21e462019f58ffc3ac5a8c", 
  "port": 9735, 
  "address": [
    {
      "type": "ipv4", 
      "address": "5.51.82.169", 
      "port": 9735
    }
  ], 
  "binding": [
    {
      "type": "ipv4", 
      "address": "0.0.0.0", 
      "port": 9735
    }
  ], 
  "version": "basedon-aeafe4dbe7d5c61f664c18417698866b0d70252f-modded", 
  "blockheight": 319281, 
  "network": "testnet"
}

Setup

Description:    Ubuntu 18.04 LTS
Release:        18.04
4.15.0-23-generic

btcpayserver-docker commit 511db652e8228f566b87620fe94a8d00f162d120

docker-compose up causes "manifest for nicolasdorier/btcpayserver:1.0.1.83 not found"

root@btcpayvm:~/btcpayserver-docker# docker-compose -f "$(pwd)/Production/docker-compose.btc-clightning.yml" up -d
[...]
Pulling btcpayserver (nicolasdorier/btcpayserver:1.0.1.83)...
ERROR: manifest for nicolasdorier/btcpayserver:1.0.1.83 not found

This tag doesn't seem to exist, so I fixed it by changing btcpayserver in the yml and setting:
image: nicolasdorier/btcpayserver:1.0.1.84

Replace container links with networks

Containers links are a legacy docker feature and are discouraged from being used. The substitute are networks.
I've done a test on btcpay.nbitstack.com and am running btc on am modified compose with networks

Ideally, we have 2 networks: internal and web with only the front facing services in web.

NBXplorer won't start

When I run docker-compose up the BTCPay Server starts fine, but when I try to access the site, I get the error below.

Image of the Error

Here is the output I keep getting:

nbxplorer_1                          | info: Configuration:  Network: Main
nbxplorer_1                          | warn: Configuration:  RPC Cookie file not found at /btc/.cookie
nbxplorer_1                          | fail: Configuration:  RPC connection settings not configured
nbxplorer_1                          | Application is shutting down...

And here my env variables.

NBITCOIN_NETWORK="mainnet"
BTCPAY_HOST="payment.mywebsite.org"
LETSENCRYPT_EMAIL="[email protected]"
BITCOIND_COOKIEFILE=".cookie"
BITCOIND_NETWORKPARAMETER="#mainnet=1"
ACME_CA_URI="https://acme-v01.api.letsencrypt.org/directory"

If I run echo $NBITCOIN_NETWORK it outputs the value of the variable, I don't think there's anything wrong with them.

I guess it's the .cookie file that is not being generated or maybe a permission problem. I have also tried to run the docker as root, but the same error happened.

Can't connect Zap Desktop to BTCPay Server

Getting the following error when submitting the gRPC configuration file from BTCPay server in ZapDesktop:

Unable to connect to host: Failed to connect before the deadline

Setup: Ubuntu 18.04, latest BTCPay Server Docker, using ZapDesktop v0.3.3

I can create lightning invoices and when I test the connection in the store settings I get "Connection to the lightning node succeeded" and when I open the public node info page it shows online.

I've tried Zap Desktop on the same server the docker instance of BTCPay server is installed with no luck as well as a few other machines.

Please let me know if there are more details that I can provide that can help find a resolution here.

Thanks!

Unable to connect to host: Failed to connect before the deadline

I've the BTCPay server up and running (fabulous bit of software by the way). It sits behind my apache server and as far as I can tell it works (https://btcpay.flat18.co.uk). SSL is a wildcard and appears to work just fine.

Following the instructions for linking the Zap client to BTCPay, I get the error in the title.

Zap version 0.2.2-beta (0.2.2-beta.4225) (macOS)

BTCPay version v1.0.2.103 Docker / Ubuntu 18.04LTS / Apache2
screenshot 2018-09-27 at 13 16 47

screenshot 2018-09-27 at 13 13 31
screenshot 2018-09-27 at 13 15 11

Updating docker-ce to 18.09.03 on raspbian stretch displays "Cannot connect to the Docker daemon at unix:///var/run/docker.sock"

service docker status

● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2019-03-10 15:05:31 AST; 5min ago
     Docs: https://docs.docker.com
  Process: 2917 ExecStart=/usr/bin/dockerd -H unix:// (code=exited, status=2)
 Main PID: 2917 (code=exited, status=2)
      CPU: 961ms

Mar 10 15:05:28 raspberrypi dockerd[2917]:         /go/src/github.com/docker/docker/cmd/dockerd/docker.go:70 +0x90
Mar 10 15:05:28 raspberrypi systemd[1]: Failed to start Docker Application Container Engine.
Mar 10 15:05:28 raspberrypi systemd[1]: docker.service: Unit entered failed state.
Mar 10 15:05:28 raspberrypi systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 15:05:31 raspberrypi systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Mar 10 15:05:31 raspberrypi systemd[1]: Stopped Docker Application Container Engine.
Mar 10 15:05:31 raspberrypi systemd[1]: docker.service: Start request repeated too quickly.
Mar 10 15:05:31 raspberrypi systemd[1]: Failed to start Docker Application Container Engine.
Mar 10 15:05:31 raspberrypi systemd[1]: docker.service: Unit entered failed state.
Mar 10 15:05:31 raspberrypi systemd[1]: docker.service: Failed with result 'exit-code'.

journalctl -xe

Mar 10 15:17:17 raspberrypi dockerd[3300]:         /go/src/github.com/docker/docker/daemon/daemon.go:419 +0xa80
Mar 10 15:17:17 raspberrypi dockerd[3300]: github.com/docker/docker/daemon.NewDaemon(0x2473748, 0x1398b800, 0x13a58500, 0x134abec0, 0x0, 0x0, 0x0)
Mar 10 15:17:17 raspberrypi dockerd[3300]:         /go/src/github.com/docker/docker/daemon/daemon.go:987 +0x249c
Mar 10 15:17:17 raspberrypi dockerd[3300]: main.(*DaemonCli).start(0x1398a700, 0x134ab3e0, 0x0, 0x0)
Mar 10 15:17:17 raspberrypi systemd[1]: docker.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 10 15:17:17 raspberrypi dockerd[3300]:         /go/src/github.com/docker/docker/cmd/dockerd/daemon.go:180 +0x614
Mar 10 15:17:17 raspberrypi dockerd[3300]: main.runDaemon(0x134ab3e0, 0x134e6780, 0x0)
Mar 10 15:17:17 raspberrypi dockerd[3300]:         /go/src/github.com/docker/docker/cmd/dockerd/docker_unix.go:7 +0x34
Mar 10 15:17:17 raspberrypi dockerd[3300]: main.newDaemonCommand.func1(0x13982140, 0x1341cd50, 0x0, 0x2, 0x0, 0x0)
Mar 10 15:17:17 raspberrypi dockerd[3300]:         /go/src/github.com/docker/docker/cmd/dockerd/docker.go:29 +0x54
Mar 10 15:17:17 raspberrypi dockerd[3300]: github.com/docker/docker/vendor/github.com/spf13/cobra.(*Command).execute(0x13982140, 0x1349e108, 0x2, 0x3, 0x13982140, 0x134
Mar 10 15:17:17 raspberrypi dockerd[3300]:         /go/src/github.com/docker/docker/vendor/github.com/spf13/cobra/command.go:762 +0x364
Mar 10 15:17:17 raspberrypi dockerd[3300]: github.com/docker/docker/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0x13982140, 0x245c5a0, 0x21caaa0, 0x245c5a8)
Mar 10 15:17:17 raspberrypi dockerd[3300]:         /go/src/github.com/docker/docker/vendor/github.com/spf13/cobra/command.go:852 +0x220
Mar 10 15:17:17 raspberrypi dockerd[3300]: github.com/docker/docker/vendor/github.com/spf13/cobra.(*Command).Execute(0x13982140, 0x1349c0f0, 0x1)
Mar 10 15:17:17 raspberrypi dockerd[3300]:         /go/src/github.com/docker/docker/vendor/github.com/spf13/cobra/command.go:800 +0x1c
Mar 10 15:17:17 raspberrypi dockerd[3300]: main.main()
Mar 10 15:17:17 raspberrypi dockerd[3300]:         /go/src/github.com/docker/docker/cmd/dockerd/docker.go:70 +0x90
Mar 10 15:17:17 raspberrypi systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Mar 10 15:17:17 raspberrypi systemd[1]: docker.service: Unit entered failed state.
Mar 10 15:17:17 raspberrypi systemd[1]: docker.service: Failed with result 'exit-code'.
Mar 10 15:17:19 raspberrypi systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Mar 10 15:17:19 raspberrypi systemd[1]: Stopped Docker Application Container Engine.
-- Subject: Unit docker.service has finished shutting down
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit docker.service has finished shutting down.
Mar 10 15:17:19 raspberrypi systemd[1]: docker.service: Start request repeated too quickly.
Mar 10 15:17:19 raspberrypi systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- 
-- Unit docker.service has failed.
-- 
-- The result is failed.
Mar 10 15:17:19 raspberrypi systemd[1]: docker.service: Unit entered failed state.
Mar 10 15:17:19 raspberrypi systemd[1]: docker.service: Failed with result 'exit-code'.

Conflict with LND other port 9735

Summary

I want to start a btcpayserver docker to experiment on the testnet. I already run a bitcoind and LND instance on the mainnet on the same machine (a small home server on Ubuntu).

I followed instructions on the README page, and ran . ./btcpay-setup.sh -i, everything was ok, except an error that kept c-lightning from starting.

Here is the exact error message :
ERROR: for clightning_bitcoin Cannot start service clightning_bitcoin: driver failed programming external connectivity on endpoint btcpayserver_clightning_bitcoin (fdb8db643d2aae0fbc6bbd906c7fd97ed074a5ed2be74e887191293fbb5e4d56): Error starting userland proxy: listen tcp 0.0.0.0:9735: bind: address already in use

lsof -i -P -n | grep LISTEN indeed shows lnd 13495 bitcoin 8u IPv6 511515 0t0 TCP *:9735 (LISTEN)

Is there a way to change the port c-lightning is listening on setup ? Especially since my LND is running on main and this c-lighting will run on testnet.

Environment setup

Description:    Ubuntu 18.04 LTS
Release:        18.04
4.15.0-23-generic

btcpayserver-docker commit 511db652e8228f566b87620fe94a8d00f162d120

Thanks !

Local btcpayserver-docker image builder is broken

Something with the new dokcer wizardry has broken the local generator builder flag (BTCPAYGEN_DOCKER_IMAGE to btcpayserver/docker-compose-generator:local)

Error in setup:

unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /root/BTCPayServer/btcpayserver-docker/docker-compose-generator/Dockerfile: no such file or directory
Unable to find image 'btcpayserver/docker-compose-generator:local' locally
docker: Error response from daemon: manifest for btcpayserver/docker-compose-generator:local not found.

Improve Pay Button disabled message

When a user clickc on a pay button and the feature is disabled on the store, they are greeted with
image

perhaps we should have a more friendly page version

Port 80 connects to WordPress at root of domain, but not to BTCPayServer at pay.domain

  • Using fragments: opt-save-storage-xs;opt-add-woocommerce. On initial run, WP setup appeared, was successful, and WP seems to be useable (at mydomain.com).

  • However, visiting the route pay.mydomain.com, as configured for BTCPayServer, won't load - it fails with ERR_CONNECTION_TIMED_OUT on Chrome (This site can’t be reached: pay.mydomain.com took too long to respond.). Same thing with https://.

  • Both NBXplorer and BTCPayServer are successfully reporting 'New Block' events. Also, bitcoind seems to be fully syncd (progress 1.0, correct height).

  • Running for BTC only on a DigitalOcean one-click instance, per this guide: https://medium.com/@molthoff/running-btcpay-on-digital-ocean-for-10-month-how-to-add-other-coins-7a497339fb2f. Disk usage is at 64%, Memory usage is at 54%.

  • The nginx configuration seems to contain the right url: pay.mydomain.com

  • I have run ./btcpayserver-restart.sh, and even ./changedomain.sh pay.mydomain.com

  • Upon inspecting letsencrypt-nginx-proxy-companion:

2019/03/17 20:05:24 Received event start for container 2cba9a1be126
2019/03/17 20:05:26 Received event die for container 2cba9a1be126
2019/03/17 20:05:41 Debounce minTimer fired
2019/03/17 20:05:41 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/signal_le_service'
2019/03/17 20:06:26 Received event start for container 2cba9a1be126
2019/03/17 20:06:28 Received event die for container 2cba9a1be126
2019/03/17 20:06:43 Debounce minTimer fired
2019/03/17 20:06:43 Contents of /app/letsencrypt_service_data did not change. Skipping notification '/app/signal_le_service'

Seems to be stuck in this loop, continuously restarting the LND image. There is nothing in logs/lnd.log

Also just saw this message from nginx:

x.x.x.x - - [17/Mar/2019:20:01:13 +0000] "\x03\x00\x00/*\xE0\x00\x00\x00\x00\x00Cookie: mstshash=Administr" 400 166 "-" "-"
2019/03/17 20:11:32 [warn] 8#8: no resolver defined to resolve ocsp.int-x3.letsencrypt.org while requesting certificate status, responder: ocsp.int-x3.letsencrypt.org, certificate: "/etc/nginx/certs/mydomain.com.crt"

Any ideas?

Failed to create symbolic link on Amazon Linux AMI

Prevents starting BTCPayServer

 Amazon ECS-Optimized Amazon Linux AMI 2018.03.h
BTCPay Server started
Creating network "generated_default" with the default driver
Creating generated_postgres_1 ... 
Creating btcpayserver_bitcoind ... 
Creating generated_postgres_1
Creating btcpayserver_bitcoind ... done
Creating generated_nbxplorer_1 ... 
Creating generated_nbxplorer_1 ... done
Creating generated_btcpayserver_1 ... 
Creating generated_btcpayserver_1 ... done
Creating nginx ... 
Creating nginx ... done
Creating nginx-gen ... 
Creating nginx-gen ... done
Creating letsencrypt-nginx-proxy-companion ... 
Creating letsencrypt-nginx-proxy-companion ... done
Adding symlink of bgold-cli.sh to /usr/bin

ln: failed to create symbolic link ‘/usr/bin/bgold-cli.sh’: File exists

LunaNode deployment results in 503

I did a LunaNode deployment just like BitcoinTShirt's video, and can connect via SSH and watched it sync to 100%. Unfortunately though, it is stuck at a 503 error. The only custom option I used was my own SSH key, but that doesn't seem to be the problem. docker ps shows no problems with bitcoind/cli, but:

2018-10-13 18:41:38 UpdateTip: new best=000000000000000000241e5ee9e6ba8f5b138d048d4bc7cc5d60622c5d1308ec height=545634 version=0x20000000 log2_work=89.845344 tx=348458521 date='2018-10-13 18:41:19' progress=1.000000 cache=176.7MiB(892979txo) warning='4 of last 100 blocks have unexpected version'
2018-10-13 18:45:28 connect() to 176.109.1.225:8333 failed after select(): Connection refused (111)
2018-10-13 18:47:33 connect() to [2605:e000:1523:821f:cee:96bd:cdc9:9712]:8333 failed: Cannot assign requested address (99)
2018-10-13 18:50:14 connect() to 62.205.132.245:8333 failed after select(): Connection refused (111)

in the bitcoin docker, and some other erring logs in the btcpayserver docker:

info: Configuration:  BTC: Cookie file is /root/.nbxplorer/Main/.cookie
info: Configuration:  SSH settings detected, testing connection to [email protected] on port 22 ...
info: PayServer:      Starting listening NBXplorer (BTC)
warn: Configuration:  SSH connection issue: No such device or address
info: Events:         NBXplorer BTC: NotConnected => Synching
info: PayServer:      Start watching invoices
info: Configuration:  Listening on http://0.0.0.0:49392
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: Synching => NotConnected
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: NotConnected => Synching
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: Synching => NotConnected
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: NotConnected => Synching
warn: PayServer:      Error while contacting cryptopia: The operation has timed out.
warn: PayServer:      Error while contacting kraken: Error while copying content to a stream.
warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: Synching => NotConnected
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: NotConnected => Synching
warn: PayServer:      Error while contacting cryptopia: The operation has timed out.
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: Synching => NotConnected
info: Events:         NBXplorer BTC: NotConnected => Synching
warn: PayServer:      Error while contacting cryptopia: Cannot access child value on Newtonsoft.Json.Linq.JValue.
warn: PayServer:      Error while contacting cryptopia: Cannot access child value on Newtonsoft.Json.Linq.JValue.
warn: PayServer:      Error while contacting cryptopia: Cannot access child value on Newtonsoft.Json.Linq.JValue.
warn: PayServer:      Error while contacting cryptopia: Cannot access child value on Newtonsoft.Json.Linq.JValue.
warn: PayServer:      Error while contacting cryptopia: Cannot access child value on Newtonsoft.Json.Linq.JValue.
warn: PayServer:      Error while contacting cryptopia: Cannot access child value on Newtonsoft.Json.Linq.JValue.
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: Synching => NotConnected
warn: PayServer:      Error while contacting bittrex: The operation has timed out.
warn: PayServer:      Error while contacting poloniex: The operation has timed out.
warn: PayServer:      Error while contacting binance: The operation has timed out.
warn: PayServer:      Error while contacting cryptopia: The operation has timed out.
warn: PayServer:      Error while contacting hitbtc: Resource temporarily unavailable Resource temporarily unavailable
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: Synching => NotConnected
info: Events:         NBXplorer BTC: NotConnected => Synching
warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
warn: PayServer:      Error while contacting hitbtc: <html>
      <head><title>502 Bad Gateway</title></head>
      <body bgcolor="white">
      <center><h1>502 Bad Gateway</h1></center>
      <hr><center>nginx</center>
      </body>
      </html>

warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
warn: PayServer:      Error while contacting hitbtc: <html>
      <head><title>502 Bad Gateway</title></head>
      <body bgcolor="white">
      <center><h1>502 Bad Gateway</h1></center>
      <hr><center>nginx</center>
      </body>
      </html>

warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
warn: PayServer:      Error while contacting cryptopia: Cannot access child value on Newtonsoft.Json.Linq.JValue.
warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
fail: PayServer:      BTC: NBXplorer error `The operation was canceled.`
info: Events:         NBXplorer BTC: Synching => NotConnected
info: Events:         NBXplorer BTC: NotConnected => Synching
warn: PayServer:      Error while contacting binance: The operation has timed out.
warn: PayServer:      Error while contacting cryptopia: The operation has timed out.
warn: PayServer:      Error while contacting hitbtc: The operation has timed out.
warn: PayServer:      Error while contacting binance: The operation has timed out.

IP for reference:
http://172.81.177.59/

Gonna reboot shortly

The lnd works fine but the c-lightning not (invoices)

Hello!

I got errors (a generation an invoice from app) from c-lightning as:

{"error":"No payment method available for this store\n10/9/18 4:06:39 PM: Creation of invoice starting\n10/9/18 4:06:39 PM: BTC_CZK: The rating rule is coinaverage(BTC_CZK)\n10/9/18 4:06:39 PM: BTC_CZK: The evaluated rating rule is 148972.603090763\n10/9/18 4:06:39 PM: BTC_USD: The rating rule is coinaverage(BTC_USD)\n10/9/18 4:06:39 PM: BTC_USD: The evaluated rating rule is 6613.95322581253\n10/9/18 4:06:40 PM: BTC: The amount of the invoice is too low to be paid on chain\n10/9/18 4:06:44 PM: BTC: Payment method unavailable (Impossible to create lightning invoice (Resource temporarily unavailable))\n"}

When i try to create an invoice in the admin area throough web - i got same error but by red text in web

Before this:

I set up BTCPay (MS Azure - Docker container) with lnd - it works fine.
Then i changed config to c-lightning by:

btcpay-down.sh
export BTCPAYGEN_LIGHTNING=clightning
. btcpay-setup.sh -i

docker ps shows to me the container 'btcpayserver_clightning_bitcoin'
There is logs as:

Waiting for the node to start and sync
BTC: Is offline
-----trying again in 1 seconds-----
BTC: Is offline
-----trying again in 2 seconds-----
BTC: Is offline
-----trying again in 4 seconds-----
BTC: Is offline
-----trying again in 8 seconds-----
BTC: Is offline
-----trying again in 16 seconds-----
BTC: Is fully synched
Node synched
Replaced network mainnet by bitcoin in /root/.lightning/config
2018-10-09T16:05:29.076Z lightningd(35): Server started with public key 02c163829275ee68d33290f393459d57a1559af09307208bf0f3448d08e37e720c, alias  (color #02c163) and lightningd 3c8001d-modded
2018-10-09T16:07:34.842Z lightningd(35): lightning_channeld-02908b1a203349f963d52a32cc12a19d06ee920380ed14ae01d1cfbc3f16886678 chan #3: Peer connection lost
2018-10-09T16:07:34.842Z lightningd(35): 02908b1a203349f963d52a32cc12a19d06ee920380ed14ae01d1cfbc3f16886678 chan #3: Peer transient failure in CHANNELD_NORMAL: lightning_channeld: Owning subdaemon lightning_channeld died (62208)

Then i update BTCPay to last commit

Then i change BTCPay again to lnd - again it works fine. Then i changed to c-lightning - again same error (Resource temporarily unavailable). Through cli interface i can create invoice under c-lightning...

Unable to connect zap, joule etc to BTCPayServer

I am unable to connect zap, joule etc to LND through BTCPayServer

I am not using the internal nginx reverse proxy because I am using a single IP which already has a server hosted with various other services behind a nginx reverse proxy.

Everything else works just fine just can't connect to a wallet LND

Is this supposed to be null "certificateThumbprint": null,

I have also tried clightning and spark and just get a 404 error from btcpay
Basically everything is working just fine except I am unable to connect any lightning wallets to manage the channels

{
"configurations": [
{
"host": "btcpay.xxxxxxxxxxxxxxxxxxxxxx",
"port": 443,
"ssl": true,
"chainType": "Mainnet",
"type": "grpc",
"cryptoCode": "BTC",
"certificateThumbprint": null,
"macaroon": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"adminMacaroon": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"readonlyMacaroon": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"invoiceMacaroon": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
]
}

I installed BTCPaySever with the variables

export BTCPAY_HOST="btcpay.xxxxxxxxxxxxxxxxxxxxxxxx"
export NBITCOIN_NETWORK="mainnet"
export BTCPAYGEN_CRYPTO1="btc"
export BTCPAYGEN_CRYPTO2="ltc"
export BTCPAYGEN_REVERSEPROXY="none"
export BTCPAYGEN_LIGHTNING="lnd"
export LIGHTNING_ALIAS="xxxxxxxxxxxxxxxxxxxxxx"
export BTCPAY_PROTOCOL="https"
. ./btcpay-setup.sh -i

I have removed various fields with xxxxxxxxxxxxx for security and privacy

`Status Code: 404; Not Found` with pay button

I run my own server at https://sosthenebtcpay.pw, I did an update about 30 min ago.
I want to try the pay button, so I copied the following lines of code in a dummy page of my blog https://www.sosthene.net/Dons/ :

<form method="POST" action="https://sosthenebtcpay.pw/stores/2uZB4Ud6LQVhRCNxq1wAphjhMNPhokXRdVJ8dpADSrpy/pay">
    <input type="hidden" name="price" value="0.00000100" />
    <input type="hidden" name="currency" value="BTC" />
    <input type="hidden" name="checkoutDesc" value="Tip" />
    <input type="image" src="https://sosthenebtcpay.pw/img/paybutton/pay.png" name="submit" style="width:209px" alt="Pay with BtcPay, Self-Hosted Bitcoin Payment Processor">
</form>

When I click on the button, I open the page https://sosthenebtcpay.pw/stores/2uZB4Ud6LQVhRCNxq1wAphjhMNPhokXRdVJ8dpADSrpy/pay
The page is blank with a Status Code: 404; Not Found error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.