Docker resources for hosting BTCPayServer easily
Go to file
2018-03-22 00:11:38 +09:00
docker-compose-generator Can configure LIGHTNING_ALIAS 2018-03-22 00:11:38 +09:00
Production Can configure LIGHTNING_ALIAS 2018-03-22 00:11:38 +09:00
Production-NoReverseProxy Can configure LIGHTNING_ALIAS 2018-03-22 00:11:38 +09:00
.gitattributes add gitattribute 2018-03-20 13:54:45 +09:00
.gitignore Add instructions for docker noobs 2018-03-20 14:10:32 +09:00
bitcoin-cli.ps1 Add utilities 2018-03-20 10:53:13 +09:00
bitcoin-cli.sh Add utilities 2018-03-20 10:53:13 +09:00
bitcoin-lightning-cli.ps1 Add cli tools 2018-03-21 14:08:28 +09:00
bitcoin-lightning-cli.sh Add cli tools 2018-03-21 14:08:28 +09:00
generate-docker-compose.ps1 Use generated docker-compose 2018-03-19 23:26:46 +09:00
LICENSE Init 2017-09-15 01:24:33 +09:00
litecoin-cli.ps1 Add utilities 2018-03-20 10:53:13 +09:00
litecoin-cli.sh Add utilities 2018-03-20 10:53:13 +09:00
litecoin-lightning-cli.ps1 Add cli tools 2018-03-21 14:08:28 +09:00
litecoin-lightning-cli.sh fix litecoin-lightning-cli 2018-03-21 21:49:54 +09:00
publish-stable.ps1 helper script 2018-01-13 14:21:42 +09:00
README.md Fix name of containers 2018-03-21 14:08:44 +09:00

How to use

This repository is hosting different docker-compose which can be used to facilitate deployment of BTCPay Server.

Architecture

As you can see, it depends on several piece of infrastructure, mainly:

  • A lightweight block explorer (NBXplorer),
  • A database (Postgres, or SQLite),
  • A full node (Bitcoin Core)

Setting up the dependencies might be time consuming, this repository is meant to give working example of docker-compose file which will setup everything for you.

The Production docker-compose files are used for production environment. It adds NGinx as a reverse proxy and Let's Encrypt and DockerGen to automatically configure HTTPS.

The production docker-compose is used under the hood to deploy an instance of BTCPay on Microsoft Azure in one click:

Deploy to Azure

The Production-NoReverseProxy docker-compose files are used for environment which are already behind a reverse proxy. It exposes BTCPayServer directly on port 80.

About accessing services inside those docker compose

Several scripts are provided to access the internal of your docker-service:

  • litecoin-cli.sh
  • bitcoin-cli.sh
  • litecoin-lightning-cli.sh
  • bitcoin-lightning-cli.sh

We also provide powershell .ps1 scripts if you are on windows.

You can use it easily:

./bitcoin-cli.sh getblockcount

For docker noobs

If you are a docker noob here is how you would create a HTTPS ready server.

First step is to make sure you have a domain name pointing to your host, and that port 443 and 80 and externally accessible. Let's assume it is btcpay.example.com.

Clone the repository:

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

Create an .env file with the parameters documented in Production:

NBITCOIN_NETWORK=mainnet
BTCPAY_HOST=btcpay.example.com
LETSENCRYPT_EMAIL=me@example.com
ACME_CA_URI=https://acme-v01.api.letsencrypt.org/directory

Save, then run it:

docker-compose -f "$(pwd)/Production/docker-compose.btc-ltc.yml" up -d

Wait a little bit, then you can now browse https://btcpay.example.com/.

About generate-docker-compose

The files in Production and Production-NoReverseProxy are generated by a dotnet program located in docker-compose-generator. It is meant to generate a wide range a configuration from docker-compose-generator/docker-fragments without repeating myself.