captainVersion: 4 services: $$cap_appname: caproverExtra: containerHttpPort: $$cap_BTCPAY_PORT image: btcpayserver/btcpayserver:$$cap_BTCPAYSERVER_VERSION hostname: $$cap_appname.$$cap_root_domain environment: BTCPAY_HOST: $$cap_appname.$$cap_root_domain BTCPAY_POSTGRES: User ID=$$cap_POSTGRES_USER;Host=srv-captain--$$cap_appname-postgres;Port=$$cap_POSTGRES_PORT;Application Name=btcpayserver;Database=btcpayserver$$cap_NBITCOIN_NETWORK BTCPAY_EXPLORERPOSTGRES: User ID=$$cap_POSTGRES_USER;Host=srv-captain--$$cap_appname-postgres;Port=$$cap_POSTGRES_PORT;Application Name=btcpayserver;MaxPoolSize=80;Database=nbxplorer$$cap_NBITCOIN_NETWORK BTCPAY_NETWORK: $$cap_NBITCOIN_NETWORK BTCPAY_BIND: $$cap_BIND_ADDRESS:$$cap_BTCPAY_PORT BTCPAY_ROOTPATH: $$cap_BTCPAY_ROOTPATH BTCPAY_DEBUGLOG: $$cap_BTCPAY_DEBUGLOG BTCPAY_UPDATEURL: $$cap_BTCPAY_UPDATEURL BTCPAY_DOCKERDEPLOYMENT: 'true' BTCPAY_CHAINS: $$cap_USED_CHAIN BTCPAY_BTCEXPLORERURL: http://srv-captain--$$cap_appname-nbxplorer:$$cap_NBXPLORER_PORT/ BTCPAY_BTCLIGHTNING: 'type=clightning;server=unix://etc/clightning_bitcoin/lightning-rpc' BTCPAY_BTCEXTERNALSPARK: 'server=/spark/btc/;cookiefile=/etc/clightning_bitcoin_spark/.cookie' BTCPAY_BTCEXTERNALRTL: 'server=/rtl/api/authenticate/cookie;cookiefile=/etc/clightning_bitcoin_rtl/.cookie' BTCPAY_BTCEXTERNALCLIGHTNINGREST: 'server=/clightning-rest/btc;macaroonfilepath=/etc/clightning_bitcoin_rest_certs/access.macaroon;macaroondirectorypath=/etc/clightning_bitcoin_rest_certs' depends_on: - $$cap_appname-postgres - $$cap_appname-bitcoind - $$cap_appname-lightning volumes: - $$cap_appname-data:/datadir - $$cap_appname-nbxplorer-data:/root/.nbxplorer - $$cap_appname-plugins:/root/.btcpayserver/Plugins - $$cap_appname-lightning-data:/etc/clightning_bitcoin - $$cap_appname-lightning-spark:/etc/clightning_bitcoin_spark - $$cap_appname-lightning-rtl-data:/etc/clightning_bitcoin_rtl - $$cap_appname-lightning-rest-certificates:/etc/clightning_bitcoin_rest_certs $$cap_appname-postgres: caproverExtra: notExposeAsWebApp: 'true' dockerfileLines: - FROM btcpayserver/postgres:$$cap_POSTGRES_VERSION - CMD ["-c", "random_page_cost=1.0", "-c", "shared_preload_libraries=pg_stat_statements"] environment: POSTGRES_HOST_AUTH_METHOD: $$cap_POSTGRES_HOST_AUTH_METHOD volumes: - $$cap_appname-postgres:/var/lib/postgresql/data $$cap_appname-nbxplorer: caproverExtra: notExposeAsWebApp: 'true' image: nicolasdorier/nbxplorer:$$cap_NBXPLORER_VERSION environment: NBXPLORER_NETWORK: $$cap_NBITCOIN_NETWORK NBXPLORER_BIND: $$cap_BIND_ADDRESS:$$cap_NBXPLORER_PORT NBXPLORER_TRIMEVENTS: $$cap_NBXPLORER_TRIMEVENTS NBXPLORER_SIGNALFILESDIR: $$cap_NBXPLORER_SIGNALFILESDIR NBXPLORER_POSTGRES: User ID=$$cap_POSTGRES_USER;Host=srv-captain--$$cap_appname-postgres;Port=$$cap_POSTGRES_PORT;Application Name=nbxplorer;MaxPoolSize=20;Database=nbxplorer$$cap_NBITCOIN_NETWORK NBXPLORER_AUTOMIGRATE: $$cap_NBXPLORER_AUTOMIGRATE NBXPLORER_NOMIGRATEEVTS: $$cap_NBXPLORER_NOMIGRATEEVTS NBXPLORER_CHAINS: $$cap_USED_CHAIN NBXPLORER_BTCRPCURL: http://srv-captain--$$cap_appname-bitcoind:$$cap_BITCOIN_RPC_PORT/ NBXPLORER_BTCNODEENDPOINT: srv-captain--$$cap_appname-bitcoind:$$cap_BITCOIN_NODE_PORT depends_on: - $$cap_appname-postgres volumes: - $$cap_appname-nbxplorer-data:/datadir - $$cap_appname-bitcoind-data:/root/.bitcoin $$cap_appname-bitcoind: caproverExtra: notExposeAsWebApp: 'true' image: btcpayserver/bitcoin:$$cap_BITCOIN_VERSION environment: BITCOIN_NETWORK: $$cap_NBITCOIN_NETWORK BITCOIN_WALLETDIR: $$cap_BITCOIN_WALLETDIR BITCOIN_EXTRA_ARGS: | rpcport=$$cap_BITCOIN_RPC_PORT rpcbind=$$cap_BIND_ADDRESS:$$cap_BITCOIN_RPC_PORT rpcallowip=$$cap_BIND_ADDRESS/$$cap_BITCOIN_IP_ALLOWLIST_CIDR port=$$cap_BITCOIN_NODE_PORT whitelist=$$cap_BIND_ADDRESS/$$cap_BITCOIN_IP_ALLOWLIST_CIDR maxmempool=$$cap_BITCOIN_MAX_MEMPOOL prune=$$cap_BITCOIN_PRUNE $$cap_BITCOIN_ADDITIONAL_ARGUMENTS volumes: - $$cap_appname-bitcoind-wallet-data:/walletdata - $$cap_appname-bitcoind-data:/data $$cap_appname-lightning: caproverExtra: notExposeAsWebApp: 'true' image: btcpayserver/lightning:$$cap_LIGHTNING_VERSION environment: LIGHTNINGD_NETWORK: $$cap_NBITCOIN_NETWORK LIGHTNINGD_CHAIN: $$cap_USED_CHAIN LIGHTNINGD_ALIAS: $$cap_LIGHTNINGD_ALIAS LIGHTNINGD_ANNOUNCEADDR: $$cap_LIGHTNINGD_ANNOUNCEADDR LIGHTNINGD_PORT: $$cap_LIGHTNINGD_PORT LIGHTNINGD_READY_FILE: $$cap_LIGHTNINGD_READY_FILE LIGHTNINGD_OPT: | bitcoin-datadir=$$cap_LIGHTNINGD_BITCOIN_DATA_DIRECTORY bitcoin-rpcconnect=srv-captain--$$cap_appname-bitcoind experimental-offers $$cap_LIGHTNINGD_ADDITIONAL_ARGUMENTS ports: - $$cap_LIGHTNINGD_PORT:$$cap_LIGHTNINGD_PORT depends_on: - $$cap_appname-bitcoind volumes: - $$cap_appname-lightning-data:/root/.lightning - $$cap_appname-bitcoind-data:/etc/bitcoin - $$cap_appname-nbxplorer-data:/root/.nbxplorer $$cap_appname-lightning-spark: caproverExtra: notExposeAsWebApp: 'true' image: shesek/spark-wallet:$$cap_LIGHTNING_SPARK_VERSION environment: NETWORK: $$cap_NBITCOIN_NETWORK SPARK_OPT: $$cap_LIGHTNING_SPARK_OPTIONS volumes: - $$cap_appname-lightning-data:/etc/lightning - $$cap_appname-lightning-spark:/data depends_on: - $$cap_appname-lightning $$cap_appname-lightning-rest: caproverExtra: notExposeAsWebApp: 'true' image: saubyk/c-lightning-rest:$$cap_LIGHTNING_REST_VERSION environment: PROTOCOL: $$cap_LIGHTNING_REST_PROTOCOL NODE: srv-captain--$$cap_appname-lightning:$$cap_LIGHTNING_REST_LIGHTNINGD_PORT LIGHTNINGD_READY_FILE: $$cap_LIGHTNINGD_READY_FILE depends_on: - $$cap_appname-lightning volumes: - $$cap_appname-lightning-data:/root/.lightning - $$cap_appname-bitcoind-data:/etc/bitcoin - $$cap_appname-lightning-rest-certificates:/usr/src/app/certs - $$cap_appname-nbxplorer-data:/root/.nbxplorer $$cap_appname-rtl: caproverExtra: notExposeAsWebApp: 'true' image: shahanafarooqui/rtl:$$cap_RTL_VERSION environment: LN_IMPLEMENTATION: $$cap_RTL_LN_IMPLEMENTATION CONFIG_PATH: $$cap_RTL_LIGHTNING_CONFIG_PATH LN_SERVER_URL: http://srv-captain--$$cap_appname-lightning-rest:$$cap_RTL_LN_SERVER_URL_PORT/v1 MACAROON_PATH: $$cap_RTL_MACAROON_PATH RTL_CONFIG_PATH: $$cap_RTL_CONFIG_PATH BITCOIND_CONFIG_PATH: $$cap_RTL_BITCOIND_CONFIG_PATH RTL_SSO: $$cap_RTL_SSO RTL_COOKIE_PATH: $$cap_RTL_COOKIE_PATH LOGOUT_REDIRECT_LINK: $$cap_RTL_LOGOUT_REDIRECT_LINK volumes: - $$cap_appname-lightning-data:/root/.lightning - $$cap_appname-bitcoind-data:/etc/bitcoin - $$cap_appname-lightning-rtl-data:/data - $$cap_appname-lightning-rest-certificates:/etc/clightning_bitcoin_rest_certs caproverOneClickApp: instructions: start: |- BTCPay Server is a free, open-source & self-hosted bitcoin payment gateway. It allows self-sovereign individuals and businesses to accept bitcoin payments online or in person without any fees. This will deploy BTCPay Server with Bitcoin Full Node (with 50 GB pruning), Core Lightning Node, Spark Wallet and Ride The Lightning. Please note that features like SSH access and Onion service have been omitted to keep deployment simple. You may need to open the port `9735` in your firewall. end: |- BTCPay Server has been successfully deployed! Please change the following settings before using the service: 1. Go to the settings for `$$cap_appname` 2. Enable **Websocket Support** 3. Enable **HTTPS** 4. Click on **Edit Default Nginx Configurations** and paste the following content before the last closing bracket "}": ``` location /rtl/ { proxy_pass http://srv-captain--$$cap_appname-rtl:$$cap_RTL_PORT/rtl/; } location /spark/btc/ { proxy_pass http://srv-captain--$$cap_appname-lightning-spark:$$cap_LIGHTNING_SPARK_PORT/; } location /clightning-rest/btc/ { rewrite ^/clightning-rest/btc/(.*) /$1 break; proxy_pass http://srv-captain--$$cap_appname-lightning-rest:$$cap_RTL_LN_SERVER_URL_PORT/; } ``` Now you can access it at `https://$$cap_appname.$$cap_root_domain` It will take some time to synchronize the Bitcoin full node. You should also observe the app logs from time to time. displayName: BTCPay Server isOfficial: true description: Free, open-source & self-hosted, Bitcoin payment processor. documentation: https://docs.btcpayserver.org variables: - id: $$cap_BIND_ADDRESS label: General | Bind Address description: Address to bind the services. defaultValue: '0.0.0.0' validRegex: /.{1,}/ - id: $$cap_BTCPAYSERVER_VERSION label: General | BTCPay Server Version description: Check out their valid tags at https://hub.docker.com/r/btcpayserver/btcpayserver/tags defaultValue: '1.6.11' validRegex: /.{1,}/ - id: $$cap_POSTGRES_VERSION label: General | PostgreSQL Version description: Check out their valid tags at https://hub.docker.com/r/btcpayserver/postgres/tags defaultValue: '13.7' validRegex: /.{1,}/ - id: $$cap_NBXPLORER_VERSION label: General | NBXplorer Version description: Check out their valid tags at https://hub.docker.com/r/nicolasdorier/nbxplorer/tags defaultValue: '2.3.38' validRegex: /.{1,}/ - id: $$cap_BITCOIN_VERSION label: General | Bitcoin Node Version description: Check out their valid tags at https://hub.docker.com/r/btcpayserver/bitcoin/tags defaultValue: '23.0' validRegex: /.{1,}/ - id: $$cap_LIGHTNING_VERSION label: General | Lightning Version description: Check out their valid tags at https://hub.docker.com/r/btcpayserver/lightning/tags defaultValue: v0.10.2 validRegex: /.{1,}/ - id: $$cap_LIGHTNING_SPARK_VERSION label: General | Lightning Spark Version description: Check out their valid tags at https://hub.docker.com/r/shesek/spark-wallet/tags defaultValue: 0.3.1-standalone validRegex: /.{1,}/ - id: $$cap_LIGHTNING_REST_VERSION label: General | Lightning REST Version description: Check out their valid tags at https://hub.docker.com/r/saubyk/c-lightning-rest/tags defaultValue: '0.9.0' validRegex: /.{1,}/ - id: $$cap_RTL_VERSION label: General | Ride The Lightning Version description: Check out their valid tags at https://hub.docker.com/r/shahanafarooqui/rtl/tags defaultValue: '0.13.1' validRegex: /.{1,}/ - id: $$cap_NBITCOIN_NETWORK label: General | Network Type description: The type of Bitcoin network to use (e.g. `mainnet`, `testnet`, or `regtest`) defaultValue: mainnet validRegex: /^(mainnet|testnet|regtest|simnet)$/ - id: $$cap_USED_CHAIN label: Explorer | Chain description: Blockchain to be used. Defaults is `btc` and should **not** be changed. defaultValue: btc validRegex: /.{1,}/ - id: $$cap_POSTGRES_PORT label: Database | Port description: Port of the PostgreSQL database host. defaultValue: 5432 validRegex: /.{1,}/ - id: $$cap_POSTGRES_USER label: Database | User description: User of the PostgreSQL database. defaultValue: postgres validRegex: /.{1,}/ - id: $$cap_POSTGRES_HOST_AUTH_METHOD label: Database | Authentication Method description: Method of authentication for incoming connections in PostgreSQL. defaultValue: trust validRegex: /.{1,}/ - id: $$cap_BTCPAY_ROOTPATH label: Application | Root Path description: Root path of the application. defaultValue: / validRegex: /.{1,}/ - id: $$cap_BTCPAY_PORT label: Application | Port description: Port of the application host. defaultValue: 49392 validRegex: /.{1,}/ - id: $$cap_BTCPAY_DEBUGLOG label: Application | Debug Log description: Log file for debugging information. defaultValue: btcpay.log validRegex: /.{1,}/ - id: $$cap_BTCPAY_UPDATEURL label: Application | Update URL description: URL to BTCPay Server releases. defaultValue: https://api.github.com/repos/btcpayserver/btcpayserver/releases/latest validRegex: /.{1,}/ - id: $$cap_NBXPLORER_PORT label: Explorer | Port description: Port of the NBXplorer host. defaultValue: 32838 validRegex: /.{1,}/ - id: $$cap_NBXPLORER_TRIMEVENTS label: Explorer | Trim Events description: Trim the amount of events in NBXplorer. defaultValue: 10000 validRegex: /.{1,}/ - id: $$cap_NBXPLORER_SIGNALFILESDIR label: Explorer | Signal Files Directory description: Path to signal files directory in NBXplorer. defaultValue: /datadir validRegex: /.{1,}/ - id: $$cap_NBXPLORER_AUTOMIGRATE label: Explorer | Automatic Migrations description: Whether to enable automatic migrations. defaultValue: 'true' validRegex: /^(true|false)$/ - id: $$cap_NBXPLORER_NOMIGRATEEVTS label: Explorer | Event Migrations description: Whether to disable event migrations. defaultValue: 'true' validRegex: /^(true|false)$/ - id: $$cap_BITCOIN_RPC_PORT label: Bitcoin Node | RPC Port description: Port of Bitcoin node RPC. defaultValue: 43782 validRegex: /.{1,}/ - id: $$cap_BITCOIN_NODE_PORT label: Bitcoin Node | Node Port description: Port of Bitcoin node endpoint. defaultValue: 39388 validRegex: /.{1,}/ - id: $$cap_BITCOIN_WALLETDIR label: Bitcoin Node | Wallet Directory description: Path to wallet files directory of the Bitcoin node. defaultValue: /walletdata validRegex: /.{1,}/ - id: $$cap_BITCOIN_MAX_MEMPOOL label: Bitcoin Node | Maximum Mempool Size description: Maximum Bitcoin node mempool size in megabytes. defaultValue: 500 validRegex: /.{1,}/ - id: $$cap_BITCOIN_IP_ALLOWLIST_CIDR label: Bitcoin Node | Allowlist Subnet description: Whitelist IP subnet using CIDR notation for the Bitcoin node. defaultValue: '0' validRegex: /.{1,}/ - id: $$cap_BITCOIN_PRUNE label: Bitcoin Node | Prune description: |- Configure a disk space on stored blocks of the Bitcoin node, denoted in megabytes. Default is 50 gigabytes, this will keep around 6 months of blocks. defaultValue: 50000 - id: $$cap_BITCOIN_ADDITIONAL_ARGUMENTS label: Bitcoin Node | Additional Arguments description: Additional Bitcoin node startup arguments. - id: $$cap_LIGHTNINGD_ANNOUNCEADDR label: Lightning Node | Announced Address description: IP address of your server. E.g. `123.123.123.123`. validRegex: /.{1,}/ - id: $$cap_LIGHTNINGD_ALIAS label: Lightning Node | Alias description: An alias for your Lightning node. defaultValue: my-awesome-node-$$cap_gen_random_hex(32) validRegex: /.{1,}/ - id: $$cap_LIGHTNINGD_PORT label: Lightning Node | Port description: Port of your Lightning node host. defaultValue: 9735 validRegex: /.{1,}/ - id: $$cap_LIGHTNINGD_READY_FILE label: Lightning Node | Ready File description: Path to Bitcoin node ready status indicator file in the Lightning node. defaultValue: /root/.nbxplorer/btc_fully_synched validRegex: /.{1,}/ - id: $$cap_LIGHTNINGD_BITCOIN_DATA_DIRECTORY label: Lightning Node | Bitcoin Data Directory description: Path to Bitcoin data directory in the Lightning node. defaultValue: /etc/bitcoin validRegex: /.{1,}/ - id: $$cap_LIGHTNINGD_ADDITIONAL_ARGUMENTS label: Lightning Node | Additional Arguments description: Additional Lightning node startup arguments. - id: $$cap_LIGHTNING_SPARK_OPTIONS label: Lightning Node | Spark | Lightning Network Files description: Additional start up options for Lightning Spark. defaultValue: --no-tls -C /data/.cookie validRegex: /.{1,}/ - id: $$cap_LIGHTNING_SPARK_PORT label: Lightning Node | Spark | Port description: Port of Lightning Spark host. defaultValue: 9737 validRegex: /.{1,}/ - id: $$cap_LIGHTNING_REST_PROTOCOL label: Lightning Node | REST | Protocol description: Which HTTP protocol to use in Lightning REST. defaultValue: http validRegex: /^(http|https)$/ - id: $$cap_LIGHTNING_REST_LIGHTNINGD_PORT label: Lightning Node | Spark | Lightning REST API Port description: REST API port of the Lightning node. defaultValue: 9835 validRegex: /.{1,}/ - id: $$cap_RTL_LN_IMPLEMENTATION label: Ride The Lightning | Lightning Implementation description: Lightning implementation used for Ride The Lightning. defaultValue: CLT validRegex: /.{1,}/ - id: $$cap_RTL_LIGHTNING_CONFIG_PATH label: Ride The Lightning | Lightning Configuration description: Path to Lightning configuration for Ride The Lightning. defaultValue: /root/.lightning/config validRegex: /.{1,}/ - id: $$cap_RTL_LN_SERVER_URL_PORT label: Ride The Lightning | Lightning REST Server Port description: Port of the Lightning REST server for Ride The Lightning. defaultValue: 3001 validRegex: /.{1,}/ - id: $$cap_RTL_MACAROON_PATH label: Ride The Lightning | Macaroon Path description: Path to the macaroon file for Ride The Lightning. defaultValue: /etc/clightning_bitcoin_rest_certs validRegex: /.{1,}/ - id: $$cap_RTL_CONFIG_PATH label: Ride The Lightning | Configuration Path description: Path to the configuration file for Ride The Lightning. defaultValue: /data/ validRegex: /.{1,}/ - id: $$cap_RTL_BITCOIND_CONFIG_PATH label: Ride The Lightning | Bitcoin Configuration Path description: Path to the Bitcoin configuration file for Ride The Lightning. defaultValue: /etc/bitcoin/bitcoin.conf validRegex: /.{1,}/ - id: $$cap_RTL_SSO label: Ride The Lightning | Single-Sign-On description: Whether to use Single-Sign-On for Ride The Lightning. defaultValue: 1 validRegex: /.{1,}/ - id: $$cap_RTL_COOKIE_PATH label: Ride The Lightning | Cookie Path description: Path to the cookie file for Ride The Lightning. defaultValue: /data/.cookie validRegex: /.{1,}/ - id: $$cap_RTL_LOGOUT_REDIRECT_LINK label: Ride The Lightning | Log-Out Redirect Link description: Log-Out redirect link for Ride The Lightning. defaultValue: /server/services validRegex: /.{1,}/ - id: $$cap_RTL_PORT label: Ride The Lightning | Port description: Port of Ride The Lightning host. defaultValue: 3000 validRegex: /.{1,}/