1
0
Files
btcpayserver-docker/Production
maltokyo 420ae328b1 Add Bluewallet LNDHub (#472)
* Add Bluewallet LND Hub to BTCPay Server

Anyone else want to use native Bluewallet Lightning with their BTC Pay Server, this will enable it.

* Add Bluewallet LND Hub to BTCPay Server

Use non-custodial LND Lightning directly from your Bluewallet, and freely let others open accounts on your node.

* Update README.md

* Update opt-add-bluewallet-lndhub.yml

* Update opt-add-bluewallet-lndhub.yml

* Testing defects fixed

Remove init (not compatible with v3 of docker-compose)

Update compatibility table

* Update README.md

* Nginx RP Fixes

* Update nginx.tmpl

* Fixed stylesheet and QR code display issues

* Requested changes from Kukks

* Add missing images to docker builder and build

* move required key to bottom of fragment

Co-authored-by: Andrew Camilleri <kukks@btcpayserver.org>
Co-authored-by: Kukks <evilkukka@gmail.com>
2021-05-11 09:56:31 +02:00
..
2019-06-24 14:21:29 +09:00
2021-05-11 09:56:31 +02:00
2017-12-18 19:09:46 +09:00

How to use docker-compose with NGinx

NGinx acts as a reverse proxy, and takes 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)
  2. A lightweight block explorer (NBxplorer)
  3. A BTCPay Server
  4. A database (Postgres)
  5. A reverse proxy (NGINX)
  6. Two containers configuring NGINX as a reverse proxy and renewing SSL certificates.

Architecture

The Deploy on Azure Button is using this docker-compose under the hood on an Ubuntu machine. You can use it on any docker supporting host.

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

Any unset or empty environment variable will be set for a regtest deployment.

The ports mapped on the host are:

  1. 80 for Let's encrypt
  2. 443 for the website
  3. 9735 for the bitcoin lightning network node (if used)
  4. 9736 for the litecoin lightning network node (if used)

Example for running on mainnet:

For linux:

docker-compose up \
    -e "NBITCOIN_NETWORK=mainnet" \
    -e "BTCPAY_HOST=btcpay.example.com" \
    -e "LETSENCRYPT_EMAIL=me@example.com" \
    -e "ACME_CA_URI=production"

For powershell:

docker-compose up `
    -e "NBITCOIN_NETWORK=mainnet" `
    -e "BTCPAY_HOST=btcpay.example.com" `
    -e "LETSENCRYPT_EMAIL=me@example.com" `
    -e "ACME_CA_URI=production"

See also The guide for docker noobs.

Make sure the domain btcpay.example.com point to your server and that port 80 and 443 are open.