From 7f5ed1e9f32f9ffec116bfa802955b8f4fff909d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 3 Jan 2025 20:09:13 +0000 Subject: [PATCH] deploy: 93c4013b787eabf18ca5012305cbee33ef31b6d2 --- 404.html | 6 +++--- AdvancedForms/index.html | 4 ++-- Apps/index.html | 4 ++-- BTCPayServer/LocalDevSetup/index.html | 4 ++-- BTCPayServer/Security/index.html | 4 ++-- BTCPayServer/db-migration/index.html | 4 ++-- BTCPayServer/greenfield-authorization/index.html | 4 ++-- BTCPayServer/greenfield-development/index.html | 4 ++-- BTCPayVsOthers/index.html | 4 ++-- BigCommerce/index.html | 4 ++-- Breez/index.html | 4 ++-- Bringin/index.html | 4 ++-- ColdCardWallet/index.html | 4 ++-- Community/index.html | 4 ++-- Conference-PoS-guide/index.html | 4 ++-- Configurator/index.html | 4 ++-- Contribute/Design/index.html | 4 ++-- Contribute/Dev/index.html | 4 ++-- Contribute/DevCode/index.html | 4 ++-- Contribute/DevTest/index.html | 4 ++-- Contribute/Misc/index.html | 4 ++-- Contribute/Translate/index.html | 4 ++-- Contribute/Write/index.html | 4 ++-- Contribute/WriteBlog/index.html | 4 ++-- Contribute/WriteDocs/index.html | 4 ++-- Contribute/WriteSoftware/index.html | 4 ++-- Contribute/index.html | 4 ++-- CreateStore/index.html | 4 ++-- CreateWallet/index.html | 4 ++-- CustomIntegration/index.html | 4 ++-- Dashboard/index.html | 4 ++-- Deployment/Azure/index.html | 4 ++-- Deployment/AzurePennyPinching/index.html | 4 ++-- Deployment/Clovyr/index.html | 4 ++-- Deployment/DynamicDNS/index.html | 4 ++-- Deployment/GoogleCloud/index.html | 4 ++-- Deployment/Hack0/index.html | 4 ++-- Deployment/Hardware/index.html | 4 ++-- Deployment/HardwareAsAService/index.html | 4 ++-- Deployment/LightningInABox/index.html | 4 ++-- Deployment/LunaNode/index.html | 4 ++-- Deployment/ManualDeployment/index.html | 4 ++-- Deployment/ManualDeploymentExtended/index.html | 4 ++-- Deployment/RaspberryPi4/index.html | 4 ++-- Deployment/ReverseProxyToTor/index.html | 4 ++-- Deployment/ReverseSSHtunnel/index.html | 4 ++-- Deployment/ThirdPartyHosting/index.html | 4 ++-- Deployment/index.html | 4 ++-- Deployment/voltagecloud/index.html | 4 ++-- Deployment/webdeployment/index.html | 4 ++-- Development/Altcoins/index.html | 4 ++-- Development/GreenFieldExample-NodeJS/index.html | 4 ++-- Development/GreenFieldExample/index.html | 4 ++-- Development/GreenfieldExample-PHP/index.html | 4 ++-- Development/InvoiceMetadata/index.html | 4 ++-- Development/LocalDev/index.html | 4 ++-- Development/LocalDevelopment/index.html | 4 ++-- Development/Plugins/index.html | 4 ++-- Development/TestnetDemo/index.html | 4 ++-- Development/Theme/index.html | 4 ++-- Development/ecommerce-integration-guide/index.html | 4 ++-- Development/index.html | 4 ++-- Docker/backup-restore/index.html | 4 ++-- Docker/chatwoot/index.html | 4 ++-- Docker/cloudflare-tunnel/index.html | 4 ++-- Docker/fastsync/index.html | 4 ++-- Docker/fireflyiii/index.html | 4 ++-- Docker/index.html | 4 ++-- Docker/joinmarket/index.html | 4 ++-- Docker/lightning-terminal/index.html | 4 ++-- Docker/ndlc/index.html | 4 ++-- Docker/pihole/index.html | 4 ++-- Docker/tallycoin-connect/index.html | 4 ++-- Drupal/index.html | 4 ++-- DynamicReports/index.html | 4 ++-- ElectrumPersonalServer/index.html | 4 ++-- ElectrumWallet/index.html | 4 ++-- ElectrumX/index.html | 4 ++-- FAQ/Altcoin/index.html | 4 ++-- FAQ/Apps/index.html | 4 ++-- FAQ/Deployment/index.html | 4 ++-- FAQ/General/index.html | 4 ++-- FAQ/Integrations/index.html | 4 ++-- FAQ/LightningNetwork/index.html | 4 ++-- FAQ/ServerSettings/index.html | 4 ++-- FAQ/Stores/index.html | 4 ++-- FAQ/Synchronization/index.html | 4 ++-- FAQ/Wallet/index.html | 4 ++-- FAQ/index.html | 4 ++-- Forms/index.html | 4 ++-- Grandnode/index.html | 4 ++-- Guide/index.html | 4 ++-- HardwareWalletIntegration/index.html | 4 ++-- InvoiceNinja/index.html | 4 ++-- Invoices/index.html | 4 ++-- LNDhubAPI/index.html | 4 ++-- LedgerWallet/index.html | 4 ++-- LightningNetwork/index.html | 4 ++-- LightningNetwork_PaymentChannels/index.html | 4 ++-- Magento/index.html | 4 ++-- NBXplorer/API/index.html | 4 ++-- NBXplorer/Postgres-Migration/index.html | 4 ++-- NBXplorer/Postgres-Schema/index.html | 4 ++-- NBXplorer/index.html | 4 ++-- Nopcommerce/index.html | 4 ++-- Nostr/index.html | 4 ++-- Notifications/index.html | 4 ++-- Odoo/index.html | 4 ++-- OpenCart/index.html | 4 ++-- Payjoin/index.html | 4 ++-- PaymentRequests/index.html | 4 ++-- Payouts/index.html | 4 ++-- Payroll/index.html | 4 ++-- PhocaCart/index.html | 4 ++-- PodServer/index.html | 4 ++-- PrestaShop/index.html | 4 ++-- PullPayments/index.html | 4 ++-- Refund/index.html | 4 ++-- RegisterAccount/index.html | 4 ++-- Reporting/index.html | 4 ++-- Shopify/index.html | 7 ++++--- ShopifyV2/index.html | 8 ++++---- Shopware/index.html | 4 ++-- SideShift/index.html | 4 ++-- Sign-PSBT-with-sparrow-wallet/index.html | 4 ++-- Smartstore/index.html | 4 ++-- Support/index.html | 4 ++-- TicketTailor/index.html | 4 ++-- Translations/index.html | 4 ++-- Transmuter/DCA/index.html | 4 ++-- Transmuter/EmailReceiptsPreset/index.html | 4 ++-- Transmuter/index.html | 4 ++-- Trocador/index.html | 4 ++-- Troubleshooting/index.html | 4 ++-- TryItOut/index.html | 4 ++-- UseCase/index.html | 4 ++-- Vault/HowToVerify/index.html | 4 ++-- VirtueMart/index.html | 4 ++-- Wabisabi/index.html | 4 ++-- Walkthrough/index.html | 4 ++-- Wallet/index.html | 4 ++-- WalletSetup/index.html | 4 ++-- WasabiWallet/index.html | 4 ++-- WhatsNext/index.html | 4 ++-- Wix/index.html | 4 ++-- WooCommerce/index.html | 4 ++-- Xenforo/index.html | 4 ++-- Zapier/index.html | 4 ++-- assets/js/{100.99a47a22.js => 100.d4cddc62.js} | 2 +- assets/js/{106.6501e86a.js => 106.e8618108.js} | 2 +- assets/js/{107.b9fdf202.js => 107.a463f888.js} | 2 +- assets/js/{108.6453abe3.js => 108.1718b216.js} | 2 +- assets/js/{112.fdef2d76.js => 112.3b3e61f8.js} | 2 +- assets/js/{113.900a6daf.js => 113.34b53002.js} | 2 +- assets/js/{114.1aabc18b.js => 114.318bf311.js} | 2 +- assets/js/{116.b652d17a.js => 116.ffe3fe6f.js} | 2 +- assets/js/{117.88d9da02.js => 117.87457c61.js} | 2 +- assets/js/{119.e3d8d511.js => 119.2ed902a2.js} | 2 +- assets/js/12.6c3a8671.js | 1 + assets/js/12.c803a429.js | 1 - assets/js/{121.883ba361.js => 121.5bbfe06f.js} | 2 +- assets/js/{122.c511e6a6.js => 122.5a3a7ab4.js} | 2 +- assets/js/{123.5249d9cf.js => 123.30657657.js} | 2 +- assets/js/{125.54cefdcb.js => 125.1abef3b1.js} | 2 +- assets/js/{126.28143809.js => 126.03474fce.js} | 2 +- assets/js/{128.ccc0c2a3.js => 128.ddd96668.js} | 2 +- assets/js/{129.61159920.js => 129.1012095c.js} | 2 +- assets/js/{13.7bdac7b1.js => 13.387420a7.js} | 2 +- assets/js/{130.200d2fd4.js => 130.d2c8df6c.js} | 2 +- assets/js/{131.a204fc5c.js => 131.fc4520f1.js} | 2 +- assets/js/{133.71c8ccb1.js => 133.01afc6ea.js} | 2 +- assets/js/{134.6e21a6d8.js => 134.34e8d418.js} | 2 +- assets/js/{135.3d82884e.js => 135.6bfb45ec.js} | 2 +- assets/js/{136.c0c02fbc.js => 136.12ebfad3.js} | 2 +- assets/js/{137.8956159c.js => 137.8f464279.js} | 2 +- assets/js/{138.1ce578d6.js => 138.82244a3d.js} | 2 +- assets/js/{139.984c6749.js => 139.2d08ba15.js} | 2 +- assets/js/{140.1044f935.js => 140.a7e34fe5.js} | 2 +- assets/js/{142.3ace671d.js => 142.58ca1a53.js} | 2 +- assets/js/{145.1f5588e5.js => 145.821d7c2c.js} | 2 +- assets/js/{146.73720689.js => 146.0732c044.js} | 2 +- assets/js/{148.0c8969d7.js => 148.0f1b78a1.js} | 2 +- assets/js/{149.b7ccd3c9.js => 149.b6c5b769.js} | 2 +- assets/js/{15.adf001d6.js => 15.45bd3721.js} | 2 +- assets/js/{150.375fe60b.js => 150.942a29d4.js} | 2 +- assets/js/{151.ec97cdce.js => 151.60106cd1.js} | 2 +- assets/js/{154.1bc6de62.js => 154.a7995f2c.js} | 2 +- assets/js/{155.d589c522.js => 155.7c0e7c4e.js} | 2 +- assets/js/{156.6661f5f0.js => 156.35b44a0c.js} | 2 +- assets/js/{157.ada1660d.js => 157.e986753a.js} | 2 +- assets/js/16.9f76bcc7.js | 1 + assets/js/16.ae036874.js | 1 - assets/js/{162.e9c89bbb.js => 162.ba38fe61.js} | 2 +- assets/js/{163.f7fe0d04.js => 163.cc386a6f.js} | 2 +- assets/js/{167.196e7bf0.js => 167.6ec3c087.js} | 2 +- assets/js/{170.b10b0803.js => 170.b3ae67bb.js} | 2 +- assets/js/{172.e79e6c43.js => 172.4697e4be.js} | 2 +- assets/js/{173.791c56bf.js => 173.0cb0fb0c.js} | 2 +- assets/js/{19.98721af1.js => 19.bc42608e.js} | 2 +- assets/js/{20.8fd29059.js => 20.3366512c.js} | 2 +- assets/js/{22.83be7979.js => 22.5d258c45.js} | 2 +- assets/js/{23.38ea1f53.js => 23.82b0e1e0.js} | 2 +- assets/js/{24.4af07e1c.js => 24.f480b2ed.js} | 2 +- assets/js/{25.6c8cb184.js => 25.1203153b.js} | 2 +- assets/js/{28.e0ba3c0a.js => 28.3980471b.js} | 2 +- assets/js/{29.6a840def.js => 29.250cfac8.js} | 2 +- assets/js/{32.d1c4e8cd.js => 32.d3285e69.js} | 2 +- assets/js/{33.2de860ef.js => 33.914ddfec.js} | 2 +- assets/js/{34.0a14be83.js => 34.e9389c6e.js} | 2 +- assets/js/{35.a767f69f.js => 35.d35115d4.js} | 2 +- assets/js/{39.cf6a4c12.js => 39.cffecf03.js} | 2 +- assets/js/{40.b0c976bc.js => 40.2675daed.js} | 2 +- assets/js/{49.e57b1699.js => 49.4d54ca00.js} | 2 +- assets/js/{50.9ec99fee.js => 50.01147758.js} | 2 +- assets/js/{51.1e09f182.js => 51.945515f0.js} | 2 +- assets/js/{57.c3ef4ad8.js => 57.bbcc2d66.js} | 2 +- assets/js/{58.2bf7514c.js => 58.7ddd51e1.js} | 2 +- assets/js/{59.eda521f6.js => 59.4f4df784.js} | 2 +- assets/js/{60.d4f28193.js => 60.746b4709.js} | 2 +- assets/js/{61.76bb3939.js => 61.12ec4e08.js} | 2 +- assets/js/{62.fe4b3490.js => 62.340e5ad9.js} | 2 +- assets/js/{63.810dc92b.js => 63.677b3b18.js} | 2 +- assets/js/{64.391f89ef.js => 64.bc68a417.js} | 2 +- assets/js/{68.43f703a0.js => 68.f27bb40f.js} | 2 +- assets/js/{69.8dbc76d5.js => 69.cc2e5201.js} | 2 +- assets/js/{70.b25bb6ad.js => 70.9b26b300.js} | 2 +- assets/js/{71.bcdc4747.js => 71.3c9b32d6.js} | 2 +- assets/js/{72.8072b4ed.js => 72.e13a8822.js} | 2 +- assets/js/{73.3155350a.js => 73.ccc40e53.js} | 2 +- assets/js/{81.808f483b.js => 81.117de549.js} | 2 +- assets/js/{85.94d0757c.js => 85.3539fbac.js} | 2 +- assets/js/{86.1ef4622f.js => 86.743d6ecc.js} | 2 +- assets/js/{88.2824b019.js => 88.445114ee.js} | 2 +- assets/js/{89.5daf81b5.js => 89.ac7b3625.js} | 2 +- assets/js/{92.8898544d.js => 92.6bc7a5e0.js} | 2 +- assets/js/{94.19a81614.js => 94.9b053e31.js} | 2 +- assets/js/{95.272ff25a.js => 95.41d9cdff.js} | 2 +- assets/js/{96.b54edf16.js => 96.85408867.js} | 2 +- assets/js/{99.d24ce9e5.js => 99.63a8e32c.js} | 2 +- assets/js/{app.68b69b2a.js => app.686837c2.js} | 4 ++-- index.html | 4 ++-- sitemap.xml | 2 +- 242 files changed, 395 insertions(+), 394 deletions(-) rename assets/js/{100.99a47a22.js => 100.d4cddc62.js} (99%) rename assets/js/{106.6501e86a.js => 106.e8618108.js} (99%) rename assets/js/{107.b9fdf202.js => 107.a463f888.js} (96%) rename assets/js/{108.6453abe3.js => 108.1718b216.js} (98%) rename assets/js/{112.fdef2d76.js => 112.3b3e61f8.js} (95%) rename assets/js/{113.900a6daf.js => 113.34b53002.js} (99%) rename assets/js/{114.1aabc18b.js => 114.318bf311.js} (98%) rename assets/js/{116.b652d17a.js => 116.ffe3fe6f.js} (98%) rename assets/js/{117.88d9da02.js => 117.87457c61.js} (99%) rename assets/js/{119.e3d8d511.js => 119.2ed902a2.js} (99%) create mode 100644 assets/js/12.6c3a8671.js delete mode 100644 assets/js/12.c803a429.js rename assets/js/{121.883ba361.js => 121.5bbfe06f.js} (99%) rename assets/js/{122.c511e6a6.js => 122.5a3a7ab4.js} (99%) rename assets/js/{123.5249d9cf.js => 123.30657657.js} (99%) rename assets/js/{125.54cefdcb.js => 125.1abef3b1.js} (98%) rename assets/js/{126.28143809.js => 126.03474fce.js} (99%) rename assets/js/{128.ccc0c2a3.js => 128.ddd96668.js} (99%) rename assets/js/{129.61159920.js => 129.1012095c.js} (99%) rename assets/js/{13.7bdac7b1.js => 13.387420a7.js} (99%) rename assets/js/{130.200d2fd4.js => 130.d2c8df6c.js} (99%) rename assets/js/{131.a204fc5c.js => 131.fc4520f1.js} (99%) rename assets/js/{133.71c8ccb1.js => 133.01afc6ea.js} (99%) rename assets/js/{134.6e21a6d8.js => 134.34e8d418.js} (99%) rename assets/js/{135.3d82884e.js => 135.6bfb45ec.js} (98%) rename assets/js/{136.c0c02fbc.js => 136.12ebfad3.js} (97%) rename assets/js/{137.8956159c.js => 137.8f464279.js} (99%) rename assets/js/{138.1ce578d6.js => 138.82244a3d.js} (97%) rename assets/js/{139.984c6749.js => 139.2d08ba15.js} (98%) rename assets/js/{140.1044f935.js => 140.a7e34fe5.js} (98%) rename assets/js/{142.3ace671d.js => 142.58ca1a53.js} (99%) rename assets/js/{145.1f5588e5.js => 145.821d7c2c.js} (99%) rename assets/js/{146.73720689.js => 146.0732c044.js} (99%) rename assets/js/{148.0c8969d7.js => 148.0f1b78a1.js} (99%) rename assets/js/{149.b7ccd3c9.js => 149.b6c5b769.js} (99%) rename assets/js/{15.adf001d6.js => 15.45bd3721.js} (89%) rename assets/js/{150.375fe60b.js => 150.942a29d4.js} (98%) rename assets/js/{151.ec97cdce.js => 151.60106cd1.js} (96%) rename assets/js/{154.1bc6de62.js => 154.a7995f2c.js} (99%) rename assets/js/{155.d589c522.js => 155.7c0e7c4e.js} (99%) rename assets/js/{156.6661f5f0.js => 156.35b44a0c.js} (97%) rename assets/js/{157.ada1660d.js => 157.e986753a.js} (99%) create mode 100644 assets/js/16.9f76bcc7.js delete mode 100644 assets/js/16.ae036874.js rename assets/js/{162.e9c89bbb.js => 162.ba38fe61.js} (95%) rename assets/js/{163.f7fe0d04.js => 163.cc386a6f.js} (98%) rename assets/js/{167.196e7bf0.js => 167.6ec3c087.js} (99%) rename assets/js/{170.b10b0803.js => 170.b3ae67bb.js} (98%) rename assets/js/{172.e79e6c43.js => 172.4697e4be.js} (95%) rename assets/js/{173.791c56bf.js => 173.0cb0fb0c.js} (98%) rename assets/js/{19.98721af1.js => 19.bc42608e.js} (99%) rename assets/js/{20.8fd29059.js => 20.3366512c.js} (95%) rename assets/js/{22.83be7979.js => 22.5d258c45.js} (82%) rename assets/js/{23.38ea1f53.js => 23.82b0e1e0.js} (81%) rename assets/js/{24.4af07e1c.js => 24.f480b2ed.js} (86%) rename assets/js/{25.6c8cb184.js => 25.1203153b.js} (89%) rename assets/js/{28.e0ba3c0a.js => 28.3980471b.js} (86%) rename assets/js/{29.6a840def.js => 29.250cfac8.js} (76%) rename assets/js/{32.d1c4e8cd.js => 32.d3285e69.js} (99%) rename assets/js/{33.2de860ef.js => 33.914ddfec.js} (81%) rename assets/js/{34.0a14be83.js => 34.e9389c6e.js} (96%) rename assets/js/{35.a767f69f.js => 35.d35115d4.js} (90%) rename assets/js/{39.cf6a4c12.js => 39.cffecf03.js} (99%) rename assets/js/{40.b0c976bc.js => 40.2675daed.js} (99%) rename assets/js/{49.e57b1699.js => 49.4d54ca00.js} (92%) rename assets/js/{50.9ec99fee.js => 50.01147758.js} (93%) rename assets/js/{51.1e09f182.js => 51.945515f0.js} (97%) rename assets/js/{57.c3ef4ad8.js => 57.bbcc2d66.js} (96%) rename assets/js/{58.2bf7514c.js => 58.7ddd51e1.js} (98%) rename assets/js/{59.eda521f6.js => 59.4f4df784.js} (94%) rename assets/js/{60.d4f28193.js => 60.746b4709.js} (96%) rename assets/js/{61.76bb3939.js => 61.12ec4e08.js} (98%) rename assets/js/{62.fe4b3490.js => 62.340e5ad9.js} (99%) rename assets/js/{63.810dc92b.js => 63.677b3b18.js} (99%) rename assets/js/{64.391f89ef.js => 64.bc68a417.js} (92%) rename assets/js/{68.43f703a0.js => 68.f27bb40f.js} (99%) rename assets/js/{69.8dbc76d5.js => 69.cc2e5201.js} (99%) rename assets/js/{70.b25bb6ad.js => 70.9b26b300.js} (97%) rename assets/js/{71.bcdc4747.js => 71.3c9b32d6.js} (99%) rename assets/js/{72.8072b4ed.js => 72.e13a8822.js} (99%) rename assets/js/{73.3155350a.js => 73.ccc40e53.js} (96%) rename assets/js/{81.808f483b.js => 81.117de549.js} (98%) rename assets/js/{85.94d0757c.js => 85.3539fbac.js} (98%) rename assets/js/{86.1ef4622f.js => 86.743d6ecc.js} (95%) rename assets/js/{88.2824b019.js => 88.445114ee.js} (99%) rename assets/js/{89.5daf81b5.js => 89.ac7b3625.js} (97%) rename assets/js/{92.8898544d.js => 92.6bc7a5e0.js} (99%) rename assets/js/{94.19a81614.js => 94.9b053e31.js} (94%) rename assets/js/{95.272ff25a.js => 95.41d9cdff.js} (98%) rename assets/js/{96.b54edf16.js => 96.85408867.js} (98%) rename assets/js/{99.d24ce9e5.js => 99.63a8e32c.js} (98%) rename assets/js/{app.68b69b2a.js => app.686837c2.js} (71%) diff --git a/404.html b/404.html index 98c1f058cb..646c2a883e 100644 --- a/404.html +++ b/404.html @@ -9,13 +9,13 @@ - + -

404

Looks like we've got some broken links.
+ - + diff --git a/AdvancedForms/index.html b/AdvancedForms/index.html index f9a50b3a07..4598347c45 100644 --- a/AdvancedForms/index.html +++ b/AdvancedForms/index.html @@ -9,7 +9,7 @@ - + @@ -173,6 +173,6 @@ →

- + diff --git a/Apps/index.html b/Apps/index.html index 5c28035fef..e7d2290a82 100644 --- a/Apps/index.html +++ b/Apps/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# BTCPay Server Apps

The primary purpose of BTCPay Server is to remove dependencies on trusted third-parties. The Apps are built in applications that obsolete central-authorities and allow users an easy way to extend the use case of the software. Users can self-host all sorts of customizable applications that work out of the box.

To create an app, go to Apps > Create a new app. Apps are store-dependent, which means that each app needs to be connected to a store.

# Point of Sale App

The web-based PoS app allows users with brick and mortar stores to readily accept cryptocurrencies without fees or a third-party, directly to their wallet. The PoS can be displayed easily on tablets or any other devices which support web browsing. Users can easily create a homescreen shortcut for a quick access to the web-app.

BTCPay Pos

Adding new products is easy. The app has a shopping cart feature, tips, product inventory, custom payment options and more.

The Point of sale app can also be used to receive donations, tips or even as a small e-commerce shop, depending on the options or customizations applied.

Curently, the Point of Sale app supports three different views:

  • A Static view representing only the items for sale.
  • A Cart view including items for sale and a cart for checkout.
  • A Light view consisting only of a keypad for easy and quick payments (Starting from v1.0.5.6 (opens new window)).

To get your first Point of Sale app running, follow theses few simple steps:

  1. Go to Apps and Create a new app
  2. Add a name for your app
  3. Choose app type > Point Of Sale
  4. Select the store to associate with the app.
  5. Customize your PoS by choosing a view (Static, Cart, Light), adding your own items with prices, photos, and a description.
  6. Click Save Settings.
  7. Click View App to view your PoS (Your customers can access the PoS through that link).

You can change the appearance of your Point of Sale app by following the theme customization guide.

# Crowdfunding App

Crowdfunding is an application which you can launch from BTCPay Server interface that allows you to create a self-hosted funding campaign, similar to Kickstarter or Indiegogo. Unlike traditional crowdfunding platforms, the creator of the campaign is the owner of the platform. Funds go directly to the creator’s wallet without any fees.

  1. Go to > Apps
  2. Add a name of your app
  3. Choose app type > Crowdfund
  4. Select the store to associate with the app.
  5. Customize your Crowdfund by adding your own perks with prices, photos, and description.
  6. Check the box > Allow crowdfund to be publicly visible
  7. Click "Save Settings".
  8. Click "View App" to view your Crowdfund (Contributors can access the crowdfund through that link).

If you would like to provide digital or physical products to the backers of your crowdfunding campaign, you can integrate WooCommerce store into it. You can also set limits on contribution perks using the inventory feature.

# Payment Button

Easily-embeddable HTML and highly-customizable payment buttons allow users to receive tips and donations. Online stores can also integrate payment buttons. When a site visitor clicks on the button, BTCPay displays the invoice.

  1. In your left menu bar, under the "PLUGINS" section, select "Pay Button".
  2. Allow anyone to create invoices.
  3. Customize your button.
  4. Copy the generated form and embed it on your website.
- + diff --git a/BTCPayServer/LocalDevSetup/index.html b/BTCPayServer/LocalDevSetup/index.html index 792fbef1d4..5dcdd3fe43 100644 --- a/BTCPayServer/LocalDevSetup/index.html +++ b/BTCPayServer/LocalDevSetup/index.html @@ -9,7 +9,7 @@ - + @@ -72,6 +72,6 @@ type=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true

Now you can create a lightning invoice on BTCPay Server regtest and make a payment through Polar.

PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated. Or, uncheck the box that says, "Break when this exception type is thrown".

# FAQ

# docker-compose up dev failed or tests are not passing, what should I do?

  1. Run docker-compose down --volumes (this will reset your test environment)
  2. Run docker-compose pull (this will ensure you have the latest images)
  3. Run again with docker-compose up dev

# How to run the Altcoin environment?

docker-compose -f docker-compose.altcoins.yml up dev

If you still have issues, try to restart docker.

# How to run the Selenium test with a browser?

Run dotnet user-secrets set RunSeleniumInBrowser true to run tests in browser.

To switch back to headless mode (recommended) you can run dotnet user-secrets remove RunSeleniumInBrowser.

# Session not created: This version of ChromeDriver only supports Chrome version 88

When you run tests for selenium, you may end up with this error. This happen when we update the selenium packages on BTCPay Server while you did not update your chrome version.

If you want to use a older chrome driver on this page (opens new window) then point to it with

dotnet user-secrets set ChromeDriverDirectory "path/to/the/driver/directory"

- + diff --git a/BTCPayServer/Security/index.html b/BTCPayServer/Security/index.html index 73378228a3..647799e59e 100644 --- a/BTCPayServer/Security/index.html +++ b/BTCPayServer/Security/index.html @@ -9,7 +9,7 @@ - + @@ -89,6 +89,6 @@ →

- + diff --git a/BTCPayServer/db-migration/index.html b/BTCPayServer/db-migration/index.html index 3b44ce688d..5b63bc3f30 100644 --- a/BTCPayServer/db-migration/index.html +++ b/BTCPayServer/db-migration/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Migration from SQLite and MySQL to Postgres

# Introduction

This document is intended for BTCPay Server integrators such as Raspiblitz, Umbrel, Embassy OS or anybody running BTCPay Server on SQLite or MySql.

If you are a user of an integrated solution, please contact the integrator directly and provide them with the link to this document.

BTCPay Server has for long time supported three different backends:

  1. Postgres
  2. SQLite
  3. MySql

While most of our users are using the Postgres backend, maintaining supports for all those databases has been very challenging, and Postgres is the only one part of our test suite.

As a result, we regret to inform you that we decided to stop the support of MySql and SQLite.

We understand that dropping support might be painful for users and integrators of our product, and we will do our best to provide a migration path.

Please keep us informed if you experience any issues while migrating on our community chat (opens new window).

# Procedure

In order to successfully migrate, you will need to run BTCPay Server 1.7.8 or newer.

As a reminder there are three settings controlling the choice of backend of BTCPay Server which can be controller by command line, environment variable or configuration settings.

Command line argument Environment variable
--postgres BTCPAY_POSTGRES="..."
--mysql BTCPAY_MYSQL="..."
--sqlitefile BTCPAY_SQLITEFILE="blah.db"

If you are currently using mysql or sqlitefile, and you wish to migrate to postgres, you simply need to add the command line argument --postgres or the environment variable BTCPAY_POSTGRES pointing to a fresh postgres database.

It is strongly advised not to create a database in Postgres before performing the migration with BTCPay Server. This is because BTCPay Server will automatically create the necessary database for you. However, if you must create the database manually, please ensure that the C_TYPE and COLLATE settings are both set to C.

Careful: Do not remove the former mysql or sqlitefile setting, you should have both: the postgres setting and the former sqlite/mysql setting

From 1.7.8, BTCPay Server will interprete this and attempt to copy the data from mysql and sqlite into the new postgres database.

Note that once the migration is complete, the old mysql and sqlite settings will simply be ignored.

If the migration fails, you can revert the postgres setting you added, so the next restart will run on the old unsupported database. You can retry a migration by adding the postgres setting again.

# Known issues

  • The migration script isn't very optimized, and will attempt to load every table in memory. If your sqlite or mysql database is too big, you may experience an Out Of Memory issue. If that happen to you, please contact us.
  • There are no migration for plugin's data.
- + diff --git a/BTCPayServer/greenfield-authorization/index.html b/BTCPayServer/greenfield-authorization/index.html index 81b479802d..518d13ddf0 100644 --- a/BTCPayServer/greenfield-authorization/index.html +++ b/BTCPayServer/greenfield-authorization/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/BTCPayServer/greenfield-development/index.html b/BTCPayServer/greenfield-development/index.html index 5ec1011471..c174be03e0 100644 --- a/BTCPayServer/greenfield-development/index.html +++ b/BTCPayServer/greenfield-development/index.html @@ -9,7 +9,7 @@ - + @@ -78,6 +78,6 @@ →

- + diff --git a/BTCPayVsOthers/index.html b/BTCPayVsOthers/index.html index e0d7765d56..dd639ccd4f 100644 --- a/BTCPayVsOthers/index.html +++ b/BTCPayVsOthers/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@ →

- + diff --git a/BigCommerce/index.html b/BigCommerce/index.html index 262d350a2d..ca96fc4c79 100644 --- a/BigCommerce/index.html +++ b/BigCommerce/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Breez/index.html b/Breez/index.html index c329a1dae9..3af2f44940 100644 --- a/Breez/index.html +++ b/Breez/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/Bringin/index.html b/Bringin/index.html index 2b794e601d..399c1da437 100644 --- a/Bringin/index.html +++ b/Bringin/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/ColdCardWallet/index.html b/ColdCardWallet/index.html index 22d39810dd..62a1ece732 100644 --- a/ColdCardWallet/index.html +++ b/ColdCardWallet/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Connecting Coldcard Wallet to BTCPay Server

This document shows how to use a Coldcard Wallet with your BTCPay Server.

# Coldcard Wallet Setup

This guide assumes, you have a Coldcard wallet set up. To configure the Coldcard, please see the quick setup guide on manufacturer's website (opens new window).

# Quick Setup

  1. Insert the MicroSD card into the Coldcard wallet.
  2. Go to Advanced > MicroSD Card > Electrum Wallet > Native-Segwit
  3. Insert the MicroSD card back into your PC
  4. In BTCPay Server, Stores > Settings > Setup > Connect an existing wallet > Import wallet file
  5. Choose File > select the wallet file earlier exported from Coldcard.
  6. Click Continue
  7. Confirm the addresses match the ones shown in your BTCPay Server.

The Coldcard is now connected to your BTCPay Server. Payments go directly to Coldcard. The video below shows how to connect your BTCPay store to your Coldcard.

# Spending from BTCPay Server wallet with Coldcard (PSBT)

Once there are some funds in received to your BTCPay Wallet connected to Coldcard, you can spend them by using PSBT (opens new window) (Partially Signed Bitcoin Transactions). This allows completely offline signing of your transactions, without ever having to connect your hardware wallet to the internet.

  1. Wallets > Manage > Send
  2. Fill in destination address and the amount
  3. Click on the Sign with a wallet supporting PSBT button.
  4. You will be redirected to PSBT tab, with pre-filled information, click on the Sign with a wallet supporting PSBT (save as file)
  5. Save the file onto MicroSD card
  6. Insert MicroSD into your Coldcard.
  7. In Coldcard, click on the Ready To Sign
  8. Review the transaction information, and click OK button to sign it.
  9. Transaction will be saved onto MicroSD.
  10. In BTCPay, go to PSBT tab of the wallet and upload the signed PSBT file.
  11. Click Decode
  12. Click Other Actions and select Review
  13. Review your transactions and click Broadcast to broadcast it on the network.

The video below shows how to connect your BTCPay store to your Coldcard.

- + diff --git a/Community/index.html b/Community/index.html index 911637faa3..363a2b7628 100644 --- a/Community/index.html +++ b/Community/index.html @@ -9,7 +9,7 @@ - + @@ -62,6 +62,6 @@

- + diff --git a/Conference-PoS-guide/index.html b/Conference-PoS-guide/index.html index 0a1649255f..2e9494ac6f 100644 --- a/Conference-PoS-guide/index.html +++ b/Conference-PoS-guide/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@ →

- + diff --git a/Configurator/index.html b/Configurator/index.html index cb95233578..d8d3ef30a5 100644 --- a/Configurator/index.html +++ b/Configurator/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Contribute/Design/index.html b/Contribute/Design/index.html index 70231d6d80..50d53b89ff 100644 --- a/Contribute/Design/index.html +++ b/Contribute/Design/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/Contribute/Dev/index.html b/Contribute/Dev/index.html index 000a69e727..862da8b8bd 100644 --- a/Contribute/Dev/index.html +++ b/Contribute/Dev/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Coding BTCPay Server

# Why coding matters

By helping the project grow, become more mature, advanced and elaborate, coders working on BTCPay Server are a central component of the project.

If you have coding skills, be it writing or reviewing code, you can contribute to BTCPay Server.

# Where to start

If you're a developer looking to help, but you're not sure where to begin, check the good first issue label (opens new window), which contains small pieces of work that have been specifically flagged as being friendly to new contributors.

Contributors looking to do something a bit more challenging, before opening a pull request, please create an issue (opens new window) or join our community chat (opens new window) to get early feedback, discuss best ways to tackle the problem and to ensure there is no work duplication.

We are actively looking for developers who can take on and resolve GitHub issues and help with development. If you would like to help us, but need some guidance, the #dev channel on Mattermost (opens new window) is the place to ask questions.

# Setup Developer Environment

If you are interested in getting started as a developer or tester of the software behind BTCPay Server, check out the Setup Developer Environment guide that will walk you step by step through every software used in development with BTCPay such as Git, GitBash, Github, Docker, Visual Studio, Postgres, etc. If you have never coded before and you are looking to learn something new, start here.

# Local BTCPay Development

If you already have a developer environment setup you can start with the BTCPay specific Local Development documentation.

# Local BTCPay Testing

Once you have your development environment tools setup and your local BTCPay Server running, view the Local Testing guide. This shows you how to use BTCPay in regtest mode for use in development and for users who want to test new features before they are released.

# Requirements

Software requirements (ie. IDE) can also be found in local development.

# Videos

BTCPay Server development videos can be found here or on the BTCPayServer YouTube (opens new window) channel.

- + diff --git a/Contribute/DevCode/index.html b/Contribute/DevCode/index.html index 4530270dcb..782a25976c 100644 --- a/Contribute/DevCode/index.html +++ b/Contribute/DevCode/index.html @@ -9,7 +9,7 @@ - + @@ -99,6 +99,6 @@ →

- + diff --git a/Contribute/DevTest/index.html b/Contribute/DevTest/index.html index a8dd53e064..adf50382d5 100644 --- a/Contribute/DevTest/index.html +++ b/Contribute/DevTest/index.html @@ -9,7 +9,7 @@ - + @@ -84,6 +84,6 @@ →

- + diff --git a/Contribute/Misc/index.html b/Contribute/Misc/index.html index 74da19d77b..7519e4a1cd 100644 --- a/Contribute/Misc/index.html +++ b/Contribute/Misc/index.html @@ -9,7 +9,7 @@ - + @@ -64,6 +64,6 @@

- + diff --git a/Contribute/Translate/index.html b/Contribute/Translate/index.html index 5dca9b0bb3..49b7c9aec6 100644 --- a/Contribute/Translate/index.html +++ b/Contribute/Translate/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

- + diff --git a/Contribute/Write/index.html b/Contribute/Write/index.html index 960ba25ee6..8a62e9d933 100644 --- a/Contribute/Write/index.html +++ b/Contribute/Write/index.html @@ -9,7 +9,7 @@ - + @@ -59,6 +59,6 @@ GitHub (opens new window)

# Documenting BTCPay Server

# Why documentation matters

Documentation is essential to give users of all skill levels concise and clear information about the software and how to use it. BTCPay server has many different use cases and as a result many different kinds of users seeking information from the documentation. Writers contributing to BTCPay Server are as important as any other contributor.

If you have technical knowledge in a certain area, want to help document new features or simply get involved in the BTCPay Server project, documentation is a great place to get started with contributing.

If you have writing skills or if you have a fair knowledge of the English language, then you can contribute to BTCPay Server or review the work of other contributors. Writing contributors can help in a number of places.

# BTCPay Documentation

Documentation work needing to be completed can be found in the open issues page (opens new window) on Github. For information on how to start a documentation task, see the documentation guide.

For documentation guidance or discussion of a new documentation idea, join the #documentation channel on Mattermost (opens new window).

# BTCPay Blog

Another great way to contribute is by writing content for the BTCPay blog. To get started on a blog topic, join the #content creation channel on Mattermost (opens new window).

# Requirements

In order to contribute to BTCPay Server as a writer there are some requirements.

Since most of the documentation done in BTCPay Server is submitted and reviewed through Github, you must have a Github account (opens new window). It's also on Github that you can contribute by reviewing the documentation work done by others (pull requests).

Important note: Contributions explained in this documentation are meant to be done in English only. If you wish to contribute in other languages, see Translations.

# Text Editor

It is recommended to have a Rich-Text editor.

Notepad++ (opens new window) is a decent software and easy to use for the newer contributors.

For more advanced users, Visual Studio Code (VS Code) (opens new window) is a good choice. The Markdown All In One extension in VS Code is also recommended, for visual comfort while editing and the ability to preview Markdown changes. This is helpful for the BTCPay documentation which is written primarily in Markdown.

These are only recommended: If you already use other similar software that you're accustomed to, you are free to continue using them.

# Version Control

To be able to manage your contributions (such as forking repositories, creating and working on branches, making pull requests and issues, etc.) it's recommended you have Github Desktop (opens new window). You can see the step by step guide to making a pull request using Github Desktop here.

- + diff --git a/Contribute/WriteBlog/index.html b/Contribute/WriteBlog/index.html index f66f548f54..72643c6b47 100644 --- a/Contribute/WriteBlog/index.html +++ b/Contribute/WriteBlog/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Contribute/WriteDocs/index.html b/Contribute/WriteDocs/index.html index 8179cc3d5c..8364c5934b 100644 --- a/Contribute/WriteDocs/index.html +++ b/Contribute/WriteDocs/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/Contribute/WriteSoftware/index.html b/Contribute/WriteSoftware/index.html index 401cb623b5..54b2907f1f 100644 --- a/Contribute/WriteSoftware/index.html +++ b/Contribute/WriteSoftware/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/Contribute/index.html b/Contribute/index.html index 3dd9dc6e37..238228779f 100644 --- a/Contribute/index.html +++ b/Contribute/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# How to contribute to BTCPay Server?

BTCPay Server is built and maintained entirely by volunteer contributors around the internet.

We welcome, appreciate and encourage new contributions.

Depending on your skills and interest, you can help in a number of ways:

Every contribution is important and if you have any questions, feel free to consult our growing community.

- + diff --git a/CreateStore/index.html b/CreateStore/index.html index 5a2b561e12..488e8a0ce3 100644 --- a/CreateStore/index.html +++ b/CreateStore/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/CreateWallet/index.html b/CreateWallet/index.html index f87a56fba7..a4f539cfd2 100644 --- a/CreateWallet/index.html +++ b/CreateWallet/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/CustomIntegration/index.html b/CustomIntegration/index.html index b883b7adfb..00e98f2c64 100644 --- a/CustomIntegration/index.html +++ b/CustomIntegration/index.html @@ -9,7 +9,7 @@ - + @@ -93,6 +93,6 @@ (opens new window)

- + diff --git a/Dashboard/index.html b/Dashboard/index.html index 7e6254fca5..4100f68e82 100644 --- a/Dashboard/index.html +++ b/Dashboard/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/Deployment/Azure/index.html b/Deployment/Azure/index.html index 6b650da347..4b06f36f36 100644 --- a/Deployment/Azure/index.html +++ b/Deployment/Azure/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Azure Deployment

This setup is similar to the Docker Deployment, except that the docker-compose is hosted by Microsoft Azure.

# One-click setup

Start by clicking the following button:

Deploy to Azure (opens new window)

You can log into Azure (opens new window) with your Microsoft account.

Final installation steps:

Fill in the remaining options: Azure Resource Config

  • Click 'Purchase' to confirm
  • (Wait for Azure deployment)
  • Type ip into the search bar and select the first option, BTCPayServerPublicIP
  • Copy the hostname for your Azure deployment, under DNS name: Azure BTCPayServerPublicIP
  • Visit it (all major browsers supported)
  • Click 'Register' and create an account - This will be your admin account!
  • At your domain registrar, point your domain at this hostname (read more: How to change your BTCPay Server domain name)
  • Then, visit https://EXAMPLE.eastus.cloudapp.azure.com/server/maintenance
  • Enter your domain name and click 'Confirm'
  • (Wait 1-5 minutes)
  • Done! Visit https://EXAMPLE.MYSITE.com/stores to create your store and begin invoicing.

For advanced users, you can connect via SSH with the information on https://EXAMPLE.MYSITE.com/server/services/ssh, and:

  • Run docker ps and docker logs xxx to view running processes
  • Run btcpay-down.sh and btcpay-up.sh to stop and start the BTCPayServer

Approximate Cost (unpruned, Bitcoin-only, after Azure $200 free trial): 60 USD per month

After all your nodes have synced and you've confirmed everything works, follow this guide to fine-tune for savings; costs should drop to 30 or 40 USD per month.

Learn more: btcpayserver/btcpayserver-azure (opens new window)

- + diff --git a/Deployment/AzurePennyPinching/index.html b/Deployment/AzurePennyPinching/index.html index d1c9b8e65e..d28410d05d 100644 --- a/Deployment/AzurePennyPinching/index.html +++ b/Deployment/AzurePennyPinching/index.html @@ -9,7 +9,7 @@ - + @@ -92,6 +92,6 @@ →

- + diff --git a/Deployment/Clovyr/index.html b/Deployment/Clovyr/index.html index 9081352680..d283f1cdfb 100644 --- a/Deployment/Clovyr/index.html +++ b/Deployment/Clovyr/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Deployment/DynamicDNS/index.html b/Deployment/DynamicDNS/index.html index 8f5dc4e79e..eb297523ff 100644 --- a/Deployment/DynamicDNS/index.html +++ b/Deployment/DynamicDNS/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Deployment/GoogleCloud/index.html b/Deployment/GoogleCloud/index.html index f572724ba6..6f33c31fd1 100644 --- a/Deployment/GoogleCloud/index.html +++ b/Deployment/GoogleCloud/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Deployment/Hack0/index.html b/Deployment/Hack0/index.html index f14e1df5cd..4fb8cd3a41 100644 --- a/Deployment/Hack0/index.html +++ b/Deployment/Hack0/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Deployment/Hardware/index.html b/Deployment/Hardware/index.html index 9f2ab84271..501d351843 100644 --- a/Deployment/Hardware/index.html +++ b/Deployment/Hardware/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Hardware Deployment

Hardware deployment is advised when you want to be in total control of your own infrastructure.

Those are very useful for personal use or for people who wants absolute control over their infrastructure.

The main downside of hardware deployment is that it requires some hardware investment, and higher learning curve. The availability of your server will also probably lower than using a VPS such as LunaNode, as you are more likely to suffer from internet down time or hardware failure.

If you are still not sure whether you need hardware deployment, please see our diagram.

While all hardware deployments are similar to one another, we document step by step the process on three different hardware settings.

You can easily adapt those documentation on the custom hardware you prefer, we support arm32, arm64 and amd64.

Note that those solutions are all based on our docker deployment system.

- + diff --git a/Deployment/HardwareAsAService/index.html b/Deployment/HardwareAsAService/index.html index 73f5df7a0e..6b10538a99 100644 --- a/Deployment/HardwareAsAService/index.html +++ b/Deployment/HardwareAsAService/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/Deployment/LightningInABox/index.html b/Deployment/LightningInABox/index.html index 82dc23fe65..8938396a71 100644 --- a/Deployment/LightningInABox/index.html +++ b/Deployment/LightningInABox/index.html @@ -9,7 +9,7 @@ - + @@ -144,6 +144,6 @@ →

- + diff --git a/Deployment/LunaNode/index.html b/Deployment/LunaNode/index.html index bf43461a1c..ac872d10f4 100644 --- a/Deployment/LunaNode/index.html +++ b/Deployment/LunaNode/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/Deployment/ManualDeployment/index.html b/Deployment/ManualDeployment/index.html index 6d037812bb..c4ae9f3d6d 100644 --- a/Deployment/ManualDeployment/index.html +++ b/Deployment/ManualDeployment/index.html @@ -9,7 +9,7 @@ - + @@ -112,6 +112,6 @@ →

- + diff --git a/Deployment/ManualDeploymentExtended/index.html b/Deployment/ManualDeploymentExtended/index.html index 9c845f5448..56503e4e15 100644 --- a/Deployment/ManualDeploymentExtended/index.html +++ b/Deployment/ManualDeploymentExtended/index.html @@ -9,7 +9,7 @@ - + @@ -731,6 +731,6 @@

- + diff --git a/Deployment/RaspberryPi4/index.html b/Deployment/RaspberryPi4/index.html index 2cf8e35b92..c5ee34d956 100644 --- a/Deployment/RaspberryPi4/index.html +++ b/Deployment/RaspberryPi4/index.html @@ -9,7 +9,7 @@ - + @@ -166,6 +166,6 @@ →

- + diff --git a/Deployment/ReverseProxyToTor/index.html b/Deployment/ReverseProxyToTor/index.html index 2605f65289..de8d5d683a 100644 --- a/Deployment/ReverseProxyToTor/index.html +++ b/Deployment/ReverseProxyToTor/index.html @@ -9,7 +9,7 @@ - + @@ -265,6 +265,6 @@ →

- + diff --git a/Deployment/ReverseSSHtunnel/index.html b/Deployment/ReverseSSHtunnel/index.html index 6e1752dd46..a43348f030 100644 --- a/Deployment/ReverseSSHtunnel/index.html +++ b/Deployment/ReverseSSHtunnel/index.html @@ -9,7 +9,7 @@ - + @@ -109,6 +109,6 @@ →

- + diff --git a/Deployment/ThirdPartyHosting/index.html b/Deployment/ThirdPartyHosting/index.html index 82dd113339..8f66632735 100644 --- a/Deployment/ThirdPartyHosting/index.html +++ b/Deployment/ThirdPartyHosting/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/Deployment/index.html b/Deployment/index.html index 2016ec4501..6e02f2d331 100644 --- a/Deployment/index.html +++ b/Deployment/index.html @@ -9,7 +9,7 @@ - + @@ -62,6 +62,6 @@ →

- + diff --git a/Deployment/voltagecloud/index.html b/Deployment/voltagecloud/index.html index eb0fc050a2..fdbcbd8fe0 100644 --- a/Deployment/voltagecloud/index.html +++ b/Deployment/voltagecloud/index.html @@ -9,7 +9,7 @@ - + @@ -90,6 +90,6 @@ →

- + diff --git a/Deployment/webdeployment/index.html b/Deployment/webdeployment/index.html index b24fdac428..a01f0e2db7 100644 --- a/Deployment/webdeployment/index.html +++ b/Deployment/webdeployment/index.html @@ -9,7 +9,7 @@ - + @@ -73,6 +73,6 @@ Found a deployment that is missing, and do you want it added or notified us? Join the community chat (opens new window) on Mattermost by downloading Mattermost app (opens new window), or on Telegram (opens new window) and tell us about it. You can also create an issue in the BTCPay server Documents on Github (opens new window).

- + diff --git a/Development/Altcoins/index.html b/Development/Altcoins/index.html index e8652bf7be..76c4514599 100644 --- a/Development/Altcoins/index.html +++ b/Development/Altcoins/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/Development/GreenFieldExample-NodeJS/index.html b/Development/GreenFieldExample-NodeJS/index.html index 10c1eb80b5..94ec96e7ce 100644 --- a/Development/GreenFieldExample-NodeJS/index.html +++ b/Development/GreenFieldExample-NodeJS/index.html @@ -9,7 +9,7 @@ - + @@ -285,6 +285,6 @@ →

- + diff --git a/Development/GreenFieldExample/index.html b/Development/GreenFieldExample/index.html index 2a5abf7414..418ea39f50 100644 --- a/Development/GreenFieldExample/index.html +++ b/Development/GreenFieldExample/index.html @@ -9,7 +9,7 @@ - + @@ -160,6 +160,6 @@ →

- + diff --git a/Development/GreenfieldExample-PHP/index.html b/Development/GreenfieldExample-PHP/index.html index bdea6eaf9a..f34e859a4f 100644 --- a/Development/GreenfieldExample-PHP/index.html +++ b/Development/GreenfieldExample-PHP/index.html @@ -9,7 +9,7 @@ - + @@ -209,6 +209,6 @@ →

- + diff --git a/Development/InvoiceMetadata/index.html b/Development/InvoiceMetadata/index.html index 692fab43bd..416a30d4bd 100644 --- a/Development/InvoiceMetadata/index.html +++ b/Development/InvoiceMetadata/index.html @@ -9,7 +9,7 @@ - + @@ -132,6 +132,6 @@ →

- + diff --git a/Development/LocalDev/index.html b/Development/LocalDev/index.html index 72ab912a33..cd1ac7160e 100644 --- a/Development/LocalDev/index.html +++ b/Development/LocalDev/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ dotnet test -c Altcoins-Debug

# HTTPS support for local development

Some browser security features may require that you use HTTPS to be properly tested.

In this case, use Bitcoin-HTTPS (or Altcoin-HTTPS) launch profile. This will create a self signed certificate for your development purpose.

However, your browser will not trust it, making it difficult to debug.

You can instruct your OS to trust this development time certificate by running:

dotnet dev-certs https --trust
 

# Videos

For more information check out these videos:

and these notes:

- + diff --git a/Development/LocalDevelopment/index.html b/Development/LocalDevelopment/index.html index c5c9b0edca..cc33db3b4d 100644 --- a/Development/LocalDevelopment/index.html +++ b/Development/LocalDevelopment/index.html @@ -9,7 +9,7 @@ - + @@ -98,6 +98,6 @@ →

- + diff --git a/Development/Plugins/index.html b/Development/Plugins/index.html index 256dd9687c..a438d4a9fa 100644 --- a/Development/Plugins/index.html +++ b/Development/Plugins/index.html @@ -9,7 +9,7 @@ - + @@ -236,6 +236,6 @@ →

- + diff --git a/Development/TestnetDemo/index.html b/Development/TestnetDemo/index.html index b1fb6fef4b..96617a3293 100644 --- a/Development/TestnetDemo/index.html +++ b/Development/TestnetDemo/index.html @@ -9,7 +9,7 @@ - + @@ -63,6 +63,6 @@

- + diff --git a/Development/Theme/index.html b/Development/Theme/index.html index 7bcef3ee05..ad304fa1ce 100644 --- a/Development/Theme/index.html +++ b/Development/Theme/index.html @@ -9,7 +9,7 @@ - + @@ -94,6 +94,6 @@ →

- + diff --git a/Development/ecommerce-integration-guide/index.html b/Development/ecommerce-integration-guide/index.html index 07eef93b76..0e5fee6358 100644 --- a/Development/ecommerce-integration-guide/index.html +++ b/Development/ecommerce-integration-guide/index.html @@ -9,7 +9,7 @@ - + @@ -107,6 +107,6 @@ →

- + diff --git a/Development/index.html b/Development/index.html index 04adaf89e7..f6ff784067 100644 --- a/Development/index.html +++ b/Development/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Docker/backup-restore/index.html b/Docker/backup-restore/index.html index 6d62b4758d..dc33fdd52f 100644 --- a/Docker/backup-restore/index.html +++ b/Docker/backup-restore/index.html @@ -9,7 +9,7 @@ - + @@ -123,6 +123,6 @@ →

- + diff --git a/Docker/chatwoot/index.html b/Docker/chatwoot/index.html index cc53a1af3d..93d46c42be 100644 --- a/Docker/chatwoot/index.html +++ b/Docker/chatwoot/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@
  1. Wait for BTPay to be online and then create the database for chatwoot
docker exec -ti chatwoot sh -c "export DISABLE_DATABASE_ENVIRONMENT_CHECK=1 && bundle exec rails db:reset"
 
  1. Go to chatwoot website at https://chatwoot.xpayserver.com and set up.
- + diff --git a/Docker/cloudflare-tunnel/index.html b/Docker/cloudflare-tunnel/index.html index 88df0dd5de..20230a13eb 100644 --- a/Docker/cloudflare-tunnel/index.html +++ b/Docker/cloudflare-tunnel/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

- + diff --git a/Docker/fastsync/index.html b/Docker/fastsync/index.html index 0d6ee505c5..1ccee0a582 100644 --- a/Docker/fastsync/index.html +++ b/Docker/fastsync/index.html @@ -9,7 +9,7 @@ - + @@ -86,6 +86,6 @@ →

- + diff --git a/Docker/fireflyiii/index.html b/Docker/fireflyiii/index.html index 9b854f3adc..b6535fa60d 100644 --- a/Docker/fireflyiii/index.html +++ b/Docker/fireflyiii/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Docker/index.html b/Docker/index.html index dff07a1405..41fc093e06 100644 --- a/Docker/index.html +++ b/Docker/index.html @@ -9,7 +9,7 @@ - + @@ -218,6 +218,6 @@ →

- + diff --git a/Docker/joinmarket/index.html b/Docker/joinmarket/index.html index 241375981e..6f7665e82c 100644 --- a/Docker/joinmarket/index.html +++ b/Docker/joinmarket/index.html @@ -9,7 +9,7 @@ - + @@ -108,6 +108,6 @@ →

- + diff --git a/Docker/lightning-terminal/index.html b/Docker/lightning-terminal/index.html index a800c8cfa7..693fdf70c1 100644 --- a/Docker/lightning-terminal/index.html +++ b/Docker/lightning-terminal/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/Docker/ndlc/index.html b/Docker/ndlc/index.html index a8275d0c26..b007fccf7f 100644 --- a/Docker/ndlc/index.html +++ b/Docker/ndlc/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/Docker/pihole/index.html b/Docker/pihole/index.html index 6aa51539cb..6f1f2b57a1 100644 --- a/Docker/pihole/index.html +++ b/Docker/pihole/index.html @@ -9,7 +9,7 @@ - + @@ -76,6 +76,6 @@ →

- + diff --git a/Docker/tallycoin-connect/index.html b/Docker/tallycoin-connect/index.html index 0c34f5f602..edb96ce4bb 100644 --- a/Docker/tallycoin-connect/index.html +++ b/Docker/tallycoin-connect/index.html @@ -9,7 +9,7 @@ - + @@ -76,6 +76,6 @@ →

- + diff --git a/Drupal/index.html b/Drupal/index.html index 7220d64849..fe5f68c74f 100644 --- a/Drupal/index.html +++ b/Drupal/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@ →

- + diff --git a/DynamicReports/index.html b/DynamicReports/index.html index 7591b5282a..97f08f41d7 100644 --- a/DynamicReports/index.html +++ b/DynamicReports/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/ElectrumPersonalServer/index.html b/ElectrumPersonalServer/index.html index 1c3c1cc2c1..89c84d8846 100644 --- a/ElectrumPersonalServer/index.html +++ b/ElectrumPersonalServer/index.html @@ -9,7 +9,7 @@ - + @@ -73,6 +73,6 @@ →

- + diff --git a/ElectrumWallet/index.html b/ElectrumWallet/index.html index e9da186480..465275b2a1 100644 --- a/ElectrumWallet/index.html +++ b/ElectrumWallet/index.html @@ -9,7 +9,7 @@ - + @@ -61,6 +61,6 @@

If you are running a version older than Electrum 4, also enter the following command and press 'enter'

wallet.storage.write()
 
ElectrumWallet

Restart your Electrum and verify that the newly set gap limit is correct by entering in the console:

wallet.gap_limit
 

There's no good answer to how much you should set the gap limit to. Most merchants set 100-200. If you're a big merchants with high transaction volume, you can try with even higher gap limit.

For more details about the Gap Limit, check the FAQ.

Electrum and BTCPay Server are now connected. Any payments received to your BTCPay will be visible in Electrum, where you can further spend them.

- + diff --git a/ElectrumX/index.html b/ElectrumX/index.html index 25bd46a12a..1f5dd75e0c 100644 --- a/ElectrumX/index.html +++ b/ElectrumX/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/FAQ/Altcoin/index.html b/FAQ/Altcoin/index.html index 3eaee0af20..82b293230e 100644 --- a/FAQ/Altcoin/index.html +++ b/FAQ/Altcoin/index.html @@ -9,7 +9,7 @@ - + @@ -71,6 +71,6 @@

- + diff --git a/FAQ/Apps/index.html b/FAQ/Apps/index.html index b2894e1db4..6451f999d5 100644 --- a/FAQ/Apps/index.html +++ b/FAQ/Apps/index.html @@ -9,7 +9,7 @@ - + @@ -180,6 +180,6 @@ →

- + diff --git a/FAQ/Deployment/index.html b/FAQ/Deployment/index.html index 37248a6cde..6bbcb8ddd8 100644 --- a/FAQ/Deployment/index.html +++ b/FAQ/Deployment/index.html @@ -9,7 +9,7 @@ - + @@ -286,6 +286,6 @@ →

- + diff --git a/FAQ/General/index.html b/FAQ/General/index.html index 889fb8d073..19097a939f 100644 --- a/FAQ/General/index.html +++ b/FAQ/General/index.html @@ -9,7 +9,7 @@ - + @@ -80,6 +80,6 @@ →

- + diff --git a/FAQ/Integrations/index.html b/FAQ/Integrations/index.html index 48d35d813c..1ff08caf90 100644 --- a/FAQ/Integrations/index.html +++ b/FAQ/Integrations/index.html @@ -9,7 +9,7 @@ - + @@ -116,6 +116,6 @@ →

- + diff --git a/FAQ/LightningNetwork/index.html b/FAQ/LightningNetwork/index.html index 0af38a9745..22f5a0a4c7 100644 --- a/FAQ/LightningNetwork/index.html +++ b/FAQ/LightningNetwork/index.html @@ -9,7 +9,7 @@ - + @@ -198,6 +198,6 @@ →

- + diff --git a/FAQ/ServerSettings/index.html b/FAQ/ServerSettings/index.html index 4dd5350d32..f35d10221c 100644 --- a/FAQ/ServerSettings/index.html +++ b/FAQ/ServerSettings/index.html @@ -9,7 +9,7 @@ - + @@ -125,6 +125,6 @@ →

- + diff --git a/FAQ/Stores/index.html b/FAQ/Stores/index.html index 5a7cf10fe4..a1d3632eda 100644 --- a/FAQ/Stores/index.html +++ b/FAQ/Stores/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

- + diff --git a/FAQ/Synchronization/index.html b/FAQ/Synchronization/index.html index 0967348ffd..500102c988 100644 --- a/FAQ/Synchronization/index.html +++ b/FAQ/Synchronization/index.html @@ -9,7 +9,7 @@ - + @@ -132,6 +132,6 @@ →

- + diff --git a/FAQ/Wallet/index.html b/FAQ/Wallet/index.html index 3cd5d25ed3..4dbb146b83 100644 --- a/FAQ/Wallet/index.html +++ b/FAQ/Wallet/index.html @@ -9,7 +9,7 @@ - + @@ -79,6 +79,6 @@ →

- + diff --git a/FAQ/index.html b/FAQ/index.html index 2a1556c912..6d392c6fad 100644 --- a/FAQ/index.html +++ b/FAQ/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Frequently Asked Questions and Common Issues

This document contains a Table of contents to all FAQ and common issues.

# General FAQ

General, non-technical questions about BTCPay. What it is, how it works, what are its features, why is it different and who can use it.

# Deployment FAQ

Questions and solutions to BTCPay installation.

# General Deployment FAQ

# Web Deployment FAQ

# Luna Node Web Deployment FAQ

# Manual Deployment FAQ

# Synchronization FAQ

Common questions and issues that may occur during the initial sync of BTCPay.

# Integrations FAQ

Questions about e-commerce and other integrations.

# Integrations General

# WooCommerce FAQ

# Server Settings FAQ

Common problems and questions server admins have.

# Maintenance FAQ

# Theme / Customization FAQ

# Policies FAQ

# Services FAQ

# Files FAQ

# Stores FAQ

Store settings explained.

# Wallet FAQ

Here are some of the questions and problems about wallets in BTCPay.

# Apps FAQ

Frequent questions about the applications in BTCPay.

# Lightning Network FAQ

Lightning Network troubleshooting and common problems.

# Lightning Network General FAQ

# Lightning Network LND FAQ

# Lightning Network Core Lightning (CLN) FAQ

# Altcoins FAQ

- + diff --git a/Forms/index.html b/Forms/index.html index e683dbdf41..7b27a3eb33 100644 --- a/Forms/index.html +++ b/Forms/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ We'll start by giving it a name; in the example, we will use Restaurant. Unlike before, we will start with the empty field that was generated.

BTCPay Server formbuilder - Create new form
  1. We will name the first field, Table number
  2. Define the Type of the field; we need it to be Text or Number, click on the drop-down and select Number.
BTCPay Server formbuilder - Create new form
  1. The label we set for this field as it shows to the customer; in our example, we will name it Table Number.
  2. Regarding The name of the field, we replicate the previous field's name, Table Number, for consistency.
  3. We could define a Default value; however, we'll keep it empty in the example.
  4. Helper Text This is the text provided below the field we are creating to indicate what you request from the customer.
  5. Last, we can set two parameters; one is always to make it required to be filled out; in this example, we will set this to yes. And if it's a Constant, users can't change this so we won't use the setting for the example.
BTCPay Server formbuilder - Create new form

After you've filled in the parameters for the field, it should show on the left of your editor how the field displays and functions when the customer interacts with it.

BTCPay Server formbuilder - Create new form

Now that the first field is done, you can click on the + Add form element below your first field and create the rest of the required form fields. Once you've made all the fields, click Save in the top right of your screen, and all should be set!

BTCPay Server formbuilder - Create new form

The Form Builder makes creating custom forms flexible and easy. If you still require more personalization, as mentioned at the start of this guide, please read on Advanced Forms to learn about the JSON created in the Code tab in the Form builder.

# Public Forms

When Allow form for public use is enabled, a form can be used as a way to share a URL, where users must fill in the form and an invoice is then generated.

By default, the invoice currency is set to the store's default currency, and the amount is set to "any".

You can configure the form to have a pre-configured currency and amount by creating fields with specific names.

You can create these fields with type hidden to not show it to the user. Additionally, if you'd like the user to not be able to modify the values, you must set Constant to checked.

This can be used as an alternative to the Pay Button, with the added benefit that you can lock in invoice parameters such as amount and currency.

# Adjust invoice amounts based on user input

In most modern ecommerce scenarios, you need to modify the amount being charged based on user input, such as their preferred shipping method, their country, promotional codes, etc.

The form comes with such functionality as of BTCPay Server version 1.11.0. Any field that has its name start with invoice_amount_adjustment (supported since v1.11) or invoice_amount_multiply_adjustment (supported since v1.12) and its value being a valid number will automatically adjust the invoice amount.

This functionality currently works for public form usage and for the Point of Sale plugin. See the Mirror Fields section of the Advanced Forms guide for details.

# Charging extra based on shipping method

Create a field of type "select", with the name invoice_amount_adjustment_shipping_method, and options that map to what shipping methods you have available. We will use 2 options: DHL with a value of 10 and Fedex with a value of 20. When a user selects either or, the invoice amount will be adjusted by 10 or 20 respectively.

Note: This is a simple example. While the invoice amount will be correctly adjusted, you will not be able to see the selected shipping option inside the created invoice. We must make use of Mirror fields to accomplish this.

To save the user selected shipping method choice we must do the following instead:

# Promo codes

When the user enters chocolate in the promo code field, the invoice amount will be adjusted by -5.

# Showing user input on the receipt

By default, none of the user input will be shown on the invoice receipt. To do this, we must create a mapping for each field.

- + diff --git a/Grandnode/index.html b/Grandnode/index.html index 29161d1575..baad6bb182 100644 --- a/Grandnode/index.html +++ b/Grandnode/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Guide/index.html b/Guide/index.html index a873652f23..5744283dba 100644 --- a/Guide/index.html +++ b/Guide/index.html @@ -9,7 +9,7 @@ - + @@ -83,6 +83,6 @@ →

- + diff --git a/HardwareWalletIntegration/index.html b/HardwareWalletIntegration/index.html index ca38522cff..86bb19f135 100644 --- a/HardwareWalletIntegration/index.html +++ b/HardwareWalletIntegration/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/InvoiceNinja/index.html b/InvoiceNinja/index.html index 90b4745271..12cb98d6d0 100644 --- a/InvoiceNinja/index.html +++ b/InvoiceNinja/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/Invoices/index.html b/Invoices/index.html index bf447055b7..523d9c896a 100644 --- a/Invoices/index.html +++ b/Invoices/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/LNDhubAPI/index.html b/LNDhubAPI/index.html index 6d15a6fe58..9adbd2a94a 100644 --- a/LNDhubAPI/index.html +++ b/LNDhubAPI/index.html @@ -9,7 +9,7 @@ - + @@ -73,6 +73,6 @@ →

- + diff --git a/LedgerWallet/index.html b/LedgerWallet/index.html index 9edd4dcf05..c37069e49b 100644 --- a/LedgerWallet/index.html +++ b/LedgerWallet/index.html @@ -9,7 +9,7 @@ - + @@ -59,6 +59,6 @@ GitHub (opens new window)

# Connecting Ledger Wallet to BTCPay Server

This document shows how to connect Ledger Nano S Wallet to BTCPay Server.

WARNING

Direct Ledger Nano S integration is no longer supported. For Bitcoin wallets, you can use your Ledger hardware wallet regularly via the new hardware wallet integration.

For altcoin wallets, you can spend funds from your external wallet, sign a transaction within the internal wallet with HD Private Key or mnemonic seed or a hot wallet.

To set up a new altcoin wallet, add the extended public key manually or create a new wallet.

# Ledger Nano S Wallet Setup

This guide assumes, you have a Nano S wallet set up. To configure the Nano S, please see the quick setup guide on manufacturer's website (opens new window).

# Requirements

  1. Bitcoin App installed on the Ledger
  2. Google Chrome or Firefox
  3. For Firefox, U2F needs to be enabled in about:config
  4. No other U2F devices plugged in into your PC (Yubikey, other wallets, etc)

# Quick Setup

  1. Plug in Ledger Nano S into your PC.
  2. Open the Bitcoin app on your Ledger.
  3. In BTCPay Server, Store > Settings > Wallet > Setup > Derivation Scheme > Import from Hardware Device > Ledger wallet
  4. Select the account which you want to use, in most cases it's the Account 0
  5. Confirm the Export public key on the wallet.
  6. The extended public key will now automatically be added from Ledger to your BTCPay Server Store.
  7. Make sure that the derivation scheme is Enabled
  8. Click Continue
  9. Confirm the address match in BTCPay.

Your Ledger wallet is now connected to your BTCPay. Payments go directly to Ledger.

# Manual Setup

If you have more than 20 accounts in your Ledger you might not be able to find the correct account because the select shows a maximum of 20 entries. In this case you can manually find the extended public key for your wanted account in these steps:

  1. Open the Ledger live app (opens new window)
  2. Accounts -> choose your account
  3. Edit Account on the top right via the tool-icon
  4. In Edit Account -> ADVANCED LOGS
  5. Copy the extended public key string
  6. Paste it manually into the "DerivationScheme" textfield
  7. Continue with Step 7 of the Quick Setup above
Ledger Account "Advanced Logs" info screenshot

# Spending from BTCPay Server wallet with Ledger

Once there are some funds in received to your BTCPay Wallet connected to Ledger, you can spend them by signing a transaction with your hardware wallet. This allows easy interaction of the Ledger wallet with your full node, without leaking information to third-party servers.

  1. Plug in Ledger Nano S into your PC.
  2. Open the Bitcoin app on your Ledger.
  3. In BTCPay, go to Wallets > Manage > Send
  4. Fill in destination address and the amount
  5. Click on the Sign with your Ledger Wallet device.
  6. BTCPay will establish a connection with the Ledger wallet and display transaction information on the wallet screen.
  7. Confirm the transaction on the Ledger.
  8. In Ledger, click on the Ready To Sign
  9. Review your transactions and click Broadcast to broadcast it on the network.

The video below shows how to connect your BTCPay store to your Ledger and how to use Ledger with the internal BTCPay wallet.

- + diff --git a/LightningNetwork/index.html b/LightningNetwork/index.html index d7257f1228..59fd35557d 100644 --- a/LightningNetwork/index.html +++ b/LightningNetwork/index.html @@ -9,7 +9,7 @@ - + @@ -109,6 +109,6 @@

- + diff --git a/LightningNetwork_PaymentChannels/index.html b/LightningNetwork_PaymentChannels/index.html index 8efc83bb41..fdc3452f03 100644 --- a/LightningNetwork_PaymentChannels/index.html +++ b/LightningNetwork_PaymentChannels/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

# Opening and operating payment channels

Given that the Lightning Network is a relatively new technology under active development, getting your freshly deployed node ready to send and receive payments, still, requires a couple of steps.

Overview:

  1. The lightning node is deployed, enabled and its on-chain wallet is funded
  2. A peer is identified and the first payment channel is opened
  3. Inbound and outbound liquidity is acquired. The node is now able to send and receive
  4. Liquidity management, an ongoing process to maintain the capacity to send and receive

Key considerations:

  • Choosing the channel partner. Consider opening the first channel to a well connected peer with robust uptime. This will increase the chances for your payments to be routed and settled.
  • Inbound vs outbound capacity. Outbound capacity allows nodes to send payments whereas inbound capacity allows nodes to receive payments. As a merchant using lightning, having inbound capacity is essential for customers to be able to pay you.
  • Inbound capacity. A node adds inbound capacity by either spending sats from its local balance or having other nodes in the network open channels to it.
  • Liquidity management: maintaining the ability to send and receive is a continous process where a balance between inbound vs outbound capacity has to be maintained across payment channels. This capacity distribution must be adjusted depending upon the use case of the node operator.
  • Lightning Service Providers: LSPs offer paid third-party services that improve the ease of operating a lightning network node. Such services can be used to acquire inbound capacity or to automate the rebalancing process.

Below a set of good resources for a deeper dive into topics such as:

- + diff --git a/Magento/index.html b/Magento/index.html index 1d53fb8f19..3d494fedf9 100644 --- a/Magento/index.html +++ b/Magento/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/NBXplorer/API/index.html b/NBXplorer/API/index.html index 7e6114e7f8..bd5646f6da 100644 --- a/NBXplorer/API/index.html +++ b/NBXplorer/API/index.html @@ -9,7 +9,7 @@ - + @@ -73,6 +73,6 @@ →

- + diff --git a/NBXplorer/Postgres-Migration/index.html b/NBXplorer/Postgres-Migration/index.html index 1e9d83e76d..2731526c6e 100644 --- a/NBXplorer/Postgres-Migration/index.html +++ b/NBXplorer/Postgres-Migration/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/NBXplorer/Postgres-Schema/index.html b/NBXplorer/Postgres-Schema/index.html index 90f8f20113..fa64cd73bb 100644 --- a/NBXplorer/Postgres-Schema/index.html +++ b/NBXplorer/Postgres-Schema/index.html @@ -9,7 +9,7 @@ - + @@ -87,6 +87,6 @@ →

- + diff --git a/NBXplorer/index.html b/NBXplorer/index.html index d73c5ce327..5d12c68cd0 100644 --- a/NBXplorer/index.html +++ b/NBXplorer/index.html @@ -9,7 +9,7 @@ - + @@ -108,6 +108,6 @@ →

- + diff --git a/Nopcommerce/index.html b/Nopcommerce/index.html index bdba3c54f7..0d2d600b9a 100644 --- a/Nopcommerce/index.html +++ b/Nopcommerce/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/Nostr/index.html b/Nostr/index.html index f9f39f77e2..10110f4631 100644 --- a/Nostr/index.html +++ b/Nostr/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/Notifications/index.html b/Notifications/index.html index 054887f190..044f2f45f3 100644 --- a/Notifications/index.html +++ b/Notifications/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ {Invoice.Status} {Invoice.OrderId}

Find the source here for possible updates (opens new window)

Create new Email rule
- + diff --git a/Odoo/index.html b/Odoo/index.html index 49bde5bf4f..f6349129b5 100644 --- a/Odoo/index.html +++ b/Odoo/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/OpenCart/index.html b/OpenCart/index.html index 2c8bb439a4..4c46c084e6 100644 --- a/OpenCart/index.html +++ b/OpenCart/index.html @@ -9,7 +9,7 @@ - + @@ -89,6 +89,6 @@ →

- + diff --git a/Payjoin/index.html b/Payjoin/index.html index 0c392e9ea8..29222a84b7 100644 --- a/Payjoin/index.html +++ b/Payjoin/index.html @@ -9,7 +9,7 @@ - + @@ -59,6 +59,6 @@ GitHub (opens new window)

# BTCPay Server Payjoin Guide

This document explains how to use BTCPay Server's Payjoin feature. For a detailed, technical explanation of how payjoin is implemented, check BIP78 (opens new window)

You can follow this video to better understand what payjoin is and how to use it.

# Enabling Payjoin as a merchant

  1. Create a store
  2. Configure a hot wallet for your derivation scheme. Be sure to use either segwit or segwit wrapped as the address type.
  3. Enable Payjoin/P2EP in the "General Settings" and click "Save"

It's important to note that you will need at least 1 UTXO for payjoin to work.

Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server

# Paying to Payjoin as a user

The BTCPay Wallet supports Payjoin.

  1. Retrieve the BIP21 payment link from a BTCPay Server invoice which has payjoin enabled by either:
    • Scan the QR code with the camera scanning feature
    • Copy the link from the "Open in wallet" button and paste it in the "Parse BIP21" prompt
  2. The send form should be populated with the payment details. You can check if the invoice supports payjoin by expanding "advanced settings" to see if there is a "Payjoin endpoint" input with a url.
  3. Sign your transaction using either BTCPay Server's hardware wallet support via BTCPay Vault or the hot wallet feature.
  4. Once your original transaction is ready, you will be given the option to either Broadcast (Payjoin) or to Broadcast (Simple). Choose Broadcast (Payjoin).
  5. The payjoin server will propose a new special transaction, if possible. If the payjoin server is unable to do the payjoin, the original transaction is broadcast instead.
  6. If you are using a hardware wallet, you will be asked to sign the payjoin transaction again (the hot wallet feature signs the transaction for you automatically).
  7. Congratulations, you've just helped improve Bitcoin's fungibility and your financial sovereignty!
Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server
Receive PayJoin in BTCPay Server

# Why did a payjoin not happen?

There's multiple reasons for this:

  • The store did not have any utxos to contribute towards a payjoin
  • Your wallet does not use the same format as the store's (essential to not raise suspicion to analysis companies)
  • You are not using segwit or p2sh wrapped segwit.
  • The payjoin server is not available

# Supported wallets

Please contact and encourage your wallet developers to add support. The more widespread the usage of payjoin, the more broken the heuristics used by blockchain analysis companies become and can effectively trace your financial history. If you are a wallet developer, please contact us if you need help or have feedback.

- + diff --git a/PaymentRequests/index.html b/PaymentRequests/index.html index 2d85efa0d7..6ded1f0a46 100644 --- a/PaymentRequests/index.html +++ b/PaymentRequests/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/Payouts/index.html b/Payouts/index.html index b59826c140..87013a22a6 100644 --- a/Payouts/index.html +++ b/Payouts/index.html @@ -9,7 +9,7 @@ - + @@ -81,6 +81,6 @@ →

- + diff --git a/Payroll/index.html b/Payroll/index.html index 741c797f20..c1ab413161 100644 --- a/Payroll/index.html +++ b/Payroll/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/PhocaCart/index.html b/PhocaCart/index.html index e2ae03a82b..f969006001 100644 --- a/PhocaCart/index.html +++ b/PhocaCart/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

- + diff --git a/PodServer/index.html b/PodServer/index.html index 69d2d1045c..5770a40fbe 100644 --- a/PodServer/index.html +++ b/PodServer/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

- + diff --git a/PrestaShop/index.html b/PrestaShop/index.html index ab03a2a7a1..58c178e307 100644 --- a/PrestaShop/index.html +++ b/PrestaShop/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/PullPayments/index.html b/PullPayments/index.html index 6b51b021f7..a0fe60b56d 100644 --- a/PullPayments/index.html +++ b/PullPayments/index.html @@ -9,7 +9,7 @@ - + @@ -100,6 +100,6 @@ 6
  • Clicking on the notification brings the sender to a page listing all outstanding payouts 7
  • Check the payout to approve, pay and confirm 8
  • You are then brought to the normal wallet user interface of BTCPay Server
  • WARNING

    Clicking on Confirm selected payouts will use the current exchange rate of your wallet's store settings. The rate is then fixed, even if you don't complete the payment. Payments made at a later time will use this previously confirmed rate.

    # Additional use cases for the Pull Payments feature

    The Pull Payment feature can be used in multiple applications, the first one being Refunds.

    - + diff --git a/Refund/index.html b/Refund/index.html index 4a1f8194ef..aafb51d5f4 100644 --- a/Refund/index.html +++ b/Refund/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

    - + diff --git a/RegisterAccount/index.html b/RegisterAccount/index.html index ad86e5ba56..d0f8cca53e 100644 --- a/RegisterAccount/index.html +++ b/RegisterAccount/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Reporting/index.html b/Reporting/index.html index 00a16db748..d430ca1d8f 100644 --- a/Reporting/index.html +++ b/Reporting/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ (opens new window)

    - + diff --git a/Shopify/index.html b/Shopify/index.html index 100be53abc..20fcead22c 100644 --- a/Shopify/index.html +++ b/Shopify/index.html @@ -9,7 +9,7 @@ - + @@ -57,7 +57,8 @@ FAQ GitHub - (opens new window)

    # Accept Bitcoin in Shopify with BTCPay Server

    Introducing BTCPay Server for Shopify – open-source payment gateway that enables you accept bitcoin payments directly on your website or stores from customers with no fee.

    Our integration with Shopify allows you connect your self-hosted BTCPay Server with your Shopify store (opens new window), enabling you accept Bitcoin payments swiftly and securely.

    # What BTCPay offers:

    • Zero fees: Enjoy a payment gateway with no fees. Yes, You saw that right. Zero fees!
    • Direct payment, No middlemen or KYC: Say goodbye to intermediaries and tedious paperwork, and get your money directly in your wallet
    • Fully automated system: BTCPay takes care of payments, invoice management and refunds automatically.
    • Display Bitcoin QR code at checkout: Enhance customer experience with an easy and secure payment option.
    • Self-hosted infrastructure: Maintain full control over your payment gateway.
    • Lightning Network integrated: Instant, fast and low cost payments and payouts
    • Easy CSV exports
    • Versatile plugin system: Extend functionality according to your needs
    • Point-of-sale integration – Accept payments in your physical shops
    • Multilingual ready: Serve a global audience right out of the box.
    • Community-driven support: Get responsive assistance from our dedicated community (Mattermost (opens new window) or Telegram (opens new window)).

    # Prerequisites:

    Before diving into the setup process, ensure you have the following:

    WARNING

    Shopify might give false flags on deprecated API calls. The most likely answer we could find, due to a change by Shopify to specific fields of the Order resource and is assumed to get used in BTCPay Server. Find more details here (opens new window)

    # Setting up BTCPay Server with Shopify

    1. In Shopify, click on Apps > in the left sidebar
    2. On the modal popped up, click on App and sales channel settings
    3. From the page displayed, click on Develop apps button
    4. If prompted, click on Allow custom app development
    5. Create an app and name it, e.g. BTCPay Server
    6. On the app page, in Overview tab, click on the Configure Admin API scopes
    7. In the filter admin access scopes type in Orders
    8. In Orders enable read_orders and write_orders and then click Save
    9. Click on the Install App in the top right corner and when pop-up window appears click Install
    10. Reveal Admin API access token and copy it
    11. In your BTCPay Server, go to your store and on the left sidebar click on Shopify
    12. In the first field, Shop name enter the subdomain of your Shopify store e.g. SOME_ID.myshopify.com then enter SOME_ID
    13. In third field, Admin API access token paste the Admin API access token you just copied from Shopify
    14. In the second field, API key paste the API key from Shopify - which you can find at the bottom of the same page where you copied the Admin API access token
    15. Click Save on BTCPay Shopify settings page
    16. Back on Shopify: On left menu select Checkout scroll down to "Order status page" and paste the HTML <script> code you see in BTCPay Shopify settings into the "Additional scripts" text field.
    17. Click Save and scroll back up to the top
    18. Now click on Payments in the left sidebar, scroll down to "Manual payment methods", click on (+) Manual payment method and select Create custom payment method on the dropdown.
    19. In Custom payment method name fill in Bitcoin with BTCPay Server, optionally you can fill in other fields, but it's not required.
    20. Hit Activate and you've set up Shopify and BTCPay Server successfully.

    TIP

    "Custom Payment method name" must contain at least one of the following words (case-insensitive): bitcoin, btcpayserver, btcpay server or btc to work.

    Below are step by step visuals describing the process outlined above.

    BTCPay Server shopify step 1
    BTCPay Server shopify step 2
    BTCPay Server shopify step 3
    BTCPay Server shopify step 4
    BTCPay Server shopify step 5
    BTCPay Server shopify step 6
    BTCPay Server shopify step 7
    BTCPay Server shopify step 8
    BTCPay Server shopify step 9
    BTCPay Server shopify step 10
    BTCPay Server shopify step 11
    BTCPay Server shopify step 12
    BTCPay Server shopify step 13
    BTCPay Server shopify step 14
    BTCPay Server shopify step 14-2

    Demo Checkout flow after everything is set up:

    BTCPay Server shopify step 15
    BTCPay Server shopify step 16
    BTCPay Server shopify step 17
    BTCPay Server shopify step 18
    - + diff --git a/ShopifyV2/index.html b/ShopifyV2/index.html index 970ea1b89a..067831168d 100644 --- a/ShopifyV2/index.html +++ b/ShopifyV2/index.html @@ -9,7 +9,7 @@ - + @@ -57,11 +57,11 @@ FAQ GitHub - (opens new window)

    # Accept Bitcoin in Shopify with BTCPay Server

    Introducing BTCPay Server for Shopify open-source payment gateway that enables you accept bitcoin payments directly on your website or stores from customers with no fee.

    Our integration with Shopify allows you connect your self-hosted BTCPay Server with your Shopify store (opens new window), enabling you accept Bitcoin payments swiftly and securely.

    # What BTCPay offers:

    • Zero fees: Enjoy a payment gateway with no fees. Yes, You saw that right. Zero fees!
    • Direct payment, No middlemen or KYC: Say goodbye to intermediaries and tedious paperwork, and get your money directly in your wallet
    • Fully automated system: BTCPay takes care of payments, invoice management and refunds automatically.
    • Display Bitcoin QR code at checkout: Enhance customer experience with an easy and secure payment option.
    • Self-hosted infrastructure: Maintain full control over your payment gateway.
    • Lightning Network integrated: Instant, fast and low cost payments and payouts
    • Easy CSV exports
    • Versatile plugin system: Extend functionality according to your needs
    • Point-of-sale integration Accept payments in your physical shops
    • Multilingual ready: Serve a global audience right out of the box.
    • Community-driven support: Get responsive assistance from our dedicated community (Mattermost (opens new window) or Telegram (opens new window)).

    # Prerequisites:

    Before diving into the setup process, ensure you have the following:

    WARNING

    Shopify might give false flags on deprecated API calls. The most likely answer we could find, due to a change by Shopify to specific fields of the Order resource and is assumed to get used in BTCPay Server. Find more details here (opens new window)

    # Setting up BTCPay Server with Shopify

    # Create an app and get API credentials from Shopify

    1. In Shopify, click on Apps > in the left sidebar
      BTCPay Server shopify step 1
    2. On the modal popped up, click on App and sales channel settings
      BTCPay Server shopify step 2
    3. From the page displayed, click on Develop apps button
      BTCPay Server shopify step 3
    4. If prompted, click on Allow custom app development
      BTCPay Server shopify step 4
    5. Create an app and name it, e.g. BTCPay Server, click on Create App
      BTCPay Server shopify step 5 BTCPay Server shopify step 6
    6. On the app page, in Overview tab, click on the Configure Admin API scopes
      BTCPay Server shopify step 7
    7. In the filter admin access scopes type in Orders
    8. In Orders enable read_orders and write_orders and then click Save
      BTCPay Server shopify step 8
    9. Click on the "API credentials" tab, and then click on the Install App in the top right corner and when pop-up window appears click Install
      BTCPay Server shopify step 9-1
      BTCPay Server shopify step 9-2
    10. Reveal Admin API access token and copy it (and note it down somewhere safe)
    11. Also copy the API key and API Secret and note it down somewhere safe
      BTCPay Server shopify step 10 and 11
    12. Shopify app setup is now complete

    # Set up a custom payment method in Shopify

    1. Back to Shopify, on the home page, click on Settings >> Payments in the left sidebar, scroll down to "Manual payment methods", click on (+) Manual payment method and select Create custom payment method on the dropdown. + (opens new window)

      # Accept Bitcoin in Shopify with BTCPay Server

      Introducing BTCPay Server for Shopify open-source payment gateway that enables you accept bitcoin payments directly on your website or stores from customers with no fee.

      Our integration with Shopify allows you connect your self-hosted BTCPay Server with your Shopify store (opens new window), enabling you accept Bitcoin payments swiftly and securely.

      # What BTCPay offers:

      • Zero fees: Enjoy a payment gateway with no fees. Yes, You saw that right. Zero fees!
      • Direct payment, No middlemen or KYC: Say goodbye to intermediaries and tedious paperwork, and get your money directly in your wallet
      • Fully automated system: BTCPay takes care of payments, invoice management and refunds automatically.
      • Display Bitcoin QR code at checkout: Enhance customer experience with an easy and secure payment option.
      • Self-hosted infrastructure: Maintain full control over your payment gateway.
      • Lightning Network integrated: Instant, fast and low cost payments and payouts
      • Easy CSV exports
      • Versatile plugin system: Extend functionality according to your needs
      • Point-of-sale integration Accept payments in your physical shops
      • Multilingual ready: Serve a global audience right out of the box.
      • Community-driven support: Get responsive assistance from our dedicated community (Mattermost (opens new window) or Telegram (opens new window)).

      # Prerequisites:

      Before diving into the setup process, ensure you have the following:

      # Setting up BTCPay Server with Shopify

      # Create an app and get API credentials from Shopify

      1. In Shopify, click on Apps > in the left sidebar
        BTCPay Server shopify step 1
      2. On the modal popped up, click on App and sales channel settings
        BTCPay Server shopify step 2
      3. From the page displayed, click on Develop apps button
        BTCPay Server shopify step 3
      4. If prompted, click on Allow custom app development
        BTCPay Server shopify step 4
      5. Create an app and name it, e.g. BTCPay Server, click on Create App
        BTCPay Server shopify step 5 BTCPay Server shopify step 6
      6. On the app page, in Overview tab, click on the Configure Admin API scopes
        BTCPay Server shopify step 7
      7. In the filter admin access scopes type in Orders
      8. In Orders enable read_orders and write_orders and then click Save
        BTCPay Server shopify step 8
      9. Click on the "API credentials" tab, and then click on the Install App in the top right corner and when pop-up window appears click Install
        BTCPay Server shopify step 9-1
        BTCPay Server shopify step 9-2
      10. Reveal Admin API access token and copy it (and note it down somewhere safe)
      11. Also copy the API key and API Secret and note it down somewhere safe
        BTCPay Server shopify step 10 and 11
      12. Shopify app setup is now complete

      # Set up a custom payment method in Shopify

      1. Back to Shopify, on the home page, click on Settings >> Payments in the left sidebar, scroll down to "Manual payment methods", click on (+) Manual payment method and select Create custom payment method on the dropdown. Create payment method step 1
      2. In Custom payment method name fill in Bitcoin with BTCPay Server (also see TIP box below), optionally you can fill in other fields, but it's not required. However you would need to inform your customers that payment with Bitcoin comes on the next screen after checkout on the "Thank you" page. Ideally you would inform your customers in the Additional details field. The payment option can have a delay between 2 - 10 seconds on the "Thank you" page, before it is displayed so this also needs to be communicated with the customers. Suggested text: Please note that the Bitcoin payment option will be displayed on the "Thank you" page after a few seconds. If it does not show up after 5-10 seconds please contact our support.
      3. Hit Activate and you've set up Shopify and BTCPay Server payment method successfully. -Create payment method step 2 and 3

      TIP

      "Custom Payment method name" must contain at least one of the following words (case-insensitive): bitcoin, btcpayserver, btcpay server or btc to work.

      # Install BTCPay Server Shopify plugin

      1. In your BTCPay Server, go to your plugins, find and install Shopify plugin. Once done, on the left sidebar click on Shopify
      2. In the first field, Shopify Store URL enter the subdomain of your Shopify store e.g. SOME_ID.myshopify.com then enter SOME_ID
      3. In the second field, API key paste the API key from Shopify - see steps above.
      4. Do the same for the third field, paste the API Secret from Shopify and paste in the API Secret field.
      5. In the last field, Admin API access token paste the Admin API access token
      6. You can decide to edit the payment method description text. This basically defines the text that the user sees when the invoice loads on shopify.
      7. Click Save on BTCPay Shopify settings page
        BTCPay Server step 1-7
      8. BTCPay then validates the credentials, and once validated, creates an create order webhook, and finally saves the credentials.
        BTCPay Server step 1-7

      # Install BTCPay-Shopify application on Shopify

      The second piece of this installation guide is setting up the BTCPay-Shopify app. You can choose to self-host your own BTCPay-Shopify app +Create payment method step 2 and 3

    TIP

    "Custom Payment method name" must contain at least one of the following words (case-insensitive): bitcoin, btcpayserver, btcpay server or btc to work.

    # Install BTCPay Server Shopify plugin

    WARNING

    This plugin is currently in pre-release mode. To view, you can enable "Show plugins in pre-release" in your server settings.

    1. In your BTCPay Server, go to your plugins, find and install Shopify plugin. Once done, on the left sidebar click on Shopify
    2. In the first field, Shopify Store URL enter the subdomain of your Shopify store e.g. SOME_ID.myshopify.com then enter SOME_ID
    3. In the second field, API key paste the API key from Shopify - see steps above.
    4. Do the same for the third field, paste the API Secret from Shopify and paste in the API Secret field.
    5. In the last field, Admin API access token paste the Admin API access token
    6. You can decide to edit the payment method description text. This basically defines the text that the user sees when the invoice loads on shopify.
    7. Click Save on BTCPay Shopify settings page
      BTCPay Server step 1-7
    8. BTCPay then validates the credentials, and once validated, creates an create order webhook, and finally saves the credentials.
      BTCPay Server step 1-7

    # Install BTCPay-Shopify application on Shopify

    The second piece of this installation guide is setting up the BTCPay-Shopify app. You can choose to self-host your own BTCPay-Shopify app or use the app we submitted to the Shopify App Store.

    # Using BTCPay-Shopify from Shopify App Store

    WARNING

    As of now, the BTCPay-Shopify app is not yet available on the Shopify App Store. We are working on getting it published.

    1. Now we need to install the BTCPay-Shopify app. Visit the Shopify app store (opens new window) search for "BTCPay" and install the BTCPay-Shopify app.
      App Setup: Step 1
    2. Once installed, you can go to your dashboard, click on Apps > in the left sidebar, then you would see the list of installed apps, including the just installed BTCPay-Shopify app.
    3. Select the BTCPay-Shopify app, and in settings, input your BTCPay Server URL (e.g https://btcpay.example.com) and the storeId to which your Shopify plugin is connected on your BTCPay Server instance.
      App Setup: Step 2 + 3
    4. In your shopify dashboard, click on Settings, which is located on the bottom of the left nav panel, select Checkout and then Customize.
      App Setup: Step 4.1
      App Setup: Step 4.2
    5. In the editor change the selected page to the "Thank you" page.
      App Setup: Step 5.1
      App Setup: Step 5.2
    6. Click on the Apps icon on the left panel App Setup: Step 6
    7. Click on the (+) sign on the listed "BTCPay Checkout" app and then on the "Thank you" page listed.
      App Setup: Step 7
    8. You will now see the extension got added to your "Thank you" page. Click save in the top right corner.
      App Setup: Step 8
    9. To double check all is working, click on the left arrow < next to "BTCPay Checkout" and verify it is listed in the "Order details section".
      App Setup: Step 9.1
      App Setup: Step 9.2

    Congrats! You have successfully installed the BTCPay-Shopify app and set up the payment method on your Shopify store. You are ready to go. See also the demo checkout flow below to make sure everything works.

    # Self-hosting the BTCPay-shopify app

    If you are a developer or would love to have total control, you would need to create and deploy your own application.

    # Requirements:

    1. A Linux VPS instance to deploy your shopify app to
    2. The VPS should have Docker Engine installed (opens new window)
    3. A domain/subdomain with an DNS A-record to the IP of your VPS instance, in our example below we use the placeholder "YOUR_HOSTED_APP_URL.COM", e.g. btcpaypp.example.com
    4. Shopify plugin installed in your BTCPay Server instance
    5. A shopify partner account (opens new window)

    # Installation instructions:

    # Create a Shopify app on partner account
    1. On Shopify Partner dashboard (opens new window), click on Apps > All Apps > Create App > Create app manually. Enter the name you want to call the app (e.g. BTCPay Server APPNAME) and click Create.
    2. Once created displays your "Client ID" and "Client secret", which we need in a minute.
    3. On the left sidebar click on Configuration
    4. In the App URL field, enter the URL of your hosted app, e.g. https://YOUR_HOSTED_APP_URL.COM
    5. In the Allowed redirection URL(s) field, enter:
    https://YOUR_HOSTED_APP_URL.COM/auth/callback
     https://YOUR_HOSTED_APP_URL.COM/auth/shopify/callback
    @@ -106,6 +106,6 @@
           
           →
         

    - + diff --git a/Shopware/index.html b/Shopware/index.html index fd8314ea60..bad6873747 100644 --- a/Shopware/index.html +++ b/Shopware/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/SideShift/index.html b/SideShift/index.html index b6f7aa9f62..0c13cb38c1 100644 --- a/SideShift/index.html +++ b/SideShift/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

    - + diff --git a/Sign-PSBT-with-sparrow-wallet/index.html b/Sign-PSBT-with-sparrow-wallet/index.html index e8fccc9e9e..1579954e9a 100644 --- a/Sign-PSBT-with-sparrow-wallet/index.html +++ b/Sign-PSBT-with-sparrow-wallet/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

    # Creating a PSBT with BTCPay Server and Sparrow wallet

    This guide explains how you can create a partially signed bitcoin transaction (PSBT) on BTCPay Server and sign and broadcast it with Sparrow wallet (opens new window). We use BitBox02 (opens new window) hardware wallet in this example, but it will work with any other supported hardware wallet. This can be useful if you have an airgapped setup or persons creating the transaction and signing it are different people.

    # 1. Creating a transaction (on BTCPay Server):

    • Log into your BTCPay Server and select the store you want to send from
    • Under "Wallets" select "Bitcoin"
    • Click on button [Send]

    # On send screen:

    BTCPay: Create transaction on BTCPay Server
    • Enter the destination bitcoin address
    • Enter the amount
    • Optional: Change fee rate (get the current fee rate on mempool.space (opens new window) depending on how fast you want the transaction to be confirmed)
    • Important: click on "Advanced Settings" so it expands and check "Always include non-witness UTXO if available" (this is needed so hardware wallets like BitBox02 can sign the transaction)
    • Optional: on "Allow fee increase (RBF)", set to "Yes" (this is useful if you select a too low fee you can bump the fee so your transaction is not stuck and get’s confirmed)
    • Click [Sign transaction] button

    # On choosing signing method screen:

    BTCPay: Choose signing method: Partially Signed Bitcoin Transaction
    • Select "Partially Signed Bitcoin Transaction"

    # On PSBT screen:

    BTCPay: Download the PSBT file
    • Open the accordion of "Export PSBT for signing" click on button [Download PSBT file]
    • Store the file on hard-drive (you can use it to sign the PSBT yourself, or you can send it to somebody doing the signing on Sparrow wallet, see below); e.g. psbt-export.psbt

    # 2. Signing and sending the PSBT (on Sparrow wallet)

    • Open your Sparrow wallet app and corresponding wallet holding the data for the xPub used in your store
    • Next, import the PSBT file you created on BTCPay Server
    • In menu: File -> Open Transaction -> File...
    • Select the file you stored (or got sent from accounting) e.g. psbt-export.psbt

    # On showing the imported PSBT transaction:

    Sparrow wallet: Load the PSBT file
    • Make sure under headline "Signatures:" the "signing wallet" matches the wallet you want to sent from
    • Click on [Finalize Transaction for Signing]

    # Signing the transaction:

    Sparrow wallet: PSBT loaded, ready for signing
    • Click on [Sign]

    # Connect Hardware wallet popup:

    Sparrow wallet: connect to hardware wallet (e.g. in our case BitBox02)
    • Plug-in your hardware wallet (BitBox02 in our case)
    • Enter your hardware wallet pin (for BitBox02 it shows on screen open BitBox app but you do not need to, wait until you can enter the pin)
    • After BitBox02 unlocked, click [Scan...], your hardware wallet will show up

    # Wallet connected successfully:

    Sparrow wallet: hardware wallet successfully connected
    • Click [Sign]
    • A summary of the transaction will be shown on the BitBox02 device, you need to confirm it there

    # Broadcasting the transaction:

    Sparrow wallet: broadcast the transaction
    • After signing was successful you need to broadcast the transaction to the Bitcoin network
    • Click [Broadcast Transaction]

    TIP

    Alternatively, instead of broadcasting the transaction from Sparrow wallet (e.g. if you have an airgapped setup) you could also copy and paste the signed transaction PSBT from the textbox and upload it to your BTCPay Server and let it broadcast the transaction to the network.

    Congrats, done!

    - + diff --git a/Smartstore/index.html b/Smartstore/index.html index d8b5dffc0e..925cc5c7fc 100644 --- a/Smartstore/index.html +++ b/Smartstore/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Support/index.html b/Support/index.html index 052ef20176..8a7ee49b90 100644 --- a/Support/index.html +++ b/Support/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

    - + diff --git a/TicketTailor/index.html b/TicketTailor/index.html index 000837fb74..26b65d1933 100644 --- a/TicketTailor/index.html +++ b/TicketTailor/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@ →

    - + diff --git a/Translations/index.html b/Translations/index.html index d1098262f7..ed3061ba25 100644 --- a/Translations/index.html +++ b/Translations/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Transmuter/DCA/index.html b/Transmuter/DCA/index.html index 7b8a6453f2..adee39ce37 100644 --- a/Transmuter/DCA/index.html +++ b/Transmuter/DCA/index.html @@ -9,7 +9,7 @@ - + @@ -73,6 +73,6 @@ →

    - + diff --git a/Transmuter/EmailReceiptsPreset/index.html b/Transmuter/EmailReceiptsPreset/index.html index 199816cf96..cb1daadb76 100644 --- a/Transmuter/EmailReceiptsPreset/index.html +++ b/Transmuter/EmailReceiptsPreset/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

    - + diff --git a/Transmuter/index.html b/Transmuter/index.html index a7023da3f7..4416e63b5f 100644 --- a/Transmuter/index.html +++ b/Transmuter/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ There must be a class implementing BtcTransmuterExtension in this library. This file bootstraps the plugin name and adds all the services to system on startup.

    # Adding a Trigger

    # Adding an Action

    # Adding an External Service

    - + diff --git a/Trocador/index.html b/Trocador/index.html index 653e250733..c5ea286eac 100644 --- a/Trocador/index.html +++ b/Trocador/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Troubleshooting/index.html b/Troubleshooting/index.html index 4d0c1ac585..07528f3671 100644 --- a/Troubleshooting/index.html +++ b/Troubleshooting/index.html @@ -9,7 +9,7 @@ - + @@ -98,6 +98,6 @@ →

    - + diff --git a/TryItOut/index.html b/TryItOut/index.html index c131b3cd92..29bb727421 100644 --- a/TryItOut/index.html +++ b/TryItOut/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/UseCase/index.html b/UseCase/index.html index 99b6bf7362..f1c2827ab6 100644 --- a/UseCase/index.html +++ b/UseCase/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Vault/HowToVerify/index.html b/Vault/HowToVerify/index.html index 92ae0a2174..600b503f6b 100644 --- a/Vault/HowToVerify/index.html +++ b/Vault/HowToVerify/index.html @@ -9,7 +9,7 @@ - + @@ -83,6 +83,6 @@ →

    - + diff --git a/VirtueMart/index.html b/VirtueMart/index.html index 9e55af39a8..676747bfb3 100644 --- a/VirtueMart/index.html +++ b/VirtueMart/index.html @@ -9,7 +9,7 @@ - + @@ -88,6 +88,6 @@ →

    - + diff --git a/Wabisabi/index.html b/Wabisabi/index.html index d61d99a3de..745fade3cc 100644 --- a/Wabisabi/index.html +++ b/Wabisabi/index.html @@ -9,7 +9,7 @@ - + @@ -88,6 +88,6 @@ →

    - + diff --git a/Walkthrough/index.html b/Walkthrough/index.html index 456ce349a7..b2acde08d1 100644 --- a/Walkthrough/index.html +++ b/Walkthrough/index.html @@ -9,7 +9,7 @@ - + @@ -80,6 +80,6 @@ →

    - + diff --git a/Wallet/index.html b/Wallet/index.html index 18c8b1e2a1..2608287887 100644 --- a/Wallet/index.html +++ b/Wallet/index.html @@ -9,7 +9,7 @@ - + @@ -63,6 +63,6 @@ Here, you have the options to perform several actions on your wallet, such Rescanning wallet for missing transactions, prunning old transactions, view wallet phrase, remove wallet among features.

    Wallet Rescan

    If you manually added the extended public key from an external wallet, you'd need to adjust AccountKeyPath that you can find in your external wallet, for example m/84'/0'/0' to be able to spend from the BTCPay Wallet.

    In wallet settings you will also find the speed policy for the specific store. There are 2 main settings under Payment, Payment invalid if transaction fails to confirm in ... after invoice creation and Consider the invoice confirmed when the payment transaction.... The latter lets you set the number of confirmations required to be recognized as settled.

    Wallet settings

    # Re-scan

    The Rescan relies on Bitcoin Core 0.17.0's scantxoutset to scan the current state of the blockchain (called UTXO Set) for coins belonging to the configured derivation scheme.

    Wallet Rescan

    Wallet re-scan solves two critical problems for BTCPay users:

    1. Gap limit
    2. Importing a previously used wallet

    Gap limit: Most wallets typically have the address gap limit set to 20. This means that if a merchant receives 21 or more consecutive unpaid invoices, those wallets show the incorrect balance and some transactions may not be visible.

    Wallet import: When users add a derivation scheme of a wallet that had transactions in the past (previously used wallet), BTCPay won't be able to show the balance and transactions from the past.

    Wallet rescan progress

    Re-scan is a feature that solves both of these problems. Once the scan is complete, BTCPay Server will show the correct balance, along with the past transactions of the wallet.

    Wallet re-scan requires access to the full node which means that this function is only available for server owners.

    Users who use a third-party host should use a newly generated xpub key and also use an external wallet like Electrum which allows them to increase the gap limit.

    # Labels

    At the bottom of your wallet settings, you can manage your custom transaction label.

    Clicking on the link would take you to a page where you can view all custom labels associated to all transaction. You can remove any or all custom labels given the required permission.

    Wallet settings
    - + diff --git a/WalletSetup/index.html b/WalletSetup/index.html index 562a16837b..1f6a4b54a0 100644 --- a/WalletSetup/index.html +++ b/WalletSetup/index.html @@ -9,7 +9,7 @@ - + @@ -58,6 +58,6 @@ GitHub (opens new window)

    # (3) Wallet Setup

    After account registration and store creation, it's time to configure a wallet in your BTCPay Server, so that you can start receiving payments into it.

    There are two ways to set up a wallet in BTCPay Server:

    There are many options on how set up a wallet with your BTCPay Server. It's up to you to decide what works best for your use-case. Once you configure a wallet, you're all set. The next step, is to start exploring the features.

    Proceed to the next step - What's Next?.

    - + diff --git a/WasabiWallet/index.html b/WasabiWallet/index.html index e08202dfa4..751a2b894a 100644 --- a/WasabiWallet/index.html +++ b/WasabiWallet/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ After the loading is done and the wallet is opened, click on the 3 dots at the top right corner to go to Wallet Info .

    Wasabi Find Wallet Info

    Select and copy the Extended Account Public Key. This is the public key from which BTCPay will derive addresses. This cannot be used to derive private keys and spend the bitcoin.

    Wasabi Extended Account Public Key

    # Setup store wallet

    1. Assuming you created a store and are now in the Dashboard. Click on Set up a wallet
    Connect Wasabi Wallet to BTCPay Server
    1. As you did the above steps in wasabi, Click Connect an existing wallet
    Connect Wasabi Wallet to BTCPay Server
    1. Choose Enter extended public key
    Connect Wasabi Wallet to BTCPay Server
    1. Paste the Extended Account Public Key into derivation scheme field as it is, without adding anything else and click Continue
    Connect Wasabi Wallet to BTCPay Server
    1. Return to the Wasabi Wallet. Click the Receive button and generate a new address.
    Wasabi Receive
    1. Compare the address you see in Wasabi Wallet to addresses shown in BTCPay Server. Find a match, continue.
    Connect Wasabi Wallet to BTCPay Server
    1. When you found a match, your wallet is now connected to the store.
    Connect Wasabi Wallet to BTCPay Server

    # Connecting Wasabi to BTCPay Server Full Node (If you're self-hosting BTCPay)

    After the wallets are connected, it is highly recommended to connect Wasabi Wallet to your full node in BTCPay. The process is easy but can only be done if you self-host BTCPay and are logged in as Admin. Tor has to be enabled in BTCPay (it is enabled by default). This process enhances privacy even further.

    In BTCPay, go Server Settings > Services > Full node P2P > See Information. On the BTCP-P2P page, click on the Show Confidential QR Code. Bellow the QR Code, there's a link See QR Code information by clicking here, so click on the link to reveal your string. Copy the string but remove bitcoin-p2p:// part.

    In Wasabi, go to the Bitcoin tab at Settings and paste the endpoint in Bitcoin P2P Endpoint.

    Restart Wasabi to apply the changes.

    # Configuring the Gap Limit in Wasabi

    At the search bar on top, click on Wallet Folder. Shortly the json file will be shown in a sub-folder. Open that file with a text editor like notepad. Find the line "MinGapLimit": 21, and change it to "MinGapLimit": 100, and save the file.

    There's no good answer to how much you should set the gap limit to. Most merchants set 100-200. If you're a big merchant with high transaction volume, you can try with even a higher gap limit.

    For more details about the Gap Limit, check the FAQ.

    Wasabi Wallet and BTCPay Server are now connected. Any payments received to your BTCPay will be visible in Wasabi, where you can further spend or mix them.

    - + diff --git a/WhatsNext/index.html b/WhatsNext/index.html index 075704b6f3..212447165b 100644 --- a/WhatsNext/index.html +++ b/WhatsNext/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

    - + diff --git a/Wix/index.html b/Wix/index.html index 6beaed7125..9180052c43 100644 --- a/Wix/index.html +++ b/Wix/index.html @@ -9,7 +9,7 @@ - + @@ -93,6 +93,6 @@ →

    - + diff --git a/WooCommerce/index.html b/WooCommerce/index.html index 111e492a8e..d5d03401a7 100644 --- a/WooCommerce/index.html +++ b/WooCommerce/index.html @@ -9,7 +9,7 @@ - + @@ -115,6 +115,6 @@ →

    - + diff --git a/Xenforo/index.html b/Xenforo/index.html index 9412387071..f5ac68e352 100644 --- a/Xenforo/index.html +++ b/Xenforo/index.html @@ -9,7 +9,7 @@ - + @@ -68,6 +68,6 @@ →

    - + diff --git a/Zapier/index.html b/Zapier/index.html index 0a809f45c9..0174bd4ac9 100644 --- a/Zapier/index.html +++ b/Zapier/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

    - + diff --git a/assets/js/100.99a47a22.js b/assets/js/100.d4cddc62.js similarity index 99% rename from assets/js/100.99a47a22.js rename to assets/js/100.d4cddc62.js index 05f46cfc75..b4d7d52a5e 100644 --- a/assets/js/100.99a47a22.js +++ b/assets/js/100.d4cddc62.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[100],{811:function(e,t,i){"use strict";i.r(t);var a=i(17),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"greenfield-api-authorization-flow"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-authorization-flow"}},[e._v("#")]),e._v(" GreenField API Authorization Flow")]),e._v(" "),t("p",[e._v("The GreenField API allows two modes of authentication to its endpoints: Basic Auth and API keys.")]),e._v(" "),t("h2",{attrs:{id:"basic-auth"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#basic-auth"}},[e._v("#")]),e._v(" Basic auth")]),e._v(" "),t("p",[e._v("Basic auth allows you to seamlessly integrate with BTCPay Server's user system using only a traditional user/password login form. This is however a security risk if the application is a third party as they will receive your credentials in plain text and will be able to access your full account.")]),e._v(" "),t("h2",{attrs:{id:"api-keys"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-keys"}},[e._v("#")]),e._v(" API Keys")]),e._v(" "),t("p",[e._v("BTCPay Server's Greenfield API also allows users to generate API keys with "),t("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[e._v("specific permissions"),t("OutboundLink")],1),e._v(". "),t("strong",[e._v("If you are integrating BTCPay Server into your third-party application, this is the recommended way.")])]),e._v(" "),t("h3",{attrs:{id:"manually-create-an-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#manually-create-an-api-key"}},[e._v("#")]),e._v(" Manually create an API key")]),e._v(" "),t("p",[e._v("Users can create a new API key in the BTCPay Server UI under "),t("code",[e._v("Account")]),e._v(" -> "),t("code",[e._v("Manage account")]),e._v(" -> "),t("code",[e._v("API keys")])]),e._v(" "),t("h3",{attrs:{id:"create-api-keys-over-the-api-itself"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-api-keys-over-the-api-itself"}},[e._v("#")]),e._v(" Create API keys over the API itself")]),e._v(" "),t("p",[e._v("A user can create an API key for themselves using the "),t("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/APIKeys_CreateAPIKey",target:"_blank",rel:"noopener noreferrer"}},[e._v("Create API Key endpoint"),t("OutboundLink")],1),e._v(" via Basic Auth or an unrestricted API key. Server administrators can create API keys for any user using the "),t("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[e._v("Create API key for user endpoint"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"interactive-api-key-setup-flow"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interactive-api-key-setup-flow"}},[e._v("#")]),e._v(" Interactive API key setup flow")]),e._v(" "),t("p",[e._v("Asking a user to generate a dedicated API key, with a specific set of permissions manually can be a bad UX experience. For this scenario, we have the "),t("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#tag/Authorization",target:"_blank",rel:"noopener noreferrer"}},[e._v("Authorize User UI"),t("OutboundLink")],1),e._v(". This allows external applications to request the user to generate an API key with a specific set of permissions by simply generating a URL to BTCPay Server and redirecting the user to it.\nAdditionally, there are 2 optional parameters to the endpoint which allow a more seamless integration:")]),e._v(" "),t("ul",[t("li",[e._v("if "),t("code",[e._v("redirect")]),e._v(" is specified, once the API key is created, BTCPay Server redirects the user via a POST submission to the specified "),t("code",[e._v("redirect")]),e._v(" URL, with a json body containing the API key, user id, and permissions granted.")]),e._v(" "),t("li",[e._v("if "),t("code",[e._v("applicationIdentifier")]),e._v(" is specified (along with "),t("code",[e._v("redirect")]),e._v("), BTCPay Server will check if there is an existing API key associated with the user that also has this application identifier, redirect host AND the permissions required match. "),t("code",[e._v("applicationIdentifier")]),e._v(" is ignored if "),t("code",[e._v("redirect")]),e._v(" is not specified.")])]),e._v(" "),t("p",[e._v("Some examples of a generated Authorize URL:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize")]),e._v(" - A simplistic request, where no permission is requested. Useful to prove that a user exists on a specific BTCPay Server instance.")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?applicationName=Your%20Application")]),e._v(" - Indicates that the API key is being generated for "),t("code",[e._v("Your Application")])]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?applicationName=Your%20Application&redirect=http://gozo.com")]),e._v(" - Redirects the user via a POST to "),t("code",[e._v("http://gozo.com")]),e._v(" with a JSON body containing the API key and its info.")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?applicationName=Your%20Application&redirect=http://gozo.com&applicationIdentifier=gozo")]),e._v(" - Attempts to match a previously created API key based on the app identifier, domain and permissions and is prompted.")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?permissions=btcpay.store.cancreateinvoice&permissions=btcpay.store.canviewinvoices")]),e._v(" - A request asking for permissions to create and view invoices on all stores available to the user")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?permissions=btcpay.store.cancreateinvoice&permissions=btcpay.store.canviewinvoices&selectiveStores=true")]),e._v(" - A request asking for permissions to create and view invoices on stores but also allows the user to choose which stores the application will have the permission to.")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?permissions=btcpay.store.cancreateinvoice&permissions=btcpay.store.canviewinvoices&strict=false")]),e._v(" - A request asking for permissions but allows the user to remove or add to the requested permission list.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[100],{812:function(e,t,i){"use strict";i.r(t);var a=i(17),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"greenfield-api-authorization-flow"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-authorization-flow"}},[e._v("#")]),e._v(" GreenField API Authorization Flow")]),e._v(" "),t("p",[e._v("The GreenField API allows two modes of authentication to its endpoints: Basic Auth and API keys.")]),e._v(" "),t("h2",{attrs:{id:"basic-auth"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#basic-auth"}},[e._v("#")]),e._v(" Basic auth")]),e._v(" "),t("p",[e._v("Basic auth allows you to seamlessly integrate with BTCPay Server's user system using only a traditional user/password login form. This is however a security risk if the application is a third party as they will receive your credentials in plain text and will be able to access your full account.")]),e._v(" "),t("h2",{attrs:{id:"api-keys"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-keys"}},[e._v("#")]),e._v(" API Keys")]),e._v(" "),t("p",[e._v("BTCPay Server's Greenfield API also allows users to generate API keys with "),t("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[e._v("specific permissions"),t("OutboundLink")],1),e._v(". "),t("strong",[e._v("If you are integrating BTCPay Server into your third-party application, this is the recommended way.")])]),e._v(" "),t("h3",{attrs:{id:"manually-create-an-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#manually-create-an-api-key"}},[e._v("#")]),e._v(" Manually create an API key")]),e._v(" "),t("p",[e._v("Users can create a new API key in the BTCPay Server UI under "),t("code",[e._v("Account")]),e._v(" -> "),t("code",[e._v("Manage account")]),e._v(" -> "),t("code",[e._v("API keys")])]),e._v(" "),t("h3",{attrs:{id:"create-api-keys-over-the-api-itself"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-api-keys-over-the-api-itself"}},[e._v("#")]),e._v(" Create API keys over the API itself")]),e._v(" "),t("p",[e._v("A user can create an API key for themselves using the "),t("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/APIKeys_CreateAPIKey",target:"_blank",rel:"noopener noreferrer"}},[e._v("Create API Key endpoint"),t("OutboundLink")],1),e._v(" via Basic Auth or an unrestricted API key. Server administrators can create API keys for any user using the "),t("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[e._v("Create API key for user endpoint"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"interactive-api-key-setup-flow"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#interactive-api-key-setup-flow"}},[e._v("#")]),e._v(" Interactive API key setup flow")]),e._v(" "),t("p",[e._v("Asking a user to generate a dedicated API key, with a specific set of permissions manually can be a bad UX experience. For this scenario, we have the "),t("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#tag/Authorization",target:"_blank",rel:"noopener noreferrer"}},[e._v("Authorize User UI"),t("OutboundLink")],1),e._v(". This allows external applications to request the user to generate an API key with a specific set of permissions by simply generating a URL to BTCPay Server and redirecting the user to it.\nAdditionally, there are 2 optional parameters to the endpoint which allow a more seamless integration:")]),e._v(" "),t("ul",[t("li",[e._v("if "),t("code",[e._v("redirect")]),e._v(" is specified, once the API key is created, BTCPay Server redirects the user via a POST submission to the specified "),t("code",[e._v("redirect")]),e._v(" URL, with a json body containing the API key, user id, and permissions granted.")]),e._v(" "),t("li",[e._v("if "),t("code",[e._v("applicationIdentifier")]),e._v(" is specified (along with "),t("code",[e._v("redirect")]),e._v("), BTCPay Server will check if there is an existing API key associated with the user that also has this application identifier, redirect host AND the permissions required match. "),t("code",[e._v("applicationIdentifier")]),e._v(" is ignored if "),t("code",[e._v("redirect")]),e._v(" is not specified.")])]),e._v(" "),t("p",[e._v("Some examples of a generated Authorize URL:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize")]),e._v(" - A simplistic request, where no permission is requested. Useful to prove that a user exists on a specific BTCPay Server instance.")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?applicationName=Your%20Application")]),e._v(" - Indicates that the API key is being generated for "),t("code",[e._v("Your Application")])]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?applicationName=Your%20Application&redirect=http://gozo.com")]),e._v(" - Redirects the user via a POST to "),t("code",[e._v("http://gozo.com")]),e._v(" with a JSON body containing the API key and its info.")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?applicationName=Your%20Application&redirect=http://gozo.com&applicationIdentifier=gozo")]),e._v(" - Attempts to match a previously created API key based on the app identifier, domain and permissions and is prompted.")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?permissions=btcpay.store.cancreateinvoice&permissions=btcpay.store.canviewinvoices")]),e._v(" - A request asking for permissions to create and view invoices on all stores available to the user")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?permissions=btcpay.store.cancreateinvoice&permissions=btcpay.store.canviewinvoices&selectiveStores=true")]),e._v(" - A request asking for permissions to create and view invoices on stores but also allows the user to choose which stores the application will have the permission to.")]),e._v(" "),t("li",[t("code",[e._v("https://mainnet.demo.btcpayserver.org/api-keys/authorize?permissions=btcpay.store.cancreateinvoice&permissions=btcpay.store.canviewinvoices&strict=false")]),e._v(" - A request asking for permissions but allows the user to remove or add to the requested permission list.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/106.6501e86a.js b/assets/js/106.e8618108.js similarity index 99% rename from assets/js/106.6501e86a.js rename to assets/js/106.e8618108.js index b2d8e8be93..73c10a96e2 100644 --- a/assets/js/106.6501e86a.js +++ b/assets/js/106.e8618108.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[106],{819:function(e,t,a){"use strict";a.r(t);var r=a(17),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"setting-up-btcpay-server-for-conference-event-local-community"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-btcpay-server-for-conference-event-local-community"}},[e._v("#")]),e._v(" Setting up BTCPay Server for Conference / Event / Local Community")]),e._v(" "),t("p",[e._v("We will be going through the setup we used at "),t("a",{attrs:{href:"https://blog.btcpayserver.org/case-study-bitcoin-atlantis/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Atlantis"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://bitcoinmagazine.com/business/case-study-enabling-bitcoin-as-a-medium-of-exchange-at-the-bitcoin-asia-conference-in-hong-kong",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Hong Kong"),t("OutboundLink")],1),e._v(" and other conferences for a great user experience for attendees and merchants.")]),e._v(" "),t("p",[e._v("For Point of Sale (PoS) devices we use the "),t("a",{attrs:{href:"https://bitcoinize.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoinize"),t("OutboundLink")],1),e._v(" devices with receipt printer (but you can use any other Android-based PoS device).")]),e._v(" "),t("p",[e._v("The Lightning Network part will be done by "),t("a",{attrs:{href:"https://blink.sv",target:"_blank",rel:"noopener noreferrer"}},[e._v("Blink.sv"),t("OutboundLink")],1),e._v(" with the Blink plugin (but you can swap it for any other LN service like Alby, Breez, use our internal LN node or connect to your own LN node).")]),e._v(" "),t("p",[e._v("To allow an even smoother UX for attendees without an internet connection or no prior Bitcoin knowledge we show how to set up and issue Bolt Cards and allow users to top-up.")]),e._v(" "),t("p",[e._v("To get an overview of the whole setup and steps you can watch our workshop from BTCPrague 2024.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Hpd-IytvI4Y/hqdefault.jpg)"},attrs:{href:"https://youtu.be/Hpd-IytvI4Y",title:"BTCPrague 2024 Workshop","data-id":"Hpd-IytvI4Y"}},[t("iframe",{attrs:{title:"BTCPrague 2024 Workshop","data-src":"https://www.youtube-nocookie.com/embed/Hpd-IytvI4Y?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("hr"),e._v(" "),t("p",[t("strong",[e._v("Table of contents")])]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#initial-setup"}},[e._v("Initial setup")])]),t("li",[t("a",{attrs:{href:"#setup-merchant-stores-and-initialize-bitcoinize-devices"}},[e._v("Setup merchant stores and initialize Bitcoinize devices")]),t("ul",[t("li",[t("a",{attrs:{href:"#preparation-of-bitcoinize-devices"}},[e._v("Preparation of Bitcoinize devices")])])])]),t("li",[t("a",{attrs:{href:"#setup-merchant-stores"}},[e._v("Setup merchant stores")]),t("ul",[t("li",[t("a",{attrs:{href:"#1-create-store"}},[e._v("1. Create store")])]),t("li",[t("a",{attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("2. Setup Lightning Network wallet")])]),t("li",[t("a",{attrs:{href:"#3-configure-spread-and-enable-sounds"}},[e._v("3. Configure spread and enable sounds")])]),t("li",[t("a",{attrs:{href:"#4-setup-point-of-sale-pos"}},[e._v("4. Setup Point of Sale (PoS)")])]),t("li",[t("a",{attrs:{href:"#5-put-pos-link-and-labels-on-bitcoinize-device"}},[e._v("5. Put PoS link and labels on Bitcoinize device")])]),t("li",[t("a",{attrs:{href:"#6-give-merchants-access-to-the-payment-history-optional"}},[e._v("6. Give merchants access to the payment history (optional)")])])])]),t("li",[t("a",{attrs:{href:"#setup-a-bolt-cards-provider"}},[e._v("Setup a Bolt Cards provider")]),t("ul",[t("li",[t("a",{attrs:{href:"#1-create-a-store"}},[e._v("1. Create a store")])]),t("li",[t("a",{attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("2. Setup Lightning Network wallet")])]),t("li",[t("a",{attrs:{href:"#3-setup-automated-payouts"}},[e._v("3. Setup automated payouts")])]),t("li",[t("a",{attrs:{href:"#4-setup-bolt-cards-factory"}},[e._v("4. Setup Bolt Cards Factory")])]),t("li",[t("a",{attrs:{href:"#5-checking-the-balance-of-cards-and-topping-them-up"}},[e._v("5. Checking the balance of cards and topping them up")])]),t("li",[t("a",{attrs:{href:"#6-resetting-bolt-cards-after-the-conferenceevent"}},[e._v("6. Resetting Bolt Cards after the conference/event")])])])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"initial-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#initial-setup"}},[e._v("#")]),e._v(" Initial setup")]),e._v(" "),t("ul",[t("li",[e._v("Setup BTCPay Server v1.13.2 or later on a VPS (with public IP)")]),e._v(" "),t("li",[e._v("Setup a subdomain or use one provided by VPS hosting (e.g. Lunanode)")]),e._v(" "),t("li",[e._v("Register the admin account and create a first test store")]),e._v(" "),t("li",[e._v("Do "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[e._v("FastSync")]),e._v(" (optional)")],1)]),e._v(" "),t("p",[t("strong",[e._v("Once the server is up, install these plugins:")])]),e._v(" "),t("ul",[t("li",[e._v("Blink plugin")]),e._v(" "),t("li",[e._v("Bolt Cards plugin")])]),e._v(" "),t("p",[e._v("Then restart BTCPay Server (via UI or "),t("code",[e._v("docker restart generated_btcpayserver_1")]),e._v(" via SSH)")]),e._v(" "),t("h2",{attrs:{id:"setup-merchant-stores-and-initialize-bitcoinize-devices"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-merchant-stores-and-initialize-bitcoinize-devices"}},[e._v("#")]),e._v(" Setup merchant stores and initialize Bitcoinize devices")]),e._v(" "),t("h3",{attrs:{id:"preparation-of-bitcoinize-devices"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparation-of-bitcoinize-devices"}},[e._v("#")]),e._v(" Preparation of Bitcoinize devices")]),e._v(" "),t("ul",[t("li",[e._v("Make sure Bitcoinize devices battery level is 90%+ (if less, then charge)")]),e._v(" "),t("li",[e._v("Extension cords / high-powered USB hubs are critical when setting up 10+ devices")]),e._v(" "),t("li",[e._v("Insert the paper roll in the device's printer")])]),e._v(" "),t("h2",{attrs:{id:"setup-merchant-stores"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-merchant-stores"}},[e._v("#")]),e._v(" Setup merchant stores")]),e._v(" "),t("p",[e._v("Log into your BTCPay Server instance with your admin account.")]),e._v(" "),t("p",[t("em",[t("strong",[e._v("Repeat the following steps for each merchant:")])])]),e._v(" "),t("h3",{attrs:{id:"1-create-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-store"}},[e._v("#")]),e._v(" 1. Create store")]),e._v(" "),t("ul",[t("li",[e._v('Top left dropdown -> "'),t("strong",[e._v("Create store")]),e._v('" button\n'),t("ul",[t("li",[t("strong",[e._v("Name")]),e._v(": e.g. Nakamoto's Pineapple Pizza")]),e._v(" "),t("li",[t("strong",[e._v("Default Currency")]),e._v(": USD, HKD, ... depending on location")]),e._v(" "),t("li",[t("strong",[e._v("Preferred Price Source")]),e._v(": For USD, EUR Kraken is recommended, HKD Coingecko, for more exotic currencies you can try Coingecko or check if there is a local exchange listed in the dropdown")])])]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Create store")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"2-setup-lightning-network-wallet"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("#")]),e._v(" 2. Setup Lightning Network wallet")]),e._v(" "),t("p",[e._v("Setup the Lightning wallet to be connected to the merchants' Blink account, follow the "),t("a",{attrs:{href:"https://dev.blink.sv/examples/btcpayserver-plugin#how-to-connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions on Blink docs"),t("OutboundLink")],1),e._v(".\n(Alternatively, in case your merchants want to get paid in local currency you can set up your conference Blink account and distribute funds later on fiat ramps)")]),e._v(" "),t("h3",{attrs:{id:"3-configure-spread-and-enable-sounds"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-configure-spread-and-enable-sounds"}},[e._v("#")]),e._v(" 3. Configure spread and enable sounds")]),e._v(" "),t("ul",[t("li",[e._v('Click "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Rates")]),e._v('"')]),e._v(" "),t("li",[t("strong",[e._v("Add Exchange Rate Spread")]),e._v(": enter "),t("code",[e._v("1")]),e._v(", so we have extra room (Blink charges 0.2% for hedging in StableSats USD")]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Save")]),e._v('" button')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Checkout Appearance")]),e._v('"')]),e._v(" "),t("li",[e._v('On dropdown "'),t("strong",[e._v("Select a preset")]),e._v('", select "'),t("strong",[e._v("In-store")]),e._v('"')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Save")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"4-setup-point-of-sale-pos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-setup-point-of-sale-pos"}},[e._v("#")]),e._v(" 4. Setup Point of Sale (PoS)")]),e._v(" "),t("ul",[t("li",[e._v('Left sidebar under "Plugins", click on "'),t("strong",[e._v("Point of Sale")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("App Name")]),e._v('": enter the same merchant name as for the store')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Create")]),e._v('" button')]),e._v(" "),t("li",[e._v('Now on PoS settings, make sure "'),t("strong",[e._v("App Name")]),e._v('" and "'),t("strong",[e._v("Display Title")]),e._v('" are filled out')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Choose Point of Sale Style")]),e._v('": select "'),t("strong",[e._v("Keypad")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Currency")]),e._v('", select the same currency as your store')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')]),e._v(" "),t("li",[e._v('On the top right click on the "'),t("strong",[e._v("View")]),e._v('" button and make sure the keypad is shown')])]),e._v(" "),t("h3",{attrs:{id:"5-put-pos-link-and-labels-on-bitcoinize-device"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#5-put-pos-link-and-labels-on-bitcoinize-device"}},[e._v("#")]),e._v(" 5. Put PoS link and labels on Bitcoinize device")]),e._v(" "),t("ul",[t("li",[e._v('Go back to PoS settings in your browser and click on the "'),t("strong",[e._v("QR-code icon")]),e._v('"')]),e._v(" "),t("li",[e._v('On your Bitcoinize (or other) device, open the "'),t("strong",[e._v("Camera")]),e._v('" app')]),e._v(" "),t("li",[e._v('Scroll to the right until you find "'),t("strong",[e._v("more")]),e._v('" category -> select "'),t("strong",[e._v("QR-Code")]),e._v('"')]),e._v(" "),t("li",[e._v("Now scan the QR-Code shown in your browser (on the PoS settings page)")]),e._v(" "),t("li",[e._v("After scanning open the URL in the Chrome browser")]),e._v(" "),t("li",[e._v("Check that you see the keypad and the correct merchant name")]),e._v(" "),t("li",[e._v('Tap on the 3 dots "'),t("strong",[e._v("...")]),e._v('" on the top right and select "'),t("strong",[e._v("Add to home")]),e._v('"')]),e._v(" "),t("li",[e._v("Place the icon on the main home screen for easy access")]),e._v(" "),t("li",[e._v("Label the device and box with stickers bearing the merchant name")])]),e._v(" "),t("p",[t("em",[t("strong",[e._v("Testing the PoS device payments and give permissions:")])])]),e._v(" "),t("ul",[t("li",[e._v("Start the PoS page from the home screen")]),e._v(" "),t("li",[e._v("Ensure that the sound on the device is turned up so that there is audio feedback on payment, especially if Bolt Cards are used")]),e._v(" "),t("li",[e._v('Enter 0.01 USD (or other currency equivalent) and tap on "'),t("strong",[e._v("Charge")]),e._v('" button')]),e._v(" "),t("li",[e._v("Only first time the browser will ask for NFC permission, tap on the button to give it the requested permission")]),e._v(" "),t("li",[e._v("Pay the invoice either with a Bolt Card or Lightning wallet")]),e._v(" "),t("li",[e._v("Ensure you hear the sound after the payment")]),e._v(" "),t("li",[e._v('Tap on "'),t("strong",[e._v("View receipt")]),e._v('" button, test printing the receipt by selecting the '),t("strong",[e._v("POSPrinter")]),e._v(' from the dropdown, tap on the "'),t("strong",[e._v("Print")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"6-give-merchants-access-to-the-payment-history-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#6-give-merchants-access-to-the-payment-history-optional"}},[e._v("#")]),e._v(" 6. Give merchants access to the payment history (optional)")]),e._v(" "),t("p",[e._v('Optionally you can also create a login for each store/merchant on the PoS device so they can access the payment history. This is helpful to double-check what was the last payment or if a payment was already made. You can do so by adding a "Merchant" role with the following permissions:')]),e._v(" "),t("ul",[t("li",[e._v("btcpay.store.canmodifyinvoices")]),e._v(" "),t("li",[e._v("btcpay.store.canviewstoresettings")]),e._v(" "),t("li",[e._v("btcpay.store.canviewpaymentrequestes")]),e._v(" "),t("li",[e._v("btcpay.store.canarchivepullpayments")]),e._v(" "),t("li",[e._v("btcpay.store.cancreatenonapprovedpullpayments")])]),e._v(" "),t("p",[e._v("After that create a user for each store and assign them to the right store.")]),e._v(" "),t("h2",{attrs:{id:"setup-a-bolt-cards-provider"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-a-bolt-cards-provider"}},[e._v("#")]),e._v(" Setup a Bolt Cards provider")]),e._v(" "),t("p",[e._v('We will create a separate store that is serving as a Bolt Cards provider. To find it easier in the list of stores you can append the store name with a "z", e.g. "z - Bolt Cards Provider".')]),e._v(" "),t("p",[e._v("For this special store we will connect a Blink account with the important differences compared to merchant Blink accounts:")]),e._v(" "),t("ul",[t("li",[e._v("the API key has to have also "),t("strong",[e._v("write permission")]),e._v(", otherwise Bolt Cards won't be able to pull the funds")]),e._v(" "),t("li",[e._v("Make sure you connect the "),t("strong",[e._v("Bitcoin wallet")]),e._v(" (and "),t("em",[e._v("not")]),e._v(" StableSats USD)")])]),e._v(" "),t("h3",{attrs:{id:"1-create-a-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-a-store"}},[e._v("#")]),e._v(" 1. Create a store")]),e._v(" "),t("ul",[t("li",[e._v('Create a store with the name "'),t("strong",[e._v("z - Bolt Cards Provider")]),e._v('" (same steps as shown for merchant stores above)')])]),e._v(" "),t("h3",{attrs:{id:"2-setup-lightning-network-wallet-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-setup-lightning-network-wallet-2"}},[e._v("#")]),e._v(" 2. Setup Lightning Network wallet")]),e._v(" "),t("p",[e._v("Setup the Lightning wallet to be connected to your Blink account as per "),t("a",{attrs:{href:"https://dev.blink.sv/examples/btcpayserver-plugin#how-to-connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions on Blink docs"),t("OutboundLink")],1),e._v(" but make sure:")]),e._v(" "),t("ul",[t("li",[e._v('the API key has "Read", "Receive" and "Write" permissions, otherwise Bolt Cards won\'t be able to pull the funds')]),e._v(" "),t("li",[e._v("make sure you connect to the "),t("strong",[e._v("Bitcoin wallet")]),e._v(" (and "),t("em",[e._v("not")]),e._v(" StableSats USD)")])]),e._v(" "),t("h3",{attrs:{id:"3-setup-automated-payouts"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-setup-automated-payouts"}},[e._v("#")]),e._v(" 3. Setup automated payouts")]),e._v(" "),t("p",[e._v("To allow no-interaction top-ups of Bolt Cards we need to make sure payouts are processing automatically.")]),e._v(" "),t("ul",[t("li",[e._v('Go "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Payout Processors")]),e._v('"')]),e._v(" "),t("li",[e._v('Below "'),t("strong",[e._v("Automated Lightning Sender")]),e._v('", click on "'),t("strong",[e._v("Configure")]),e._v('"')]),e._v(" "),t("li",[e._v('Enable "**Process approved payouts instantly"')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"4-setup-bolt-cards-factory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-setup-bolt-cards-factory"}},[e._v("#")]),e._v(" 4. Setup Bolt Cards Factory")]),e._v(" "),t("h4",{attrs:{id:"setup-a-bolt-card-factory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-a-bolt-card-factory"}},[e._v("#")]),e._v(" Setup a Bolt Card factory")]),e._v(" "),t("ul",[t("li",[e._v('On the left sidebar go to "'),t("strong",[e._v("Boltcard Factories")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("App Name")]),e._v('": Enter a name like "Your conference" (it will be displayed when the card is read)')]),e._v(" "),t("li",[e._v('Click on the "'),t("strong",[e._v("Create")]),e._v('" button, and you will see the following settings. For example, if you want to preload the cards with 210 Sats, enter the following:\n'),t("ul",[t("li",[e._v('"'),t("strong",[e._v("Name")]),e._v('": Name of the conference/event that is displayed when a Bolt Card is read')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Amount")]),e._v('": 210')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Currency")]),e._v('": SATS (The currency must to be '),t("strong",[e._v("SATS")]),e._v(", do not set any other currency)")]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Automatically approve claims")]),e._v('": checked (true)')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Payment Methods")]),e._v('": "BTC (Off-Chain)" checked (true)')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')])])])]),e._v(" "),t("h4",{attrs:{id:"program-bolt-cards"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#program-bolt-cards"}},[e._v("#")]),e._v(" Program Bolt Cards")]),e._v(" "),t("p",[e._v('Still, on that Boltcards Factory settings page, you now click on "'),t("strong",[e._v("View")]),e._v('" button on the top right, the page that opens will need to be opened on a mobile device with NFC writing support (e.g. a Bitcoinize device).')]),e._v(" "),t("ul",[t("li",[e._v("Ensure that you have the "),t("a",{attrs:{href:"https://play.google.com/store/apps/details?id=com.lightningnfcapp&hl=en&gl=US",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bolt Card NFC Card Creator"),t("OutboundLink")],1),e._v(" installed on the mobile device")]),e._v(" "),t("li",[e._v("If there is a Bolt Card NFC Card Creator app already installed - "),t("em",[t("strong",[e._v("make sure it's the latest version")])]),e._v(", optionally uninstall and install the newest version from the app store")]),e._v(" "),t("li",[e._v('When you click on the "'),t("strong",[e._v("Setup")]),e._v('" button on the Boltcard Factory it should open the Bolt Card NFC Card Creator app')]),e._v(" "),t("li",[e._v("Make sure you hold the Bolt Card *"),t("strong",[e._v("until ALL green checkmarks are done")])]),e._v(" "),t("li",[e._v('You can now batch initialize cards. Just click on the "'),t("strong",[e._v("Write again")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"5-checking-the-balance-of-cards-and-topping-them-up"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#5-checking-the-balance-of-cards-and-topping-them-up"}},[e._v("#")]),e._v(" 5. Checking the balance of cards and topping them up")]),e._v(" "),t("p",[e._v('In the same store that serves as the Bolt Card provider you will have a "'),t("strong",[e._v("Boltcard Balance")]),e._v('" menu item on the left sidebar. The URL will look like this '),t("a",{attrs:{href:"https://btcpay.yourdomain.tld/boltcards/balance",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://btcpay.yourdomain.tld/boltcards/balance"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v('When you open that link on a mobile device with NFC support (such as Bitcoinize), you can use it to allow users to check their balance and also for topping their cards up with Sats, to do that, tap on the "'),t("strong",[e._v("QR-Code icon")]),e._v('" after reading the balance of the card.')]),e._v(" "),t("h3",{attrs:{id:"6-resetting-bolt-cards-after-the-conferenceevent"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#6-resetting-bolt-cards-after-the-conferenceevent"}},[e._v("#")]),e._v(" 6. Resetting Bolt Cards after the conference/event")]),e._v(" "),t("p",[e._v("Like the balance page, you can find the link on the left sidebar. The URL will look like this "),t("a",{attrs:{href:"https://btcpay.yourdomain.tld/boltcards/balance?view=Reset",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://btcpay.yourdomain.tld/boltcards/balance?view=Reset"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("You should consider publishing this link during or even before the event and allow attendees to sweep and reset their cards after the event, so they can reuse the Bolt Cards and reprogram them. This is only possible after the reset is done successfully.")]),e._v(" "),t("p",[e._v("To reset Bolt Cards, like for setting them up, you need the Bolt Card NFC Card Creator app.")]),e._v(" "),t("p",[e._v("See "),t("a",{attrs:{href:"https://x.com/r0ckstardev/status/1767618114139639817",target:"_blank",rel:"noopener noreferrer"}},[e._v("this tweet by Uncle Rockstar Dev"),t("OutboundLink")],1),e._v(" how the instructions could look like.")]),e._v(" "),t("p",[e._v("Congratulations, you have now set up a BTCPay Server for a conference or event with a smooth user experience for attendees and merchants. Enjoy the event!")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[106],{820:function(e,t,a){"use strict";a.r(t);var r=a(17),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"setting-up-btcpay-server-for-conference-event-local-community"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-btcpay-server-for-conference-event-local-community"}},[e._v("#")]),e._v(" Setting up BTCPay Server for Conference / Event / Local Community")]),e._v(" "),t("p",[e._v("We will be going through the setup we used at "),t("a",{attrs:{href:"https://blog.btcpayserver.org/case-study-bitcoin-atlantis/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Atlantis"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://bitcoinmagazine.com/business/case-study-enabling-bitcoin-as-a-medium-of-exchange-at-the-bitcoin-asia-conference-in-hong-kong",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Hong Kong"),t("OutboundLink")],1),e._v(" and other conferences for a great user experience for attendees and merchants.")]),e._v(" "),t("p",[e._v("For Point of Sale (PoS) devices we use the "),t("a",{attrs:{href:"https://bitcoinize.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoinize"),t("OutboundLink")],1),e._v(" devices with receipt printer (but you can use any other Android-based PoS device).")]),e._v(" "),t("p",[e._v("The Lightning Network part will be done by "),t("a",{attrs:{href:"https://blink.sv",target:"_blank",rel:"noopener noreferrer"}},[e._v("Blink.sv"),t("OutboundLink")],1),e._v(" with the Blink plugin (but you can swap it for any other LN service like Alby, Breez, use our internal LN node or connect to your own LN node).")]),e._v(" "),t("p",[e._v("To allow an even smoother UX for attendees without an internet connection or no prior Bitcoin knowledge we show how to set up and issue Bolt Cards and allow users to top-up.")]),e._v(" "),t("p",[e._v("To get an overview of the whole setup and steps you can watch our workshop from BTCPrague 2024.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Hpd-IytvI4Y/hqdefault.jpg)"},attrs:{href:"https://youtu.be/Hpd-IytvI4Y",title:"BTCPrague 2024 Workshop","data-id":"Hpd-IytvI4Y"}},[t("iframe",{attrs:{title:"BTCPrague 2024 Workshop","data-src":"https://www.youtube-nocookie.com/embed/Hpd-IytvI4Y?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("hr"),e._v(" "),t("p",[t("strong",[e._v("Table of contents")])]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#initial-setup"}},[e._v("Initial setup")])]),t("li",[t("a",{attrs:{href:"#setup-merchant-stores-and-initialize-bitcoinize-devices"}},[e._v("Setup merchant stores and initialize Bitcoinize devices")]),t("ul",[t("li",[t("a",{attrs:{href:"#preparation-of-bitcoinize-devices"}},[e._v("Preparation of Bitcoinize devices")])])])]),t("li",[t("a",{attrs:{href:"#setup-merchant-stores"}},[e._v("Setup merchant stores")]),t("ul",[t("li",[t("a",{attrs:{href:"#1-create-store"}},[e._v("1. Create store")])]),t("li",[t("a",{attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("2. Setup Lightning Network wallet")])]),t("li",[t("a",{attrs:{href:"#3-configure-spread-and-enable-sounds"}},[e._v("3. Configure spread and enable sounds")])]),t("li",[t("a",{attrs:{href:"#4-setup-point-of-sale-pos"}},[e._v("4. Setup Point of Sale (PoS)")])]),t("li",[t("a",{attrs:{href:"#5-put-pos-link-and-labels-on-bitcoinize-device"}},[e._v("5. Put PoS link and labels on Bitcoinize device")])]),t("li",[t("a",{attrs:{href:"#6-give-merchants-access-to-the-payment-history-optional"}},[e._v("6. Give merchants access to the payment history (optional)")])])])]),t("li",[t("a",{attrs:{href:"#setup-a-bolt-cards-provider"}},[e._v("Setup a Bolt Cards provider")]),t("ul",[t("li",[t("a",{attrs:{href:"#1-create-a-store"}},[e._v("1. Create a store")])]),t("li",[t("a",{attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("2. Setup Lightning Network wallet")])]),t("li",[t("a",{attrs:{href:"#3-setup-automated-payouts"}},[e._v("3. Setup automated payouts")])]),t("li",[t("a",{attrs:{href:"#4-setup-bolt-cards-factory"}},[e._v("4. Setup Bolt Cards Factory")])]),t("li",[t("a",{attrs:{href:"#5-checking-the-balance-of-cards-and-topping-them-up"}},[e._v("5. Checking the balance of cards and topping them up")])]),t("li",[t("a",{attrs:{href:"#6-resetting-bolt-cards-after-the-conferenceevent"}},[e._v("6. Resetting Bolt Cards after the conference/event")])])])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"initial-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#initial-setup"}},[e._v("#")]),e._v(" Initial setup")]),e._v(" "),t("ul",[t("li",[e._v("Setup BTCPay Server v1.13.2 or later on a VPS (with public IP)")]),e._v(" "),t("li",[e._v("Setup a subdomain or use one provided by VPS hosting (e.g. Lunanode)")]),e._v(" "),t("li",[e._v("Register the admin account and create a first test store")]),e._v(" "),t("li",[e._v("Do "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[e._v("FastSync")]),e._v(" (optional)")],1)]),e._v(" "),t("p",[t("strong",[e._v("Once the server is up, install these plugins:")])]),e._v(" "),t("ul",[t("li",[e._v("Blink plugin")]),e._v(" "),t("li",[e._v("Bolt Cards plugin")])]),e._v(" "),t("p",[e._v("Then restart BTCPay Server (via UI or "),t("code",[e._v("docker restart generated_btcpayserver_1")]),e._v(" via SSH)")]),e._v(" "),t("h2",{attrs:{id:"setup-merchant-stores-and-initialize-bitcoinize-devices"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-merchant-stores-and-initialize-bitcoinize-devices"}},[e._v("#")]),e._v(" Setup merchant stores and initialize Bitcoinize devices")]),e._v(" "),t("h3",{attrs:{id:"preparation-of-bitcoinize-devices"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparation-of-bitcoinize-devices"}},[e._v("#")]),e._v(" Preparation of Bitcoinize devices")]),e._v(" "),t("ul",[t("li",[e._v("Make sure Bitcoinize devices battery level is 90%+ (if less, then charge)")]),e._v(" "),t("li",[e._v("Extension cords / high-powered USB hubs are critical when setting up 10+ devices")]),e._v(" "),t("li",[e._v("Insert the paper roll in the device's printer")])]),e._v(" "),t("h2",{attrs:{id:"setup-merchant-stores"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-merchant-stores"}},[e._v("#")]),e._v(" Setup merchant stores")]),e._v(" "),t("p",[e._v("Log into your BTCPay Server instance with your admin account.")]),e._v(" "),t("p",[t("em",[t("strong",[e._v("Repeat the following steps for each merchant:")])])]),e._v(" "),t("h3",{attrs:{id:"1-create-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-store"}},[e._v("#")]),e._v(" 1. Create store")]),e._v(" "),t("ul",[t("li",[e._v('Top left dropdown -> "'),t("strong",[e._v("Create store")]),e._v('" button\n'),t("ul",[t("li",[t("strong",[e._v("Name")]),e._v(": e.g. Nakamoto's Pineapple Pizza")]),e._v(" "),t("li",[t("strong",[e._v("Default Currency")]),e._v(": USD, HKD, ... depending on location")]),e._v(" "),t("li",[t("strong",[e._v("Preferred Price Source")]),e._v(": For USD, EUR Kraken is recommended, HKD Coingecko, for more exotic currencies you can try Coingecko or check if there is a local exchange listed in the dropdown")])])]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Create store")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"2-setup-lightning-network-wallet"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("#")]),e._v(" 2. Setup Lightning Network wallet")]),e._v(" "),t("p",[e._v("Setup the Lightning wallet to be connected to the merchants' Blink account, follow the "),t("a",{attrs:{href:"https://dev.blink.sv/examples/btcpayserver-plugin#how-to-connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions on Blink docs"),t("OutboundLink")],1),e._v(".\n(Alternatively, in case your merchants want to get paid in local currency you can set up your conference Blink account and distribute funds later on fiat ramps)")]),e._v(" "),t("h3",{attrs:{id:"3-configure-spread-and-enable-sounds"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-configure-spread-and-enable-sounds"}},[e._v("#")]),e._v(" 3. Configure spread and enable sounds")]),e._v(" "),t("ul",[t("li",[e._v('Click "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Rates")]),e._v('"')]),e._v(" "),t("li",[t("strong",[e._v("Add Exchange Rate Spread")]),e._v(": enter "),t("code",[e._v("1")]),e._v(", so we have extra room (Blink charges 0.2% for hedging in StableSats USD")]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Save")]),e._v('" button')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Checkout Appearance")]),e._v('"')]),e._v(" "),t("li",[e._v('On dropdown "'),t("strong",[e._v("Select a preset")]),e._v('", select "'),t("strong",[e._v("In-store")]),e._v('"')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Save")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"4-setup-point-of-sale-pos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-setup-point-of-sale-pos"}},[e._v("#")]),e._v(" 4. Setup Point of Sale (PoS)")]),e._v(" "),t("ul",[t("li",[e._v('Left sidebar under "Plugins", click on "'),t("strong",[e._v("Point of Sale")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("App Name")]),e._v('": enter the same merchant name as for the store')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Create")]),e._v('" button')]),e._v(" "),t("li",[e._v('Now on PoS settings, make sure "'),t("strong",[e._v("App Name")]),e._v('" and "'),t("strong",[e._v("Display Title")]),e._v('" are filled out')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Choose Point of Sale Style")]),e._v('": select "'),t("strong",[e._v("Keypad")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Currency")]),e._v('", select the same currency as your store')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')]),e._v(" "),t("li",[e._v('On the top right click on the "'),t("strong",[e._v("View")]),e._v('" button and make sure the keypad is shown')])]),e._v(" "),t("h3",{attrs:{id:"5-put-pos-link-and-labels-on-bitcoinize-device"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#5-put-pos-link-and-labels-on-bitcoinize-device"}},[e._v("#")]),e._v(" 5. Put PoS link and labels on Bitcoinize device")]),e._v(" "),t("ul",[t("li",[e._v('Go back to PoS settings in your browser and click on the "'),t("strong",[e._v("QR-code icon")]),e._v('"')]),e._v(" "),t("li",[e._v('On your Bitcoinize (or other) device, open the "'),t("strong",[e._v("Camera")]),e._v('" app')]),e._v(" "),t("li",[e._v('Scroll to the right until you find "'),t("strong",[e._v("more")]),e._v('" category -> select "'),t("strong",[e._v("QR-Code")]),e._v('"')]),e._v(" "),t("li",[e._v("Now scan the QR-Code shown in your browser (on the PoS settings page)")]),e._v(" "),t("li",[e._v("After scanning open the URL in the Chrome browser")]),e._v(" "),t("li",[e._v("Check that you see the keypad and the correct merchant name")]),e._v(" "),t("li",[e._v('Tap on the 3 dots "'),t("strong",[e._v("...")]),e._v('" on the top right and select "'),t("strong",[e._v("Add to home")]),e._v('"')]),e._v(" "),t("li",[e._v("Place the icon on the main home screen for easy access")]),e._v(" "),t("li",[e._v("Label the device and box with stickers bearing the merchant name")])]),e._v(" "),t("p",[t("em",[t("strong",[e._v("Testing the PoS device payments and give permissions:")])])]),e._v(" "),t("ul",[t("li",[e._v("Start the PoS page from the home screen")]),e._v(" "),t("li",[e._v("Ensure that the sound on the device is turned up so that there is audio feedback on payment, especially if Bolt Cards are used")]),e._v(" "),t("li",[e._v('Enter 0.01 USD (or other currency equivalent) and tap on "'),t("strong",[e._v("Charge")]),e._v('" button')]),e._v(" "),t("li",[e._v("Only first time the browser will ask for NFC permission, tap on the button to give it the requested permission")]),e._v(" "),t("li",[e._v("Pay the invoice either with a Bolt Card or Lightning wallet")]),e._v(" "),t("li",[e._v("Ensure you hear the sound after the payment")]),e._v(" "),t("li",[e._v('Tap on "'),t("strong",[e._v("View receipt")]),e._v('" button, test printing the receipt by selecting the '),t("strong",[e._v("POSPrinter")]),e._v(' from the dropdown, tap on the "'),t("strong",[e._v("Print")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"6-give-merchants-access-to-the-payment-history-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#6-give-merchants-access-to-the-payment-history-optional"}},[e._v("#")]),e._v(" 6. Give merchants access to the payment history (optional)")]),e._v(" "),t("p",[e._v('Optionally you can also create a login for each store/merchant on the PoS device so they can access the payment history. This is helpful to double-check what was the last payment or if a payment was already made. You can do so by adding a "Merchant" role with the following permissions:')]),e._v(" "),t("ul",[t("li",[e._v("btcpay.store.canmodifyinvoices")]),e._v(" "),t("li",[e._v("btcpay.store.canviewstoresettings")]),e._v(" "),t("li",[e._v("btcpay.store.canviewpaymentrequestes")]),e._v(" "),t("li",[e._v("btcpay.store.canarchivepullpayments")]),e._v(" "),t("li",[e._v("btcpay.store.cancreatenonapprovedpullpayments")])]),e._v(" "),t("p",[e._v("After that create a user for each store and assign them to the right store.")]),e._v(" "),t("h2",{attrs:{id:"setup-a-bolt-cards-provider"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-a-bolt-cards-provider"}},[e._v("#")]),e._v(" Setup a Bolt Cards provider")]),e._v(" "),t("p",[e._v('We will create a separate store that is serving as a Bolt Cards provider. To find it easier in the list of stores you can append the store name with a "z", e.g. "z - Bolt Cards Provider".')]),e._v(" "),t("p",[e._v("For this special store we will connect a Blink account with the important differences compared to merchant Blink accounts:")]),e._v(" "),t("ul",[t("li",[e._v("the API key has to have also "),t("strong",[e._v("write permission")]),e._v(", otherwise Bolt Cards won't be able to pull the funds")]),e._v(" "),t("li",[e._v("Make sure you connect the "),t("strong",[e._v("Bitcoin wallet")]),e._v(" (and "),t("em",[e._v("not")]),e._v(" StableSats USD)")])]),e._v(" "),t("h3",{attrs:{id:"1-create-a-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-a-store"}},[e._v("#")]),e._v(" 1. Create a store")]),e._v(" "),t("ul",[t("li",[e._v('Create a store with the name "'),t("strong",[e._v("z - Bolt Cards Provider")]),e._v('" (same steps as shown for merchant stores above)')])]),e._v(" "),t("h3",{attrs:{id:"2-setup-lightning-network-wallet-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-setup-lightning-network-wallet-2"}},[e._v("#")]),e._v(" 2. Setup Lightning Network wallet")]),e._v(" "),t("p",[e._v("Setup the Lightning wallet to be connected to your Blink account as per "),t("a",{attrs:{href:"https://dev.blink.sv/examples/btcpayserver-plugin#how-to-connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions on Blink docs"),t("OutboundLink")],1),e._v(" but make sure:")]),e._v(" "),t("ul",[t("li",[e._v('the API key has "Read", "Receive" and "Write" permissions, otherwise Bolt Cards won\'t be able to pull the funds')]),e._v(" "),t("li",[e._v("make sure you connect to the "),t("strong",[e._v("Bitcoin wallet")]),e._v(" (and "),t("em",[e._v("not")]),e._v(" StableSats USD)")])]),e._v(" "),t("h3",{attrs:{id:"3-setup-automated-payouts"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-setup-automated-payouts"}},[e._v("#")]),e._v(" 3. Setup automated payouts")]),e._v(" "),t("p",[e._v("To allow no-interaction top-ups of Bolt Cards we need to make sure payouts are processing automatically.")]),e._v(" "),t("ul",[t("li",[e._v('Go "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Payout Processors")]),e._v('"')]),e._v(" "),t("li",[e._v('Below "'),t("strong",[e._v("Automated Lightning Sender")]),e._v('", click on "'),t("strong",[e._v("Configure")]),e._v('"')]),e._v(" "),t("li",[e._v('Enable "**Process approved payouts instantly"')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"4-setup-bolt-cards-factory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-setup-bolt-cards-factory"}},[e._v("#")]),e._v(" 4. Setup Bolt Cards Factory")]),e._v(" "),t("h4",{attrs:{id:"setup-a-bolt-card-factory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-a-bolt-card-factory"}},[e._v("#")]),e._v(" Setup a Bolt Card factory")]),e._v(" "),t("ul",[t("li",[e._v('On the left sidebar go to "'),t("strong",[e._v("Boltcard Factories")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("App Name")]),e._v('": Enter a name like "Your conference" (it will be displayed when the card is read)')]),e._v(" "),t("li",[e._v('Click on the "'),t("strong",[e._v("Create")]),e._v('" button, and you will see the following settings. For example, if you want to preload the cards with 210 Sats, enter the following:\n'),t("ul",[t("li",[e._v('"'),t("strong",[e._v("Name")]),e._v('": Name of the conference/event that is displayed when a Bolt Card is read')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Amount")]),e._v('": 210')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Currency")]),e._v('": SATS (The currency must to be '),t("strong",[e._v("SATS")]),e._v(", do not set any other currency)")]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Automatically approve claims")]),e._v('": checked (true)')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Payment Methods")]),e._v('": "BTC (Off-Chain)" checked (true)')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')])])])]),e._v(" "),t("h4",{attrs:{id:"program-bolt-cards"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#program-bolt-cards"}},[e._v("#")]),e._v(" Program Bolt Cards")]),e._v(" "),t("p",[e._v('Still, on that Boltcards Factory settings page, you now click on "'),t("strong",[e._v("View")]),e._v('" button on the top right, the page that opens will need to be opened on a mobile device with NFC writing support (e.g. a Bitcoinize device).')]),e._v(" "),t("ul",[t("li",[e._v("Ensure that you have the "),t("a",{attrs:{href:"https://play.google.com/store/apps/details?id=com.lightningnfcapp&hl=en&gl=US",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bolt Card NFC Card Creator"),t("OutboundLink")],1),e._v(" installed on the mobile device")]),e._v(" "),t("li",[e._v("If there is a Bolt Card NFC Card Creator app already installed - "),t("em",[t("strong",[e._v("make sure it's the latest version")])]),e._v(", optionally uninstall and install the newest version from the app store")]),e._v(" "),t("li",[e._v('When you click on the "'),t("strong",[e._v("Setup")]),e._v('" button on the Boltcard Factory it should open the Bolt Card NFC Card Creator app')]),e._v(" "),t("li",[e._v("Make sure you hold the Bolt Card *"),t("strong",[e._v("until ALL green checkmarks are done")])]),e._v(" "),t("li",[e._v('You can now batch initialize cards. Just click on the "'),t("strong",[e._v("Write again")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"5-checking-the-balance-of-cards-and-topping-them-up"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#5-checking-the-balance-of-cards-and-topping-them-up"}},[e._v("#")]),e._v(" 5. Checking the balance of cards and topping them up")]),e._v(" "),t("p",[e._v('In the same store that serves as the Bolt Card provider you will have a "'),t("strong",[e._v("Boltcard Balance")]),e._v('" menu item on the left sidebar. The URL will look like this '),t("a",{attrs:{href:"https://btcpay.yourdomain.tld/boltcards/balance",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://btcpay.yourdomain.tld/boltcards/balance"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v('When you open that link on a mobile device with NFC support (such as Bitcoinize), you can use it to allow users to check their balance and also for topping their cards up with Sats, to do that, tap on the "'),t("strong",[e._v("QR-Code icon")]),e._v('" after reading the balance of the card.')]),e._v(" "),t("h3",{attrs:{id:"6-resetting-bolt-cards-after-the-conferenceevent"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#6-resetting-bolt-cards-after-the-conferenceevent"}},[e._v("#")]),e._v(" 6. Resetting Bolt Cards after the conference/event")]),e._v(" "),t("p",[e._v("Like the balance page, you can find the link on the left sidebar. The URL will look like this "),t("a",{attrs:{href:"https://btcpay.yourdomain.tld/boltcards/balance?view=Reset",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://btcpay.yourdomain.tld/boltcards/balance?view=Reset"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("You should consider publishing this link during or even before the event and allow attendees to sweep and reset their cards after the event, so they can reuse the Bolt Cards and reprogram them. This is only possible after the reset is done successfully.")]),e._v(" "),t("p",[e._v("To reset Bolt Cards, like for setting them up, you need the Bolt Card NFC Card Creator app.")]),e._v(" "),t("p",[e._v("See "),t("a",{attrs:{href:"https://x.com/r0ckstardev/status/1767618114139639817",target:"_blank",rel:"noopener noreferrer"}},[e._v("this tweet by Uncle Rockstar Dev"),t("OutboundLink")],1),e._v(" how the instructions could look like.")]),e._v(" "),t("p",[e._v("Congratulations, you have now set up a BTCPay Server for a conference or event with a smooth user experience for attendees and merchants. Enjoy the event!")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/107.b9fdf202.js b/assets/js/107.a463f888.js similarity index 96% rename from assets/js/107.b9fdf202.js rename to assets/js/107.a463f888.js index 641f9b3607..82178da86a 100644 --- a/assets/js/107.b9fdf202.js +++ b/assets/js/107.a463f888.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[107],{824:function(e,t,r){"use strict";r.r(t);var n=r(17),s=Object(n.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"design-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#design-btcpay-server"}},[e._v("#")]),e._v(" Design BTCPay Server")]),e._v(" "),t("h2",{attrs:{id:"why-designing-matters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-designing-matters"}},[e._v("#")]),e._v(" Why designing matters")]),e._v(" "),t("p",[e._v("Designing for BTCPay Server consists of improving overall experience for the end-user, making it easier to navigate the menus, options, etc...")]),e._v(" "),t("p",[e._v("To contribute design to BTCPay Server, check out the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/ux-ui",target:"_blank",rel:"noopener noreferrer"}},[e._v("UX/UI channel"),t("OutboundLink")],1),e._v(" for current discussions and the Figma "),t("a",{attrs:{href:"https://www.figma.com/file/C7Xyq0FlxgFW8vaBr8ht1z/BTCPAY?node-id=1766%3A1005",target:"_blank",rel:"noopener noreferrer"}},[e._v("getting started"),t("OutboundLink")],1),e._v(" section for the design projects that are currently being worked on.")]),e._v(" "),t("p",[e._v("Graphic content also helps promote BTCPay Server. Be it full scale logos, memes or other graphics, we're always enjoying seeing what contributors come up with.\nFollowing the "),t("a",{attrs:{href:"https://design.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Codified Design Guidelines"),t("OutboundLink")],1),e._v(" is "),t("strong",[e._v("required")]),e._v(" so that graphical content can be consistent between contributors.")])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[107],{823:function(e,t,r){"use strict";r.r(t);var n=r(17),s=Object(n.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"design-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#design-btcpay-server"}},[e._v("#")]),e._v(" Design BTCPay Server")]),e._v(" "),t("h2",{attrs:{id:"why-designing-matters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-designing-matters"}},[e._v("#")]),e._v(" Why designing matters")]),e._v(" "),t("p",[e._v("Designing for BTCPay Server consists of improving overall experience for the end-user, making it easier to navigate the menus, options, etc...")]),e._v(" "),t("p",[e._v("To contribute design to BTCPay Server, check out the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/ux-ui",target:"_blank",rel:"noopener noreferrer"}},[e._v("UX/UI channel"),t("OutboundLink")],1),e._v(" for current discussions and the Figma "),t("a",{attrs:{href:"https://www.figma.com/file/C7Xyq0FlxgFW8vaBr8ht1z/BTCPAY?node-id=1766%3A1005",target:"_blank",rel:"noopener noreferrer"}},[e._v("getting started"),t("OutboundLink")],1),e._v(" section for the design projects that are currently being worked on.")]),e._v(" "),t("p",[e._v("Graphic content also helps promote BTCPay Server. Be it full scale logos, memes or other graphics, we're always enjoying seeing what contributors come up with.\nFollowing the "),t("a",{attrs:{href:"https://design.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Codified Design Guidelines"),t("OutboundLink")],1),e._v(" is "),t("strong",[e._v("required")]),e._v(" so that graphical content can be consistent between contributors.")])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/108.6453abe3.js b/assets/js/108.1718b216.js similarity index 98% rename from assets/js/108.6453abe3.js rename to assets/js/108.1718b216.js index f939fd072d..8232e7f68c 100644 --- a/assets/js/108.6453abe3.js +++ b/assets/js/108.1718b216.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[108],{823:function(e,t,r){"use strict";r.r(t);var o=r(17),a=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"coding-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#coding-btcpay-server"}},[e._v("#")]),e._v(" Coding BTCPay Server")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#why-coding-matters"}},[e._v("Why coding matters")])]),t("li",[t("a",{attrs:{href:"#where-to-start"}},[e._v("Where to start")]),t("ul",[t("li",[t("a",{attrs:{href:"#setup-developer-environment"}},[e._v("Setup Developer Environment")])]),t("li",[t("a",{attrs:{href:"#local-btcpay-development"}},[e._v("Local BTCPay Development")])]),t("li",[t("a",{attrs:{href:"#local-btcpay-testing"}},[e._v("Local BTCPay Testing")])])])]),t("li",[t("a",{attrs:{href:"#requirements"}},[e._v("Requirements")])]),t("li",[t("a",{attrs:{href:"#videos"}},[e._v("Videos")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"why-coding-matters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-coding-matters"}},[e._v("#")]),e._v(" Why coding matters")]),e._v(" "),t("p",[e._v("By helping the project grow, become more mature, advanced and elaborate, coders working on BTCPay Server are a central component of the project.")]),e._v(" "),t("p",[e._v("If you have coding skills, be it writing or reviewing code, you can contribute to BTCPay Server.")]),e._v(" "),t("h2",{attrs:{id:"where-to-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#where-to-start"}},[e._v("#")]),e._v(" Where to start")]),e._v(" "),t("p",[e._v("If you're a developer looking to help, but you're not sure where to begin, check the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22",target:"_blank",rel:"noopener noreferrer"}},[e._v("good first issue label"),t("OutboundLink")],1),e._v(", which contains small pieces of work that have been specifically flagged as being friendly to new contributors.")]),e._v(" "),t("p",[e._v("Contributors looking to do something a bit more challenging, before opening a pull request, please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/new/choose",target:"_blank",rel:"noopener noreferrer"}},[e._v("create an issue"),t("OutboundLink")],1),e._v(" or join "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("our community chat"),t("OutboundLink")],1),e._v(" to get early feedback, discuss best ways to tackle the problem and to ensure there is no work duplication.")]),e._v(" "),t("p",[e._v("We are actively looking for developers who can take on and resolve GitHub issues and help with development. If you would like to help us, but need some guidance, the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/dev",target:"_blank",rel:"noopener noreferrer"}},[e._v("#dev channel on Mattermost"),t("OutboundLink")],1),e._v(" is the place to ask questions.")]),e._v(" "),t("h3",{attrs:{id:"setup-developer-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-developer-environment"}},[e._v("#")]),e._v(" Setup Developer Environment")]),e._v(" "),t("p",[e._v("If you are interested in getting started as a developer or tester of the software behind BTCPay Server, check out the "),t("RouterLink",{attrs:{to:"/Contribute/DevCode/"}},[e._v("Setup Developer Environment")]),e._v(" guide that will walk you step by step through every software used in development with BTCPay such as Git, GitBash, Github, Docker, Visual Studio, Postgres, etc. If you have never coded before and you are looking to learn something new, start here.")],1),e._v(" "),t("h3",{attrs:{id:"local-btcpay-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-btcpay-development"}},[e._v("#")]),e._v(" Local BTCPay Development")]),e._v(" "),t("p",[e._v("If you already have a developer environment setup you can start with the BTCPay specific "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/"}},[e._v("Local Development")]),e._v(" documentation.")],1),e._v(" "),t("h3",{attrs:{id:"local-btcpay-testing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-btcpay-testing"}},[e._v("#")]),e._v(" Local BTCPay Testing")]),e._v(" "),t("p",[e._v("Once you have your development environment tools setup and your local BTCPay Server running, view the "),t("RouterLink",{attrs:{to:"/Contribute/DevTest/"}},[e._v("Local Testing")]),e._v(" guide. This shows you how to use BTCPay in regtest mode for use in development and for users who want to test new features before they are released.")],1),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("p",[e._v("Software requirements (ie. IDE) can also be found in "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/#which-ide"}},[e._v("local development")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("BTCPay Server development videos can be found "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/#videos"}},[e._v("here")]),e._v(" or on the "),t("a",{attrs:{href:"https://www.youtube.com/channel/UCpG9WL6TJuoNfFVkaDMp9ug",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer YouTube"),t("OutboundLink")],1),e._v(" channel.")],1)])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[108],{824:function(e,t,r){"use strict";r.r(t);var o=r(17),a=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"coding-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#coding-btcpay-server"}},[e._v("#")]),e._v(" Coding BTCPay Server")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#why-coding-matters"}},[e._v("Why coding matters")])]),t("li",[t("a",{attrs:{href:"#where-to-start"}},[e._v("Where to start")]),t("ul",[t("li",[t("a",{attrs:{href:"#setup-developer-environment"}},[e._v("Setup Developer Environment")])]),t("li",[t("a",{attrs:{href:"#local-btcpay-development"}},[e._v("Local BTCPay Development")])]),t("li",[t("a",{attrs:{href:"#local-btcpay-testing"}},[e._v("Local BTCPay Testing")])])])]),t("li",[t("a",{attrs:{href:"#requirements"}},[e._v("Requirements")])]),t("li",[t("a",{attrs:{href:"#videos"}},[e._v("Videos")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"why-coding-matters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-coding-matters"}},[e._v("#")]),e._v(" Why coding matters")]),e._v(" "),t("p",[e._v("By helping the project grow, become more mature, advanced and elaborate, coders working on BTCPay Server are a central component of the project.")]),e._v(" "),t("p",[e._v("If you have coding skills, be it writing or reviewing code, you can contribute to BTCPay Server.")]),e._v(" "),t("h2",{attrs:{id:"where-to-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#where-to-start"}},[e._v("#")]),e._v(" Where to start")]),e._v(" "),t("p",[e._v("If you're a developer looking to help, but you're not sure where to begin, check the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22",target:"_blank",rel:"noopener noreferrer"}},[e._v("good first issue label"),t("OutboundLink")],1),e._v(", which contains small pieces of work that have been specifically flagged as being friendly to new contributors.")]),e._v(" "),t("p",[e._v("Contributors looking to do something a bit more challenging, before opening a pull request, please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/new/choose",target:"_blank",rel:"noopener noreferrer"}},[e._v("create an issue"),t("OutboundLink")],1),e._v(" or join "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("our community chat"),t("OutboundLink")],1),e._v(" to get early feedback, discuss best ways to tackle the problem and to ensure there is no work duplication.")]),e._v(" "),t("p",[e._v("We are actively looking for developers who can take on and resolve GitHub issues and help with development. If you would like to help us, but need some guidance, the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/dev",target:"_blank",rel:"noopener noreferrer"}},[e._v("#dev channel on Mattermost"),t("OutboundLink")],1),e._v(" is the place to ask questions.")]),e._v(" "),t("h3",{attrs:{id:"setup-developer-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-developer-environment"}},[e._v("#")]),e._v(" Setup Developer Environment")]),e._v(" "),t("p",[e._v("If you are interested in getting started as a developer or tester of the software behind BTCPay Server, check out the "),t("RouterLink",{attrs:{to:"/Contribute/DevCode/"}},[e._v("Setup Developer Environment")]),e._v(" guide that will walk you step by step through every software used in development with BTCPay such as Git, GitBash, Github, Docker, Visual Studio, Postgres, etc. If you have never coded before and you are looking to learn something new, start here.")],1),e._v(" "),t("h3",{attrs:{id:"local-btcpay-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-btcpay-development"}},[e._v("#")]),e._v(" Local BTCPay Development")]),e._v(" "),t("p",[e._v("If you already have a developer environment setup you can start with the BTCPay specific "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/"}},[e._v("Local Development")]),e._v(" documentation.")],1),e._v(" "),t("h3",{attrs:{id:"local-btcpay-testing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-btcpay-testing"}},[e._v("#")]),e._v(" Local BTCPay Testing")]),e._v(" "),t("p",[e._v("Once you have your development environment tools setup and your local BTCPay Server running, view the "),t("RouterLink",{attrs:{to:"/Contribute/DevTest/"}},[e._v("Local Testing")]),e._v(" guide. This shows you how to use BTCPay in regtest mode for use in development and for users who want to test new features before they are released.")],1),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("p",[e._v("Software requirements (ie. IDE) can also be found in "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/#which-ide"}},[e._v("local development")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("BTCPay Server development videos can be found "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/#videos"}},[e._v("here")]),e._v(" or on the "),t("a",{attrs:{href:"https://www.youtube.com/channel/UCpG9WL6TJuoNfFVkaDMp9ug",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer YouTube"),t("OutboundLink")],1),e._v(" channel.")],1)])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/112.fdef2d76.js b/assets/js/112.3b3e61f8.js similarity index 95% rename from assets/js/112.fdef2d76.js rename to assets/js/112.3b3e61f8.js index fd5def0879..f999334316 100644 --- a/assets/js/112.fdef2d76.js +++ b/assets/js/112.3b3e61f8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[112],{832:function(t,e,r){"use strict";r.r(e);var o=r(17),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"contribute-to-the-blog"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#contribute-to-the-blog"}},[t._v("#")]),t._v(" Contribute to the blog")]),t._v(" "),e("p",[t._v("For the time being, the blog is hosted on Wordpress and the contributing process doesn't require Github.")]),t._v(" "),e("p",[t._v("Simply hit us in the "),e("a",{attrs:{href:"https://chat.btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[t._v("chat"),e("OutboundLink")],1),t._v(" and we'll discuss the writing proposed.")]),t._v(" "),e("p",[t._v("Subjects that are suitable for the blog include:")]),t._v(" "),e("ul",[e("li",[t._v("BTCPay Server updates")]),t._v(" "),e("li",[t._v("Tutorials")]),t._v(" "),e("li",[t._v("Testimonies of how BTCPay Server helped you")])]),t._v(" "),e("p",[t._v("Writing articles on our "),e("a",{attrs:{href:"https://blog.btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blog"),e("OutboundLink")],1),t._v(" helps spread the word on new features being implemented, or provides tutorials on how to use them.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[112],{831:function(t,e,r){"use strict";r.r(e);var o=r(17),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"contribute-to-the-blog"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#contribute-to-the-blog"}},[t._v("#")]),t._v(" Contribute to the blog")]),t._v(" "),e("p",[t._v("For the time being, the blog is hosted on Wordpress and the contributing process doesn't require Github.")]),t._v(" "),e("p",[t._v("Simply hit us in the "),e("a",{attrs:{href:"https://chat.btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[t._v("chat"),e("OutboundLink")],1),t._v(" and we'll discuss the writing proposed.")]),t._v(" "),e("p",[t._v("Subjects that are suitable for the blog include:")]),t._v(" "),e("ul",[e("li",[t._v("BTCPay Server updates")]),t._v(" "),e("li",[t._v("Tutorials")]),t._v(" "),e("li",[t._v("Testimonies of how BTCPay Server helped you")])]),t._v(" "),e("p",[t._v("Writing articles on our "),e("a",{attrs:{href:"https://blog.btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[t._v("Blog"),e("OutboundLink")],1),t._v(" helps spread the word on new features being implemented, or provides tutorials on how to use them.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/113.900a6daf.js b/assets/js/113.34b53002.js similarity index 99% rename from assets/js/113.900a6daf.js rename to assets/js/113.34b53002.js index 4e539bb5fa..d626534b21 100644 --- a/assets/js/113.900a6daf.js +++ b/assets/js/113.34b53002.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[113],{841:function(t,a,e){"use strict";e.r(a);var s=e(17),n=Object(s.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"using-the-btcpay-api-for-custom-integration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-the-btcpay-api-for-custom-integration"}},[t._v("#")]),t._v(" Using the BTCPay API for Custom Integration")]),t._v(" "),a("p",[t._v("BTCPay Server provides 2 APIS in order to integrate with it:")]),t._v(" "),a("ul",[a("li",[a("RouterLink",{attrs:{to:"/Development/GreenFieldExample/"}},[t._v("GreenField API")]),t._v(" - A RESTful API that aims to allow you to use BTCPay Server headless. This is the recommended API for projects which do not wish to recycle code from a Bitpay integration.")],1),t._v(" "),a("li",[t._v("Bitpay Invoice API - BTCPay implements the same API as Bitpay for creating and managing invoices.")])]),t._v(" "),a("p",[a("strong",[t._v("Migrating from BitPay to BTCPay")]),t._v(" normally is as easy as changing a URL.")]),t._v(" "),a("p",[t._v("While Bitpay only allows one account for one merchant, BTCPay allows a user to manage multiple stores.")]),t._v(" "),a("h2",{attrs:{id:"official-client-libraries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#official-client-libraries"}},[t._v("#")]),t._v(" Official Client Libraries")]),t._v(" "),a("p",[t._v("BTCPay maintains official client libraries for "),a("a",{attrs:{href:"https://github.com/MetacoSA/NBitpayClient",target:"_blank",rel:"noopener noreferrer"}},[t._v("C#"),a("OutboundLink")],1),t._v(", "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpay-python",target:"_blank",rel:"noopener noreferrer"}},[t._v("Python"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://github.com/btcpayserver/node-btcpay",target:"_blank",rel:"noopener noreferrer"}},[t._v("NodeJS"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("In addition, there are forked repositories of Bitpay's "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-php-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("PHP"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://github.com/bitpay/ruby-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Ruby"),a("OutboundLink")],1),t._v(" clients.")]),t._v(" "),a("h2",{attrs:{id:"accessing-the-api-manually"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#accessing-the-api-manually"}},[t._v("#")]),t._v(" Accessing the API Manually")]),t._v(" "),a("p",[t._v("If not using one of the libraries above, the REST API can be accessed manually.")]),t._v(" "),a("p",[t._v("The authentication mechanism is using "),a("code",[t._v("BitId")]),t._v(".")]),t._v(" "),a("p",[t._v("With "),a("code",[t._v("BitId")]),t._v(", the "),a("code",[t._v("client")]),t._v(" of the API (like an e-commerce plugin) generates a private key, then informs the "),a("code",[t._v("server")]),t._v(" (BTCPay) about the "),a("code",[t._v("public key")]),t._v(".")]),t._v(" "),a("p",[t._v("Every requests to the API sent by the client is signed with the client's "),a("code",[t._v("private key")]),t._v(".")]),t._v(" "),a("p",[t._v("We call "),a("code",[t._v("pairing")]),t._v(" the process to inform BTCPay about your "),a("code",[t._v("public key")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"pairing-process"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#pairing-process"}},[t._v("#")]),t._v(" Pairing process")]),t._v(" "),a("p",[t._v("Your first need to create a new store:")]),t._v(" "),a("ol",[a("li",[t._v("Log in")]),t._v(" "),a("li",[t._v("Go to Stores menu")]),t._v(" "),a("li",[t._v("Click on "),a("code",[t._v("Create a new store")])]),t._v(" "),a("li",[t._v("Enter a friendly name for the store, validate.")])]),t._v(" "),a("p",[t._v("There is two method of "),a("code",[t._v("pairing")]),t._v(", client side pairing and server side pairing.")]),t._v(" "),a("h3",{attrs:{id:"client-side-pairing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#client-side-pairing"}},[t._v("#")]),t._v(" Client side pairing")]),t._v(" "),a("p",[t._v("With client side pairing, the "),a("code",[t._v("client")]),t._v(" generates a URL from their "),a("code",[t._v("public key")]),t._v(" which a human user can browse to validate the pairing.")]),t._v(" "),a("p",[t._v("Typically the URL looks like "),a("code",[t._v("https://btcpay.example.com/api-access-request?pairingCode=")]),t._v(".")]),t._v(" "),a("p",[t._v("You can find documentation about how to achieve this with "),a("a",{attrs:{href:"https://support.bitpay.com/hc/en-us/articles/115003001183-How-do-I-pair-my-client-and-create-a-token-",target:"_blank",rel:"noopener noreferrer"}},[t._v("this link"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"server-side-pairing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#server-side-pairing"}},[t._v("#")]),t._v(" Server side pairing")]),t._v(" "),a("p",[t._v("The second way, is to generate your private key via some bitcoin library then:")]),t._v(" "),a("ol",[a("li",[t._v("Go to the store's settings")]),t._v(" "),a("li",[t._v("Click on "),a("code",[t._v("Access tokens")])]),t._v(" "),a("li",[t._v("Click on "),a("code",[t._v("Create new Token")])]),t._v(" "),a("li",[t._v("Select merchant's facade and enter your public key,")]),t._v(" "),a("li",[t._v("Click request pairing")]),t._v(" "),a("li",[t._v("Click on Approve")])]),t._v(" "),a("h2",{attrs:{id:"note"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#note"}},[t._v("#")]),t._v(" Note")]),t._v(" "),a("p",[a("strong",[t._v("BTCPay Server has an API compatible with Bitpay")]),t._v("; changing your e-commerce application "),a("strong",[t._v("from Bitpay to BTCPay")]),t._v(" should take minimal effort.")]),t._v(" "),a("p",[t._v("You can read the full API documentation "),a("a",{attrs:{href:"https://bitpay.com/api#resource-Invoices",target:"_blank",rel:"noopener noreferrer"}},[t._v("on Bitpay's website"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("There is only one difference: Bitpay only allows one account for one merchant, BTCPay allows a user to manage multiple stores.")]),t._v(" "),a("h2",{attrs:{id:"modal-checkout"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#modal-checkout"}},[t._v("#")]),t._v(" Modal Checkout")]),t._v(" "),a("p",[t._v("To generate a pop-up modal experience:")]),t._v(" "),a("ol",[a("li",[t._v("Include the btcpay.js script in your html page")])]),t._v(" "),a("div",{staticClass:"language-html extra-class"},[a("pre",{pre:!0,attrs:{class:"language-html"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("https://your.btcpay.url/modal/btcpay.js"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}}),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),a("ol",{attrs:{start:"2"}},[a("li",[t._v("Call the invoice API to generate an invoice (example code). This is sample backend code as it contains an auth token that should not be exposed in your front-end.")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" axiosClient "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" axios"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("create")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("baseURL")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[t._v("BTCPAY_URL")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("timeout")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("responseType")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'json'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[t._v("BTCPAY_AUTH")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" invoiceCreation "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("price")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12345")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("currency")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USD'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("orderId")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'something'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("itemDesc")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'item description'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("notificationUrl")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://webhook.after.checkout.com/goeshere'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("redirectURL")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://go.here.after.checkout.com'")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" axiosClient"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/invoices'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" invoiceCreation"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" invoiceId "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("id\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Use the invoiceId to pop up the modal")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("window"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("btcpay"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("showInvoice")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("invoiceId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("You'll often want to do something like refresh the state of your page when the invoice is paid, or note some kind of state before the modal pops up. You can attach event listeners like this:")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("window"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("btcpay"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onModalWillEnter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("yourCallbackFunction"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nwindow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("btcpay"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onModalWillLeave")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("yourCallbackFunction"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nwindow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("btcpay"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onModalReceiveMessage")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("yourCallbackFunction"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// available from v1.0.5.6")]),t._v("\n")])])]),a("p",[a("code",[t._v("onModalReceiveMessage")]),t._v(" will invoke your callback when a new status has been pushed from BTCPay Server to the invoice UI. The data format is "),a("code",[t._v('{invoiceId: "x", status: "y" }')])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[113],{836:function(t,a,e){"use strict";e.r(a);var s=e(17),n=Object(s.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"using-the-btcpay-api-for-custom-integration"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-the-btcpay-api-for-custom-integration"}},[t._v("#")]),t._v(" Using the BTCPay API for Custom Integration")]),t._v(" "),a("p",[t._v("BTCPay Server provides 2 APIS in order to integrate with it:")]),t._v(" "),a("ul",[a("li",[a("RouterLink",{attrs:{to:"/Development/GreenFieldExample/"}},[t._v("GreenField API")]),t._v(" - A RESTful API that aims to allow you to use BTCPay Server headless. This is the recommended API for projects which do not wish to recycle code from a Bitpay integration.")],1),t._v(" "),a("li",[t._v("Bitpay Invoice API - BTCPay implements the same API as Bitpay for creating and managing invoices.")])]),t._v(" "),a("p",[a("strong",[t._v("Migrating from BitPay to BTCPay")]),t._v(" normally is as easy as changing a URL.")]),t._v(" "),a("p",[t._v("While Bitpay only allows one account for one merchant, BTCPay allows a user to manage multiple stores.")]),t._v(" "),a("h2",{attrs:{id:"official-client-libraries"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#official-client-libraries"}},[t._v("#")]),t._v(" Official Client Libraries")]),t._v(" "),a("p",[t._v("BTCPay maintains official client libraries for "),a("a",{attrs:{href:"https://github.com/MetacoSA/NBitpayClient",target:"_blank",rel:"noopener noreferrer"}},[t._v("C#"),a("OutboundLink")],1),t._v(", "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpay-python",target:"_blank",rel:"noopener noreferrer"}},[t._v("Python"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://github.com/btcpayserver/node-btcpay",target:"_blank",rel:"noopener noreferrer"}},[t._v("NodeJS"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("In addition, there are forked repositories of Bitpay's "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-php-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("PHP"),a("OutboundLink")],1),t._v(" and "),a("a",{attrs:{href:"https://github.com/bitpay/ruby-client",target:"_blank",rel:"noopener noreferrer"}},[t._v("Ruby"),a("OutboundLink")],1),t._v(" clients.")]),t._v(" "),a("h2",{attrs:{id:"accessing-the-api-manually"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#accessing-the-api-manually"}},[t._v("#")]),t._v(" Accessing the API Manually")]),t._v(" "),a("p",[t._v("If not using one of the libraries above, the REST API can be accessed manually.")]),t._v(" "),a("p",[t._v("The authentication mechanism is using "),a("code",[t._v("BitId")]),t._v(".")]),t._v(" "),a("p",[t._v("With "),a("code",[t._v("BitId")]),t._v(", the "),a("code",[t._v("client")]),t._v(" of the API (like an e-commerce plugin) generates a private key, then informs the "),a("code",[t._v("server")]),t._v(" (BTCPay) about the "),a("code",[t._v("public key")]),t._v(".")]),t._v(" "),a("p",[t._v("Every requests to the API sent by the client is signed with the client's "),a("code",[t._v("private key")]),t._v(".")]),t._v(" "),a("p",[t._v("We call "),a("code",[t._v("pairing")]),t._v(" the process to inform BTCPay about your "),a("code",[t._v("public key")]),t._v(".")]),t._v(" "),a("h2",{attrs:{id:"pairing-process"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#pairing-process"}},[t._v("#")]),t._v(" Pairing process")]),t._v(" "),a("p",[t._v("Your first need to create a new store:")]),t._v(" "),a("ol",[a("li",[t._v("Log in")]),t._v(" "),a("li",[t._v("Go to Stores menu")]),t._v(" "),a("li",[t._v("Click on "),a("code",[t._v("Create a new store")])]),t._v(" "),a("li",[t._v("Enter a friendly name for the store, validate.")])]),t._v(" "),a("p",[t._v("There is two method of "),a("code",[t._v("pairing")]),t._v(", client side pairing and server side pairing.")]),t._v(" "),a("h3",{attrs:{id:"client-side-pairing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#client-side-pairing"}},[t._v("#")]),t._v(" Client side pairing")]),t._v(" "),a("p",[t._v("With client side pairing, the "),a("code",[t._v("client")]),t._v(" generates a URL from their "),a("code",[t._v("public key")]),t._v(" which a human user can browse to validate the pairing.")]),t._v(" "),a("p",[t._v("Typically the URL looks like "),a("code",[t._v("https://btcpay.example.com/api-access-request?pairingCode=")]),t._v(".")]),t._v(" "),a("p",[t._v("You can find documentation about how to achieve this with "),a("a",{attrs:{href:"https://support.bitpay.com/hc/en-us/articles/115003001183-How-do-I-pair-my-client-and-create-a-token-",target:"_blank",rel:"noopener noreferrer"}},[t._v("this link"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("h3",{attrs:{id:"server-side-pairing"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#server-side-pairing"}},[t._v("#")]),t._v(" Server side pairing")]),t._v(" "),a("p",[t._v("The second way, is to generate your private key via some bitcoin library then:")]),t._v(" "),a("ol",[a("li",[t._v("Go to the store's settings")]),t._v(" "),a("li",[t._v("Click on "),a("code",[t._v("Access tokens")])]),t._v(" "),a("li",[t._v("Click on "),a("code",[t._v("Create new Token")])]),t._v(" "),a("li",[t._v("Select merchant's facade and enter your public key,")]),t._v(" "),a("li",[t._v("Click request pairing")]),t._v(" "),a("li",[t._v("Click on Approve")])]),t._v(" "),a("h2",{attrs:{id:"note"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#note"}},[t._v("#")]),t._v(" Note")]),t._v(" "),a("p",[a("strong",[t._v("BTCPay Server has an API compatible with Bitpay")]),t._v("; changing your e-commerce application "),a("strong",[t._v("from Bitpay to BTCPay")]),t._v(" should take minimal effort.")]),t._v(" "),a("p",[t._v("You can read the full API documentation "),a("a",{attrs:{href:"https://bitpay.com/api#resource-Invoices",target:"_blank",rel:"noopener noreferrer"}},[t._v("on Bitpay's website"),a("OutboundLink")],1),t._v(".")]),t._v(" "),a("p",[t._v("There is only one difference: Bitpay only allows one account for one merchant, BTCPay allows a user to manage multiple stores.")]),t._v(" "),a("h2",{attrs:{id:"modal-checkout"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#modal-checkout"}},[t._v("#")]),t._v(" Modal Checkout")]),t._v(" "),a("p",[t._v("To generate a pop-up modal experience:")]),t._v(" "),a("ol",[a("li",[t._v("Include the btcpay.js script in your html page")])]),t._v(" "),a("div",{staticClass:"language-html extra-class"},[a("pre",{pre:!0,attrs:{class:"language-html"}},[a("code",[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("<")]),t._v("script")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token attr-name"}},[t._v("src")]),a("span",{pre:!0,attrs:{class:"token attr-value"}},[a("span",{pre:!0,attrs:{class:"token punctuation attr-equals"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')]),t._v("https://your.btcpay.url/modal/btcpay.js"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v('"')])]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{pre:!0,attrs:{class:"token script"}}),a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token tag"}},[a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("")])]),t._v("\n")])])]),a("ol",{attrs:{start:"2"}},[a("li",[t._v("Call the invoice API to generate an invoice (example code). This is sample backend code as it contains an auth token that should not be exposed in your front-end.")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" axiosClient "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" axios"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("create")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("baseURL")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[t._v("BTCPAY_URL")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("timeout")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("responseType")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'json'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token constant"}},[t._v("BTCPAY_AUTH")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" invoiceCreation "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("price")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[t._v("12345")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("currency")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USD'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("orderId")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'something'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("itemDesc")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'item description'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("notificationUrl")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://webhook.after.checkout.com/goeshere'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),a("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("redirectURL")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://go.here.after.checkout.com'")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" response "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("await")]),t._v(" axiosClient"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/invoices'")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" invoiceCreation"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" invoiceId "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" response"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("data"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("id\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Use the invoiceId to pop up the modal")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("window"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("btcpay"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("showInvoice")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("invoiceId"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("You'll often want to do something like refresh the state of your page when the invoice is paid, or note some kind of state before the modal pops up. You can attach event listeners like this:")])]),t._v(" "),a("div",{staticClass:"language-js extra-class"},[a("pre",{pre:!0,attrs:{class:"language-js"}},[a("code",[t._v("window"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("btcpay"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onModalWillEnter")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("yourCallbackFunction"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nwindow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("btcpay"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onModalWillLeave")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("yourCallbackFunction"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\nwindow"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("btcpay"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("onModalReceiveMessage")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("yourCallbackFunction"),a("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// available from v1.0.5.6")]),t._v("\n")])])]),a("p",[a("code",[t._v("onModalReceiveMessage")]),t._v(" will invoke your callback when a new status has been pushed from BTCPay Server to the invoice UI. The data format is "),a("code",[t._v('{invoiceId: "x", status: "y" }')])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/114.1aabc18b.js b/assets/js/114.318bf311.js similarity index 98% rename from assets/js/114.1aabc18b.js rename to assets/js/114.318bf311.js index ec538356cc..c127ce6921 100644 --- a/assets/js/114.1aabc18b.js +++ b/assets/js/114.318bf311.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[114],{840:function(e,r,t){"use strict";t.r(r);var a=t(17),o=Object(a.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"dynamic-dns-service"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#dynamic-dns-service"}},[e._v("#")]),e._v(" Dynamic DNS Service")]),e._v(" "),r("h2",{attrs:{id:"motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[e._v("#")]),e._v(" Motivation")]),e._v(" "),r("p",[r("strong",[e._v("Dynamic DNS")]),e._v(" is needed if:")]),e._v(" "),r("ul",[r("li",[e._v("You are running BTCPay Server with a hosting provider that does not provide a default domain for your server")]),e._v(" "),r("li",[e._v("You don't want to buy your own domain name (e.g. "),r("code",[e._v("mybusiness.com")]),e._v(")")]),e._v(" "),r("li",[e._v("You need to access your BTCPay Server over internet via HTTPS. (Your BTCPayServer is accessed by other internet users)")])]),e._v(" "),r("p",[e._v("Then you want to use "),r("strong",[e._v("BTCPayServer Dynamic DNS service")]),e._v(".")]),e._v(" "),r("p",[e._v("You "),r("strong",[e._v("don't need")]),e._v(" Dynamic DNS Service if:")]),e._v(" "),r("ul",[r("li",[e._v("You host BTCPay Server at home and only access it via the local network (just using HTTP locally or using Tor is fine)")]),e._v(" "),r("li",[e._v("Your BTCPay Server should be only accessed by yourself (just use Tor browser and the Tor address of you instance)")]),e._v(" "),r("li",[e._v("Your hosting provider provides a domain name for your server by default (i.e. Lunanode for example provides a subdomain of "),r("code",[e._v(".lndyn.com")]),e._v(" for free, and Azure provides for "),r("code",[e._v(".azurewebsites.net")]),e._v(")")])]),e._v(" "),r("p",[e._v("A "),r("strong",[e._v("Dynamic DNS Providers")]),e._v(" allows you to have a free domain like "),r("code",[e._v("example.ddns.net")]),e._v(" for your server.\nAdditionally Dynamic DNS Providers expose a simple API to update the DNS record automatically when your BTCPay Server instance changes its external IP address.")]),e._v(" "),r("p",[e._v("BTCPay Server, when configured to use Dynamic DNS, will periodically check and update the DNS record if an external IP change is detected.")]),e._v(" "),r("h2",{attrs:{id:"how-to-use"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[e._v("#")]),e._v(" How to use")]),e._v(" "),r("h3",{attrs:{id:"step-1-create-the-domain"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-1-create-the-domain"}},[e._v("#")]),e._v(" Step 1: Create the domain")]),e._v(" "),r("p",[e._v("First, create an account on a Dynamic DNS provider, the most popular providers are:")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.noip.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("noip"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.duckdns.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("duckdns"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.zoneedit.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("zoneedit"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://dyn.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("dyndns"),r("OutboundLink")],1),e._v(" (not free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://domains.google.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("google"),r("OutboundLink")],1),e._v(" (not free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.easydns.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("easydns"),r("OutboundLink")],1),e._v(" (not free)")])]),e._v(" "),r("p",[e._v("Once you've created an account, you can create a free domain name through their website.")]),e._v(" "),r("h3",{attrs:{id:"step-2-configure-dynamic-dns-on-btcpay-server"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-2-configure-dynamic-dns-on-btcpay-server"}},[e._v("#")]),e._v(" Step 2: Configure Dynamic DNS on BTCPay Server")]),e._v(" "),r("p",[e._v("You need to be administrator of your instance.\nGo to Server Settings > Services > Dynamic DNS.")]),e._v(" "),r("ul",[r("li",[e._v("Add a Dynamic DNS")]),e._v(" "),r("li",[e._v("Select your Dynamic DNS provider")]),e._v(" "),r("li",[e._v("Enter the domain you created in step 1")]),e._v(" "),r("li",[e._v("Add the login and password you created in step 1")]),e._v(" "),r("li",[e._v("Check the "),r("code",[e._v("enabled")]),e._v(" box and save")])]),e._v(" "),r("h3",{attrs:{id:"step-3-configure-your-btcpay-docker-install-to-provide-https-certificates"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-3-configure-your-btcpay-docker-install-to-provide-https-certificates"}},[e._v("#")]),e._v(" Step 3: Configure your BTCPay docker install to provide HTTPS certificates")]),e._v(" "),r("p",[e._v("If you are using a docker deployment, you also need to update your BTCPayServer install.\nConnect via SSH to your instance and run:")]),e._v(" "),r("div",{staticClass:"language-bash extra-class"},[r("pre",{pre:!0,attrs:{class:"language-bash"}},[r("code",[r("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ADDITIONAL_HOSTS")]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"example.ddns.net"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),r("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),r("p",[e._v("If you have any other hosts in "),r("code",[e._v("BTCPAY_ADDITIONAL_HOSTS")]),e._v(", just separate them with "),r("code",[e._v(",")]),e._v(".")])])}),[],!1,null,null,null);r.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[114],{841:function(e,r,t){"use strict";t.r(r);var a=t(17),o=Object(a.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"dynamic-dns-service"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#dynamic-dns-service"}},[e._v("#")]),e._v(" Dynamic DNS Service")]),e._v(" "),r("h2",{attrs:{id:"motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[e._v("#")]),e._v(" Motivation")]),e._v(" "),r("p",[r("strong",[e._v("Dynamic DNS")]),e._v(" is needed if:")]),e._v(" "),r("ul",[r("li",[e._v("You are running BTCPay Server with a hosting provider that does not provide a default domain for your server")]),e._v(" "),r("li",[e._v("You don't want to buy your own domain name (e.g. "),r("code",[e._v("mybusiness.com")]),e._v(")")]),e._v(" "),r("li",[e._v("You need to access your BTCPay Server over internet via HTTPS. (Your BTCPayServer is accessed by other internet users)")])]),e._v(" "),r("p",[e._v("Then you want to use "),r("strong",[e._v("BTCPayServer Dynamic DNS service")]),e._v(".")]),e._v(" "),r("p",[e._v("You "),r("strong",[e._v("don't need")]),e._v(" Dynamic DNS Service if:")]),e._v(" "),r("ul",[r("li",[e._v("You host BTCPay Server at home and only access it via the local network (just using HTTP locally or using Tor is fine)")]),e._v(" "),r("li",[e._v("Your BTCPay Server should be only accessed by yourself (just use Tor browser and the Tor address of you instance)")]),e._v(" "),r("li",[e._v("Your hosting provider provides a domain name for your server by default (i.e. Lunanode for example provides a subdomain of "),r("code",[e._v(".lndyn.com")]),e._v(" for free, and Azure provides for "),r("code",[e._v(".azurewebsites.net")]),e._v(")")])]),e._v(" "),r("p",[e._v("A "),r("strong",[e._v("Dynamic DNS Providers")]),e._v(" allows you to have a free domain like "),r("code",[e._v("example.ddns.net")]),e._v(" for your server.\nAdditionally Dynamic DNS Providers expose a simple API to update the DNS record automatically when your BTCPay Server instance changes its external IP address.")]),e._v(" "),r("p",[e._v("BTCPay Server, when configured to use Dynamic DNS, will periodically check and update the DNS record if an external IP change is detected.")]),e._v(" "),r("h2",{attrs:{id:"how-to-use"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[e._v("#")]),e._v(" How to use")]),e._v(" "),r("h3",{attrs:{id:"step-1-create-the-domain"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-1-create-the-domain"}},[e._v("#")]),e._v(" Step 1: Create the domain")]),e._v(" "),r("p",[e._v("First, create an account on a Dynamic DNS provider, the most popular providers are:")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.noip.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("noip"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.duckdns.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("duckdns"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.zoneedit.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("zoneedit"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://dyn.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("dyndns"),r("OutboundLink")],1),e._v(" (not free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://domains.google.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("google"),r("OutboundLink")],1),e._v(" (not free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.easydns.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("easydns"),r("OutboundLink")],1),e._v(" (not free)")])]),e._v(" "),r("p",[e._v("Once you've created an account, you can create a free domain name through their website.")]),e._v(" "),r("h3",{attrs:{id:"step-2-configure-dynamic-dns-on-btcpay-server"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-2-configure-dynamic-dns-on-btcpay-server"}},[e._v("#")]),e._v(" Step 2: Configure Dynamic DNS on BTCPay Server")]),e._v(" "),r("p",[e._v("You need to be administrator of your instance.\nGo to Server Settings > Services > Dynamic DNS.")]),e._v(" "),r("ul",[r("li",[e._v("Add a Dynamic DNS")]),e._v(" "),r("li",[e._v("Select your Dynamic DNS provider")]),e._v(" "),r("li",[e._v("Enter the domain you created in step 1")]),e._v(" "),r("li",[e._v("Add the login and password you created in step 1")]),e._v(" "),r("li",[e._v("Check the "),r("code",[e._v("enabled")]),e._v(" box and save")])]),e._v(" "),r("h3",{attrs:{id:"step-3-configure-your-btcpay-docker-install-to-provide-https-certificates"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-3-configure-your-btcpay-docker-install-to-provide-https-certificates"}},[e._v("#")]),e._v(" Step 3: Configure your BTCPay docker install to provide HTTPS certificates")]),e._v(" "),r("p",[e._v("If you are using a docker deployment, you also need to update your BTCPayServer install.\nConnect via SSH to your instance and run:")]),e._v(" "),r("div",{staticClass:"language-bash extra-class"},[r("pre",{pre:!0,attrs:{class:"language-bash"}},[r("code",[r("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ADDITIONAL_HOSTS")]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"example.ddns.net"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),r("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),r("p",[e._v("If you have any other hosts in "),r("code",[e._v("BTCPAY_ADDITIONAL_HOSTS")]),e._v(", just separate them with "),r("code",[e._v(",")]),e._v(".")])])}),[],!1,null,null,null);r.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/116.b652d17a.js b/assets/js/116.ffe3fe6f.js similarity index 98% rename from assets/js/116.b652d17a.js rename to assets/js/116.ffe3fe6f.js index 3166320b80..9e78c366c7 100644 --- a/assets/js/116.b652d17a.js +++ b/assets/js/116.ffe3fe6f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[116],{845:function(e,r,t){"use strict";t.r(r);var a=t(17),n=Object(a.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"hardware-as-a-service"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#hardware-as-a-service"}},[e._v("#")]),e._v(" Hardware As A Service")]),e._v(" "),r("p",[e._v("Multiple entities or companies in the Bitcoin space provide "),r("strong",[e._v("preinstalled hardware that include BTCPay Server")]),e._v(".\nInstalled for example on Raspberry Pi or Rock64 devices, the BTCPay Server instance sits besides other software stacks.")]),e._v(" "),r("p",[e._v("This "),r("strong",[e._v("Hardware As A Service")]),e._v(" can be free or paid, and is mostly open-sourced for peer-review.")]),e._v(" "),r("p",[e._v("They are suitable for technical users to speed up the installation and initial syncing process.\nLess-technical users will find the 1-click or plug-and-play systems of these services incredibly practical.")]),e._v(" "),r("div",{staticClass:"custom-block warning"},[r("p",{staticClass:"custom-block-title"},[e._v("Please note:")]),e._v(" "),r("p",[e._v("Hardware-as-a-Service products consist of multiple softwares tied together.\nThe BTCPay Server community has no knowledge of how BTCPay Server integrates into these services, and cannot provide any support for these types of "),r("RouterLink",{attrs:{to:"/Deployment/ManualDeployment/"}},[e._v("Manual Deployments")]),e._v(". Please report bugs and issues directly to the entity that provided you with BTCPay Server inside their product.")],1)]),e._v(" "),r("p",[e._v("Here you can find a non-exhaustive list of companies that provide such a service:")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.nodl.it/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Nodl"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.dglab.com/en/works/hack0/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Hack0"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://mynodebtc.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("MyNode"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://raspiblitz.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("RaspiBlitz"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://umbrel.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Umbrel"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://start9.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Embassy"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://runcitadel.space/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Citadel"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://bitcoinpaybox.es/",target:"_blank",rel:"noopener noreferrer"}},[e._v("BitcoinpayBox"),r("OutboundLink")],1)])]),e._v(" "),r("p",[e._v("Do you provide Hardware As A Service and are not listed here?\nOpen an issue to "),r("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("get added to this list"),r("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[116],{846:function(e,r,t){"use strict";t.r(r);var a=t(17),n=Object(a.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"hardware-as-a-service"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#hardware-as-a-service"}},[e._v("#")]),e._v(" Hardware As A Service")]),e._v(" "),r("p",[e._v("Multiple entities or companies in the Bitcoin space provide "),r("strong",[e._v("preinstalled hardware that include BTCPay Server")]),e._v(".\nInstalled for example on Raspberry Pi or Rock64 devices, the BTCPay Server instance sits besides other software stacks.")]),e._v(" "),r("p",[e._v("This "),r("strong",[e._v("Hardware As A Service")]),e._v(" can be free or paid, and is mostly open-sourced for peer-review.")]),e._v(" "),r("p",[e._v("They are suitable for technical users to speed up the installation and initial syncing process.\nLess-technical users will find the 1-click or plug-and-play systems of these services incredibly practical.")]),e._v(" "),r("div",{staticClass:"custom-block warning"},[r("p",{staticClass:"custom-block-title"},[e._v("Please note:")]),e._v(" "),r("p",[e._v("Hardware-as-a-Service products consist of multiple softwares tied together.\nThe BTCPay Server community has no knowledge of how BTCPay Server integrates into these services, and cannot provide any support for these types of "),r("RouterLink",{attrs:{to:"/Deployment/ManualDeployment/"}},[e._v("Manual Deployments")]),e._v(". Please report bugs and issues directly to the entity that provided you with BTCPay Server inside their product.")],1)]),e._v(" "),r("p",[e._v("Here you can find a non-exhaustive list of companies that provide such a service:")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.nodl.it/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Nodl"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.dglab.com/en/works/hack0/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Hack0"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://mynodebtc.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("MyNode"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://raspiblitz.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("RaspiBlitz"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://umbrel.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Umbrel"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://start9.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Embassy"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://runcitadel.space/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Citadel"),r("OutboundLink")],1)]),e._v(" "),r("li",[r("a",{attrs:{href:"https://bitcoinpaybox.es/",target:"_blank",rel:"noopener noreferrer"}},[e._v("BitcoinpayBox"),r("OutboundLink")],1)])]),e._v(" "),r("p",[e._v("Do you provide Hardware As A Service and are not listed here?\nOpen an issue to "),r("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("get added to this list"),r("OutboundLink")],1)])])}),[],!1,null,null,null);r.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/117.88d9da02.js b/assets/js/117.87457c61.js similarity index 99% rename from assets/js/117.88d9da02.js rename to assets/js/117.87457c61.js index 28f2372044..d2d3b6b77a 100644 --- a/assets/js/117.88d9da02.js +++ b/assets/js/117.87457c61.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[117],{848:function(a,t,e){"use strict";e.r(t);var s=e(17),r=Object(s.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"hardware-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hardware-deployment"}},[a._v("#")]),a._v(" Hardware Deployment")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://lightninginabox.co",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning in a Box"),t("OutboundLink")],1),a._v('\n"Your hardware. Your node. Your keys. Your Bitcoin".')]),a._v(" "),t("p",[a._v("In order for your Bitcoin experience to be truly self-sovereign and trustless you should consider "),t("strong",[a._v("running nodes on your own hardware")]),a._v(" and internet connection.\n"),t("strong",[a._v("BTCPay Server is an excellent way to run both Bitcoin & Lightning nodes")]),a._v(".\nNot only are you validating transactions you also get the ability to accept base layer Bitcoin and second layer Lightning payments.\nFollowing are instructions to install and host your very own BTCPay Server.")]),a._v(" "),t("p",[a._v("The process is basically the following:")]),a._v(" "),t("ol",[t("li",[a._v("Purchase and assemble hardware.")]),a._v(" "),t("li",[a._v("Install base Operating System and configure networking.")]),a._v(" "),t("li",[a._v("Install BTCPayServer-Docker.")])]),a._v(" "),t("p",[t("strong",[a._v("BTCPay Server can be installed on the following hardware")]),a._v(". The end result is a small, quiet node that is fast enough to sync from block zero. The total cost is approximately $300.")]),a._v(" "),t("ol",[t("li",[t("a",{attrs:{href:"https://www.amazon.com/dp/B0C89TQ1YF?ref=nb_sb_ss_w_as-reorder-t1_k0_1_4&=&crid=SHKYOXZIRAO0&=&sprefix=beel",target:"_blank",rel:"noopener noreferrer"}},[a._v("BeeLink S12 - Mini PC - $169.00"),t("OutboundLink")],1)]),a._v(" "),t("li",[t("a",{attrs:{href:"https://www.amazon.com/Western-Digital-SA510-Internal-Solid/dp/B0C14TF467/ref=sr_1_3?crid=2WDY52E7ESSEB&dib=eyJ2IjoiMSJ9.MBxkb5ZIvwjKXOzscB0GUvsbhX1rVhilXNFzID6n0xHORsDBPkIxQhIixVuiLY9I16rlFs5COExAAD8761Do-tzuAnZiutbqN-KM9rAL4zCw94kA_ArCJeR_RTDynZbiXf2Phnahw1Gw2dqXVek3p0dpe6_a_fbJrqx4BRaieoYo0zj1mX6YPGaYZAmF2Vf_Quk1TrkARk6s1_wZ0vFUw7EWdjKJ9hmNLxPWMfADML90A1rXk8gSCcRnwV2jdzN7jCfg2_urfJZ3IWOW5X3iwnP7s-vSec88PGmQ3RhS-Rc.sEURveFhiTAHYwZQdwyJX72hpWL5UgD_3tEPet747oE&dib_tag=se&keywords=2tb+ssd+wd+blue&qid=1710685725&s=electronics&sprefix=2tb+ssd+wd+blue%2Celectronics%2C90&sr=1-3",target:"_blank",rel:"noopener noreferrer"}},[a._v("WD Blue 2TB SSD - $129.00"),t("OutboundLink")],1)])]),a._v(" "),t("p",[a._v("Other requirements are as follows:")]),a._v(" "),t("ol",[t("li",[a._v("High speed internet connection.")]),a._v(" "),t("li",[a._v("Static IP")]),a._v(" "),t("li",[a._v("Domain Name")]),a._v(" "),t("li",[a._v("Ability to open ports on your router (optional, BTCPayServer can be accessed over TOR or by Dynamic DNS).")]),a._v(" "),t("li",[a._v("Tiny Screwdriver")]),a._v(" "),t("li",[a._v("USB Thumb Drive")]),a._v(" "),t("li",[a._v("USB Keyboard, Mouse and Monitor (for initial install only). Can be headless when completed.")])]),a._v(" "),t("p",[a._v("Assuming you purchased the hardware mentioned above, here are the build instructions.")]),a._v(" "),t("h3",{attrs:{id:"configure-your-domain-name"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-your-domain-name"}},[a._v("#")]),a._v(" Configure your domain name.")]),a._v(" "),t("p",[a._v('It can take several hours for DNS changes to propagate so you should do this step first.\nLogin to your domain registrar and point an A record from your domain to the external IP address of your internet connection.\nI suggest that you use a subdomain (ie. btcpay.yourdomain.com).\nTo find your external IP address Google "whats my ip".')]),a._v(" "),t("h3",{attrs:{id:"assemble-your-lightning-in-a-box-liab"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#assemble-your-lightning-in-a-box-liab"}},[a._v("#")]),a._v(" Assemble your Lightning in a Box (LIAB).")]),a._v(" "),t("ul",[t("li",[a._v("Remove back cover with screwdriver.")]),a._v(" "),t("li",[a._v("Insert SSD")]),a._v(" "),t("li",[a._v("Install hard drive using included cage.")])]),a._v(" "),t("h3",{attrs:{id:"download-ubuntu-2204-lts-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-ubuntu-2204-lts-server"}},[a._v("#")]),a._v(" Download "),t("a",{attrs:{href:"https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso",target:"_blank",rel:"noopener noreferrer"}},[a._v("Ubuntu 22.04 LTS Server"),t("OutboundLink")],1)]),a._v(" "),t("h3",{attrs:{id:"download-and-install-balena-etcher"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-install-balena-etcher"}},[a._v("#")]),a._v(" Download and install "),t("a",{attrs:{href:"https://etcher.balena.io/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Balena Etcher"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("p",[a._v("Etcher is software that is used to flash OS images to SD cards and USB Drives.\nIn this case we will be using Etcher to flash our USB Thumb Drive with the Ubuntu OS.")]),a._v(" "),t("h3",{attrs:{id:"connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[a._v("#")]),a._v(" Connect your USB keyboard, mouse, monitor and thumb drive.")]),a._v(" "),t("p",[a._v('Press the power button to boot your LIAB. Press the "DEL" key to access the bios and change the boot order to use the thumb drive first.\nThe Ubuntu installation process is pretty simple and easy to follow. Here\'s a tutorial from the Ubuntu website. '),t("a",{attrs:{href:"https://ubuntu.com/tutorials/install-ubuntu-server#1-overview",target:"_blank",rel:"noopener noreferrer"}},[a._v("Install Ubuntu Server"),t("OutboundLink")],1),a._v(". The BeeLink S12 ships with Windows Pre-Installed so you will have to delete the NVME partitions and install Ubuntu on that drive.")]),a._v(" "),t("p",[a._v('*During the install process make sure you set the hostname to "btcpay" and enable SSH.')]),a._v(" "),t("h3",{attrs:{id:"give-your-liab-a-static-ip-address-on-your-local-network"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#give-your-liab-a-static-ip-address-on-your-local-network"}},[a._v("#")]),a._v(" Give your LIAB a static IP address on your local network.")]),a._v(" "),t("p",[a._v("There are a few different ways to do this and you will find a ton of articles online. Here's a pretty simple one to follow "),t("a",{attrs:{href:"https://www.linuxtechi.com/static-ip-address-on-ubuntu-server/",target:"_blank",rel:"noopener noreferrer"}},[a._v("How to configure a static IP address on Ubuntu 22.04"),t("OutboundLink")],1),a._v('. To avoid conflicts with other devices on your network you should also set a "reservation" for your LIAB.')]),a._v(" "),t("h3",{attrs:{id:"log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[a._v("#")]),a._v(" Log into your router and forward ports 80, 443 and 9735 to your LIAB's local IP address. (optional, if using .local, or Tor only)")]),a._v(" "),t("p",[a._v('Every router is different and you should be able to find instructions for your router by searching for "Port Forward + your router make and model".')]),a._v(" "),t("h3",{attrs:{id:"install-fail2ban-git-and-avahi-daemon"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-fail2ban-git-and-avahi-daemon"}},[a._v("#")]),a._v(" Install Fail2ban, GIT and Avahi-Daemon.")]),a._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/fail2ban/fail2ban/wiki/How-to-install-fail2ban-packages",target:"_blank",rel:"noopener noreferrer"}},[a._v("Fail2ban"),t("OutboundLink")],1),a._v(" bans IP's that attempt to connect to your server and show malicious signs. GIT allows you to clone and manage repositories on github.com.")]),a._v(" "),t("li",[t("a",{attrs:{href:"https://avahi.org/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Avahi"),t("OutboundLink")],1),a._v(" is a system which facilitates service discovery on a local network via the mDNS/DNS-SD protocol suite.\nOpen a new terminal window and type the following commands:")])]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" avahi-daemon\n")])])]),t("h3",{attrs:{id:"configuring-the-firewall"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-firewall"}},[a._v("#")]),a._v(" Configuring the firewall")]),a._v(" "),t("p",[a._v("Install a firewall and allow SSH, HTTP, HTTPS, Bitcoin, and Lightning:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" ufw\nufw default deny incoming\nufw default allow outgoing\n")])])]),t("p",[a._v("This command allows SSH connections from internal networks only:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("10.0")]),a._v(".0.0/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("172.16")]),a._v(".0.0/12 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("169.254")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fc00::/7 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fe80::/10 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from ff00::/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\n")])])]),t("p",[a._v("These ports need to be accessible from anywhere (The default subnet is 'any' unless you specify one):")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("443")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("8333")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("9735")]),a._v("/tcp\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Enable the firewall")]),a._v("\nufw "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Verify the configuration")]),a._v("\nufw status\n")])])]),t("h3",{attrs:{id:"install-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-docker"}},[a._v("#")]),a._v(" Install Docker")]),a._v(" "),t("div",{staticClass:"language-Bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" apt-transport-https ca-certificates "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" software-properties-common\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-fsSL")]),a._v(" https://download.docker.com/linux/ubuntu/gpg "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" gpg "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--dearmor")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" /usr/share/keyrings/docker-archive-keyring.gpg\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"deb [arch='),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("dpkg --print-architecture"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(" signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("lsb_release "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-cs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(' stable"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" /etc/apt/sources.list.d/docker.list "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" /dev/null\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt-cache")]),a._v(" policy docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" systemctl status "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"configuring-the-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-storage"}},[a._v("#")]),a._v(" Configuring the storage")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("fdisk")]),a._v(" /dev/sda\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'p' to list existing partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'd' to delete currently selected partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'n' to create a new partition")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'w' to write the new partition table and exit fdisk")]),a._v("\nmkfs.ext4 /dev/sda1\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" /mnt/usb\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("UUID")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" blkid "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" UUID "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" value /dev/sda1"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"UUID='),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$UUID")]),a._v(' /mnt/usb ext4 defaults,noatime,nofail 0 0"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v(" /etc/fstab\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v("\n")])])]),t("h3",{attrs:{id:"create-mount-for-docker-volumes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-mount-for-docker-volumes"}},[a._v("#")]),a._v(" Create mount for Docker volumes")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("rm")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-rf")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-p")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--bind")]),a._v(" /mnt/usb /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"/mnt/docker /var/lib/docker none bind,nobootwait 0 2"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">>")]),a._v(" /etc/fstab\nsystemctl restart "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"setup-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-btcpay-server"}},[a._v("#")]),a._v(" Setup BTCPay Server")]),a._v(" "),t("p",[a._v("Download BTCPay Server from GitHub:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# ensure we are in root home")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" btcpayserver-docker\n")])])]),t("p",[a._v("Configure BTCPay by setting some "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#environment-variables",target:"_blank",rel:"noopener noreferrer"}},[a._v("environment variables"),t("OutboundLink")],1),a._v(":")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.local"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REVERSEPROXY_DEFAULT_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_HOST")]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"mainnet"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btc"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"clightning"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"nginx"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("true\n")])])]),t("p",[a._v("If you want to use multiple hostnames, add them via the optional "),t("code",[a._v("BTCPAY_ADDITIONAL_HOSTS")]),a._v(" variable:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ADDITIONAL_HOSTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.YourDomain.com"')]),a._v("\n")])])]),t("p",[a._v("In case you want to restrict access to your local network only, please note that you need to use a "),t("code",[a._v(".local")]),a._v(" domain.")]),a._v(" "),t("p",[a._v("Run the BTCPay installation:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("It should be up and running within a few minutes. Try opening http://btcpay.local in your web browser. If everything is correct, you will see BTCPay Server front page.")]),a._v(" "),t("p",[a._v("Now, you just need to wait a day or so for the Bitcoin blockchain to "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/"}},[a._v("sync and full verify")]),a._v(". The bottom of the BTCPay Server web GUI will show a pop-up dialog box to monitor the progress.")],1),a._v(" "),t("h3",{attrs:{id:"fastsync-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#fastsync-optional"}},[a._v("#")]),a._v(" FastSync (optional)")]),a._v(" "),t("p",[a._v("Please read very carefully to understand what "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[a._v("FastSync")]),a._v(" is and why it is important to verify the UTXO set yourself.")],1),a._v(" "),t("p",[a._v("By using FastSync, you are exposing yourself to attacks if a "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#what-are-the-downsides-of-fast-sync",target:"_blank",rel:"noopener noreferrer"}},[a._v("malicious UTXO set snapshot"),t("OutboundLink")],1),a._v(" is sent to you.\nIf you have another trusted node somewhere else, you can check the validity of the UTXO set gathered by FastSync by following "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#dont-trust-verify",target:"_blank",rel:"noopener noreferrer"}},[a._v("these instructions"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Stop BTCPay Server")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" /root/btcpayserver/btcpayserver-docker\n./btcpay-down.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Import FastSync UTXO set")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" contrib/FastSync\n./load-utxo-set.sh\n")])])]),t("p",[a._v("FastSync currently takes about 30 minutes on a high-speed internet connection.\nAfter FastSync finishes, run the following command to restart BTCPay Server:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("/"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("\n./btcpay-up.sh\n")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[117],{845:function(a,t,e){"use strict";e.r(t);var s=e(17),r=Object(s.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"hardware-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hardware-deployment"}},[a._v("#")]),a._v(" Hardware Deployment")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://lightninginabox.co",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning in a Box"),t("OutboundLink")],1),a._v('\n"Your hardware. Your node. Your keys. Your Bitcoin".')]),a._v(" "),t("p",[a._v("In order for your Bitcoin experience to be truly self-sovereign and trustless you should consider "),t("strong",[a._v("running nodes on your own hardware")]),a._v(" and internet connection.\n"),t("strong",[a._v("BTCPay Server is an excellent way to run both Bitcoin & Lightning nodes")]),a._v(".\nNot only are you validating transactions you also get the ability to accept base layer Bitcoin and second layer Lightning payments.\nFollowing are instructions to install and host your very own BTCPay Server.")]),a._v(" "),t("p",[a._v("The process is basically the following:")]),a._v(" "),t("ol",[t("li",[a._v("Purchase and assemble hardware.")]),a._v(" "),t("li",[a._v("Install base Operating System and configure networking.")]),a._v(" "),t("li",[a._v("Install BTCPayServer-Docker.")])]),a._v(" "),t("p",[t("strong",[a._v("BTCPay Server can be installed on the following hardware")]),a._v(". The end result is a small, quiet node that is fast enough to sync from block zero. The total cost is approximately $300.")]),a._v(" "),t("ol",[t("li",[t("a",{attrs:{href:"https://www.amazon.com/dp/B0C89TQ1YF?ref=nb_sb_ss_w_as-reorder-t1_k0_1_4&=&crid=SHKYOXZIRAO0&=&sprefix=beel",target:"_blank",rel:"noopener noreferrer"}},[a._v("BeeLink S12 - Mini PC - $169.00"),t("OutboundLink")],1)]),a._v(" "),t("li",[t("a",{attrs:{href:"https://www.amazon.com/Western-Digital-SA510-Internal-Solid/dp/B0C14TF467/ref=sr_1_3?crid=2WDY52E7ESSEB&dib=eyJ2IjoiMSJ9.MBxkb5ZIvwjKXOzscB0GUvsbhX1rVhilXNFzID6n0xHORsDBPkIxQhIixVuiLY9I16rlFs5COExAAD8761Do-tzuAnZiutbqN-KM9rAL4zCw94kA_ArCJeR_RTDynZbiXf2Phnahw1Gw2dqXVek3p0dpe6_a_fbJrqx4BRaieoYo0zj1mX6YPGaYZAmF2Vf_Quk1TrkARk6s1_wZ0vFUw7EWdjKJ9hmNLxPWMfADML90A1rXk8gSCcRnwV2jdzN7jCfg2_urfJZ3IWOW5X3iwnP7s-vSec88PGmQ3RhS-Rc.sEURveFhiTAHYwZQdwyJX72hpWL5UgD_3tEPet747oE&dib_tag=se&keywords=2tb+ssd+wd+blue&qid=1710685725&s=electronics&sprefix=2tb+ssd+wd+blue%2Celectronics%2C90&sr=1-3",target:"_blank",rel:"noopener noreferrer"}},[a._v("WD Blue 2TB SSD - $129.00"),t("OutboundLink")],1)])]),a._v(" "),t("p",[a._v("Other requirements are as follows:")]),a._v(" "),t("ol",[t("li",[a._v("High speed internet connection.")]),a._v(" "),t("li",[a._v("Static IP")]),a._v(" "),t("li",[a._v("Domain Name")]),a._v(" "),t("li",[a._v("Ability to open ports on your router (optional, BTCPayServer can be accessed over TOR or by Dynamic DNS).")]),a._v(" "),t("li",[a._v("Tiny Screwdriver")]),a._v(" "),t("li",[a._v("USB Thumb Drive")]),a._v(" "),t("li",[a._v("USB Keyboard, Mouse and Monitor (for initial install only). Can be headless when completed.")])]),a._v(" "),t("p",[a._v("Assuming you purchased the hardware mentioned above, here are the build instructions.")]),a._v(" "),t("h3",{attrs:{id:"configure-your-domain-name"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-your-domain-name"}},[a._v("#")]),a._v(" Configure your domain name.")]),a._v(" "),t("p",[a._v('It can take several hours for DNS changes to propagate so you should do this step first.\nLogin to your domain registrar and point an A record from your domain to the external IP address of your internet connection.\nI suggest that you use a subdomain (ie. btcpay.yourdomain.com).\nTo find your external IP address Google "whats my ip".')]),a._v(" "),t("h3",{attrs:{id:"assemble-your-lightning-in-a-box-liab"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#assemble-your-lightning-in-a-box-liab"}},[a._v("#")]),a._v(" Assemble your Lightning in a Box (LIAB).")]),a._v(" "),t("ul",[t("li",[a._v("Remove back cover with screwdriver.")]),a._v(" "),t("li",[a._v("Insert SSD")]),a._v(" "),t("li",[a._v("Install hard drive using included cage.")])]),a._v(" "),t("h3",{attrs:{id:"download-ubuntu-2204-lts-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-ubuntu-2204-lts-server"}},[a._v("#")]),a._v(" Download "),t("a",{attrs:{href:"https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso",target:"_blank",rel:"noopener noreferrer"}},[a._v("Ubuntu 22.04 LTS Server"),t("OutboundLink")],1)]),a._v(" "),t("h3",{attrs:{id:"download-and-install-balena-etcher"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-install-balena-etcher"}},[a._v("#")]),a._v(" Download and install "),t("a",{attrs:{href:"https://etcher.balena.io/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Balena Etcher"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("p",[a._v("Etcher is software that is used to flash OS images to SD cards and USB Drives.\nIn this case we will be using Etcher to flash our USB Thumb Drive with the Ubuntu OS.")]),a._v(" "),t("h3",{attrs:{id:"connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[a._v("#")]),a._v(" Connect your USB keyboard, mouse, monitor and thumb drive.")]),a._v(" "),t("p",[a._v('Press the power button to boot your LIAB. Press the "DEL" key to access the bios and change the boot order to use the thumb drive first.\nThe Ubuntu installation process is pretty simple and easy to follow. Here\'s a tutorial from the Ubuntu website. '),t("a",{attrs:{href:"https://ubuntu.com/tutorials/install-ubuntu-server#1-overview",target:"_blank",rel:"noopener noreferrer"}},[a._v("Install Ubuntu Server"),t("OutboundLink")],1),a._v(". The BeeLink S12 ships with Windows Pre-Installed so you will have to delete the NVME partitions and install Ubuntu on that drive.")]),a._v(" "),t("p",[a._v('*During the install process make sure you set the hostname to "btcpay" and enable SSH.')]),a._v(" "),t("h3",{attrs:{id:"give-your-liab-a-static-ip-address-on-your-local-network"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#give-your-liab-a-static-ip-address-on-your-local-network"}},[a._v("#")]),a._v(" Give your LIAB a static IP address on your local network.")]),a._v(" "),t("p",[a._v("There are a few different ways to do this and you will find a ton of articles online. Here's a pretty simple one to follow "),t("a",{attrs:{href:"https://www.linuxtechi.com/static-ip-address-on-ubuntu-server/",target:"_blank",rel:"noopener noreferrer"}},[a._v("How to configure a static IP address on Ubuntu 22.04"),t("OutboundLink")],1),a._v('. To avoid conflicts with other devices on your network you should also set a "reservation" for your LIAB.')]),a._v(" "),t("h3",{attrs:{id:"log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[a._v("#")]),a._v(" Log into your router and forward ports 80, 443 and 9735 to your LIAB's local IP address. (optional, if using .local, or Tor only)")]),a._v(" "),t("p",[a._v('Every router is different and you should be able to find instructions for your router by searching for "Port Forward + your router make and model".')]),a._v(" "),t("h3",{attrs:{id:"install-fail2ban-git-and-avahi-daemon"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-fail2ban-git-and-avahi-daemon"}},[a._v("#")]),a._v(" Install Fail2ban, GIT and Avahi-Daemon.")]),a._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/fail2ban/fail2ban/wiki/How-to-install-fail2ban-packages",target:"_blank",rel:"noopener noreferrer"}},[a._v("Fail2ban"),t("OutboundLink")],1),a._v(" bans IP's that attempt to connect to your server and show malicious signs. GIT allows you to clone and manage repositories on github.com.")]),a._v(" "),t("li",[t("a",{attrs:{href:"https://avahi.org/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Avahi"),t("OutboundLink")],1),a._v(" is a system which facilitates service discovery on a local network via the mDNS/DNS-SD protocol suite.\nOpen a new terminal window and type the following commands:")])]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" avahi-daemon\n")])])]),t("h3",{attrs:{id:"configuring-the-firewall"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-firewall"}},[a._v("#")]),a._v(" Configuring the firewall")]),a._v(" "),t("p",[a._v("Install a firewall and allow SSH, HTTP, HTTPS, Bitcoin, and Lightning:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" ufw\nufw default deny incoming\nufw default allow outgoing\n")])])]),t("p",[a._v("This command allows SSH connections from internal networks only:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("10.0")]),a._v(".0.0/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("172.16")]),a._v(".0.0/12 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("169.254")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fc00::/7 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fe80::/10 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from ff00::/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\n")])])]),t("p",[a._v("These ports need to be accessible from anywhere (The default subnet is 'any' unless you specify one):")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("443")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("8333")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("9735")]),a._v("/tcp\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Enable the firewall")]),a._v("\nufw "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Verify the configuration")]),a._v("\nufw status\n")])])]),t("h3",{attrs:{id:"install-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-docker"}},[a._v("#")]),a._v(" Install Docker")]),a._v(" "),t("div",{staticClass:"language-Bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" apt-transport-https ca-certificates "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" software-properties-common\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-fsSL")]),a._v(" https://download.docker.com/linux/ubuntu/gpg "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" gpg "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--dearmor")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" /usr/share/keyrings/docker-archive-keyring.gpg\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"deb [arch='),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("dpkg --print-architecture"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(" signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("lsb_release "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-cs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(' stable"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" /etc/apt/sources.list.d/docker.list "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" /dev/null\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt-cache")]),a._v(" policy docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" systemctl status "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"configuring-the-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-storage"}},[a._v("#")]),a._v(" Configuring the storage")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("fdisk")]),a._v(" /dev/sda\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'p' to list existing partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'd' to delete currently selected partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'n' to create a new partition")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'w' to write the new partition table and exit fdisk")]),a._v("\nmkfs.ext4 /dev/sda1\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" /mnt/usb\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("UUID")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" blkid "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" UUID "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" value /dev/sda1"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"UUID='),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$UUID")]),a._v(' /mnt/usb ext4 defaults,noatime,nofail 0 0"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v(" /etc/fstab\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v("\n")])])]),t("h3",{attrs:{id:"create-mount-for-docker-volumes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-mount-for-docker-volumes"}},[a._v("#")]),a._v(" Create mount for Docker volumes")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("rm")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-rf")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-p")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--bind")]),a._v(" /mnt/usb /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"/mnt/docker /var/lib/docker none bind,nobootwait 0 2"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">>")]),a._v(" /etc/fstab\nsystemctl restart "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"setup-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-btcpay-server"}},[a._v("#")]),a._v(" Setup BTCPay Server")]),a._v(" "),t("p",[a._v("Download BTCPay Server from GitHub:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# ensure we are in root home")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" btcpayserver-docker\n")])])]),t("p",[a._v("Configure BTCPay by setting some "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#environment-variables",target:"_blank",rel:"noopener noreferrer"}},[a._v("environment variables"),t("OutboundLink")],1),a._v(":")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.local"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REVERSEPROXY_DEFAULT_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_HOST")]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"mainnet"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btc"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"clightning"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"nginx"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("true\n")])])]),t("p",[a._v("If you want to use multiple hostnames, add them via the optional "),t("code",[a._v("BTCPAY_ADDITIONAL_HOSTS")]),a._v(" variable:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ADDITIONAL_HOSTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.YourDomain.com"')]),a._v("\n")])])]),t("p",[a._v("In case you want to restrict access to your local network only, please note that you need to use a "),t("code",[a._v(".local")]),a._v(" domain.")]),a._v(" "),t("p",[a._v("Run the BTCPay installation:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("It should be up and running within a few minutes. Try opening http://btcpay.local in your web browser. If everything is correct, you will see BTCPay Server front page.")]),a._v(" "),t("p",[a._v("Now, you just need to wait a day or so for the Bitcoin blockchain to "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/"}},[a._v("sync and full verify")]),a._v(". The bottom of the BTCPay Server web GUI will show a pop-up dialog box to monitor the progress.")],1),a._v(" "),t("h3",{attrs:{id:"fastsync-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#fastsync-optional"}},[a._v("#")]),a._v(" FastSync (optional)")]),a._v(" "),t("p",[a._v("Please read very carefully to understand what "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[a._v("FastSync")]),a._v(" is and why it is important to verify the UTXO set yourself.")],1),a._v(" "),t("p",[a._v("By using FastSync, you are exposing yourself to attacks if a "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#what-are-the-downsides-of-fast-sync",target:"_blank",rel:"noopener noreferrer"}},[a._v("malicious UTXO set snapshot"),t("OutboundLink")],1),a._v(" is sent to you.\nIf you have another trusted node somewhere else, you can check the validity of the UTXO set gathered by FastSync by following "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#dont-trust-verify",target:"_blank",rel:"noopener noreferrer"}},[a._v("these instructions"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Stop BTCPay Server")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" /root/btcpayserver/btcpayserver-docker\n./btcpay-down.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Import FastSync UTXO set")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" contrib/FastSync\n./load-utxo-set.sh\n")])])]),t("p",[a._v("FastSync currently takes about 30 minutes on a high-speed internet connection.\nAfter FastSync finishes, run the following command to restart BTCPay Server:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("/"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("\n./btcpay-up.sh\n")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/119.e3d8d511.js b/assets/js/119.2ed902a2.js similarity index 99% rename from assets/js/119.e3d8d511.js rename to assets/js/119.2ed902a2.js index ded56046e7..742f63c9a3 100644 --- a/assets/js/119.e3d8d511.js +++ b/assets/js/119.2ed902a2.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{846:function(t,e,a){"use strict";a.r(e);var s=a(17),n=Object(s.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"minimal-manual-setup"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#minimal-manual-setup"}},[t._v("#")]),t._v(" Minimal manual setup")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("DANGER")]),t._v(" "),e("h4",{attrs:{id:"not-recommended-for-production-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#not-recommended-for-production-use"}},[t._v("#")]),t._v(" Not recommended for production use")]),t._v(" "),e("p",[t._v("Manual installation is NOT recommended for production use unless you are very confident with your Operating System and Bitcoin security expertise. If you are unsure use the docker deployment or one of the other "),e("RouterLink",{attrs:{to:"/Deployment/"}},[t._v("deployment options")]),t._v(".")],1),t._v(" "),e("h4",{attrs:{id:"you-must-have-technical-literacy-and-be-able-to-resolve-any-issues-on-your-own-the-community-will-not-provide-extensive-support-for-this-deployment"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#you-must-have-technical-literacy-and-be-able-to-resolve-any-issues-on-your-own-the-community-will-not-provide-extensive-support-for-this-deployment"}},[t._v("#")]),t._v(" You must have technical literacy and be able to resolve any issues on your own. The community will not provide extensive support for this deployment.")])]),t._v(" "),e("p",[t._v("The process is basically the following:")]),t._v(" "),e("ol",[e("li",[t._v("Download and sync "),e("a",{attrs:{href:"https://bitcoincore.org",target:"_blank",rel:"noopener noreferrer"}},[t._v("Bitcoin Core"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Clone and run "),e("a",{attrs:{href:"https://github.com/dgarage/NBxplorer",target:"_blank",rel:"noopener noreferrer"}},[t._v("NBXplorer"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Clone and run "),e("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[t._v("BTCPay Server"),e("OutboundLink")],1)])]),t._v(" "),e("p",[t._v("Take a look at our video to learn more:")]),t._v(" "),e("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Xo_vApXTZBU/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=Xo_vApXTZBU",title:"BTCPay Server - Setup","data-id":"Xo_vApXTZBU"}},[e("iframe",{attrs:{title:"BTCPay Server - Setup","data-src":"https://www.youtube-nocookie.com/embed/Xo_vApXTZBU?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),t._v(" "),e("h2",{attrs:{id:"warning-not-recommended-to-use-in-production"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#warning-not-recommended-to-use-in-production"}},[t._v("#")]),t._v(" Warning: Not recommended to use in production")]),t._v(" "),e("p",[e("strong",[t._v("Manual installation")]),t._v(" is NOT recommended in production. It should be only used for learning purpose.")]),t._v(" "),e("p",[t._v("Instead you should use the "),e("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[t._v("docker deployment"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("p",[t._v("The docker deployment will provide you easy update system and make sure that all moving parts are wired correctly without any technical knowledge. It will also setup HTTPS for you.")]),t._v(" "),e("h2",{attrs:{id:"typical-manual-installation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#typical-manual-installation"}},[t._v("#")]),t._v(" Typical manual installation")]),t._v(" "),e("p",[t._v("This steps have been done on Ubuntu 18.04, adapt for your own install.")]),t._v(" "),e("p",[t._v("For Testnet specific deployment, after installing Bitcoin, .NET Core, NBXplorer and BTCPayServer, see "),e("a",{attrs:{href:"#testnet-specific-deployments"}},[t._v("Commands for Running in Testnet Mode")])]),t._v(" "),e("h3",{attrs:{id:"1-install-bitcoin-core-0191"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#1-install-bitcoin-core-0191"}},[t._v("#")]),t._v(" 1) Install Bitcoin Core 0.19.1")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BITCOIN_VERSION")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0.19.1"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BITCOIN_URL")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://bitcoin.org/bin/bitcoin-core-0.19.1/bitcoin-0.19.1-x86_64-linux-gnu.tar.gz"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BITCOIN_SHA256")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"5fcac9416e486d4960e1a946145566350ca670f9aaba99de6542080851122e4c"')]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# install bitcoin binaries")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" /tmp\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-O")]),t._v(" bitcoin.tar.gz "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BITCOIN_URL")]),t._v('"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("echo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BITCOIN_SHA256")]),t._v(' bitcoin.tar.gz"')]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" sha256sum "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" - "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" bin "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("tar")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-xzvf")]),t._v(" bitcoin.tar.gz "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-C")]),t._v(" /usr/local/bin --strip-components"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bitcoin-'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BITCOIN_VERSION")]),t._v('/bin/bitcoin-cli"')]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bitcoin-'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BITCOIN_VERSION")]),t._v('/bin/bitcoind"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("rm")]),t._v(" bitcoin.tar.gz\n")])])]),e("h3",{attrs:{id:"2-install-net-80-sdk"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#2-install-net-80-sdk"}},[t._v("#")]),t._v(" 2) Install .NET 8.0 SDK")]),t._v(" "),e("p",[t._v("On my Ubuntu 20.04 (See "),e("a",{attrs:{href:"https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004-",target:"_blank",rel:"noopener noreferrer"}},[t._v("these instructions"),e("OutboundLink")],1),t._v(" or "),e("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),e("OutboundLink")],1),t._v(" for different OS).")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Add Microsoft package repository")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-O")]),t._v(" packages-microsoft-prod.deb\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" dpkg "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v(" packages-microsoft-prod.deb\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("rm")]),t._v(" packages-microsoft-prod.deb\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Install the SDK")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" update\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" apt-transport-https\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" update\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" dotnet-sdk-6.0\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("## Check")]),t._v("\ndotnet "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\n")])])]),e("h3",{attrs:{id:"3-install-nbxplorer"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#3-install-nbxplorer"}},[t._v("#")]),t._v(" 3) Install NBXplorer")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/dgarage/NBXplorer\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" NBXplorer\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout latest\n./build.sh\n")])])]),e("h3",{attrs:{id:"4-install-btcpayserver"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#4-install-btcpayserver"}},[t._v("#")]),t._v(" 4) Install BTCPayServer")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/btcpayserver/btcpayserver\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout latest\n./build.sh\n")])])]),e("h3",{attrs:{id:"5-run-bitcoind"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#5-run-bitcoind"}},[t._v("#")]),t._v(" 5) Run bitcoind")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[t._v("bitcoind\n")])])]),e("h3",{attrs:{id:"6-run-nbxplorer"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#6-run-nbxplorer"}},[t._v("#")]),t._v(" 6) Run NBXplorer")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/NBXplorer\n./run.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--dbtrie")]),t._v("\n")])])]),e("p",[t._v("Note that using the "),e("code",[t._v("--dbtrie")]),t._v(" backend for NBXplorer, while easier, is deprecated.\nYou should better use a postgresql backend as documented on "),e("RouterLink",{attrs:{to:"/Deployment/ManualDeploymentExtended/"}},[t._v("Extended Manual Deployment")]),t._v(".")],1),t._v(" "),e("h3",{attrs:{id:"7-run-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#7-run-btcpay-server"}},[t._v("#")]),t._v(" 7) Run BTCPay Server")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/btcpayserver\n./run.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--port")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("8080")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--bind")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0\n")])])]),e("p",[t._v("Now you can browse your server on port 8080.")]),t._v(" "),e("p",[t._v("Note that by default, BTCPay Server will use SQLite as backend, while being easier, this is deprecated.\nYou should better use a postgresql backend as documented on "),e("RouterLink",{attrs:{to:"/Deployment/ManualDeploymentExtended/"}},[t._v("Extended Manual Deployment")]),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"testnet-specific-deployments"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#testnet-specific-deployments"}},[t._v("#")]),t._v(" Testnet Specific Deployments")]),t._v(" "),e("p",[t._v("Follow the instructions for installing Bitcoin, .NET Core, NBXplorer and BTCPayServer above.")]),t._v(" "),e("p",[t._v("Then when running them use:")]),t._v(" "),e("h3",{attrs:{id:"run-bitcoind-in-testnet-mode"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#run-bitcoind-in-testnet-mode"}},[t._v("#")]),t._v(" Run bitcoind in testnet mode")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[t._v("bitcoind "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-testnet")]),t._v("\n")])])]),e("h3",{attrs:{id:"run-nbxplorer-in-testnet-mode"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#run-nbxplorer-in-testnet-mode"}},[t._v("#")]),t._v(" Run NBXplorer in testnet mode")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/NBXplorer\n./run.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--network")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("testnet\n")])])]),e("h3",{attrs:{id:"run-btcpayserver-in-testnet-mode"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#run-btcpayserver-in-testnet-mode"}},[t._v("#")]),t._v(" Run BTCPayServer in testnet mode")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/btcpayserver\n./run.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--port")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("8080")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--bind")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0 "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--network")]),t._v(" testnet\n")])])]),e("h2",{attrs:{id:"additional-links"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#additional-links"}},[t._v("#")]),t._v(" Additional links")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/Deployment/ManualDeploymentExtended/"}},[t._v("Extended Manual Deployment")])],1),t._v(" "),e("li",[e("a",{attrs:{href:"https://freedomnode.com/blog/114/how-to-setup-btc-and-lightning-payment-gateway-with-btcpayserver-on-linux-manual-install",target:"_blank",rel:"noopener noreferrer"}},[t._v("How to Setup BTC and Lightning Payment Gateway with BTCPayServer on Linux [Manual Install]"),e("OutboundLink")],1),t._v(" from freedomnode.com.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{848:function(t,e,a){"use strict";a.r(e);var s=a(17),n=Object(s.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"minimal-manual-setup"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#minimal-manual-setup"}},[t._v("#")]),t._v(" Minimal manual setup")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("DANGER")]),t._v(" "),e("h4",{attrs:{id:"not-recommended-for-production-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#not-recommended-for-production-use"}},[t._v("#")]),t._v(" Not recommended for production use")]),t._v(" "),e("p",[t._v("Manual installation is NOT recommended for production use unless you are very confident with your Operating System and Bitcoin security expertise. If you are unsure use the docker deployment or one of the other "),e("RouterLink",{attrs:{to:"/Deployment/"}},[t._v("deployment options")]),t._v(".")],1),t._v(" "),e("h4",{attrs:{id:"you-must-have-technical-literacy-and-be-able-to-resolve-any-issues-on-your-own-the-community-will-not-provide-extensive-support-for-this-deployment"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#you-must-have-technical-literacy-and-be-able-to-resolve-any-issues-on-your-own-the-community-will-not-provide-extensive-support-for-this-deployment"}},[t._v("#")]),t._v(" You must have technical literacy and be able to resolve any issues on your own. The community will not provide extensive support for this deployment.")])]),t._v(" "),e("p",[t._v("The process is basically the following:")]),t._v(" "),e("ol",[e("li",[t._v("Download and sync "),e("a",{attrs:{href:"https://bitcoincore.org",target:"_blank",rel:"noopener noreferrer"}},[t._v("Bitcoin Core"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Clone and run "),e("a",{attrs:{href:"https://github.com/dgarage/NBxplorer",target:"_blank",rel:"noopener noreferrer"}},[t._v("NBXplorer"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Clone and run "),e("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[t._v("BTCPay Server"),e("OutboundLink")],1)])]),t._v(" "),e("p",[t._v("Take a look at our video to learn more:")]),t._v(" "),e("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Xo_vApXTZBU/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=Xo_vApXTZBU",title:"BTCPay Server - Setup","data-id":"Xo_vApXTZBU"}},[e("iframe",{attrs:{title:"BTCPay Server - Setup","data-src":"https://www.youtube-nocookie.com/embed/Xo_vApXTZBU?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),t._v(" "),e("h2",{attrs:{id:"warning-not-recommended-to-use-in-production"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#warning-not-recommended-to-use-in-production"}},[t._v("#")]),t._v(" Warning: Not recommended to use in production")]),t._v(" "),e("p",[e("strong",[t._v("Manual installation")]),t._v(" is NOT recommended in production. It should be only used for learning purpose.")]),t._v(" "),e("p",[t._v("Instead you should use the "),e("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[t._v("docker deployment"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("p",[t._v("The docker deployment will provide you easy update system and make sure that all moving parts are wired correctly without any technical knowledge. It will also setup HTTPS for you.")]),t._v(" "),e("h2",{attrs:{id:"typical-manual-installation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#typical-manual-installation"}},[t._v("#")]),t._v(" Typical manual installation")]),t._v(" "),e("p",[t._v("This steps have been done on Ubuntu 18.04, adapt for your own install.")]),t._v(" "),e("p",[t._v("For Testnet specific deployment, after installing Bitcoin, .NET Core, NBXplorer and BTCPayServer, see "),e("a",{attrs:{href:"#testnet-specific-deployments"}},[t._v("Commands for Running in Testnet Mode")])]),t._v(" "),e("h3",{attrs:{id:"1-install-bitcoin-core-0191"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#1-install-bitcoin-core-0191"}},[t._v("#")]),t._v(" 1) Install Bitcoin Core 0.19.1")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BITCOIN_VERSION")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0.19.1"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BITCOIN_URL")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://bitcoin.org/bin/bitcoin-core-0.19.1/bitcoin-0.19.1-x86_64-linux-gnu.tar.gz"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BITCOIN_SHA256")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"5fcac9416e486d4960e1a946145566350ca670f9aaba99de6542080851122e4c"')]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# install bitcoin binaries")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" /tmp\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-O")]),t._v(" bitcoin.tar.gz "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BITCOIN_URL")]),t._v('"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("echo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BITCOIN_SHA256")]),t._v(' bitcoin.tar.gz"')]),t._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" sha256sum "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" - "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" bin "),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("tar")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-xzvf")]),t._v(" bitcoin.tar.gz "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-C")]),t._v(" /usr/local/bin --strip-components"),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bitcoin-'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BITCOIN_VERSION")]),t._v('/bin/bitcoin-cli"')]),t._v(" "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bitcoin-'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BITCOIN_VERSION")]),t._v('/bin/bitcoind"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("rm")]),t._v(" bitcoin.tar.gz\n")])])]),e("h3",{attrs:{id:"2-install-net-80-sdk"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#2-install-net-80-sdk"}},[t._v("#")]),t._v(" 2) Install .NET 8.0 SDK")]),t._v(" "),e("p",[t._v("On my Ubuntu 20.04 (See "),e("a",{attrs:{href:"https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004-",target:"_blank",rel:"noopener noreferrer"}},[t._v("these instructions"),e("OutboundLink")],1),t._v(" or "),e("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),e("OutboundLink")],1),t._v(" for different OS).")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Add Microsoft package repository")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-O")]),t._v(" packages-microsoft-prod.deb\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" dpkg "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v(" packages-microsoft-prod.deb\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("rm")]),t._v(" packages-microsoft-prod.deb\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Install the SDK")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" update\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" apt-transport-https\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" update\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" dotnet-sdk-6.0\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("## Check")]),t._v("\ndotnet "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\n")])])]),e("h3",{attrs:{id:"3-install-nbxplorer"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#3-install-nbxplorer"}},[t._v("#")]),t._v(" 3) Install NBXplorer")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/dgarage/NBXplorer\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" NBXplorer\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout latest\n./build.sh\n")])])]),e("h3",{attrs:{id:"4-install-btcpayserver"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#4-install-btcpayserver"}},[t._v("#")]),t._v(" 4) Install BTCPayServer")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/btcpayserver/btcpayserver\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver\n"),e("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout latest\n./build.sh\n")])])]),e("h3",{attrs:{id:"5-run-bitcoind"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#5-run-bitcoind"}},[t._v("#")]),t._v(" 5) Run bitcoind")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[t._v("bitcoind\n")])])]),e("h3",{attrs:{id:"6-run-nbxplorer"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#6-run-nbxplorer"}},[t._v("#")]),t._v(" 6) Run NBXplorer")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/NBXplorer\n./run.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--dbtrie")]),t._v("\n")])])]),e("p",[t._v("Note that using the "),e("code",[t._v("--dbtrie")]),t._v(" backend for NBXplorer, while easier, is deprecated.\nYou should better use a postgresql backend as documented on "),e("RouterLink",{attrs:{to:"/Deployment/ManualDeploymentExtended/"}},[t._v("Extended Manual Deployment")]),t._v(".")],1),t._v(" "),e("h3",{attrs:{id:"7-run-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#7-run-btcpay-server"}},[t._v("#")]),t._v(" 7) Run BTCPay Server")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/btcpayserver\n./run.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--port")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("8080")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--bind")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0\n")])])]),e("p",[t._v("Now you can browse your server on port 8080.")]),t._v(" "),e("p",[t._v("Note that by default, BTCPay Server will use SQLite as backend, while being easier, this is deprecated.\nYou should better use a postgresql backend as documented on "),e("RouterLink",{attrs:{to:"/Deployment/ManualDeploymentExtended/"}},[t._v("Extended Manual Deployment")]),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"testnet-specific-deployments"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#testnet-specific-deployments"}},[t._v("#")]),t._v(" Testnet Specific Deployments")]),t._v(" "),e("p",[t._v("Follow the instructions for installing Bitcoin, .NET Core, NBXplorer and BTCPayServer above.")]),t._v(" "),e("p",[t._v("Then when running them use:")]),t._v(" "),e("h3",{attrs:{id:"run-bitcoind-in-testnet-mode"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#run-bitcoind-in-testnet-mode"}},[t._v("#")]),t._v(" Run bitcoind in testnet mode")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[t._v("bitcoind "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-testnet")]),t._v("\n")])])]),e("h3",{attrs:{id:"run-nbxplorer-in-testnet-mode"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#run-nbxplorer-in-testnet-mode"}},[t._v("#")]),t._v(" Run NBXplorer in testnet mode")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/NBXplorer\n./run.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--network")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("testnet\n")])])]),e("h3",{attrs:{id:"run-btcpayserver-in-testnet-mode"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#run-btcpayserver-in-testnet-mode"}},[t._v("#")]),t._v(" Run BTCPayServer in testnet mode")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/btcpayserver\n./run.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--port")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("8080")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--bind")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0 "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--network")]),t._v(" testnet\n")])])]),e("h2",{attrs:{id:"additional-links"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#additional-links"}},[t._v("#")]),t._v(" Additional links")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/Deployment/ManualDeploymentExtended/"}},[t._v("Extended Manual Deployment")])],1),t._v(" "),e("li",[e("a",{attrs:{href:"https://freedomnode.com/blog/114/how-to-setup-btc-and-lightning-payment-gateway-with-btcpayserver-on-linux-manual-install",target:"_blank",rel:"noopener noreferrer"}},[t._v("How to Setup BTC and Lightning Payment Gateway with BTCPayServer on Linux [Manual Install]"),e("OutboundLink")],1),t._v(" from freedomnode.com.")])])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/12.6c3a8671.js b/assets/js/12.6c3a8671.js new file mode 100644 index 0000000000..0d10a852dc --- /dev/null +++ b/assets/js/12.6c3a8671.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{340:function(e,t,o){e.exports=o.p+"assets/img/complete_payment.ff220853.png"},605:function(e,t,o){e.exports=o.p+"assets/img/step_1.9472dd10.png"},606:function(e,t,o){e.exports=o.p+"assets/img/step_2.09916e50.png"},607:function(e,t,o){e.exports=o.p+"assets/img/step_3.bee69e6c.png"},608:function(e,t,o){e.exports=o.p+"assets/img/step_4.5a0db702.png"},609:function(e,t,o){e.exports=o.p+"assets/img/step_5.8b8524c9.png"},610:function(e,t,o){e.exports=o.p+"assets/img/step_6.69d3a0cd.png"},611:function(e,t,o){e.exports=o.p+"assets/img/step_7.78e87aed.png"},612:function(e,t,o){e.exports=o.p+"assets/img/step_8.e0aa468d.png"},613:function(e,t,o){e.exports=o.p+"assets/img/step_9-1.05f3f7c8.png"},614:function(e,t,o){e.exports=o.p+"assets/img/step_9-2.e3e5012d.png"},615:function(e,t,o){e.exports=o.p+"assets/img/step_10_and_11.144512a3.png"},616:function(e,t,o){e.exports=o.p+"assets/img/pm_step_1.1bea1f2a.png"},617:function(e,t,o){e.exports=o.p+"assets/img/pm_step_2_and_3.9bf6b09b.png"},618:function(e,t,o){e.exports=o.p+"assets/img/btcpay_step_1-7.9831ecbf.png"},619:function(e,t,o){e.exports=o.p+"assets/img/btcpay_step_8.f92d2d58.png"},620:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-2-settings.0146aead.png"},621:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-4-1.735b3d9f.png"},622:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-4-2.0b871a76.png"},623:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-5-1.a71cf731.png"},624:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-5-2.9550a3c5.png"},625:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-6.1bcb2593.png"},626:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-7.0cca2330.png"},627:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-8.110012d5.png"},628:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-9-1.98153ef7.png"},629:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-9-2.2cd78663.png"},630:function(e,t,o){e.exports=o.p+"assets/img/partner-app_allow-network-access.6c68e580.png"},631:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_loginto-container-auth-start.cfcc6814.png"},632:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_partner_login_email.be60b3c8.png"},633:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_login-confirmation.7297c62f.png"},634:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_login_success.7e98caa2.png"},635:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_deployment_done.491d277a.png"},636:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_deployment_url_browser.38d86e69.png"},637:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_custom-distribution-1.00bcb7ef.png"},638:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-confirm.ba7101d7.png"},639:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-generate-link.cdbb0a8a.png"},640:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-generated-link-copy.138a4008.png"},641:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-choose-store.7f2e8f0a.png"},642:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-install-to-store-confirm.87685dd6.png"},643:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-install-complete-config-app.959b95fe.png"},644:function(e,t,o){e.exports=o.p+"assets/img/payment_option.08c972fd.png"},645:function(e,t,o){e.exports=o.p+"assets/img/pay_with_btcpay_modal.1899a6bb.png"},646:function(e,t,o){e.exports=o.p+"assets/img/pay_with_btcpay_modal_invoice.67c073fe.png"},647:function(e,t,o){e.exports=o.p+"assets/img/payment_invoice.3fd764b0.png"},648:function(e,t,o){e.exports=o.p+"assets/img/paid_invoice.084d2a4e.png"},649:function(e,t,o){e.exports=o.p+"assets/img/paid_invoice_btcpay.676f5a70.png"},650:function(e,t,o){e.exports=o.p+"assets/img/invoice_payment_details.e65e8d6b.png"},929:function(e,t,o){"use strict";o.r(t);var s=o(17),a=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"accept-bitcoin-in-shopify-with-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#accept-bitcoin-in-shopify-with-btcpay-server"}},[e._v("#")]),e._v(" Accept Bitcoin in Shopify with BTCPay Server")]),e._v(" "),t("p",[e._v("Introducing BTCPay Server for Shopify open-source payment gateway that enables you accept bitcoin payments directly on your website or stores from customers with no fee.")]),e._v(" "),t("p",[e._v("Our integration with Shopify allows you connect your self-hosted BTCPay Server with your "),t("a",{attrs:{href:"https://www.shopify.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Shopify store"),t("OutboundLink")],1),e._v(", enabling you accept Bitcoin payments swiftly and securely.")]),e._v(" "),t("h2",{attrs:{id:"what-btcpay-offers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-btcpay-offers"}},[e._v("#")]),e._v(" What BTCPay offers:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Zero fees")]),e._v(": Enjoy a payment gateway with no fees. Yes, You saw that right. Zero fees!")]),e._v(" "),t("li",[t("strong",[e._v("Direct payment, No middlemen or KYC")]),e._v(": Say goodbye to intermediaries and tedious paperwork, and get your money directly in your wallet")]),e._v(" "),t("li",[t("strong",[e._v("Fully automated system")]),e._v(": BTCPay takes care of payments, invoice management and refunds automatically.")]),e._v(" "),t("li",[t("strong",[e._v("Display Bitcoin QR code at checkout")]),e._v(": Enhance customer experience with an easy and secure payment option.")]),e._v(" "),t("li",[t("strong",[e._v("Self-hosted infrastructure")]),e._v(": Maintain full control over your payment gateway.")]),e._v(" "),t("li",[t("strong",[e._v("Lightning Network integrated")]),e._v(": Instant, fast and low cost payments and payouts")]),e._v(" "),t("li",[t("strong",[e._v("Easy CSV exports")])]),e._v(" "),t("li",[t("strong",[e._v("Versatile plugin system")]),e._v(": Extend functionality according to your needs")]),e._v(" "),t("li",[t("strong",[e._v("Point-of-sale integration")]),e._v(" Accept payments in your physical shops")]),e._v(" "),t("li",[t("strong",[e._v("Multilingual ready")]),e._v(": Serve a global audience right out of the box.")]),e._v(" "),t("li",[t("strong",[e._v("Community-driven support")]),e._v(": Get responsive assistance from our dedicated community ("),t("a",{attrs:{href:"http://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(").")])]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites:")]),e._v(" "),t("p",[e._v("Before diving into the setup process, ensure you have the following:")]),e._v(" "),t("ul",[t("li",[e._v("Shopify account")]),e._v(" "),t("li",[e._v("BTCPay Server - "),t("RouterLink",{attrs:{to:"/ShopifyV2/Deployment/"}},[e._v("self-hosted")]),e._v(" or run by a "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("third-party host")]),e._v(" v2.0.0 or later.")],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/ShopifyV2/CreateStore/"}},[e._v("Created BTCPay Server store")]),e._v(" with "),t("RouterLink",{attrs:{to:"/ShopifyV2/WalletSetup/"}},[e._v("wallet set up")])],1)]),e._v(" "),t("h2",{attrs:{id:"setting-up-btcpay-server-with-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-btcpay-server-with-shopify"}},[e._v("#")]),e._v(" Setting up BTCPay Server with Shopify")]),e._v(" "),t("h3",{attrs:{id:"create-an-app-and-get-api-credentials-from-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-an-app-and-get-api-credentials-from-shopify"}},[e._v("#")]),e._v(" Create an app and get API credentials from Shopify")]),e._v(" "),t("ol",[t("li",[e._v("In Shopify, click on "),t("code",[e._v("Apps >")]),e._v(" in the left sidebar"),t("br"),e._v(" "),t("img",{attrs:{src:o(605),alt:"BTCPay Server shopify step 1",title:"BTCPay Server shopify step 1"}})]),e._v(" "),t("li",[e._v("On the modal popped up, click on "),t("code",[e._v("App and sales channel settings")]),t("br"),e._v(" "),t("img",{attrs:{src:o(606),alt:"BTCPay Server shopify step 2",title:"BTCPay Server shopify step 2"}})]),e._v(" "),t("li",[e._v("From the page displayed, click on "),t("code",[e._v("Develop apps")]),e._v(" button"),t("br"),e._v(" "),t("img",{attrs:{src:o(607),alt:"BTCPay Server shopify step 3",title:"BTCPay Server shopify step 3"}})]),e._v(" "),t("li",[e._v("If prompted, click on "),t("code",[e._v("Allow custom app development")]),t("br"),e._v(" "),t("img",{attrs:{src:o(608),alt:"BTCPay Server shopify step 4",title:"BTCPay Server shopify step 4"}})]),e._v(" "),t("li",[t("code",[e._v("Create an app")]),e._v(" and name it, e.g. BTCPay Server, click on "),t("code",[e._v("Create App")]),t("br"),e._v(" "),t("img",{attrs:{src:o(609),alt:"BTCPay Server shopify step 5",title:"BTCPay Server shopify step 5"}}),e._v(" "),t("img",{attrs:{src:o(610),alt:"BTCPay Server shopify step 6",title:"BTCPay Server shopify step 6"}})]),e._v(" "),t("li",[e._v("On the app page, in "),t("code",[e._v("Overview")]),e._v(" tab, click on the "),t("code",[e._v("Configure Admin API scopes")]),t("br"),e._v(" "),t("img",{attrs:{src:o(611),alt:"BTCPay Server shopify step 7",title:"BTCPay Server shopify step 7"}})]),e._v(" "),t("li",[e._v("In the filter admin access scopes type in "),t("code",[e._v("Orders")])]),e._v(" "),t("li",[e._v("In "),t("code",[e._v("Orders")]),e._v(" enable "),t("code",[e._v("read_orders")]),e._v(" and "),t("code",[e._v("write_orders")]),e._v(" and then click "),t("code",[e._v("Save")]),t("br"),e._v(" "),t("img",{attrs:{src:o(612),alt:"BTCPay Server shopify step 8",title:"BTCPay Server shopify step 8"}})]),e._v(" "),t("li",[e._v('Click on the "API credentials" tab, and then click on the '),t("code",[e._v("Install App")]),e._v(" in the top right corner and when pop-up window appears click "),t("code",[e._v("Install")]),t("br"),e._v(" "),t("img",{attrs:{src:o(613),alt:"BTCPay Server shopify step 9-1",title:"BTCPay Server shopify step 9-1"}}),t("br"),e._v(" "),t("img",{attrs:{src:o(614),alt:"BTCPay Server shopify step 9-2",title:"BTCPay Server shopify step 9-2"}})]),e._v(" "),t("li",[e._v("Reveal "),t("code",[e._v("Admin API access token")]),e._v(" and "),t("code",[e._v("copy")]),e._v(" it (and note it down somewhere safe)")]),e._v(" "),t("li",[e._v("Also copy the "),t("code",[e._v("API key")]),e._v(" and "),t("code",[e._v("API Secret")]),e._v(" and note it down somewhere safe"),t("br"),e._v(" "),t("img",{attrs:{src:o(615),alt:"BTCPay Server shopify step 10 and 11",title:"BTCPay Server shopify step 10 and 11"}})]),e._v(" "),t("li",[e._v("Shopify app setup is now complete")])]),e._v(" "),t("h3",{attrs:{id:"set-up-a-custom-payment-method-in-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#set-up-a-custom-payment-method-in-shopify"}},[e._v("#")]),e._v(" Set up a custom payment method in Shopify")]),e._v(" "),t("ol",[t("li",[e._v("Back to Shopify, on the home page, click on "),t("code",[e._v("Settings")]),e._v(" >> "),t("code",[e._v("Payments")]),e._v(' in the left sidebar, scroll down to "Manual payment methods", click on '),t("code",[e._v("(+) Manual payment method")]),e._v(" and select "),t("code",[e._v("Create custom payment method")]),e._v(" on the dropdown.\n"),t("img",{attrs:{src:o(616),alt:"Create payment method step 1",title:"Create payment method step 1"}})]),e._v(" "),t("li",[e._v("In "),t("code",[e._v("Custom payment method name")]),e._v(" fill in "),t("code",[e._v("Bitcoin with BTCPay Server")]),e._v(' (also see TIP box below), optionally you can fill in other fields, but it\'s not required.\nHowever you would need to inform your customers that payment with Bitcoin comes on the next screen after checkout on the "Thank you" page. Ideally you would inform your customers in the '),t("code",[e._v("Additional details")]),e._v(' field.\nThe payment option can have a delay between 2 - 10 seconds on the "Thank you" page, before it is displayed so this also needs to be communicated with the customers. Suggested text: '),t("code",[e._v('Please note that the Bitcoin payment option will be displayed on the "Thank you" page after a few seconds. If it does not show up after 5-10 seconds please contact our support.')])]),e._v(" "),t("li",[e._v("Hit "),t("code",[e._v("Activate")]),e._v(" and you've set up Shopify and BTCPay Server payment method successfully.\n"),t("img",{attrs:{src:o(617),alt:"Create payment method step 2 and 3",title:"Create payment method step 2 and 3"}})])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v('"Custom Payment method name" '),t("strong",[e._v("must")]),e._v(" contain at least one of the following words (case-insensitive): "),t("code",[e._v("bitcoin")]),e._v(", "),t("code",[e._v("btcpayserver")]),e._v(", "),t("code",[e._v("btcpay server")]),e._v(" or "),t("code",[e._v("btc")]),e._v(" to work.")])]),e._v(" "),t("h2",{attrs:{id:"install-btcpay-server-shopify-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-btcpay-server-shopify-plugin"}},[e._v("#")]),e._v(" Install BTCPay Server Shopify plugin")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v('This plugin is currently in pre-release mode. To view, you can enable "Show plugins in pre-release" in your server settings.')])]),e._v(" "),t("ol",[t("li",[e._v("In your BTCPay Server, go to your plugins, find and install Shopify plugin. Once done, on the left sidebar click on "),t("code",[e._v("Shopify")])]),e._v(" "),t("li",[e._v("In the first field, "),t("code",[e._v("Shopify Store URL")]),e._v(" enter the subdomain of your Shopify store e.g. SOME_ID.myshopify.com then enter SOME_ID")]),e._v(" "),t("li",[e._v("In the second field, "),t("code",[e._v("API key")]),e._v(" paste the "),t("code",[e._v("API key")]),e._v(" from Shopify - see steps above.")]),e._v(" "),t("li",[e._v("Do the same for the third field, paste the "),t("code",[e._v("API Secret")]),e._v(" from Shopify and paste in the "),t("code",[e._v("API Secret")]),e._v(" field.")]),e._v(" "),t("li",[e._v("In the last field, "),t("code",[e._v("Admin API access token")]),e._v(" paste the "),t("code",[e._v("Admin API access token")])]),e._v(" "),t("li",[e._v("You can decide to edit the payment method description text. This basically defines the text that the user sees when the invoice loads on shopify.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Save")]),e._v(" on BTCPay Shopify settings page"),t("br"),e._v(" "),t("img",{attrs:{src:o(618),alt:"BTCPay Server step 1-7",title:"BTCPay Server step 1-7"}})]),e._v(" "),t("li",[e._v("BTCPay then validates the credentials, and once validated, creates an create order webhook, and finally saves the credentials."),t("br"),e._v(" "),t("img",{attrs:{src:o(619),alt:"BTCPay Server step 1-7",title:"BTCPay Server step 1-7"}})])]),e._v(" "),t("h2",{attrs:{id:"install-btcpay-shopify-application-on-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-btcpay-shopify-application-on-shopify"}},[e._v("#")]),e._v(" Install BTCPay-Shopify application on Shopify")]),e._v(" "),t("p",[e._v("The second piece of this installation guide is setting up the BTCPay-Shopify app. You can choose to self-host your own BTCPay-Shopify app\nor use the app we submitted to the Shopify App Store.")]),e._v(" "),t("h3",{attrs:{id:"using-btcpay-shopify-from-shopify-app-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-btcpay-shopify-from-shopify-app-store"}},[e._v("#")]),e._v(" Using BTCPay-Shopify from Shopify App Store")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("As of now, the BTCPay-Shopify app is not yet available on the Shopify App Store. We are working on getting it published.")])]),e._v(" "),t("ol",[t("li",[e._v("Now we need to install the BTCPay-Shopify app. Visit the "),t("a",{attrs:{href:"https://apps.shopify.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Shopify app store"),t("OutboundLink")],1),e._v(' search for "BTCPay" and install the BTCPay-Shopify app.'),t("br"),e._v(" "),t("a",{attrs:{href:"./img/Shopify/app-setup_step-1.png"}},[e._v("App Setup: Step 1")])]),e._v(" "),t("li",[e._v("Once installed, you can go to your dashboard, click on "),t("code",[e._v("Apps >")]),e._v(" in the left sidebar, then you would see the list of installed apps, including the just installed BTCPay-Shopify app.")]),e._v(" "),t("li",[e._v("Select the BTCPay-Shopify app, and in settings, input your "),t("code",[e._v("BTCPay Server URL")]),e._v(" (e.g https://btcpay.example.com) and the "),t("code",[e._v("storeId")]),e._v(" to which your Shopify plugin is connected on your BTCPay Server instance."),t("br"),e._v(" "),t("img",{attrs:{src:o(620),alt:"App Setup: Step 2 + 3",title:"App Setup: Step 2 + 3"}})]),e._v(" "),t("li",[e._v("In your shopify dashboard, click on "),t("code",[e._v("Settings")]),e._v(", which is located on the bottom of the left nav panel, select "),t("code",[e._v("Checkout")]),e._v(" and then "),t("code",[e._v("Customize")]),e._v("."),t("br"),e._v(" "),t("img",{attrs:{src:o(621),alt:"App Setup: Step 4.1",title:"App Setup: Step 4.1"}}),t("br"),e._v(" "),t("img",{attrs:{src:o(622),alt:"App Setup: Step 4.2",title:"App Setup: Step 4.2"}})]),e._v(" "),t("li",[e._v('In the editor change the selected page to the "Thank you" page.'),t("br"),e._v(" "),t("img",{attrs:{src:o(623),alt:"App Setup: Step 5.1",title:"App Setup: Step 5.1"}}),t("br"),e._v(" "),t("img",{attrs:{src:o(624),alt:"App Setup: Step 5.2",title:"App Setup: Step 5.2"}})]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Apps")]),e._v(" icon on the left panel\n"),t("img",{attrs:{src:o(625),alt:"App Setup: Step 6",title:"App Setup: Step 6"}})]),e._v(" "),t("li",[e._v('Click on the (+) sign on the listed "BTCPay Checkout" app and then on the "Thank you" page listed.'),t("br"),e._v(" "),t("img",{attrs:{src:o(626),alt:"App Setup: Step 7",title:"App Setup: Step 7"}})]),e._v(" "),t("li",[e._v('You will now see the extension got added to your "Thank you" page. Click '),t("code",[e._v("save")]),e._v(" in the top right corner."),t("br"),e._v(" "),t("img",{attrs:{src:o(627),alt:"App Setup: Step 8",title:"App Setup: Step 8"}})]),e._v(" "),t("li",[e._v("To double check all is working, click on the left arrow "),t("code",[e._v("<")]),e._v(' next to "BTCPay Checkout" and verify it is listed in the "Order details section".'),t("br"),e._v(" "),t("img",{attrs:{src:o(628),alt:"App Setup: Step 9.1",title:"App Setup: Step 9.1"}}),t("br"),e._v(" "),t("img",{attrs:{src:o(629),alt:"App Setup: Step 9.2",title:"App Setup: Step 9.2"}})])]),e._v(" "),t("p",[e._v("Congrats! You have successfully installed the BTCPay-Shopify app and set up the payment method on your Shopify store. You are ready to go. See also the "),t("a",{attrs:{href:"#demo-checkout-flow-after-everything-is-set-up"}},[e._v("demo checkout flow below")]),e._v(" to make sure everything works.")]),e._v(" "),t("h3",{attrs:{id:"self-hosting-the-btcpay-shopify-app"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#self-hosting-the-btcpay-shopify-app"}},[e._v("#")]),e._v(" Self-hosting the BTCPay-shopify app")]),e._v(" "),t("p",[e._v("If you are a developer or would love to have total control, you would need to create and deploy your own application.")]),e._v(" "),t("h4",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements:")]),e._v(" "),t("ol",[t("li",[e._v("A Linux VPS instance to deploy your shopify app to")]),e._v(" "),t("li",[e._v("The VPS should have "),t("a",{attrs:{href:"https://docs.docker.com/engine/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Docker Engine installed"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v('A domain/subdomain with an DNS A-record to the IP of your VPS instance, in our example below we use the placeholder "YOUR_HOSTED_APP_URL.COM", e.g. btcpaypp.example.com')]),e._v(" "),t("li",[e._v("Shopify plugin installed in your BTCPay Server instance")]),e._v(" "),t("li",[e._v("A "),t("a",{attrs:{href:"https://www.shopify.com/partners",target:"_blank",rel:"noopener noreferrer"}},[e._v("shopify partner account"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"installation-instructions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation-instructions"}},[e._v("#")]),e._v(" Installation instructions:")]),e._v(" "),t("h5",{attrs:{id:"create-a-shopify-app-on-partner-account"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-a-shopify-app-on-partner-account"}},[e._v("#")]),e._v(" Create a Shopify app on partner account")]),e._v(" "),t("ol",[t("li",[e._v("On Shopify Partner "),t("a",{attrs:{href:"https://partners.shopify.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("dashboard"),t("OutboundLink")],1),e._v(", click on "),t("code",[e._v("Apps")]),e._v(" > "),t("code",[e._v("All Apps")]),e._v(" > "),t("code",[e._v("Create App")]),e._v(" > "),t("code",[e._v("Create app manually")]),e._v(". Enter the name you want to call the app (e.g. BTCPay Server APPNAME) and click "),t("code",[e._v("Create")]),e._v(".")]),e._v(" "),t("li",[e._v('Once created displays your "Client ID" and "Client secret", which we need in a minute.')]),e._v(" "),t("li",[e._v("On the left sidebar click on "),t("code",[e._v("Configuration")])]),e._v(" "),t("li",[e._v("In the "),t("code",[e._v("App URL")]),e._v(" field, enter the URL of your hosted app, e.g. "),t("code",[e._v("https://YOUR_HOSTED_APP_URL.COM")])]),e._v(" "),t("li",[e._v("In the "),t("code",[e._v("Allowed redirection URL(s)")]),e._v(" field, enter:")])]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("https://YOUR_HOSTED_APP_URL.COM/auth/callback\nhttps://YOUR_HOSTED_APP_URL.COM/auth/shopify/callback\nhttps://YOUR_HOSTED_APP_URL.COM/api/auth/callback\n")])])]),t("ol",{attrs:{start:"6"}},[t("li",[e._v('In the fields in the "Compliance webhooks" section, enter the following:\n'),t("code",[e._v("Customer data request endpoint")]),e._v(" => https://YOUR_HOSTED_APP_URL.COM/webhooks/customers/data_request\n"),t("code",[e._v("Customer data erasure endpoint")]),e._v(" => https://YOUR_HOSTED_APP_URL.COM/webhooks/customers/redact\n"),t("code",[e._v("Shop data erasure endpoint")]),e._v(" => https://YOUR_HOSTED_APP_URL.COM/webhooks/shop/redact\n"),t("a",{attrs:{href:"./img/Shopify/partner-app_configuration.png"}},[e._v("Shopify-App: configuration.png")])]),e._v(" "),t("li",[e._v("Click on "),t("code",[e._v("Save")]),e._v(" to save the changes")]),e._v(" "),t("li",[e._v("On the left sidebar click on "),t("code",[e._v("API Access")])]),e._v(" "),t("li",[e._v('Scroll down to "Allow network access in checkout and account UI extensions" and click on '),t("code",[e._v("Request access")]),e._v(" "),t("img",{attrs:{src:o(630),alt:"Shopify-App: Allow network access",title:"Shopify-App: Allow network access"}})])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("When you get an error \"Could not grant checkout ui extension scope 'read_checkout_external_data' when you try to enable network access, then go to your partner profile and fill out the first and last name and it will work.")])]),e._v(" "),t("h5",{attrs:{id:"deploy-the-btcpay-shopify-app"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#deploy-the-btcpay-shopify-app"}},[e._v("#")]),e._v(" Deploy the BTCPay-Shopify app")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Next on your VPS switch to root user and clone or download "),t("a",{attrs:{href:"https://github.com/btcpayserver/shopify-app",target:"_blank",rel:"noopener noreferrer"}},[e._v("this repository"),t("OutboundLink")],1),e._v(" and go into that directory")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/shopify-app.git shopify-app \n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" shopify-app\n")])])])]),e._v(" "),t("li",[t("p",[e._v("Copy "),t("code",[e._v(".env.example")]),e._v(" to "),t("code",[e._v(".env")]),e._v(" file, it contains the following environment variables:")])])]),e._v(" "),t("ul",[t("li",[e._v("DATABASE_URL => Your database connection string, keep it as is if you are using the default sqlite database")]),e._v(" "),t("li",[e._v('SHOPIFY_API_KEY => Represents the "Client ID" associated with the shopify app created (step 2 above)')]),e._v(" "),t("li",[e._v('SHOPIFY_API_SECRET => Represents the "Client Secret" associated with the shopify app (step 2 above)')]),e._v(" "),t("li",[e._v("SHOPIFY_APP_URL => Internal URL to reach your app, e.g. "),t("code",[e._v("http://localhost:3000")])]),e._v(" "),t("li",[e._v("DOMAIN => Your app domain, e.g. YOUR_HOSTED_APP_URL.COM")]),e._v(" "),t("li",[e._v("LETSENCRYPT_EMAIL => Your email address for Let's Encrypt")])]),e._v(" "),t("div",{staticClass:"language-dotenv extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("DATABASE_URL=file:/app/data/database.sqlite\nSHOPIFY_APP_URL=http://localhost:3000\nSHOPIFY_API_KEY=your_client_id\nSHOPIFY_API_SECRET=your_client_secret\nDOMAIN=YOUR_HOSTED_APP_URL.COM\nLETSENCRYPT_EMAIL=johndoe@example.com\n")])])]),t("p",[e._v("Replace the values of "),t("code",[e._v("SHOPIFY_API_KEY")]),e._v(", "),t("code",[e._v("SHOPIFY_API_SECRET")]),e._v(", DOMAIN and "),t("code",[e._v("LETSENCRYPT_EMAIL")]),e._v(" with your values. Don't change the value of "),t("code",[e._v("DATABASE_URL")]),e._v(" and "),t("code",[e._v("SHOPIFY_APP_URL")]),e._v(".")]),e._v(" "),t("ol",{attrs:{start:"3"}},[t("li",[t("p",[e._v("Next, rename "),t("code",[e._v("shopify.app.toml.example")]),e._v(" to "),t("code",[e._v("shopify.app.toml")]),e._v(" and change the following values:\nChange the value of "),t("code",[e._v("client_id")]),e._v(" to your apps Client ID. (Same value as SHOPIFY_API_KEY)\nChange "),t("code",[e._v("name")]),e._v(" to the name of your app (created in step 1. above) e.g. "),t("code",[e._v('name = "BTCPay Server APPNAME"')]),e._v("\nChange "),t("code",[e._v("handle")]),e._v(" to the handle of your app (created in step 1. above, you can see it in e.g. "),t("code",[e._v('handle = "btcpay-server-appname"')]),e._v("\nChange "),t("code",[e._v("application_url")]),e._v(" to your deployed URL. E.g. "),t("code",[e._v('application_url = "https://YOUR_HOSTED_APP_URL.COM"')]),e._v("\nChange the value of "),t("code",[e._v("dev_store_url")]),e._v(" to your shopify store url. E.g. "),t("code",[e._v('dev_store_url = "https://yourdevstore.myshopify.com"')]),e._v("\nIn the "),t("code",[e._v("redirect_urls")]),e._v(" array, replace YOUR_HOSTED_APP_URL.COM with your deployed URL and keep the paths. E.g. "),t("code",[e._v("https://YOUR_HOSTED_APP_URL.COM/auth/callback")])])]),e._v(" "),t("li",[t("p",[e._v("Next we need to edit the file located in "),t("code",[e._v("extensions/btcpaycheckout/src/Checkout.jsx")]),e._v(" and replace the value of the constant "),t("code",[e._v("shopifyApplicaitonUrl")]),e._v(" which is "),t("code",[e._v("https://YOUR_HOSTED_APP_URL.COM")]),e._v(" with your deployed URL.")])]),e._v(" "),t("li",[t("p",[e._v("Now you can run "),t("code",[e._v("docker compose up -d")]),e._v(" and it will spin up a nodeJS, Nginx and Let's encrypt container making sure the app is reachable over SSL. It will also install all the dependencies needed for the app to run.")])]),e._v(" "),t("li",[t("p",[e._v("Once done you need to go into the container and deploy a release. "),t("code",[e._v("docker exec -it shopify-app sh")])])]),e._v(" "),t("li",[t("p",[e._v("Now run "),t("code",[e._v("npm run deploy")]),e._v(". It will ask you to hit a key and it will show an authentication URL.\n"),t("img",{attrs:{src:o(631),alt:"App deploy: deploy and auth page",title:"App deploy: deploy and auth page"}})])]),e._v(" "),t("li",[t("p",[e._v("Copy the URL into the browser and login to your partner account.\n"),t("img",{attrs:{src:o(632),alt:"App deploy: login to partner account",title:"App deploy: login to partner account"}})])]),e._v(" "),t("li",[t("p",[e._v("Confirm and login.\n"),t("img",{attrs:{src:o(633),alt:"App deploy: Confirm CLI login",title:"App deploy: Confirm CLI login"}})])]),e._v(" "),t("li",[t("p",[e._v("You should see a success message in the browser and the terminal should continue.\n"),t("img",{attrs:{src:o(634),alt:"App deploy: Login successful",title:"App deploy: Login successful"}})])]),e._v(" "),t("li",[t("p",[e._v("On terminal it will ask you if you want to release a new version, hit 'enter' to confirm. It will deploy and show you a success message.\n"),t("img",{attrs:{src:o(635),alt:"App deploy: Deployment successful",title:"App deploy: Deployment successful"}})])]),e._v(" "),t("li",[t("p",[e._v("Once deployed let's double-check a few things.\nGo back to your shopify partner app dashboard and on left sidebar click on "),t("code",[e._v("Versions")]),e._v(", you should see a new version with the same timestamp as to when you deployed.\nIn your browser visit https://YOUR_HOSTED_APP_URL.COM and you should see a screen similar to this:\n"),t("img",{attrs:{src:o(636),alt:"App deployment: Check app deployed in browser",title:"App deployment: Check app deployed in browser"}})])])]),e._v(" "),t("p",[e._v("Congrats! You have successfully deployed the BTCPay-Shopify app, only a few steps left.")]),e._v(" "),t("ol",{attrs:{start:"13"}},[t("li",[e._v("Now it is time to deploy your application to the Shopify store that you are linking to BTCPay server. On your partner account app overview, click on "),t("code",[e._v("Choose distribution")]),e._v(" and select "),t("code",[e._v("Custom distribution")]),e._v(". Confirm the selection.")])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("Please note that selecting custom distribution would mean that you can only use the application on only one Shopify store. This is irreversible. You can deploy multiple apps though if you have more than one store.")])]),e._v(" "),t("p",[t("img",{attrs:{src:o(637),alt:"App deploy: select custom distribution",title:"App deploy: select custom distribution"}}),e._v(" "),t("img",{attrs:{src:o(638),alt:"App deploy: confirm custom distribution",title:"App deploy: confirm custom distribution"}})]),e._v(" "),t("ol",{attrs:{start:"14"}},[t("li",[e._v("On the next screen enter the Shopify store URL that you want to link the application to. This is typically the internal store url you see on configuring the store, e.g. something-random.myshopify.com.\n"),t("img",{attrs:{src:o(639),alt:"App deploy: enter your store url",title:"App deploy: enter your store url"}})]),e._v(" "),t("li",[e._v("Click on "),t("code",[e._v("Generate link")]),e._v(" and you will see a link generated.\n"),t("img",{attrs:{src:o(640),alt:"App deploy: link generated",title:"App deploy: link generated"}})]),e._v(" "),t("li",[e._v("Open the link generated on a new tab. Select the store to install the app on (ensure it matches with the store you just set in the URL field).\n"),t("img",{attrs:{src:o(641),alt:"app-deploy_distribution-choose-store.png",title:"app-deploy_distribution-choose-store.png"}})]),e._v(" "),t("li",[e._v("You will see your app listed and you can now install it by clicking on "),t("code",[e._v("Install")]),e._v(".\n"),t("img",{attrs:{src:o(642),alt:"app-deploy_distribution-install-to-store-confirm.png",title:"app-deploy_distribution-install-to-store-confirm.png"}})]),e._v(" "),t("li",[e._v("Once installed, you will see the app settings page.\n"),t("img",{attrs:{src:o(643),alt:"app-deploy_distribution-install-complete-config-app.png",title:"app-deploy_distribution-install-complete-config-app.png"}})])]),e._v(" "),t("p",[e._v("Go back to "),t("a",{attrs:{href:"#using-btcpay-shopify-from-shopify-app-store"}},[e._v("Using BTCPay-Shopify from Shopify App Store")]),e._v(" section above and continue from step 3.")]),e._v(" "),t("h2",{attrs:{id:"demo-checkout-flow-after-everything-is-set-up"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#demo-checkout-flow-after-everything-is-set-up"}},[e._v("#")]),e._v(" Demo Checkout flow after everything is set up")]),e._v(" "),t("figure",[t("img",{attrs:{src:o(340),alt:"BTCPay Server shopify step 30",title:"BTCPay Server shopify step 30"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(644),alt:"BTCPay Server shopify step 31",title:"BTCPay Server shopify step 31"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(340),alt:"BTCPay Server shopify step 32",title:"BTCPay Server shopify step 32"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(645),alt:"BTCPay Server shopify step 33",title:"BTCPay Server shopify step 33"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(646),alt:"BTCPay Server shopify step 34",title:"BTCPay Server shopify step 34"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(647),alt:"BTCPay Server shopify step 35",title:"BTCPay Server shopify step 35"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(648),alt:"BTCPay Server shopify step 36",title:"BTCPay Server shopify step 36"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(649),alt:"BTCPay Server shopify step 37",title:"BTCPay Server shopify step 37"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(650),alt:"BTCPay Server shopify step 38",title:"BTCPay Server shopify step 38"}})]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/12.c803a429.js b/assets/js/12.c803a429.js deleted file mode 100644 index eb76278996..0000000000 --- a/assets/js/12.c803a429.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{340:function(e,t,o){e.exports=o.p+"assets/img/complete_payment.ff220853.png"},605:function(e,t,o){e.exports=o.p+"assets/img/step_1.9472dd10.png"},606:function(e,t,o){e.exports=o.p+"assets/img/step_2.09916e50.png"},607:function(e,t,o){e.exports=o.p+"assets/img/step_3.bee69e6c.png"},608:function(e,t,o){e.exports=o.p+"assets/img/step_4.5a0db702.png"},609:function(e,t,o){e.exports=o.p+"assets/img/step_5.8b8524c9.png"},610:function(e,t,o){e.exports=o.p+"assets/img/step_6.69d3a0cd.png"},611:function(e,t,o){e.exports=o.p+"assets/img/step_7.78e87aed.png"},612:function(e,t,o){e.exports=o.p+"assets/img/step_8.e0aa468d.png"},613:function(e,t,o){e.exports=o.p+"assets/img/step_9-1.05f3f7c8.png"},614:function(e,t,o){e.exports=o.p+"assets/img/step_9-2.e3e5012d.png"},615:function(e,t,o){e.exports=o.p+"assets/img/step_10_and_11.144512a3.png"},616:function(e,t,o){e.exports=o.p+"assets/img/pm_step_1.1bea1f2a.png"},617:function(e,t,o){e.exports=o.p+"assets/img/pm_step_2_and_3.9bf6b09b.png"},618:function(e,t,o){e.exports=o.p+"assets/img/btcpay_step_1-7.9831ecbf.png"},619:function(e,t,o){e.exports=o.p+"assets/img/btcpay_step_8.f92d2d58.png"},620:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-2-settings.0146aead.png"},621:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-4-1.735b3d9f.png"},622:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-4-2.0b871a76.png"},623:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-5-1.a71cf731.png"},624:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-5-2.9550a3c5.png"},625:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-6.1bcb2593.png"},626:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-7.0cca2330.png"},627:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-8.110012d5.png"},628:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-9-1.98153ef7.png"},629:function(e,t,o){e.exports=o.p+"assets/img/app-setup_step-9-2.2cd78663.png"},630:function(e,t,o){e.exports=o.p+"assets/img/partner-app_allow-network-access.6c68e580.png"},631:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_loginto-container-auth-start.cfcc6814.png"},632:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_partner_login_email.be60b3c8.png"},633:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_login-confirmation.7297c62f.png"},634:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_login_success.7e98caa2.png"},635:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_deployment_done.491d277a.png"},636:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_deployment_url_browser.38d86e69.png"},637:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_custom-distribution-1.00bcb7ef.png"},638:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-confirm.ba7101d7.png"},639:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-generate-link.cdbb0a8a.png"},640:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-generated-link-copy.138a4008.png"},641:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-choose-store.7f2e8f0a.png"},642:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-install-to-store-confirm.87685dd6.png"},643:function(e,t,o){e.exports=o.p+"assets/img/app-deploy_distribution-install-complete-config-app.959b95fe.png"},644:function(e,t,o){e.exports=o.p+"assets/img/payment_option.08c972fd.png"},645:function(e,t,o){e.exports=o.p+"assets/img/pay_with_btcpay_modal.1899a6bb.png"},646:function(e,t,o){e.exports=o.p+"assets/img/pay_with_btcpay_modal_invoice.67c073fe.png"},647:function(e,t,o){e.exports=o.p+"assets/img/payment_invoice.3fd764b0.png"},648:function(e,t,o){e.exports=o.p+"assets/img/paid_invoice.084d2a4e.png"},649:function(e,t,o){e.exports=o.p+"assets/img/paid_invoice_btcpay.676f5a70.png"},650:function(e,t,o){e.exports=o.p+"assets/img/invoice_payment_details.e65e8d6b.png"},929:function(e,t,o){"use strict";o.r(t);var a=o(17),s=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"accept-bitcoin-in-shopify-with-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#accept-bitcoin-in-shopify-with-btcpay-server"}},[e._v("#")]),e._v(" Accept Bitcoin in Shopify with BTCPay Server")]),e._v(" "),t("p",[e._v("Introducing BTCPay Server for Shopify open-source payment gateway that enables you accept bitcoin payments directly on your website or stores from customers with no fee.")]),e._v(" "),t("p",[e._v("Our integration with Shopify allows you connect your self-hosted BTCPay Server with your "),t("a",{attrs:{href:"https://www.shopify.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Shopify store"),t("OutboundLink")],1),e._v(", enabling you accept Bitcoin payments swiftly and securely.")]),e._v(" "),t("h2",{attrs:{id:"what-btcpay-offers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-btcpay-offers"}},[e._v("#")]),e._v(" What BTCPay offers:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Zero fees")]),e._v(": Enjoy a payment gateway with no fees. Yes, You saw that right. Zero fees!")]),e._v(" "),t("li",[t("strong",[e._v("Direct payment, No middlemen or KYC")]),e._v(": Say goodbye to intermediaries and tedious paperwork, and get your money directly in your wallet")]),e._v(" "),t("li",[t("strong",[e._v("Fully automated system")]),e._v(": BTCPay takes care of payments, invoice management and refunds automatically.")]),e._v(" "),t("li",[t("strong",[e._v("Display Bitcoin QR code at checkout")]),e._v(": Enhance customer experience with an easy and secure payment option.")]),e._v(" "),t("li",[t("strong",[e._v("Self-hosted infrastructure")]),e._v(": Maintain full control over your payment gateway.")]),e._v(" "),t("li",[t("strong",[e._v("Lightning Network integrated")]),e._v(": Instant, fast and low cost payments and payouts")]),e._v(" "),t("li",[t("strong",[e._v("Easy CSV exports")])]),e._v(" "),t("li",[t("strong",[e._v("Versatile plugin system")]),e._v(": Extend functionality according to your needs")]),e._v(" "),t("li",[t("strong",[e._v("Point-of-sale integration")]),e._v(" Accept payments in your physical shops")]),e._v(" "),t("li",[t("strong",[e._v("Multilingual ready")]),e._v(": Serve a global audience right out of the box.")]),e._v(" "),t("li",[t("strong",[e._v("Community-driven support")]),e._v(": Get responsive assistance from our dedicated community ("),t("a",{attrs:{href:"http://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(").")])]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites:")]),e._v(" "),t("p",[e._v("Before diving into the setup process, ensure you have the following:")]),e._v(" "),t("ul",[t("li",[e._v("Shopify account")]),e._v(" "),t("li",[e._v("BTCPay Server - "),t("RouterLink",{attrs:{to:"/ShopifyV2/Deployment/"}},[e._v("self-hosted")]),e._v(" or run by a "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("third-party host")]),e._v(" v2.0.0 or later.")],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/ShopifyV2/CreateStore/"}},[e._v("Created BTCPay Server store")]),e._v(" with "),t("RouterLink",{attrs:{to:"/ShopifyV2/WalletSetup/"}},[e._v("wallet set up")])],1)]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/jJjAyvgWVfk/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=jJjAyvgWVfk",title:"BTCPay Server - Shopify Video","data-id":"jJjAyvgWVfk"}},[t("iframe",{attrs:{title:"BTCPay Server - Shopify Video","data-src":"https://www.youtube-nocookie.com/embed/jJjAyvgWVfk?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("Shopify might give false flags on deprecated API calls. The most likely answer we could find, due to a change by Shopify to specific fields of the "),t("code",[e._v("Order")]),e._v(" resource and is assumed to get used in BTCPay Server. Find more details "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/4510",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"setting-up-btcpay-server-with-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-btcpay-server-with-shopify"}},[e._v("#")]),e._v(" Setting up BTCPay Server with Shopify")]),e._v(" "),t("h3",{attrs:{id:"create-an-app-and-get-api-credentials-from-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-an-app-and-get-api-credentials-from-shopify"}},[e._v("#")]),e._v(" Create an app and get API credentials from Shopify")]),e._v(" "),t("ol",[t("li",[e._v("In Shopify, click on "),t("code",[e._v("Apps >")]),e._v(" in the left sidebar"),t("br"),e._v(" "),t("img",{attrs:{src:o(605),alt:"BTCPay Server shopify step 1",title:"BTCPay Server shopify step 1"}})]),e._v(" "),t("li",[e._v("On the modal popped up, click on "),t("code",[e._v("App and sales channel settings")]),t("br"),e._v(" "),t("img",{attrs:{src:o(606),alt:"BTCPay Server shopify step 2",title:"BTCPay Server shopify step 2"}})]),e._v(" "),t("li",[e._v("From the page displayed, click on "),t("code",[e._v("Develop apps")]),e._v(" button"),t("br"),e._v(" "),t("img",{attrs:{src:o(607),alt:"BTCPay Server shopify step 3",title:"BTCPay Server shopify step 3"}})]),e._v(" "),t("li",[e._v("If prompted, click on "),t("code",[e._v("Allow custom app development")]),t("br"),e._v(" "),t("img",{attrs:{src:o(608),alt:"BTCPay Server shopify step 4",title:"BTCPay Server shopify step 4"}})]),e._v(" "),t("li",[t("code",[e._v("Create an app")]),e._v(" and name it, e.g. BTCPay Server, click on "),t("code",[e._v("Create App")]),t("br"),e._v(" "),t("img",{attrs:{src:o(609),alt:"BTCPay Server shopify step 5",title:"BTCPay Server shopify step 5"}}),e._v(" "),t("img",{attrs:{src:o(610),alt:"BTCPay Server shopify step 6",title:"BTCPay Server shopify step 6"}})]),e._v(" "),t("li",[e._v("On the app page, in "),t("code",[e._v("Overview")]),e._v(" tab, click on the "),t("code",[e._v("Configure Admin API scopes")]),t("br"),e._v(" "),t("img",{attrs:{src:o(611),alt:"BTCPay Server shopify step 7",title:"BTCPay Server shopify step 7"}})]),e._v(" "),t("li",[e._v("In the filter admin access scopes type in "),t("code",[e._v("Orders")])]),e._v(" "),t("li",[e._v("In "),t("code",[e._v("Orders")]),e._v(" enable "),t("code",[e._v("read_orders")]),e._v(" and "),t("code",[e._v("write_orders")]),e._v(" and then click "),t("code",[e._v("Save")]),t("br"),e._v(" "),t("img",{attrs:{src:o(612),alt:"BTCPay Server shopify step 8",title:"BTCPay Server shopify step 8"}})]),e._v(" "),t("li",[e._v('Click on the "API credentials" tab, and then click on the '),t("code",[e._v("Install App")]),e._v(" in the top right corner and when pop-up window appears click "),t("code",[e._v("Install")]),t("br"),e._v(" "),t("img",{attrs:{src:o(613),alt:"BTCPay Server shopify step 9-1",title:"BTCPay Server shopify step 9-1"}}),t("br"),e._v(" "),t("img",{attrs:{src:o(614),alt:"BTCPay Server shopify step 9-2",title:"BTCPay Server shopify step 9-2"}})]),e._v(" "),t("li",[e._v("Reveal "),t("code",[e._v("Admin API access token")]),e._v(" and "),t("code",[e._v("copy")]),e._v(" it (and note it down somewhere safe)")]),e._v(" "),t("li",[e._v("Also copy the "),t("code",[e._v("API key")]),e._v(" and "),t("code",[e._v("API Secret")]),e._v(" and note it down somewhere safe"),t("br"),e._v(" "),t("img",{attrs:{src:o(615),alt:"BTCPay Server shopify step 10 and 11",title:"BTCPay Server shopify step 10 and 11"}})]),e._v(" "),t("li",[e._v("Shopify app setup is now complete")])]),e._v(" "),t("h3",{attrs:{id:"set-up-a-custom-payment-method-in-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#set-up-a-custom-payment-method-in-shopify"}},[e._v("#")]),e._v(" Set up a custom payment method in Shopify")]),e._v(" "),t("ol",[t("li",[e._v("Back to Shopify, on the home page, click on "),t("code",[e._v("Settings")]),e._v(" >> "),t("code",[e._v("Payments")]),e._v(' in the left sidebar, scroll down to "Manual payment methods", click on '),t("code",[e._v("(+) Manual payment method")]),e._v(" and select "),t("code",[e._v("Create custom payment method")]),e._v(" on the dropdown.\n"),t("img",{attrs:{src:o(616),alt:"Create payment method step 1",title:"Create payment method step 1"}})]),e._v(" "),t("li",[e._v("In "),t("code",[e._v("Custom payment method name")]),e._v(" fill in "),t("code",[e._v("Bitcoin with BTCPay Server")]),e._v(' (also see TIP box below), optionally you can fill in other fields, but it\'s not required.\nHowever you would need to inform your customers that payment with Bitcoin comes on the next screen after checkout on the "Thank you" page. Ideally you would inform your customers in the '),t("code",[e._v("Additional details")]),e._v(' field.\nThe payment option can have a delay between 2 - 10 seconds on the "Thank you" page, before it is displayed so this also needs to be communicated with the customers. Suggested text: '),t("code",[e._v('Please note that the Bitcoin payment option will be displayed on the "Thank you" page after a few seconds. If it does not show up after 5-10 seconds please contact our support.')])]),e._v(" "),t("li",[e._v("Hit "),t("code",[e._v("Activate")]),e._v(" and you've set up Shopify and BTCPay Server payment method successfully.\n"),t("img",{attrs:{src:o(617),alt:"Create payment method step 2 and 3",title:"Create payment method step 2 and 3"}})])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v('"Custom Payment method name" '),t("strong",[e._v("must")]),e._v(" contain at least one of the following words (case-insensitive): "),t("code",[e._v("bitcoin")]),e._v(", "),t("code",[e._v("btcpayserver")]),e._v(", "),t("code",[e._v("btcpay server")]),e._v(" or "),t("code",[e._v("btc")]),e._v(" to work.")])]),e._v(" "),t("h2",{attrs:{id:"install-btcpay-server-shopify-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-btcpay-server-shopify-plugin"}},[e._v("#")]),e._v(" Install BTCPay Server Shopify plugin")]),e._v(" "),t("ol",[t("li",[e._v("In your BTCPay Server, go to your plugins, find and install Shopify plugin. Once done, on the left sidebar click on "),t("code",[e._v("Shopify")])]),e._v(" "),t("li",[e._v("In the first field, "),t("code",[e._v("Shopify Store URL")]),e._v(" enter the subdomain of your Shopify store e.g. SOME_ID.myshopify.com then enter SOME_ID")]),e._v(" "),t("li",[e._v("In the second field, "),t("code",[e._v("API key")]),e._v(" paste the "),t("code",[e._v("API key")]),e._v(" from Shopify - see steps above.")]),e._v(" "),t("li",[e._v("Do the same for the third field, paste the "),t("code",[e._v("API Secret")]),e._v(" from Shopify and paste in the "),t("code",[e._v("API Secret")]),e._v(" field.")]),e._v(" "),t("li",[e._v("In the last field, "),t("code",[e._v("Admin API access token")]),e._v(" paste the "),t("code",[e._v("Admin API access token")])]),e._v(" "),t("li",[e._v("You can decide to edit the payment method description text. This basically defines the text that the user sees when the invoice loads on shopify.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Save")]),e._v(" on BTCPay Shopify settings page"),t("br"),e._v(" "),t("img",{attrs:{src:o(618),alt:"BTCPay Server step 1-7",title:"BTCPay Server step 1-7"}})]),e._v(" "),t("li",[e._v("BTCPay then validates the credentials, and once validated, creates an create order webhook, and finally saves the credentials."),t("br"),e._v(" "),t("img",{attrs:{src:o(619),alt:"BTCPay Server step 1-7",title:"BTCPay Server step 1-7"}})])]),e._v(" "),t("h2",{attrs:{id:"install-btcpay-shopify-application-on-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-btcpay-shopify-application-on-shopify"}},[e._v("#")]),e._v(" Install BTCPay-Shopify application on Shopify")]),e._v(" "),t("p",[e._v("The second piece of this installation guide is setting up the BTCPay-Shopify app. You can choose to self-host your own BTCPay-Shopify app\nor use the app we submitted to the Shopify App Store.")]),e._v(" "),t("h3",{attrs:{id:"using-btcpay-shopify-from-shopify-app-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-btcpay-shopify-from-shopify-app-store"}},[e._v("#")]),e._v(" Using BTCPay-Shopify from Shopify App Store")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("As of now, the BTCPay-Shopify app is not yet available on the Shopify App Store. We are working on getting it published.")])]),e._v(" "),t("ol",[t("li",[e._v("Now we need to install the BTCPay-Shopify app. Visit the "),t("a",{attrs:{href:"https://apps.shopify.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Shopify app store"),t("OutboundLink")],1),e._v(' search for "BTCPay" and install the BTCPay-Shopify app.'),t("br"),e._v(" "),t("a",{attrs:{href:"./img/Shopify/app-setup_step-1.png"}},[e._v("App Setup: Step 1")])]),e._v(" "),t("li",[e._v("Once installed, you can go to your dashboard, click on "),t("code",[e._v("Apps >")]),e._v(" in the left sidebar, then you would see the list of installed apps, including the just installed BTCPay-Shopify app.")]),e._v(" "),t("li",[e._v("Select the BTCPay-Shopify app, and in settings, input your "),t("code",[e._v("BTCPay Server URL")]),e._v(" (e.g https://btcpay.example.com) and the "),t("code",[e._v("storeId")]),e._v(" to which your Shopify plugin is connected on your BTCPay Server instance."),t("br"),e._v(" "),t("img",{attrs:{src:o(620),alt:"App Setup: Step 2 + 3",title:"App Setup: Step 2 + 3"}})]),e._v(" "),t("li",[e._v("In your shopify dashboard, click on "),t("code",[e._v("Settings")]),e._v(", which is located on the bottom of the left nav panel, select "),t("code",[e._v("Checkout")]),e._v(" and then "),t("code",[e._v("Customize")]),e._v("."),t("br"),e._v(" "),t("img",{attrs:{src:o(621),alt:"App Setup: Step 4.1",title:"App Setup: Step 4.1"}}),t("br"),e._v(" "),t("img",{attrs:{src:o(622),alt:"App Setup: Step 4.2",title:"App Setup: Step 4.2"}})]),e._v(" "),t("li",[e._v('In the editor change the selected page to the "Thank you" page.'),t("br"),e._v(" "),t("img",{attrs:{src:o(623),alt:"App Setup: Step 5.1",title:"App Setup: Step 5.1"}}),t("br"),e._v(" "),t("img",{attrs:{src:o(624),alt:"App Setup: Step 5.2",title:"App Setup: Step 5.2"}})]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Apps")]),e._v(" icon on the left panel\n"),t("img",{attrs:{src:o(625),alt:"App Setup: Step 6",title:"App Setup: Step 6"}})]),e._v(" "),t("li",[e._v('Click on the (+) sign on the listed "BTCPay Checkout" app and then on the "Thank you" page listed.'),t("br"),e._v(" "),t("img",{attrs:{src:o(626),alt:"App Setup: Step 7",title:"App Setup: Step 7"}})]),e._v(" "),t("li",[e._v('You will now see the extension got added to your "Thank you" page. Click '),t("code",[e._v("save")]),e._v(" in the top right corner."),t("br"),e._v(" "),t("img",{attrs:{src:o(627),alt:"App Setup: Step 8",title:"App Setup: Step 8"}})]),e._v(" "),t("li",[e._v("To double check all is working, click on the left arrow "),t("code",[e._v("<")]),e._v(' next to "BTCPay Checkout" and verify it is listed in the "Order details section".'),t("br"),e._v(" "),t("img",{attrs:{src:o(628),alt:"App Setup: Step 9.1",title:"App Setup: Step 9.1"}}),t("br"),e._v(" "),t("img",{attrs:{src:o(629),alt:"App Setup: Step 9.2",title:"App Setup: Step 9.2"}})])]),e._v(" "),t("p",[e._v("Congrats! You have successfully installed the BTCPay-Shopify app and set up the payment method on your Shopify store. You are ready to go. See also the "),t("a",{attrs:{href:"#demo-checkout-flow-after-everything-is-set-up"}},[e._v("demo checkout flow below")]),e._v(" to make sure everything works.")]),e._v(" "),t("h3",{attrs:{id:"self-hosting-the-btcpay-shopify-app"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#self-hosting-the-btcpay-shopify-app"}},[e._v("#")]),e._v(" Self-hosting the BTCPay-shopify app")]),e._v(" "),t("p",[e._v("If you are a developer or would love to have total control, you would need to create and deploy your own application.")]),e._v(" "),t("h4",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements:")]),e._v(" "),t("ol",[t("li",[e._v("A Linux VPS instance to deploy your shopify app to")]),e._v(" "),t("li",[e._v("The VPS should have "),t("a",{attrs:{href:"https://docs.docker.com/engine/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Docker Engine installed"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v('A domain/subdomain with an DNS A-record to the IP of your VPS instance, in our example below we use the placeholder "YOUR_HOSTED_APP_URL.COM", e.g. btcpaypp.example.com')]),e._v(" "),t("li",[e._v("Shopify plugin installed in your BTCPay Server instance")]),e._v(" "),t("li",[e._v("A "),t("a",{attrs:{href:"https://www.shopify.com/partners",target:"_blank",rel:"noopener noreferrer"}},[e._v("shopify partner account"),t("OutboundLink")],1)])]),e._v(" "),t("h4",{attrs:{id:"installation-instructions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation-instructions"}},[e._v("#")]),e._v(" Installation instructions:")]),e._v(" "),t("h5",{attrs:{id:"create-a-shopify-app-on-partner-account"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-a-shopify-app-on-partner-account"}},[e._v("#")]),e._v(" Create a Shopify app on partner account")]),e._v(" "),t("ol",[t("li",[e._v("On Shopify Partner "),t("a",{attrs:{href:"https://partners.shopify.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("dashboard"),t("OutboundLink")],1),e._v(", click on "),t("code",[e._v("Apps")]),e._v(" > "),t("code",[e._v("All Apps")]),e._v(" > "),t("code",[e._v("Create App")]),e._v(" > "),t("code",[e._v("Create app manually")]),e._v(". Enter the name you want to call the app (e.g. BTCPay Server APPNAME) and click "),t("code",[e._v("Create")]),e._v(".")]),e._v(" "),t("li",[e._v('Once created displays your "Client ID" and "Client secret", which we need in a minute.')]),e._v(" "),t("li",[e._v("On the left sidebar click on "),t("code",[e._v("Configuration")])]),e._v(" "),t("li",[e._v("In the "),t("code",[e._v("App URL")]),e._v(" field, enter the URL of your hosted app, e.g. "),t("code",[e._v("https://YOUR_HOSTED_APP_URL.COM")])]),e._v(" "),t("li",[e._v("In the "),t("code",[e._v("Allowed redirection URL(s)")]),e._v(" field, enter:")])]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("https://YOUR_HOSTED_APP_URL.COM/auth/callback\nhttps://YOUR_HOSTED_APP_URL.COM/auth/shopify/callback\nhttps://YOUR_HOSTED_APP_URL.COM/api/auth/callback\n")])])]),t("ol",{attrs:{start:"6"}},[t("li",[e._v('In the fields in the "Compliance webhooks" section, enter the following:\n'),t("code",[e._v("Customer data request endpoint")]),e._v(" => https://YOUR_HOSTED_APP_URL.COM/webhooks/customers/data_request\n"),t("code",[e._v("Customer data erasure endpoint")]),e._v(" => https://YOUR_HOSTED_APP_URL.COM/webhooks/customers/redact\n"),t("code",[e._v("Shop data erasure endpoint")]),e._v(" => https://YOUR_HOSTED_APP_URL.COM/webhooks/shop/redact\n"),t("a",{attrs:{href:"./img/Shopify/partner-app_configuration.png"}},[e._v("Shopify-App: configuration.png")])]),e._v(" "),t("li",[e._v("Click on "),t("code",[e._v("Save")]),e._v(" to save the changes")]),e._v(" "),t("li",[e._v("On the left sidebar click on "),t("code",[e._v("API Access")])]),e._v(" "),t("li",[e._v('Scroll down to "Allow network access in checkout and account UI extensions" and click on '),t("code",[e._v("Request access")]),e._v(" "),t("img",{attrs:{src:o(630),alt:"Shopify-App: Allow network access",title:"Shopify-App: Allow network access"}})])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("When you get an error \"Could not grant checkout ui extension scope 'read_checkout_external_data' when you try to enable network access, then go to your partner profile and fill out the first and last name and it will work.")])]),e._v(" "),t("h5",{attrs:{id:"deploy-the-btcpay-shopify-app"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#deploy-the-btcpay-shopify-app"}},[e._v("#")]),e._v(" Deploy the BTCPay-Shopify app")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Next on your VPS switch to root user and clone or download "),t("a",{attrs:{href:"https://github.com/btcpayserver/shopify-app",target:"_blank",rel:"noopener noreferrer"}},[e._v("this repository"),t("OutboundLink")],1),e._v(" and go into that directory")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/shopify-app.git shopify-app \n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" shopify-app\n")])])])]),e._v(" "),t("li",[t("p",[e._v("Copy "),t("code",[e._v(".env.example")]),e._v(" to "),t("code",[e._v(".env")]),e._v(" file, it contains the following environment variables:")])])]),e._v(" "),t("ul",[t("li",[e._v("DATABASE_URL => Your database connection string, keep it as is if you are using the default sqlite database")]),e._v(" "),t("li",[e._v('SHOPIFY_API_KEY => Represents the "Client ID" associated with the shopify app created (step 2 above)')]),e._v(" "),t("li",[e._v('SHOPIFY_API_SECRET => Represents the "Client Secret" associated with the shopify app (step 2 above)')]),e._v(" "),t("li",[e._v("SHOPIFY_APP_URL => Internal URL to reach your app, e.g. "),t("code",[e._v("http://localhost:3000")])]),e._v(" "),t("li",[e._v("DOMAIN => Your app domain, e.g. YOUR_HOSTED_APP_URL.COM")]),e._v(" "),t("li",[e._v("LETSENCRYPT_EMAIL => Your email address for Let's Encrypt")])]),e._v(" "),t("div",{staticClass:"language-dotenv extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("DATABASE_URL=file:/app/data/database.sqlite\nSHOPIFY_APP_URL=http://localhost:3000\nSHOPIFY_API_KEY=your_client_id\nSHOPIFY_API_SECRET=your_client_secret\nDOMAIN=YOUR_HOSTED_APP_URL.COM\nLETSENCRYPT_EMAIL=johndoe@example.com\n")])])]),t("p",[e._v("Replace the values of "),t("code",[e._v("SHOPIFY_API_KEY")]),e._v(", "),t("code",[e._v("SHOPIFY_API_SECRET")]),e._v(", DOMAIN and "),t("code",[e._v("LETSENCRYPT_EMAIL")]),e._v(" with your values. Don't change the value of "),t("code",[e._v("DATABASE_URL")]),e._v(" and "),t("code",[e._v("SHOPIFY_APP_URL")]),e._v(".")]),e._v(" "),t("ol",{attrs:{start:"3"}},[t("li",[t("p",[e._v("Next, rename "),t("code",[e._v("shopify.app.toml.example")]),e._v(" to "),t("code",[e._v("shopify.app.toml")]),e._v(" and change the following values:\nChange the value of "),t("code",[e._v("client_id")]),e._v(" to your apps Client ID. (Same value as SHOPIFY_API_KEY)\nChange "),t("code",[e._v("name")]),e._v(" to the name of your app (created in step 1. above) e.g. "),t("code",[e._v('name = "BTCPay Server APPNAME"')]),e._v("\nChange "),t("code",[e._v("handle")]),e._v(" to the handle of your app (created in step 1. above, you can see it in e.g. "),t("code",[e._v('handle = "btcpay-server-appname"')]),e._v("\nChange "),t("code",[e._v("application_url")]),e._v(" to your deployed URL. E.g. "),t("code",[e._v('application_url = "https://YOUR_HOSTED_APP_URL.COM"')]),e._v("\nChange the value of "),t("code",[e._v("dev_store_url")]),e._v(" to your shopify store url. E.g. "),t("code",[e._v('dev_store_url = "https://yourdevstore.myshopify.com"')]),e._v("\nIn the "),t("code",[e._v("redirect_urls")]),e._v(" array, replace YOUR_HOSTED_APP_URL.COM with your deployed URL and keep the paths. E.g. "),t("code",[e._v("https://YOUR_HOSTED_APP_URL.COM/auth/callback")])])]),e._v(" "),t("li",[t("p",[e._v("Next we need to edit the file located in "),t("code",[e._v("extensions/btcpaycheckout/src/Checkout.jsx")]),e._v(" and replace the value of the constant "),t("code",[e._v("shopifyApplicaitonUrl")]),e._v(" which is "),t("code",[e._v("https://YOUR_HOSTED_APP_URL.COM")]),e._v(" with your deployed URL.")])]),e._v(" "),t("li",[t("p",[e._v("Now you can run "),t("code",[e._v("docker compose up -d")]),e._v(" and it will spin up a nodeJS, Nginx and Let's encrypt container making sure the app is reachable over SSL. It will also install all the dependencies needed for the app to run.")])]),e._v(" "),t("li",[t("p",[e._v("Once done you need to go into the container and deploy a release. "),t("code",[e._v("docker exec -it shopify-app sh")])])]),e._v(" "),t("li",[t("p",[e._v("Now run "),t("code",[e._v("npm run deploy")]),e._v(". It will ask you to hit a key and it will show an authentication URL.\n"),t("img",{attrs:{src:o(631),alt:"App deploy: deploy and auth page",title:"App deploy: deploy and auth page"}})])]),e._v(" "),t("li",[t("p",[e._v("Copy the URL into the browser and login to your partner account.\n"),t("img",{attrs:{src:o(632),alt:"App deploy: login to partner account",title:"App deploy: login to partner account"}})])]),e._v(" "),t("li",[t("p",[e._v("Confirm and login.\n"),t("img",{attrs:{src:o(633),alt:"App deploy: Confirm CLI login",title:"App deploy: Confirm CLI login"}})])]),e._v(" "),t("li",[t("p",[e._v("You should see a success message in the browser and the terminal should continue.\n"),t("img",{attrs:{src:o(634),alt:"App deploy: Login successful",title:"App deploy: Login successful"}})])]),e._v(" "),t("li",[t("p",[e._v("On terminal it will ask you if you want to release a new version, hit 'enter' to confirm. It will deploy and show you a success message.\n"),t("img",{attrs:{src:o(635),alt:"App deploy: Deployment successful",title:"App deploy: Deployment successful"}})])]),e._v(" "),t("li",[t("p",[e._v("Once deployed let's double-check a few things.\nGo back to your shopify partner app dashboard and on left sidebar click on "),t("code",[e._v("Versions")]),e._v(", you should see a new version with the same timestamp as to when you deployed.\nIn your browser visit https://YOUR_HOSTED_APP_URL.COM and you should see a screen similar to this:\n"),t("img",{attrs:{src:o(636),alt:"App deployment: Check app deployed in browser",title:"App deployment: Check app deployed in browser"}})])])]),e._v(" "),t("p",[e._v("Congrats! You have successfully deployed the BTCPay-Shopify app, only a few steps left.")]),e._v(" "),t("ol",{attrs:{start:"13"}},[t("li",[e._v("Now it is time to deploy your application to the Shopify store that you are linking to BTCPay server. On your partner account app overview, click on "),t("code",[e._v("Choose distribution")]),e._v(" and select "),t("code",[e._v("Custom distribution")]),e._v(". Confirm the selection.")])]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("Please note that selecting custom distribution would mean that you can only use the application on only one Shopify store. This is irreversible. You can deploy multiple apps though if you have more than one store.")])]),e._v(" "),t("p",[t("img",{attrs:{src:o(637),alt:"App deploy: select custom distribution",title:"App deploy: select custom distribution"}}),e._v(" "),t("img",{attrs:{src:o(638),alt:"App deploy: confirm custom distribution",title:"App deploy: confirm custom distribution"}})]),e._v(" "),t("ol",{attrs:{start:"14"}},[t("li",[e._v("On the next screen enter the Shopify store URL that you want to link the application to. This is typically the internal store url you see on configuring the store, e.g. something-random.myshopify.com.\n"),t("img",{attrs:{src:o(639),alt:"App deploy: enter your store url",title:"App deploy: enter your store url"}})]),e._v(" "),t("li",[e._v("Click on "),t("code",[e._v("Generate link")]),e._v(" and you will see a link generated.\n"),t("img",{attrs:{src:o(640),alt:"App deploy: link generated",title:"App deploy: link generated"}})]),e._v(" "),t("li",[e._v("Open the link generated on a new tab. Select the store to install the app on (ensure it matches with the store you just set in the URL field).\n"),t("img",{attrs:{src:o(641),alt:"app-deploy_distribution-choose-store.png",title:"app-deploy_distribution-choose-store.png"}})]),e._v(" "),t("li",[e._v("You will see your app listed and you can now install it by clicking on "),t("code",[e._v("Install")]),e._v(".\n"),t("img",{attrs:{src:o(642),alt:"app-deploy_distribution-install-to-store-confirm.png",title:"app-deploy_distribution-install-to-store-confirm.png"}})]),e._v(" "),t("li",[e._v("Once installed, you will see the app settings page.\n"),t("img",{attrs:{src:o(643),alt:"app-deploy_distribution-install-complete-config-app.png",title:"app-deploy_distribution-install-complete-config-app.png"}})])]),e._v(" "),t("p",[e._v("Go back to "),t("a",{attrs:{href:"#using-btcpay-shopify-from-shopify-app-store"}},[e._v("Using BTCPay-Shopify from Shopify App Store")]),e._v(" section above and continue from step 3.")]),e._v(" "),t("h2",{attrs:{id:"demo-checkout-flow-after-everything-is-set-up"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#demo-checkout-flow-after-everything-is-set-up"}},[e._v("#")]),e._v(" Demo Checkout flow after everything is set up")]),e._v(" "),t("figure",[t("img",{attrs:{src:o(340),alt:"BTCPay Server shopify step 30",title:"BTCPay Server shopify step 30"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(644),alt:"BTCPay Server shopify step 31",title:"BTCPay Server shopify step 31"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(340),alt:"BTCPay Server shopify step 32",title:"BTCPay Server shopify step 32"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(645),alt:"BTCPay Server shopify step 33",title:"BTCPay Server shopify step 33"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(646),alt:"BTCPay Server shopify step 34",title:"BTCPay Server shopify step 34"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(647),alt:"BTCPay Server shopify step 35",title:"BTCPay Server shopify step 35"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(648),alt:"BTCPay Server shopify step 36",title:"BTCPay Server shopify step 36"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(649),alt:"BTCPay Server shopify step 37",title:"BTCPay Server shopify step 37"}})]),e._v(" "),t("figure",[t("img",{attrs:{src:o(650),alt:"BTCPay Server shopify step 38",title:"BTCPay Server shopify step 38"}})]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/121.883ba361.js b/assets/js/121.5bbfe06f.js similarity index 99% rename from assets/js/121.883ba361.js rename to assets/js/121.5bbfe06f.js index 72513e38ac..a4f10327c8 100644 --- a/assets/js/121.883ba361.js +++ b/assets/js/121.5bbfe06f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[121],{852:function(t,s,a){"use strict";a.r(s);var e=a(17),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"reverse-proxy-to-tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#reverse-proxy-to-tor"}},[t._v("#")]),t._v(" Reverse proxy to Tor")]),t._v(" "),s("h2",{attrs:{id:"advantages"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#advantages"}},[t._v("#")]),t._v(" Advantages")]),t._v(" "),s("ul",[s("li",[t._v("no port forwarding needed on the LAN of the host")]),t._v(" "),s("li",[t._v("encrypted connection")]),t._v(" "),s("li",[t._v("hides the IP of the host")])]),t._v(" "),s("h2",{attrs:{id:"requirements"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),s("ul",[s("li",[t._v("a Virtual Private Server (VPS) - eg. a minimal package on Lunanode for ~3.5$/month")]),t._v(" "),s("li",[t._v("root access on the VPS - you need to set up webserver and install packages")]),t._v(" "),s("li",[t._v("a domain or subdomain - this will be setup on the proxy webserver")])]),t._v(" "),s("p",[t._v("Get the Tor "),s("code",[t._v(".onion")]),t._v(" address of your BTCPay Server via the "),s("code",[t._v("Server settings > Services")]),t._v(' page.\nSee information in the "HTTP-based TOR hidden services" section.')]),t._v(" "),s("p",[t._v("Note: There is also a "),s("a",{attrs:{href:"#do-all-this-in-a-docker-container"}},[t._v("Docker version")]),t._v(" of this setup.")]),t._v(" "),s("h2",{attrs:{id:"vps-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#vps-setup"}},[t._v("#")]),t._v(" VPS Setup")]),t._v(" "),s("p",[t._v("You will create a nginx reverse proxy and a "),s("code",[t._v("socat")]),t._v(" service, which forwards requests to your BTCPay Server.")]),t._v(" "),s("p",[t._v("Login as root and install the required dependencies: (example assumes a Debian based system)")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# switch to root user (if not logged in as root)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# install dependencies")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt")]),t._v(" update\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" certbot nginx socat tor\n")])])]),s("h3",{attrs:{id:"socat-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#socat-setup"}},[t._v("#")]),t._v(" Socat setup")]),t._v(" "),s("p",[t._v("Create the service file "),s("code",[t._v("/etc/systemd/system/http-to-socks-proxy@.service")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-ini extra-class"},[s("pre",{pre:!0,attrs:{class:"language-ini"}},[s("code",[s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Unit")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Description")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("HTTP-to-SOCKS proxy")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("After")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("network.target")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("EnvironmentFile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("/etc/http-to-socks-proxy/%i.conf")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("ExecStart")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("/usr/bin/socat tcp4-LISTEN:${LOCAL_PORT},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${PROXY_HOST}:${REMOTE_HOST}:${REMOTE_PORT},socksport=${PROXY_PORT}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Install")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("WantedBy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("multi-user.target")]),t._v("\n")])])]),s("p",[t._v("Create the configuration for the service in "),s("code",[t._v("/etc/http-to-socks-proxy/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create the directory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" /etc/http-to-socks-proxy/\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create the file with the content below")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("nano")]),t._v(" /etc/http-to-socks-proxy/btcpayserver.conf\n")])])]),s("p",[t._v("Replace the "),s("code",[t._v("REMOTE_HOST")]),t._v(" and adapt the ports if needed:")]),t._v(" "),s("div",{staticClass:"language-conf extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("PROXY_HOST=127.0.0.1\nPROXY_PORT=9050\nLOCAL_PORT=9081\nREMOTE_HOST=heregoesthebtcpayserverhiddenserviceaddress.onion\nREMOTE_PORT=80\n")])])]),s("p",[t._v("Create a symlink in "),s("code",[t._v("/etc/systemd/system/multi-user.target.wants")]),t._v(" to enable the service and start it:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# enable")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ln")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),t._v(" /etc/systemd/system/http-to-socks-proxy"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("@.service /etc/systemd/system/multi-user.target.wants/http-to-socks-proxy"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("@btcpayserver.service\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start")]),t._v("\nsystemctl start http-to-socks-proxy@btcpayserver\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check service status")]),t._v("\nsystemctl status http-to-socks-proxy@btcpayserver\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check if tunnel is active")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tulpn")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("grep")]),t._v(" socat\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# should give something like this:")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# tcp 0 0 127.0.0.1:9081 0.0.0.0:* LISTEN 951/socat")]),t._v("\n")])])]),s("h3",{attrs:{id:"webserver-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#webserver-setup"}},[t._v("#")]),t._v(" Webserver setup")]),t._v(" "),s("h4",{attrs:{id:"point-domain-to-the-vps"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#point-domain-to-the-vps"}},[t._v("#")]),t._v(" Point domain to the VPS")]),t._v(" "),s("p",[t._v("Create the A record on the DNS server of your domain/subdomain and point it to your VPS IP address.")]),t._v(" "),s("h4",{attrs:{id:"prepare-ssl-and-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prepare-ssl-and-lets-encrypt"}},[t._v("#")]),t._v(" Prepare SSL and Let's Encrypt")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# generate 4096 bit DH params to strengthen the security, may take a while")]),t._v("\nopenssl dhparam "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-out")]),t._v(" /etc/ssl/certs/dhparam.pem "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4096")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create directory for Let's Encrypt files")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" /var/lib/letsencrypt/.well-known\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chgrp")]),t._v(" www-data /var/lib/letsencrypt\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" g+s /var/lib/letsencrypt\n")])])]),s("h4",{attrs:{id:"nginx-configuration-http"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-configuration-http"}},[t._v("#")]),t._v(" nginx configuration: http")]),t._v(" "),s("p",[t._v("Create a variable mapping to forward the correct protocol setting and check if the Upgrade header is sent by the client, e.g. "),s("code",[t._v("/etc/nginx/conf.d/map.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("map")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_x_forwarded_proto")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$proxy_x_forwarded_proto")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_x_forwarded_proto")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n '' $scheme"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("map")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_upgrade")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$connection_upgrade")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" upgrade")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n '' "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("close")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Create a config file for the domain, e.g. "),s("code",[t._v("/etc/nginx/sites-available/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("listen")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server_name")]),t._v(" btcpayserver.mydomain.com")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Let's Encrypt verification requests")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" ^~ /.well-known/acme-challenge/")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("allow")]),t._v(" all")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("root")]),t._v(" /var/lib/letsencrypt/")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default_type")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"text/plain"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try_files")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$uri")]),t._v(" =404")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Redirect everything else to https")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" /")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("301")]),t._v(" https://"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$server_name")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$request_uri")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("We will configure the https server part in the same config file once we obtained the SSL certificate.")]),t._v(" "),s("p",[t._v("Enable the web server config by creating a symlink and restarting nginx:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ln")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),t._v(" /etc/nginx/sites-available/btcpayserver.conf /etc/nginx/sites-enabled/btcpayserver.conf\n\nsystemctl restart nginx\n")])])]),s("h4",{attrs:{id:"obtain-ssl-certificate-via-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#obtain-ssl-certificate-via-lets-encrypt"}},[t._v("#")]),t._v(" Obtain SSL certificate via Let's Encrypt")]),t._v(" "),s("p",[t._v("Run the following command with adapted email and domain parameters:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("certbot certonly --agree-tos "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--email")]),t._v(" admin@mydomain.com "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--webroot")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-w")]),t._v(" /var/lib/letsencrypt/ "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" btcpayserver.mydomain.com\n")])])]),s("h4",{attrs:{id:"nginx-configuration-https"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-configuration-https"}},[t._v("#")]),t._v(" nginx configuration: https")]),t._v(" "),s("p",[t._v("Now that we have a valid SSL certificate, add the https server part at the end of "),s("code",[t._v("/etc/nginx/sites-available/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("listen")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("443")]),t._v(" ssl http2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server_name")]),t._v(" btcpayserver.mydomain.com")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# SSL settings")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_stapling")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("on")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_stapling_verify")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("on")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_timeout")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1d")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_cache")]),t._v(" shared:SSL:10m")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_tickets")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("off")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Update this with the path of your certificate files")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_certificate")]),t._v(" /etc/letsencrypt/live/btcpayserver.mydomain.com/fullchain.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_certificate_key")]),t._v(" /etc/letsencrypt/live/btcpayserver.mydomain.com/privkey.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_dhparam")]),t._v(" /etc/ssl/certs/dhparam.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_protocols")]),t._v(" TLSv1.2 TLSv1.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_ciphers")]),t._v(" ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_prefer_server_ciphers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("off")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("resolver")]),t._v(" 8.8.8.8 8.8.4.4 valid=300s")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("resolver_timeout")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("30s")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" Strict-Transport-Security "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"max-age=63072000"')]),t._v(" always")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" Content-Security-Policy "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"frame-ancestors 'self';\"")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" X-Content-Type-Options nosniff")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Proxy requests to the socat service")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" /")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_pass")]),t._v(" http://127.0.0.1:9081/")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_http_version")]),t._v(" 1.1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Host "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Real-IP "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$remote_addr")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Forwarded-For "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$remote_addr")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Forwarded-Proto "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$proxy_x_forwarded_proto")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Upgrade "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_upgrade")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Connection "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$connection_upgrade")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Restart nginx once more:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("systemctl restart nginx\n")])])]),s("p",[t._v("Now, visiting "),s("code",[t._v("btcpayserver.mydomain.com")]),t._v(" should show your BTCPay Server instance.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),s("p",[t._v('If you see an nginx error of "503 Service Temporarily Unavailable" or similar but your BTCPay Server is reachable otherwise, you need to make BTCPay Server aware of your new domain. You can do so by using environment variables (Docker based setup), log into your BTCPay Server via SSH:')]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAY_BASE_DIRECTORY")]),t._v("/btcpayserver-docker/\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAY_ADDITIONAL_HOSTS")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"btcpayserver.mydomain.com"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])])]),t._v(" "),s("h2",{attrs:{id:"do-all-this-in-a-docker-container"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#do-all-this-in-a-docker-container"}},[t._v("#")]),t._v(" Do all this in a Docker container")]),t._v(" "),s("p",[t._v("Ready made "),s("a",{attrs:{href:"https://hub.docker.com/r/cloudgenius/socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Docker image"),s("OutboundLink")],1),t._v(" ("),s("a",{attrs:{href:"https://github.com/beacloudgenius/socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Code"),s("OutboundLink")],1),t._v(")")]),t._v(" "),s("h3",{attrs:{id:"socator-socat-tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#socator-socat-tor"}},[t._v("#")]),t._v(" SocaTor = SOCAT + TOR")]),t._v(" "),s("p",[t._v("Based on "),s("a",{attrs:{href:"https://github.com/Arno0x/Docker-Socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Docker-Socator"),s("OutboundLink")],1)]),t._v(" "),s("p",[t._v("It uses socat to listen on a given TCP port (5000 in this example) and to redirect incoming traffic to a Tor hidden service specified through environment variables.\nIt acts as a relay between the standard web and a hidden service on the Tor network.\nYou can optionally restrict the IP addresses that are allowed to connect to this service by specifying an "),s("code",[t._v("ALLOWED_RANGE")]),t._v(" environment variable and using CIDR notation.")]),t._v(" "),s("p",[t._v("Please note:")]),t._v(" "),s("p",[t._v("This container does not have any nginx component because Kubernetes provides for it.")]),t._v(" "),s("h3",{attrs:{id:"usage"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),s("p",[t._v("Break free from cloud services providers limitations, secure and protect your bitcoin full node, connect that with a BTC Pay server, all behind TOR.\nSelectively expose the BTCPay Server payment gateway and API to clearnet using socat+tor running on the Internet.")]),t._v(" "),s("hr"),t._v(" "),s("h4",{attrs:{id:"build"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#build"}},[t._v("#")]),t._v(" Build")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" build "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-t")]),t._v(" cloudgenius/socator "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v("\n")])])]),s("h4",{attrs:{id:"push"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#push"}},[t._v("#")]),t._v(" Push")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" push cloudgenius/socator\n")])])]),s("h4",{attrs:{id:"start-the-image-in-background-daemon-mode-with-ip-address-restriction"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#start-the-image-in-background-daemon-mode-with-ip-address-restriction"}},[t._v("#")]),t._v(" Start the image in background ("),s("em",[t._v("daemon mode")]),t._v(") with IP address restriction")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" run "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v(":5000 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ALLOWED_RANGE=192.168.1.0/24"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE=zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE_PORT=80"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--name")]),t._v(" socator "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n cloudgenius/socator\n")])])]),s("h4",{attrs:{id:"start-the-image-in-foreground"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#start-the-image-in-foreground"}},[t._v("#")]),t._v(" Start the image in foreground")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" run "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--rm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v(":5000 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE=zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE_PORT=80"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--name")]),t._v(" socator "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n cloudgenius/socator\n")])])]),s("p",[t._v("Now "),s("code",[t._v("http://localhost:5000")]),t._v(" should show you the tor hidden service you specified in the above command.")]),t._v(" "),s("h2",{attrs:{id:"use-that-docker-container-in-a-kubernetes-cluster-using-these-manifests"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#use-that-docker-container-in-a-kubernetes-cluster-using-these-manifests"}},[t._v("#")]),t._v(" Use that Docker container in a Kubernetes Cluster using these manifests")]),t._v(" "),s("p",[t._v("These manifest assumes a typical Kubernetes cluster that exposes internal services (like socator running internallly at port 5000) to the clearnet/public internet via "),s("a",{attrs:{href:"https://github.com/kubernetes/ingress-nginx",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nginx Ingress"),s("OutboundLink")],1),t._v(" and provide automated Let's Encrypt TLS/SSL certificates via "),s("a",{attrs:{href:"https://github.com/jetstack/cert-manager",target:"_blank",rel:"noopener noreferrer"}},[t._v("cert-manager"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Deployment manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" apps/v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Deployment\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("replicas")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("selector")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("matchLabels")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("template")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("labels")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("containers")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" cloudgenius/socator "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# code https://github.com/beacloudgenius/socator")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("imagePullPolicy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" IfNotPresent\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("env")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" TOR_SITE\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# BTCPay Server Tor address => docker exec tor cat /var/lib/tor/app-btcpay-server/hostname")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" TOR_SITE_PORT\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'80'")]),t._v("\n")])])]),s("p",[t._v("Service manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Service\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" http\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("port")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("selector")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n")])])]),s("p",[t._v("Ingress manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" networking.k8s.io/v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Ingress\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("annotations")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kubernetes.io/ingress.class")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" nginx\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("cert-manager.io/cluster-issuer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" letsencrypt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("prod\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("rules")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" btcpayserver.mydomain.com\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("http")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("paths")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("backend")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("port")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("number")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("path")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("pathType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Prefix\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("tls")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("hosts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" btcpayserver.mydomain.com\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("secretName")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("tls\n")])])]),s("h2",{attrs:{id:"resources"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#resources"}},[t._v("#")]),t._v(" Resources")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"https://itgala.xyz/nginx-reverse-proxy-to-onion-site-in-tor-network/",target:"_blank",rel:"noopener noreferrer"}},[t._v("nginx reverse proxy to .onion site in Tor network"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://github.com/openoms/bitcoin-tutorials/blob/master/tor2ip_tunnel.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("Tor-to-IP tunnel service"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://stackoverflow.com/questions/55487324/how-to-make-a-nginx-reverse-proxy-direct-to-tor-hidden-service",target:"_blank",rel:"noopener noreferrer"}},[t._v("How to make a nginx reverse proxy direct to tor hidden service"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://linuxize.com/post/secure-nginx-with-let-s-encrypt-on-debian-10/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Secure Nginx with Let's Encrypt on Debian 10 Linux"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"http://nginx.org/en/docs/http/websocket.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nginx WebSocket proxying"),s("OutboundLink")],1)])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[121],{851:function(t,s,a){"use strict";a.r(s);var e=a(17),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"reverse-proxy-to-tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#reverse-proxy-to-tor"}},[t._v("#")]),t._v(" Reverse proxy to Tor")]),t._v(" "),s("h2",{attrs:{id:"advantages"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#advantages"}},[t._v("#")]),t._v(" Advantages")]),t._v(" "),s("ul",[s("li",[t._v("no port forwarding needed on the LAN of the host")]),t._v(" "),s("li",[t._v("encrypted connection")]),t._v(" "),s("li",[t._v("hides the IP of the host")])]),t._v(" "),s("h2",{attrs:{id:"requirements"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),s("ul",[s("li",[t._v("a Virtual Private Server (VPS) - eg. a minimal package on Lunanode for ~3.5$/month")]),t._v(" "),s("li",[t._v("root access on the VPS - you need to set up webserver and install packages")]),t._v(" "),s("li",[t._v("a domain or subdomain - this will be setup on the proxy webserver")])]),t._v(" "),s("p",[t._v("Get the Tor "),s("code",[t._v(".onion")]),t._v(" address of your BTCPay Server via the "),s("code",[t._v("Server settings > Services")]),t._v(' page.\nSee information in the "HTTP-based TOR hidden services" section.')]),t._v(" "),s("p",[t._v("Note: There is also a "),s("a",{attrs:{href:"#do-all-this-in-a-docker-container"}},[t._v("Docker version")]),t._v(" of this setup.")]),t._v(" "),s("h2",{attrs:{id:"vps-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#vps-setup"}},[t._v("#")]),t._v(" VPS Setup")]),t._v(" "),s("p",[t._v("You will create a nginx reverse proxy and a "),s("code",[t._v("socat")]),t._v(" service, which forwards requests to your BTCPay Server.")]),t._v(" "),s("p",[t._v("Login as root and install the required dependencies: (example assumes a Debian based system)")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# switch to root user (if not logged in as root)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# install dependencies")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt")]),t._v(" update\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" certbot nginx socat tor\n")])])]),s("h3",{attrs:{id:"socat-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#socat-setup"}},[t._v("#")]),t._v(" Socat setup")]),t._v(" "),s("p",[t._v("Create the service file "),s("code",[t._v("/etc/systemd/system/http-to-socks-proxy@.service")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-ini extra-class"},[s("pre",{pre:!0,attrs:{class:"language-ini"}},[s("code",[s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Unit")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Description")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("HTTP-to-SOCKS proxy")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("After")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("network.target")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("EnvironmentFile")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("/etc/http-to-socks-proxy/%i.conf")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("ExecStart")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("/usr/bin/socat tcp4-LISTEN:${LOCAL_PORT},reuseaddr,fork,keepalive,bind=127.0.0.1 SOCKS4A:${PROXY_HOST}:${REMOTE_HOST}:${REMOTE_PORT},socksport=${PROXY_PORT}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Install")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("WantedBy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("multi-user.target")]),t._v("\n")])])]),s("p",[t._v("Create the configuration for the service in "),s("code",[t._v("/etc/http-to-socks-proxy/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create the directory")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" /etc/http-to-socks-proxy/\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create the file with the content below")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("nano")]),t._v(" /etc/http-to-socks-proxy/btcpayserver.conf\n")])])]),s("p",[t._v("Replace the "),s("code",[t._v("REMOTE_HOST")]),t._v(" and adapt the ports if needed:")]),t._v(" "),s("div",{staticClass:"language-conf extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("PROXY_HOST=127.0.0.1\nPROXY_PORT=9050\nLOCAL_PORT=9081\nREMOTE_HOST=heregoesthebtcpayserverhiddenserviceaddress.onion\nREMOTE_PORT=80\n")])])]),s("p",[t._v("Create a symlink in "),s("code",[t._v("/etc/systemd/system/multi-user.target.wants")]),t._v(" to enable the service and start it:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# enable")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ln")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),t._v(" /etc/systemd/system/http-to-socks-proxy"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("@.service /etc/systemd/system/multi-user.target.wants/http-to-socks-proxy"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("@btcpayserver.service\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start")]),t._v("\nsystemctl start http-to-socks-proxy@btcpayserver\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check service status")]),t._v("\nsystemctl status http-to-socks-proxy@btcpayserver\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check if tunnel is active")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tulpn")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("grep")]),t._v(" socat\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# should give something like this:")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# tcp 0 0 127.0.0.1:9081 0.0.0.0:* LISTEN 951/socat")]),t._v("\n")])])]),s("h3",{attrs:{id:"webserver-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#webserver-setup"}},[t._v("#")]),t._v(" Webserver setup")]),t._v(" "),s("h4",{attrs:{id:"point-domain-to-the-vps"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#point-domain-to-the-vps"}},[t._v("#")]),t._v(" Point domain to the VPS")]),t._v(" "),s("p",[t._v("Create the A record on the DNS server of your domain/subdomain and point it to your VPS IP address.")]),t._v(" "),s("h4",{attrs:{id:"prepare-ssl-and-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prepare-ssl-and-lets-encrypt"}},[t._v("#")]),t._v(" Prepare SSL and Let's Encrypt")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# generate 4096 bit DH params to strengthen the security, may take a while")]),t._v("\nopenssl dhparam "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-out")]),t._v(" /etc/ssl/certs/dhparam.pem "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4096")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# create directory for Let's Encrypt files")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" /var/lib/letsencrypt/.well-known\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chgrp")]),t._v(" www-data /var/lib/letsencrypt\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" g+s /var/lib/letsencrypt\n")])])]),s("h4",{attrs:{id:"nginx-configuration-http"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-configuration-http"}},[t._v("#")]),t._v(" nginx configuration: http")]),t._v(" "),s("p",[t._v("Create a variable mapping to forward the correct protocol setting and check if the Upgrade header is sent by the client, e.g. "),s("code",[t._v("/etc/nginx/conf.d/map.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("map")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_x_forwarded_proto")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$proxy_x_forwarded_proto")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_x_forwarded_proto")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n '' $scheme"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("map")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_upgrade")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$connection_upgrade")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default")]),t._v(" upgrade")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n '' "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("close")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Create a config file for the domain, e.g. "),s("code",[t._v("/etc/nginx/sites-available/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("listen")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("80")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server_name")]),t._v(" btcpayserver.mydomain.com")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Let's Encrypt verification requests")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" ^~ /.well-known/acme-challenge/")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("allow")]),t._v(" all")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("root")]),t._v(" /var/lib/letsencrypt/")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("default_type")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"text/plain"')])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try_files")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$uri")]),t._v(" =404")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Redirect everything else to https")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" /")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("return")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("301")]),t._v(" https://"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$server_name")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$request_uri")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("We will configure the https server part in the same config file once we obtained the SSL certificate.")]),t._v(" "),s("p",[t._v("Enable the web server config by creating a symlink and restarting nginx:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ln")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),t._v(" /etc/nginx/sites-available/btcpayserver.conf /etc/nginx/sites-enabled/btcpayserver.conf\n\nsystemctl restart nginx\n")])])]),s("h4",{attrs:{id:"obtain-ssl-certificate-via-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#obtain-ssl-certificate-via-lets-encrypt"}},[t._v("#")]),t._v(" Obtain SSL certificate via Let's Encrypt")]),t._v(" "),s("p",[t._v("Run the following command with adapted email and domain parameters:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("certbot certonly --agree-tos "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--email")]),t._v(" admin@mydomain.com "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--webroot")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-w")]),t._v(" /var/lib/letsencrypt/ "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" btcpayserver.mydomain.com\n")])])]),s("h4",{attrs:{id:"nginx-configuration-https"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-configuration-https"}},[t._v("#")]),t._v(" nginx configuration: https")]),t._v(" "),s("p",[t._v("Now that we have a valid SSL certificate, add the https server part at the end of "),s("code",[t._v("/etc/nginx/sites-available/btcpayserver.conf")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-nginx extra-class"},[s("pre",{pre:!0,attrs:{class:"language-nginx"}},[s("code",[s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("listen")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("443")]),t._v(" ssl http2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("server_name")]),t._v(" btcpayserver.mydomain.com")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# SSL settings")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_stapling")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("on")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_stapling_verify")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("on")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_timeout")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1d")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_cache")]),t._v(" shared:SSL:10m")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_session_tickets")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("off")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Update this with the path of your certificate files")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_certificate")]),t._v(" /etc/letsencrypt/live/btcpayserver.mydomain.com/fullchain.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_certificate_key")]),t._v(" /etc/letsencrypt/live/btcpayserver.mydomain.com/privkey.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_dhparam")]),t._v(" /etc/ssl/certs/dhparam.pem")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_protocols")]),t._v(" TLSv1.2 TLSv1.3")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_ciphers")]),t._v(" ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ssl_prefer_server_ciphers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("off")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("resolver")]),t._v(" 8.8.8.8 8.8.4.4 valid=300s")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("resolver_timeout")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("30s")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" Strict-Transport-Security "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"max-age=63072000"')]),t._v(" always")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" Content-Security-Policy "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"frame-ancestors 'self';\"")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("add_header")]),t._v(" X-Content-Type-Options nosniff")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Proxy requests to the socat service")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("location")]),t._v(" /")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_pass")]),t._v(" http://127.0.0.1:9081/")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_http_version")]),t._v(" 1.1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Host "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Real-IP "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$remote_addr")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Forwarded-For "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$remote_addr")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" X-Forwarded-Proto "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$proxy_x_forwarded_proto")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Upgrade "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$http_upgrade")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token directive"}},[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("proxy_set_header")]),t._v(" Connection "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$connection_upgrade")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Restart nginx once more:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("systemctl restart nginx\n")])])]),s("p",[t._v("Now, visiting "),s("code",[t._v("btcpayserver.mydomain.com")]),t._v(" should show your BTCPay Server instance.")]),t._v(" "),s("div",{staticClass:"custom-block tip"},[s("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),s("p",[t._v('If you see an nginx error of "503 Service Temporarily Unavailable" or similar but your BTCPay Server is reachable otherwise, you need to make BTCPay Server aware of your new domain. You can do so by using environment variables (Docker based setup), log into your BTCPay Server via SSH:')]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAY_BASE_DIRECTORY")]),t._v("/btcpayserver-docker/\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAY_ADDITIONAL_HOSTS")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"btcpayserver.mydomain.com"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])])]),t._v(" "),s("h2",{attrs:{id:"do-all-this-in-a-docker-container"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#do-all-this-in-a-docker-container"}},[t._v("#")]),t._v(" Do all this in a Docker container")]),t._v(" "),s("p",[t._v("Ready made "),s("a",{attrs:{href:"https://hub.docker.com/r/cloudgenius/socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Docker image"),s("OutboundLink")],1),t._v(" ("),s("a",{attrs:{href:"https://github.com/beacloudgenius/socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Code"),s("OutboundLink")],1),t._v(")")]),t._v(" "),s("h3",{attrs:{id:"socator-socat-tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#socator-socat-tor"}},[t._v("#")]),t._v(" SocaTor = SOCAT + TOR")]),t._v(" "),s("p",[t._v("Based on "),s("a",{attrs:{href:"https://github.com/Arno0x/Docker-Socator",target:"_blank",rel:"noopener noreferrer"}},[t._v("Docker-Socator"),s("OutboundLink")],1)]),t._v(" "),s("p",[t._v("It uses socat to listen on a given TCP port (5000 in this example) and to redirect incoming traffic to a Tor hidden service specified through environment variables.\nIt acts as a relay between the standard web and a hidden service on the Tor network.\nYou can optionally restrict the IP addresses that are allowed to connect to this service by specifying an "),s("code",[t._v("ALLOWED_RANGE")]),t._v(" environment variable and using CIDR notation.")]),t._v(" "),s("p",[t._v("Please note:")]),t._v(" "),s("p",[t._v("This container does not have any nginx component because Kubernetes provides for it.")]),t._v(" "),s("h3",{attrs:{id:"usage"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),s("p",[t._v("Break free from cloud services providers limitations, secure and protect your bitcoin full node, connect that with a BTC Pay server, all behind TOR.\nSelectively expose the BTCPay Server payment gateway and API to clearnet using socat+tor running on the Internet.")]),t._v(" "),s("hr"),t._v(" "),s("h4",{attrs:{id:"build"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#build"}},[t._v("#")]),t._v(" Build")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" build "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-t")]),t._v(" cloudgenius/socator "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v("\n")])])]),s("h4",{attrs:{id:"push"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#push"}},[t._v("#")]),t._v(" Push")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" push cloudgenius/socator\n")])])]),s("h4",{attrs:{id:"start-the-image-in-background-daemon-mode-with-ip-address-restriction"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#start-the-image-in-background-daemon-mode-with-ip-address-restriction"}},[t._v("#")]),t._v(" Start the image in background ("),s("em",[t._v("daemon mode")]),t._v(") with IP address restriction")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" run "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v(":5000 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ALLOWED_RANGE=192.168.1.0/24"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE=zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE_PORT=80"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--name")]),t._v(" socator "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n cloudgenius/socator\n")])])]),s("h4",{attrs:{id:"start-the-image-in-foreground"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#start-the-image-in-foreground"}},[t._v("#")]),t._v(" Start the image in foreground")]),t._v(" "),s("div",{staticClass:"language-sh extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sh"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" run "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--rm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-p")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v(":5000 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE=zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"TOR_SITE_PORT=80"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--name")]),t._v(" socator "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("\n cloudgenius/socator\n")])])]),s("p",[t._v("Now "),s("code",[t._v("http://localhost:5000")]),t._v(" should show you the tor hidden service you specified in the above command.")]),t._v(" "),s("h2",{attrs:{id:"use-that-docker-container-in-a-kubernetes-cluster-using-these-manifests"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#use-that-docker-container-in-a-kubernetes-cluster-using-these-manifests"}},[t._v("#")]),t._v(" Use that Docker container in a Kubernetes Cluster using these manifests")]),t._v(" "),s("p",[t._v("These manifest assumes a typical Kubernetes cluster that exposes internal services (like socator running internallly at port 5000) to the clearnet/public internet via "),s("a",{attrs:{href:"https://github.com/kubernetes/ingress-nginx",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nginx Ingress"),s("OutboundLink")],1),t._v(" and provide automated Let's Encrypt TLS/SSL certificates via "),s("a",{attrs:{href:"https://github.com/jetstack/cert-manager",target:"_blank",rel:"noopener noreferrer"}},[t._v("cert-manager"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Deployment manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" apps/v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Deployment\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("replicas")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("selector")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("matchLabels")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("template")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("labels")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("containers")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("image")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" cloudgenius/socator "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# code https://github.com/beacloudgenius/socator")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("imagePullPolicy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" IfNotPresent\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("env")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" TOR_SITE\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'zqktlwiuavvvqqt4ybvgvi7tyo4hjl5xgfuvpdf6otjiycgwqbym2qad.onion'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# BTCPay Server Tor address => docker exec tor cat /var/lib/tor/app-btcpay-server/hostname")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" TOR_SITE_PORT\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'80'")]),t._v("\n")])])]),s("p",[t._v("Service manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Service\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ports")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" http\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("port")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("selector")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("role")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n")])])]),s("p",[t._v("Ingress manifest")]),t._v(" "),s("div",{staticClass:"language-yaml extra-class"},[s("pre",{pre:!0,attrs:{class:"language-yaml"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("---")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("apiVersion")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" networking.k8s.io/v1\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kind")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Ingress\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metadata")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("annotations")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("kubernetes.io/ingress.class")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" nginx\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("cert-manager.io/cluster-issuer")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" letsencrypt"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("prod\n"),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("spec")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("rules")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" btcpayserver.mydomain.com\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("http")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("paths")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("backend")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("port")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("number")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5000")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("path")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("pathType")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" Prefix\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("tls")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("hosts")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" btcpayserver.mydomain.com\n "),s("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("secretName")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" socator"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("tls\n")])])]),s("h2",{attrs:{id:"resources"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#resources"}},[t._v("#")]),t._v(" Resources")]),t._v(" "),s("ul",[s("li",[s("a",{attrs:{href:"https://itgala.xyz/nginx-reverse-proxy-to-onion-site-in-tor-network/",target:"_blank",rel:"noopener noreferrer"}},[t._v("nginx reverse proxy to .onion site in Tor network"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://github.com/openoms/bitcoin-tutorials/blob/master/tor2ip_tunnel.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("Tor-to-IP tunnel service"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://stackoverflow.com/questions/55487324/how-to-make-a-nginx-reverse-proxy-direct-to-tor-hidden-service",target:"_blank",rel:"noopener noreferrer"}},[t._v("How to make a nginx reverse proxy direct to tor hidden service"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"https://linuxize.com/post/secure-nginx-with-let-s-encrypt-on-debian-10/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Secure Nginx with Let's Encrypt on Debian 10 Linux"),s("OutboundLink")],1)]),t._v(" "),s("li",[s("a",{attrs:{href:"http://nginx.org/en/docs/http/websocket.html",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nginx WebSocket proxying"),s("OutboundLink")],1)])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/122.c511e6a6.js b/assets/js/122.5a3a7ab4.js similarity index 99% rename from assets/js/122.c511e6a6.js rename to assets/js/122.5a3a7ab4.js index ca070e9d5a..a8b42738db 100644 --- a/assets/js/122.c511e6a6.js +++ b/assets/js/122.5a3a7ab4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[122],{853:function(t,s,a){"use strict";a.r(s);var e=a(17),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"forward-ports-with-a-reverse-ssh-tunnel"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#forward-ports-with-a-reverse-ssh-tunnel"}},[t._v("#")]),t._v(" Forward ports with a reverse SSH tunnel")]),t._v(" "),s("h2",{attrs:{id:"advantages"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#advantages"}},[t._v("#")]),t._v(" Advantages")]),t._v(" "),s("ul",[s("li",[t._v("no port forwarding needed on the LAN of the host")]),t._v(" "),s("li",[t._v("encrypted connection")]),t._v(" "),s("li",[t._v("hides the IP of the host")])]),t._v(" "),s("h2",{attrs:{id:"requirements"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),s("ul",[s("li",[t._v("a Virtual Private Server (VPS) - eg. a minimal package on Lunanode for ~3.5$/month")]),t._v(" "),s("li",[t._v("root access on the VPS - only root can forward ports under no. 1000")]),t._v(" "),s("li",[t._v("ssh access to the host computer (where the ports will be forwarded from)")])]),t._v(" "),s("h2",{attrs:{id:"setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#setup"}},[t._v("#")]),t._v(" Setup")]),t._v(" "),s("h3",{attrs:{id:"on-the-host-your-btcpay-server-instance"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#on-the-host-your-btcpay-server-instance"}},[t._v("#")]),t._v(" On the host (your BTCPay Server instance)")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# switch to root user (if not logged in as root)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check for an existing ssh public key")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" ~/.ssh/*.pub\n")])])]),s("p",[t._v("If there is none generate one (keep pressing ENTER):")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("ssh-keygen "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-t")]),t._v(" rsa "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-b")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4096")]),t._v("\n")])])]),s("p",[t._v("This will generate the SSH keypair "),s("code",[t._v("id_rsa")]),t._v(" (private key) and "),s("code",[t._v("id_rsa.pub")]),t._v(" inside "),s("code",[t._v("~/.ssh")]),t._v(".")]),t._v(" "),s("p",[t._v("The private key needs to get added to the ssh-agent:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start the ssh-agent in the background")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("eval")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),t._v("ssh-agent "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# add private key to ssh-agent")]),t._v("\nssh-add ~/.ssh/id_rsa\n")])])]),s("p",[t._v("Copy the public key over to the VPS (fill in the "),s("code",[t._v("VPS_IP_ADDRESS")]),t._v(").\nYou will be prompted for the root password of the VPS.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("ssh-copy-id "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v(" ~/.ssh/id_rsa.pub root@VPS_IP_ADDRESS\n")])])]),s("p",[t._v("To verify that it works, SSH into the VPS – this should not prompt for the password anymore:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ssh")]),t._v(" root@VPS_IP_ADDRESS\n")])])]),s("h3",{attrs:{id:"on-the-vps"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#on-the-vps"}},[t._v("#")]),t._v(" On the VPS")]),t._v(" "),s("p",[t._v("You can either reuse the connection from before or login as root.")]),t._v(" "),s("p",[t._v("Edit the sshd config:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("nano")]),t._v(" /etc/ssh/sshd_config\n")])])]),s("p",[t._v("Make sure these entries are active (meaning there is no "),s("code",[t._v("#")]),t._v(" at the beggining of the line).\nAlternatively, you can just paste these on the end of the file:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("RSAAuthentication yes # not needed on latest OpenSSH versions\nPubkeyAuthentication yes\nGatewayPorts yes\nAllowTcpForwarding yes\nClientAliveInterval 60\n")])])]),s("p",[t._v("CTRL+O, ENTER to save, CTRL+X to exit.")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("You can lose access at this point if the sshd config is wrong. Please double-check!")])]),t._v(" "),s("p",[t._v("Restart the sshd service:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart sshd\n")])])]),s("h3",{attrs:{id:"back-to-the-host-your-btcpay-server-instance"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#back-to-the-host-your-btcpay-server-instance"}},[t._v("#")]),t._v(" Back to the host (your BTCPay Server instance)")]),t._v(" "),s("h4",{attrs:{id:"install-and-set-up-autossh"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-and-set-up-autossh"}},[t._v("#")]),t._v(" Install and set up autossh")]),t._v(" "),s("p",[t._v("Install the "),s("code",[t._v("autossh")]),t._v(" dependency:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" autossh\n")])])]),s("p",[t._v("Create the service file:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("nano")]),t._v(" /etc/systemd/system/autossh-tunnel.service\n")])])]),s("p",[t._v("Paste the following and fill in the "),s("code",[t._v("VPS_IP_ADDRESS")]),t._v(".\nAdd or remove ports as required.")]),t._v(" "),s("div",{staticClass:"language-ini extra-class"},[s("pre",{pre:!0,attrs:{class:"language-ini"}},[s("code",[s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Unit")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Description")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("AutoSSH tunnel service")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("After")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("network.target")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("User")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("root")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Group")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("root")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Environment")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v('"'),s("span",{pre:!0,attrs:{class:"token inner-value"}},[t._v("AUTOSSH_GATETIME=0")]),t._v('"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("ExecStart")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v('/usr/bin/autossh -C -M 0 -v -N -o "ServerAliveInterval=60" -R 9735:localhost:9735 -R 443:localhost:443 -R 80:localhost:80 root@VPS_IP_ADDRESS')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("StandardOutput")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("journal")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Install")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("WantedBy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("multi-user.target")]),t._v("\n")])])]),s("p",[t._v("Enable and start the service:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("enable")]),t._v(" autossh-tunnel\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start autossh-tunnel\n")])])]),s("p",[t._v("The port forwarding with a reverse ssh-tunnel is now complete.\nYou should be able access the ports/services of the host computer through the IP of the VPS.")]),t._v(" "),s("h2",{attrs:{id:"monitoring"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#monitoring"}},[t._v("#")]),t._v(" Monitoring")]),t._v(" "),s("p",[t._v("Check if there are any errors on the host computer:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" journalctl "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-f")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-n")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" autossh-tunnel\n")])])]),s("p",[t._v("To check if tunnel is active on the VPS:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tulpn")]),t._v("\n")])])]),s("h2",{attrs:{id:"resources"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#resources"}},[t._v("#")]),t._v(" Resources")]),t._v(" "),s("ul",[s("li",[t._v("Raspiblitz FAQ: "),s("a",{attrs:{href:"https://github.com/rootzoll/raspiblitz/blob/master/FAQ.md#how-to-setup-port-forwarding-with-a-ssh-tunnel",target:"_blank",rel:"noopener noreferrer"}},[t._v("How to setup port-forwarding with a SSH tunnel?"),s("OutboundLink")],1)]),t._v(" "),s("li",[t._v("RaspiBolt Docs: "),s("a",{attrs:{href:"https://raspibolt.org/guide/raspberry-pi/security.html#login-with-ssh-keys",target:"_blank",rel:"noopener noreferrer"}},[t._v("Login with SSH keys"),s("OutboundLink")],1)])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[122],{852:function(t,s,a){"use strict";a.r(s);var e=a(17),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"forward-ports-with-a-reverse-ssh-tunnel"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#forward-ports-with-a-reverse-ssh-tunnel"}},[t._v("#")]),t._v(" Forward ports with a reverse SSH tunnel")]),t._v(" "),s("h2",{attrs:{id:"advantages"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#advantages"}},[t._v("#")]),t._v(" Advantages")]),t._v(" "),s("ul",[s("li",[t._v("no port forwarding needed on the LAN of the host")]),t._v(" "),s("li",[t._v("encrypted connection")]),t._v(" "),s("li",[t._v("hides the IP of the host")])]),t._v(" "),s("h2",{attrs:{id:"requirements"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),s("ul",[s("li",[t._v("a Virtual Private Server (VPS) - eg. a minimal package on Lunanode for ~3.5$/month")]),t._v(" "),s("li",[t._v("root access on the VPS - only root can forward ports under no. 1000")]),t._v(" "),s("li",[t._v("ssh access to the host computer (where the ports will be forwarded from)")])]),t._v(" "),s("h2",{attrs:{id:"setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#setup"}},[t._v("#")]),t._v(" Setup")]),t._v(" "),s("h3",{attrs:{id:"on-the-host-your-btcpay-server-instance"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#on-the-host-your-btcpay-server-instance"}},[t._v("#")]),t._v(" On the host (your BTCPay Server instance)")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# switch to root user (if not logged in as root)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# check for an existing ssh public key")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" ~/.ssh/*.pub\n")])])]),s("p",[t._v("If there is none generate one (keep pressing ENTER):")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("ssh-keygen "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-t")]),t._v(" rsa "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-b")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4096")]),t._v("\n")])])]),s("p",[t._v("This will generate the SSH keypair "),s("code",[t._v("id_rsa")]),t._v(" (private key) and "),s("code",[t._v("id_rsa.pub")]),t._v(" inside "),s("code",[t._v("~/.ssh")]),t._v(".")]),t._v(" "),s("p",[t._v("The private key needs to get added to the ssh-agent:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# start the ssh-agent in the background")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("eval")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),t._v("ssh-agent "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-s")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# add private key to ssh-agent")]),t._v("\nssh-add ~/.ssh/id_rsa\n")])])]),s("p",[t._v("Copy the public key over to the VPS (fill in the "),s("code",[t._v("VPS_IP_ADDRESS")]),t._v(").\nYou will be prompted for the root password of the VPS.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("ssh-copy-id "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v(" ~/.ssh/id_rsa.pub root@VPS_IP_ADDRESS\n")])])]),s("p",[t._v("To verify that it works, SSH into the VPS – this should not prompt for the password anymore:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("ssh")]),t._v(" root@VPS_IP_ADDRESS\n")])])]),s("h3",{attrs:{id:"on-the-vps"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#on-the-vps"}},[t._v("#")]),t._v(" On the VPS")]),t._v(" "),s("p",[t._v("You can either reuse the connection from before or login as root.")]),t._v(" "),s("p",[t._v("Edit the sshd config:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("nano")]),t._v(" /etc/ssh/sshd_config\n")])])]),s("p",[t._v("Make sure these entries are active (meaning there is no "),s("code",[t._v("#")]),t._v(" at the beggining of the line).\nAlternatively, you can just paste these on the end of the file:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("RSAAuthentication yes # not needed on latest OpenSSH versions\nPubkeyAuthentication yes\nGatewayPorts yes\nAllowTcpForwarding yes\nClientAliveInterval 60\n")])])]),s("p",[t._v("CTRL+O, ENTER to save, CTRL+X to exit.")]),t._v(" "),s("div",{staticClass:"custom-block warning"},[s("p",{staticClass:"custom-block-title"},[t._v("WARNING")]),t._v(" "),s("p",[t._v("You can lose access at this point if the sshd config is wrong. Please double-check!")])]),t._v(" "),s("p",[t._v("Restart the sshd service:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart sshd\n")])])]),s("h3",{attrs:{id:"back-to-the-host-your-btcpay-server-instance"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#back-to-the-host-your-btcpay-server-instance"}},[t._v("#")]),t._v(" Back to the host (your BTCPay Server instance)")]),t._v(" "),s("h4",{attrs:{id:"install-and-set-up-autossh"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-and-set-up-autossh"}},[t._v("#")]),t._v(" Install and set up autossh")]),t._v(" "),s("p",[t._v("Install the "),s("code",[t._v("autossh")]),t._v(" dependency:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("apt-get")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" autossh\n")])])]),s("p",[t._v("Create the service file:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("nano")]),t._v(" /etc/systemd/system/autossh-tunnel.service\n")])])]),s("p",[t._v("Paste the following and fill in the "),s("code",[t._v("VPS_IP_ADDRESS")]),t._v(".\nAdd or remove ports as required.")]),t._v(" "),s("div",{staticClass:"language-ini extra-class"},[s("pre",{pre:!0,attrs:{class:"language-ini"}},[s("code",[s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Unit")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Description")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("AutoSSH tunnel service")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("After")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("network.target")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Service")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("User")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("root")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Group")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("root")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("Environment")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v('"'),s("span",{pre:!0,attrs:{class:"token inner-value"}},[t._v("AUTOSSH_GATETIME=0")]),t._v('"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("ExecStart")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v('/usr/bin/autossh -C -M 0 -v -N -o "ServerAliveInterval=60" -R 9735:localhost:9735 -R 443:localhost:443 -R 80:localhost:80 root@VPS_IP_ADDRESS')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("StandardOutput")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("journal")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token section"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token section-name selector"}},[t._v("Install")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token key attr-name"}},[t._v("WantedBy")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token value attr-value"}},[t._v("multi-user.target")]),t._v("\n")])])]),s("p",[t._v("Enable and start the service:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("enable")]),t._v(" autossh-tunnel\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start autossh-tunnel\n")])])]),s("p",[t._v("The port forwarding with a reverse ssh-tunnel is now complete.\nYou should be able access the ports/services of the host computer through the IP of the VPS.")]),t._v(" "),s("h2",{attrs:{id:"monitoring"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#monitoring"}},[t._v("#")]),t._v(" Monitoring")]),t._v(" "),s("p",[t._v("Check if there are any errors on the host computer:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" journalctl "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-f")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-n")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" autossh-tunnel\n")])])]),s("p",[t._v("To check if tunnel is active on the VPS:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tulpn")]),t._v("\n")])])]),s("h2",{attrs:{id:"resources"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#resources"}},[t._v("#")]),t._v(" Resources")]),t._v(" "),s("ul",[s("li",[t._v("Raspiblitz FAQ: "),s("a",{attrs:{href:"https://github.com/rootzoll/raspiblitz/blob/master/FAQ.md#how-to-setup-port-forwarding-with-a-ssh-tunnel",target:"_blank",rel:"noopener noreferrer"}},[t._v("How to setup port-forwarding with a SSH tunnel?"),s("OutboundLink")],1)]),t._v(" "),s("li",[t._v("RaspiBolt Docs: "),s("a",{attrs:{href:"https://raspibolt.org/guide/raspberry-pi/security.html#login-with-ssh-keys",target:"_blank",rel:"noopener noreferrer"}},[t._v("Login with SSH keys"),s("OutboundLink")],1)])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/123.5249d9cf.js b/assets/js/123.30657657.js similarity index 99% rename from assets/js/123.5249d9cf.js rename to assets/js/123.30657657.js index 3ab5ff375f..438bf23fd0 100644 --- a/assets/js/123.5249d9cf.js +++ b/assets/js/123.30657657.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{854:function(e,t,r){"use strict";r.r(t);var s=r(17),a=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"third-party-hosting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#third-party-hosting"}},[e._v("#")]),e._v(" Third-party hosting")]),e._v(" "),t("p",[e._v("A "),t("strong",[e._v("third-party host")]),e._v(" is an individual or a business which "),t("strong",[e._v("self-hosts a BTCPay Server instance and enables other users to register and use the server")]),e._v(". On a self-hosted server, the owner can add an unlimited amount of users and stores and allow those users to manage their stores independently and receive payments to their own wallets.")]),e._v(" "),t("p",[e._v("While this feature in BTCPay Server exists for complex multi-store business management, community enthusiasts use it to help other users (mostly beginners), sometimes skip an overwhelming step of "),t("strong",[e._v("deploying a self-hosted BTCPay server")]),e._v(". Users who want to test or develop applications on top of BTCPay Server also use "),t("strong",[e._v("instances hosted by third-parties")]),e._v(". Some hosts try to spread the adoption of cryptocurrencies by allowing their local merchants to receive payments for free or for a small sign-up fee.")]),e._v(" "),t("p",[e._v("In layman words, think of this feature as a payment processor factory which allows anyone to deploy a server and help others receive payments which are validated via the server owners' "),t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Full_node",target:"_blank",rel:"noopener noreferrer"}},[e._v("full Bitcoin node"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Third-party hosts")]),e._v(" play an important role in the ecosystem since they provide an easy and cost-effective "),t("strong",[e._v("way for users to try and use BTCPay Server")]),e._v(". The role of honest hosts who provide free service to others is essential in the early phase of BTCPay Server adoption. However, users should be familiar with the pros, cons and potential risks involved when using a trusted third-party. Find the optimal balance between your use-case, cost, and privacy/security trade-offs.")]),e._v(" "),t("p",[e._v("Some of the hosts are entirely free to use and maintain the server cost from donations of their users. If you've been using a reliable free host for a while, you should consider donating to them to support them.")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"#third-party-hosting"}},[e._v("Third-party hosting")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"#advantages-and-disadvantages"}},[e._v("Advantages and disadvantages")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"#pros"}},[e._v("Pros")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#cons"}},[e._v("Cons")])])])]),e._v(" "),t("li",[t("a",{attrs:{href:"#concerns-for-use"}},[e._v("Concerns For Use")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"#security-concerns"}},[e._v("Security Concerns")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#privacy-concerns"}},[e._v("Privacy Concerns")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#trust-concerns"}},[e._v("Trust Concerns")])])])]),e._v(" "),t("li",[t("a",{attrs:{href:"#third-party-hosting-faq"}},[e._v("Third Party Hosting FAQ")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#where-is-the-list-of-btcpay-third-party-hosts"}},[e._v("Where is the list of BTCPay third-party hosts?")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#how-can-one-become-a-third-party-host"}},[e._v("How can one become a third-party host?")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#are-there-any-limitations-in-features-when-using-a-third-party-host"}},[e._v("Are there any limitations in features when using a third-party host?")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#can-i-enable-the-use-of-my-lightning-network-node-to-others"}},[e._v("Can I enable the use of my Lightning Network node to others?")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#what-does-the-trusted-third-party-host-know-about-their-users"}},[e._v("What does the trusted third-party host know about their users?")])])])])]),e._v(" "),t("h2",{attrs:{id:"advantages-and-disadvantages"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#advantages-and-disadvantages"}},[e._v("#")]),e._v(" Advantages and disadvantages")]),e._v(" "),t("h3",{attrs:{id:"pros"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#pros"}},[e._v("#")]),e._v(" Pros")]),e._v(" "),t("ul",[t("li",[e._v("Easy and quicker setup")]),e._v(" "),t("li",[e._v("Cheaper and in most cases free (depending if the host is premium or free)")]),e._v(" "),t("li",[e._v("Receive payments directly to your wallet")]),e._v(" "),t("li",[e._v("Private key never required (if it is, it's a scam!)")])]),e._v(" "),t("h3",{attrs:{id:"cons"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#cons"}},[e._v("#")]),e._v(" Cons")]),e._v(" "),t("ul",[t("li",[e._v("Security concerns")]),e._v(" "),t("li",[e._v("Privacy concerns")]),e._v(" "),t("li",[e._v("Limitation of features")]),e._v(" "),t("li",[e._v("No control over a server")]),e._v(" "),t("li",[e._v("Have to trust the owner of the server")])]),e._v(" "),t("h2",{attrs:{id:"concerns-for-use"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#concerns-for-use"}},[e._v("#")]),e._v(" Concerns For Use")]),e._v(" "),t("h3",{attrs:{id:"security-concerns"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#security-concerns"}},[e._v("#")]),e._v(" Security Concerns")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://nakamotoinstitute.org/trusted-third-parties/#selection-7.6-6.2",target:"_blank",rel:"noopener noreferrer"}},[e._v("Trusted third parties are security holes"),t("OutboundLink")],1),e._v(". By relying on someone else to manage a server for you, you are potentially exposing yourself to a certain attack vector.")]),e._v(" "),t("p",[e._v("The most significant attack vector when using a third-party host is the chance that this host will gain access to the management of your funds. This can occur in two ways.")]),e._v(" "),t("p",[e._v("First, a host may allow you to create "),t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Hot_wallet",target:"_blank",rel:"noopener noreferrer"}},[e._v("hot wallets"),t("OutboundLink")],1),e._v(" on their server. This gives the host complete access to your funds. They will act as a custodian of your private keys and thus your funds. This means you must trust they will not spend your funds. This type of wallet is NOT recommended for use with third-party hosts.")]),e._v(" "),t("p",[e._v("Secondly, a malicious and technically skilled host can create a forked version of BTCPay Server and modify it to be able to either spy on your transactions or replace your "),t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Deterministic_wallet_tools#Risks_of_Sharing_an_Extended_Public_Key_.28xpub.29",target:"_blank",rel:"noopener noreferrer"}},[e._v("extended public key"),t("OutboundLink")],1),e._v(" with their own. This means that future payments made to you may end up in this malicious party's wallet.")]),e._v(" "),t("p",[e._v("While a wallet connected with an extended public key IS recommended for use with third-party hosts, It's impossible to know for certain, if the third party host is using a malicious fork. If you don't trust the third party host it is best to do the following:")]),e._v(" "),t("ul",[t("li",[e._v("Do not use hot wallet on the third party server, use an extended public key")]),e._v(" "),t("li",[e._v("Use it mainly for testing, learning and getting started with BTCPay")]),e._v(" "),t("li",[e._v("Do not use it with high volume payments or extremely valuable transactions")])]),e._v(" "),t("p",[e._v("In BTCPay Server, a private key is never "),t("em",[e._v("required")]),e._v(". This means that funds are safe even if the server is hacked, but a malicious host can intercept future payments and steal those funds. If you follow your transactions via a watch-only wallet, you should be able to detect such attack quickly and notice that your orders are being marked as paid, whereas you don't see the transactions in your wallet.")]),e._v(" "),t("div",{staticClass:"custom-block danger"},[t("p",{staticClass:"custom-block-title"},[e._v("DANGER")]),e._v(" "),t("p",[e._v("If a third-party host asks for your private key or pre-generates one for you, be sure it's a scam. Never share your private key with anyone. It's called private for a reason.")])]),e._v(" "),t("p",[e._v("An extended public key replacement attack applies to a self-hosted server as well. A malicious hacker can try to hack your server and try to replace an extended public key.")]),e._v(" "),t("h3",{attrs:{id:"privacy-concerns"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#privacy-concerns"}},[e._v("#")]),e._v(" Privacy Concerns")]),e._v(" "),t("p",[e._v("BTCPay Server does not allow server hosts to view the stores of other users nor have access to any personal data (except for registration email address). The extended public key and even balances of other users can't be seen. However, as mentioned, a malicious third-party could modify that by creating a fork that can look like BTCPay Server on the front but be something completely different in reality.")]),e._v(" "),t("p",[e._v("The biggest concern, which happens when using a third-party host (even if the owner of a self-hosted server is not malicious) comes from the nature of the Bitcoin itself. If a user is not running a full node but instead relies on someone else's node, his transactions can be listened to by the owner of that node. Running a full node is not just a convenience that gives you features and enables privacy, it gives you better security and the right to \"vote\" and validate all the transactions yourself. Don't trust, verify.")]),e._v(" "),t("p",[e._v("Here are some good resources where you learn more about the importance of full nodes")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Why_Your_Business_Should_Use_a_Full_Node_to_Accept_Bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Why Your Business Should Use a Full Node to Accept Bitcoin"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Clearing_Up_Misconceptions_About_Full_Nodes",target:"_blank",rel:"noopener noreferrer"}},[e._v("Clearing Up Misconceptions About Full Nodes"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"trust-concerns"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#trust-concerns"}},[e._v("#")]),e._v(" Trust Concerns")]),e._v(" "),t("p",[e._v("Third-party hosts have the ability to enable specific features for their non-admin users which require users to place some level of trust in the third-party host, if such features are used.")]),e._v(" "),t("p",[e._v("Specifically, third-party hosts should not enable the following policies without understanding that users will be using hot wallets on the server. These features are disabled by default for non-admins to reduce the risk considerations for both third-party hosts and their users:")]),e._v(" "),t("ul",[t("li",[e._v("Allow non-admins to create hot wallets for their stores")]),e._v(" "),t("li",[e._v("Allow non-admins to import their hot wallets to the node wallet")]),e._v(" "),t("li",[e._v("Allow non-admins to use the internal lightning node in their stores")])]),e._v(" "),t("p",[e._v("Third-party users who are granted access to an internal lightning node or hot wallet functionality to enable features such as Payjoin, should understand the risk and trust associated with "),t("RouterLink",{attrs:{to:"/CreateWallet/#hot-wallet"}},[e._v("using hot wallets")]),e._v(" before choosing to use it. Use one of the "),t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("recommended wallets")]),e._v(" which provide an extended public key to use in your store, if you are unsure which wallet type to use.")],1),e._v(" "),t("h2",{attrs:{id:"third-party-hosting-faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#third-party-hosting-faq"}},[e._v("#")]),e._v(" Third Party Hosting FAQ")]),e._v(" "),t("h2",{attrs:{id:"where-is-the-list-of-btcpay-third-party-hosts"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#where-is-the-list-of-btcpay-third-party-hosts"}},[e._v("#")]),e._v(" Where is the list of BTCPay third-party hosts?")]),e._v(" "),t("p",[e._v("Feel free to chat with the "),t("RouterLink",{attrs:{to:"/Community/"}},[e._v("Community")]),e._v(" to find the appropriate host for your needs, but also make sure to choose one that is trustworthy. Read the rest of this document to better understand the pros and cons of using a third-party host.")],1),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("The BTCPay Server "),t("a",{attrs:{href:"https://directory.btcpayserver.org/filter/hosts",target:"_blank",rel:"noopener noreferrer"}},[e._v("Directory"),t("OutboundLink")],1),e._v(" lists multiple free or paid third-party hosts that you can register to, to start exploring BTCPay Server.")])]),e._v(" "),t("h2",{attrs:{id:"how-can-one-become-a-third-party-host"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-one-become-a-third-party-host"}},[e._v("#")]),e._v(" How can one become a third-party host?")]),e._v(" "),t("p",[e._v("To become a third-party host, you need to self-host a BTCPay Server and enable registration for other users.\nGo to Server Settings > Policies > Disable registration, unmark the checkbox. You may also want to configure the "),t("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-configure-smtp-settings-in-btcpay"}},[e._v("SMTP settings")]),e._v(" to allow them to reset their password if they forget it.")],1),e._v(" "),t("p",[e._v("Alternatively you may keep public registration disabled on your homepage and only invite specific users to create a new account by "),t("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-add-a-new-user-by-invite"}},[e._v("invitation link")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"are-there-any-limitations-in-features-when-using-a-third-party-host"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#are-there-any-limitations-in-features-when-using-a-third-party-host"}},[e._v("#")]),e._v(" Are there any limitations in features when using a third-party host?")]),e._v(" "),t("p",[e._v("Yes. Here are some restrictions.")]),e._v(" "),t("ul",[t("li",[e._v("No "),t("RouterLink",{attrs:{to:"/LightningNetwork/"}},[e._v("Lightning Network")]),e._v(" by default. Can be enabled by the third-party host but at the cost of a security risk for registrants using that third-party. "),t("a",{attrs:{href:"#can-i-enable-the-use-of-my-lightning-network-node-to-others"}},[e._v("More information")])],1),e._v(" "),t("li",[e._v("No "),t("RouterLink",{attrs:{to:"/FAQ/Wallet/#what-is-wallet-re-scan-in-btcpay"}},[e._v("wallet re-scan")])],1),e._v(" "),t("li",[e._v("No "),t("RouterLink",{attrs:{to:"/Walkthrough/#server-settings"}},[e._v("Server Settings")]),e._v(" access")],1)]),e._v(" "),t("p",[e._v("The limitations happen for technical reasons, mostly because these features require a user to run a full node to use them.")]),e._v(" "),t("h2",{attrs:{id:"can-i-enable-the-use-of-my-lightning-network-node-to-others"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-enable-the-use-of-my-lightning-network-node-to-others"}},[e._v("#")]),e._v(" Can I enable the use of my Lightning Network node to others?")]),e._v(" "),t("p",[e._v("Yes, you can enable users that have registered on your BTCPay Server instance to use your Lightning Network node.\n"),t("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-many-users-can-use-lightning-network-in-btcpay"}},[e._v("See how")])],1),e._v(" "),t("h2",{attrs:{id:"what-does-the-trusted-third-party-host-know-about-their-users"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-does-the-trusted-third-party-host-know-about-their-users"}},[e._v("#")]),e._v(" What does the trusted third-party host know about their users?")]),e._v(" "),t("p",[e._v("Third party hosts (non-malicious) can see the following:")]),e._v(" "),t("ul",[t("li",[e._v("Total number of users")]),e._v(" "),t("li",[e._v("The email and username of those users")])]),e._v(" "),t("p",[e._v("Note: If additional features are enabled such as non-admin lightning wallet, hot wallets or transmuter, the server admin can see additional information related to those features. Since it's impossible to know if the third party host is using a malicious fork, it's best to assume they may know all details about your BTCPay Server usage.")]),e._v(" "),t("p",[e._v("If you are worried about the information a third party host knows about you, please consider "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("deploying your own")]),e._v(" self-hosted server.")],1)])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{853:function(e,t,r){"use strict";r.r(t);var s=r(17),a=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"third-party-hosting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#third-party-hosting"}},[e._v("#")]),e._v(" Third-party hosting")]),e._v(" "),t("p",[e._v("A "),t("strong",[e._v("third-party host")]),e._v(" is an individual or a business which "),t("strong",[e._v("self-hosts a BTCPay Server instance and enables other users to register and use the server")]),e._v(". On a self-hosted server, the owner can add an unlimited amount of users and stores and allow those users to manage their stores independently and receive payments to their own wallets.")]),e._v(" "),t("p",[e._v("While this feature in BTCPay Server exists for complex multi-store business management, community enthusiasts use it to help other users (mostly beginners), sometimes skip an overwhelming step of "),t("strong",[e._v("deploying a self-hosted BTCPay server")]),e._v(". Users who want to test or develop applications on top of BTCPay Server also use "),t("strong",[e._v("instances hosted by third-parties")]),e._v(". Some hosts try to spread the adoption of cryptocurrencies by allowing their local merchants to receive payments for free or for a small sign-up fee.")]),e._v(" "),t("p",[e._v("In layman words, think of this feature as a payment processor factory which allows anyone to deploy a server and help others receive payments which are validated via the server owners' "),t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Full_node",target:"_blank",rel:"noopener noreferrer"}},[e._v("full Bitcoin node"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Third-party hosts")]),e._v(" play an important role in the ecosystem since they provide an easy and cost-effective "),t("strong",[e._v("way for users to try and use BTCPay Server")]),e._v(". The role of honest hosts who provide free service to others is essential in the early phase of BTCPay Server adoption. However, users should be familiar with the pros, cons and potential risks involved when using a trusted third-party. Find the optimal balance between your use-case, cost, and privacy/security trade-offs.")]),e._v(" "),t("p",[e._v("Some of the hosts are entirely free to use and maintain the server cost from donations of their users. If you've been using a reliable free host for a while, you should consider donating to them to support them.")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"#third-party-hosting"}},[e._v("Third-party hosting")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"#advantages-and-disadvantages"}},[e._v("Advantages and disadvantages")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"#pros"}},[e._v("Pros")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#cons"}},[e._v("Cons")])])])]),e._v(" "),t("li",[t("a",{attrs:{href:"#concerns-for-use"}},[e._v("Concerns For Use")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"#security-concerns"}},[e._v("Security Concerns")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#privacy-concerns"}},[e._v("Privacy Concerns")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#trust-concerns"}},[e._v("Trust Concerns")])])])]),e._v(" "),t("li",[t("a",{attrs:{href:"#third-party-hosting-faq"}},[e._v("Third Party Hosting FAQ")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#where-is-the-list-of-btcpay-third-party-hosts"}},[e._v("Where is the list of BTCPay third-party hosts?")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#how-can-one-become-a-third-party-host"}},[e._v("How can one become a third-party host?")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#are-there-any-limitations-in-features-when-using-a-third-party-host"}},[e._v("Are there any limitations in features when using a third-party host?")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#can-i-enable-the-use-of-my-lightning-network-node-to-others"}},[e._v("Can I enable the use of my Lightning Network node to others?")])]),e._v(" "),t("li",[t("a",{attrs:{href:"#what-does-the-trusted-third-party-host-know-about-their-users"}},[e._v("What does the trusted third-party host know about their users?")])])])])]),e._v(" "),t("h2",{attrs:{id:"advantages-and-disadvantages"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#advantages-and-disadvantages"}},[e._v("#")]),e._v(" Advantages and disadvantages")]),e._v(" "),t("h3",{attrs:{id:"pros"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#pros"}},[e._v("#")]),e._v(" Pros")]),e._v(" "),t("ul",[t("li",[e._v("Easy and quicker setup")]),e._v(" "),t("li",[e._v("Cheaper and in most cases free (depending if the host is premium or free)")]),e._v(" "),t("li",[e._v("Receive payments directly to your wallet")]),e._v(" "),t("li",[e._v("Private key never required (if it is, it's a scam!)")])]),e._v(" "),t("h3",{attrs:{id:"cons"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#cons"}},[e._v("#")]),e._v(" Cons")]),e._v(" "),t("ul",[t("li",[e._v("Security concerns")]),e._v(" "),t("li",[e._v("Privacy concerns")]),e._v(" "),t("li",[e._v("Limitation of features")]),e._v(" "),t("li",[e._v("No control over a server")]),e._v(" "),t("li",[e._v("Have to trust the owner of the server")])]),e._v(" "),t("h2",{attrs:{id:"concerns-for-use"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#concerns-for-use"}},[e._v("#")]),e._v(" Concerns For Use")]),e._v(" "),t("h3",{attrs:{id:"security-concerns"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#security-concerns"}},[e._v("#")]),e._v(" Security Concerns")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://nakamotoinstitute.org/trusted-third-parties/#selection-7.6-6.2",target:"_blank",rel:"noopener noreferrer"}},[e._v("Trusted third parties are security holes"),t("OutboundLink")],1),e._v(". By relying on someone else to manage a server for you, you are potentially exposing yourself to a certain attack vector.")]),e._v(" "),t("p",[e._v("The most significant attack vector when using a third-party host is the chance that this host will gain access to the management of your funds. This can occur in two ways.")]),e._v(" "),t("p",[e._v("First, a host may allow you to create "),t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Hot_wallet",target:"_blank",rel:"noopener noreferrer"}},[e._v("hot wallets"),t("OutboundLink")],1),e._v(" on their server. This gives the host complete access to your funds. They will act as a custodian of your private keys and thus your funds. This means you must trust they will not spend your funds. This type of wallet is NOT recommended for use with third-party hosts.")]),e._v(" "),t("p",[e._v("Secondly, a malicious and technically skilled host can create a forked version of BTCPay Server and modify it to be able to either spy on your transactions or replace your "),t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Deterministic_wallet_tools#Risks_of_Sharing_an_Extended_Public_Key_.28xpub.29",target:"_blank",rel:"noopener noreferrer"}},[e._v("extended public key"),t("OutboundLink")],1),e._v(" with their own. This means that future payments made to you may end up in this malicious party's wallet.")]),e._v(" "),t("p",[e._v("While a wallet connected with an extended public key IS recommended for use with third-party hosts, It's impossible to know for certain, if the third party host is using a malicious fork. If you don't trust the third party host it is best to do the following:")]),e._v(" "),t("ul",[t("li",[e._v("Do not use hot wallet on the third party server, use an extended public key")]),e._v(" "),t("li",[e._v("Use it mainly for testing, learning and getting started with BTCPay")]),e._v(" "),t("li",[e._v("Do not use it with high volume payments or extremely valuable transactions")])]),e._v(" "),t("p",[e._v("In BTCPay Server, a private key is never "),t("em",[e._v("required")]),e._v(". This means that funds are safe even if the server is hacked, but a malicious host can intercept future payments and steal those funds. If you follow your transactions via a watch-only wallet, you should be able to detect such attack quickly and notice that your orders are being marked as paid, whereas you don't see the transactions in your wallet.")]),e._v(" "),t("div",{staticClass:"custom-block danger"},[t("p",{staticClass:"custom-block-title"},[e._v("DANGER")]),e._v(" "),t("p",[e._v("If a third-party host asks for your private key or pre-generates one for you, be sure it's a scam. Never share your private key with anyone. It's called private for a reason.")])]),e._v(" "),t("p",[e._v("An extended public key replacement attack applies to a self-hosted server as well. A malicious hacker can try to hack your server and try to replace an extended public key.")]),e._v(" "),t("h3",{attrs:{id:"privacy-concerns"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#privacy-concerns"}},[e._v("#")]),e._v(" Privacy Concerns")]),e._v(" "),t("p",[e._v("BTCPay Server does not allow server hosts to view the stores of other users nor have access to any personal data (except for registration email address). The extended public key and even balances of other users can't be seen. However, as mentioned, a malicious third-party could modify that by creating a fork that can look like BTCPay Server on the front but be something completely different in reality.")]),e._v(" "),t("p",[e._v("The biggest concern, which happens when using a third-party host (even if the owner of a self-hosted server is not malicious) comes from the nature of the Bitcoin itself. If a user is not running a full node but instead relies on someone else's node, his transactions can be listened to by the owner of that node. Running a full node is not just a convenience that gives you features and enables privacy, it gives you better security and the right to \"vote\" and validate all the transactions yourself. Don't trust, verify.")]),e._v(" "),t("p",[e._v("Here are some good resources where you learn more about the importance of full nodes")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Why_Your_Business_Should_Use_a_Full_Node_to_Accept_Bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Why Your Business Should Use a Full Node to Accept Bitcoin"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://en.bitcoin.it/wiki/Clearing_Up_Misconceptions_About_Full_Nodes",target:"_blank",rel:"noopener noreferrer"}},[e._v("Clearing Up Misconceptions About Full Nodes"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"trust-concerns"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#trust-concerns"}},[e._v("#")]),e._v(" Trust Concerns")]),e._v(" "),t("p",[e._v("Third-party hosts have the ability to enable specific features for their non-admin users which require users to place some level of trust in the third-party host, if such features are used.")]),e._v(" "),t("p",[e._v("Specifically, third-party hosts should not enable the following policies without understanding that users will be using hot wallets on the server. These features are disabled by default for non-admins to reduce the risk considerations for both third-party hosts and their users:")]),e._v(" "),t("ul",[t("li",[e._v("Allow non-admins to create hot wallets for their stores")]),e._v(" "),t("li",[e._v("Allow non-admins to import their hot wallets to the node wallet")]),e._v(" "),t("li",[e._v("Allow non-admins to use the internal lightning node in their stores")])]),e._v(" "),t("p",[e._v("Third-party users who are granted access to an internal lightning node or hot wallet functionality to enable features such as Payjoin, should understand the risk and trust associated with "),t("RouterLink",{attrs:{to:"/CreateWallet/#hot-wallet"}},[e._v("using hot wallets")]),e._v(" before choosing to use it. Use one of the "),t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("recommended wallets")]),e._v(" which provide an extended public key to use in your store, if you are unsure which wallet type to use.")],1),e._v(" "),t("h2",{attrs:{id:"third-party-hosting-faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#third-party-hosting-faq"}},[e._v("#")]),e._v(" Third Party Hosting FAQ")]),e._v(" "),t("h2",{attrs:{id:"where-is-the-list-of-btcpay-third-party-hosts"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#where-is-the-list-of-btcpay-third-party-hosts"}},[e._v("#")]),e._v(" Where is the list of BTCPay third-party hosts?")]),e._v(" "),t("p",[e._v("Feel free to chat with the "),t("RouterLink",{attrs:{to:"/Community/"}},[e._v("Community")]),e._v(" to find the appropriate host for your needs, but also make sure to choose one that is trustworthy. Read the rest of this document to better understand the pros and cons of using a third-party host.")],1),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("The BTCPay Server "),t("a",{attrs:{href:"https://directory.btcpayserver.org/filter/hosts",target:"_blank",rel:"noopener noreferrer"}},[e._v("Directory"),t("OutboundLink")],1),e._v(" lists multiple free or paid third-party hosts that you can register to, to start exploring BTCPay Server.")])]),e._v(" "),t("h2",{attrs:{id:"how-can-one-become-a-third-party-host"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-one-become-a-third-party-host"}},[e._v("#")]),e._v(" How can one become a third-party host?")]),e._v(" "),t("p",[e._v("To become a third-party host, you need to self-host a BTCPay Server and enable registration for other users.\nGo to Server Settings > Policies > Disable registration, unmark the checkbox. You may also want to configure the "),t("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-configure-smtp-settings-in-btcpay"}},[e._v("SMTP settings")]),e._v(" to allow them to reset their password if they forget it.")],1),e._v(" "),t("p",[e._v("Alternatively you may keep public registration disabled on your homepage and only invite specific users to create a new account by "),t("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-add-a-new-user-by-invite"}},[e._v("invitation link")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"are-there-any-limitations-in-features-when-using-a-third-party-host"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#are-there-any-limitations-in-features-when-using-a-third-party-host"}},[e._v("#")]),e._v(" Are there any limitations in features when using a third-party host?")]),e._v(" "),t("p",[e._v("Yes. Here are some restrictions.")]),e._v(" "),t("ul",[t("li",[e._v("No "),t("RouterLink",{attrs:{to:"/LightningNetwork/"}},[e._v("Lightning Network")]),e._v(" by default. Can be enabled by the third-party host but at the cost of a security risk for registrants using that third-party. "),t("a",{attrs:{href:"#can-i-enable-the-use-of-my-lightning-network-node-to-others"}},[e._v("More information")])],1),e._v(" "),t("li",[e._v("No "),t("RouterLink",{attrs:{to:"/FAQ/Wallet/#what-is-wallet-re-scan-in-btcpay"}},[e._v("wallet re-scan")])],1),e._v(" "),t("li",[e._v("No "),t("RouterLink",{attrs:{to:"/Walkthrough/#server-settings"}},[e._v("Server Settings")]),e._v(" access")],1)]),e._v(" "),t("p",[e._v("The limitations happen for technical reasons, mostly because these features require a user to run a full node to use them.")]),e._v(" "),t("h2",{attrs:{id:"can-i-enable-the-use-of-my-lightning-network-node-to-others"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-enable-the-use-of-my-lightning-network-node-to-others"}},[e._v("#")]),e._v(" Can I enable the use of my Lightning Network node to others?")]),e._v(" "),t("p",[e._v("Yes, you can enable users that have registered on your BTCPay Server instance to use your Lightning Network node.\n"),t("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-many-users-can-use-lightning-network-in-btcpay"}},[e._v("See how")])],1),e._v(" "),t("h2",{attrs:{id:"what-does-the-trusted-third-party-host-know-about-their-users"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-does-the-trusted-third-party-host-know-about-their-users"}},[e._v("#")]),e._v(" What does the trusted third-party host know about their users?")]),e._v(" "),t("p",[e._v("Third party hosts (non-malicious) can see the following:")]),e._v(" "),t("ul",[t("li",[e._v("Total number of users")]),e._v(" "),t("li",[e._v("The email and username of those users")])]),e._v(" "),t("p",[e._v("Note: If additional features are enabled such as non-admin lightning wallet, hot wallets or transmuter, the server admin can see additional information related to those features. Since it's impossible to know if the third party host is using a malicious fork, it's best to assume they may know all details about your BTCPay Server usage.")]),e._v(" "),t("p",[e._v("If you are worried about the information a third party host knows about you, please consider "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("deploying your own")]),e._v(" self-hosted server.")],1)])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/125.54cefdcb.js b/assets/js/125.1abef3b1.js similarity index 98% rename from assets/js/125.54cefdcb.js rename to assets/js/125.1abef3b1.js index 54c8099687..fff04a51bb 100644 --- a/assets/js/125.54cefdcb.js +++ b/assets/js/125.1abef3b1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[125],{865:function(e,t,r){"use strict";r.r(t);var o=r(17),a=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"how-to-add-an-altcoin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin"}},[e._v("#")]),e._v(" How to add an Altcoin")]),e._v(" "),t("p",[e._v("Bitcoin is the only focus of the project and its core developers. However, opt-in integrations are available for several altcoins.")]),e._v(" "),t("p",[e._v("For more information and the full list of integrated altcoins, check the "),t("RouterLink",{attrs:{to:"/FAQ/Altcoin/"}},[e._v("Altcoin FAQ page")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-can-i-add-an-altcoin-to-btcpayserver"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-add-an-altcoin-to-btcpayserver"}},[e._v("#")]),e._v(" How can I add an altcoin to BTCPayServer?")]),e._v(" "),t("p",[e._v("The steps for having a coin added are:")]),e._v(" "),t("ol",[t("li",[e._v("Add support for your crypto to "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBitcoin"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBxplorer"),t("OutboundLink")],1),e._v(", and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer"),t("OutboundLink")],1),e._v(". (Use examples from other coins)")]),e._v(" "),t("li",[e._v("Create your own docker image ("),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Create a docker-compose fragment ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/bitcoin.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Add your CryptoDefinition ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("p",[e._v("When testing your coin, "),t("strong",[e._v("DO NOT USE "),t("code",[e._v("build.sh")])]),e._v(", since it uses a pre-built docker image.")]),e._v(" "),t("p",[e._v("Instead, install "),t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1),e._v(" and run:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"EXAMPLE-COIN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_SUBNAME")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"test"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" docker-compose-generator/src\ndotnet run\n")])])]),t("p",[e._v("This will generate your docker-compose in the "),t("code",[e._v("Generated")]),e._v(" folder, which you can then run and test.")]),e._v(" "),t("p",[e._v("Note: BTCPay developers do not implement alternative coins on request. Adding a new coin explicitly depends on the community and developers of those coins. Furthermore, BTCPay developers do not spend excessive time testing nor maintaining the altcoins. If you're submitting a PR for a new coin, make sure that your image works. If the altcoin integration is not actively maintained it will be removed from BTCPay.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[125],{857:function(e,t,r){"use strict";r.r(t);var o=r(17),a=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"how-to-add-an-altcoin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin"}},[e._v("#")]),e._v(" How to add an Altcoin")]),e._v(" "),t("p",[e._v("Bitcoin is the only focus of the project and its core developers. However, opt-in integrations are available for several altcoins.")]),e._v(" "),t("p",[e._v("For more information and the full list of integrated altcoins, check the "),t("RouterLink",{attrs:{to:"/FAQ/Altcoin/"}},[e._v("Altcoin FAQ page")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-can-i-add-an-altcoin-to-btcpayserver"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-add-an-altcoin-to-btcpayserver"}},[e._v("#")]),e._v(" How can I add an altcoin to BTCPayServer?")]),e._v(" "),t("p",[e._v("The steps for having a coin added are:")]),e._v(" "),t("ol",[t("li",[e._v("Add support for your crypto to "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBitcoin"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBxplorer"),t("OutboundLink")],1),e._v(", and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer"),t("OutboundLink")],1),e._v(". (Use examples from other coins)")]),e._v(" "),t("li",[e._v("Create your own docker image ("),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Create a docker-compose fragment ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/bitcoin.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Add your CryptoDefinition ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("p",[e._v("When testing your coin, "),t("strong",[e._v("DO NOT USE "),t("code",[e._v("build.sh")])]),e._v(", since it uses a pre-built docker image.")]),e._v(" "),t("p",[e._v("Instead, install "),t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1),e._v(" and run:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"EXAMPLE-COIN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_SUBNAME")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"test"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" docker-compose-generator/src\ndotnet run\n")])])]),t("p",[e._v("This will generate your docker-compose in the "),t("code",[e._v("Generated")]),e._v(" folder, which you can then run and test.")]),e._v(" "),t("p",[e._v("Note: BTCPay developers do not implement alternative coins on request. Adding a new coin explicitly depends on the community and developers of those coins. Furthermore, BTCPay developers do not spend excessive time testing nor maintaining the altcoins. If you're submitting a PR for a new coin, make sure that your image works. If the altcoin integration is not actively maintained it will be removed from BTCPay.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/126.28143809.js b/assets/js/126.03474fce.js similarity index 99% rename from assets/js/126.28143809.js rename to assets/js/126.03474fce.js index 66c0382c77..3703ebb71e 100644 --- a/assets/js/126.28143809.js +++ b/assets/js/126.03474fce.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[126],{857:function(t,s,a){"use strict";a.r(s);var n=a(17),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-example-with-nodejs-javascript"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-example-with-nodejs-javascript"}},[t._v("#")]),t._v(" Greenfield API example with Node.js (JavaScript)")]),t._v(" "),s("p",[t._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Greenfield API"),s("OutboundLink")],1)]),t._v(" (also available on your instance on "),s("code",[t._v("/docs")]),t._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),t._v(" "),s("p",[t._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("Swagger file"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("In this guide, we will show you how to use it using Node.js/JavaScript.")]),t._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("p",[t._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),t._v(" "),s("p",[t._v("You can create a new API key in the BTCPay Server UI under "),s("code",[t._v("Account")]),t._v(" -> "),s("code",[t._v("Manage account")]),t._v(" -> "),s("code",[t._v("API keys")])]),t._v(" "),s("p",[t._v("For the ecommerce examples below the API key needs the following permissions:")]),t._v(" "),s("ul",[s("li",[t._v("View invoices")]),t._v(" "),s("li",[t._v("Create invoice")]),t._v(" "),s("li",[t._v("Modify invoices")]),t._v(" "),s("li",[t._v("Modify stores webhooks")]),t._v(" "),s("li",[t._v("View your stores")]),t._v(" "),s("li",[t._v("Create non-approved pull payments")])]),t._v(" "),s("p",[t._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[t._v("API documentation"),s("OutboundLink")],1),t._v(" or the permissions documented on each endpoint.")]),t._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[t._v("#")]),t._v(" eCommerce examples")]),t._v(" "),s("p",[t._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),t._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[t._v("#")]),t._v(" Create an invoice")]),t._v(" "),s("p",[t._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[t._v("create invoice endpoint"),s("OutboundLink")],1),t._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" amount "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" currency "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USD'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/invoices")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("amount")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" amount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("currency")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" currency\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[t._v("#")]),t._v(" Register a webhook (optional)")]),t._v(" "),s("p",[t._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[t._v("create webhook endpoint"),s("OutboundLink")],1),t._v(" to register a webhook.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/webhooks")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("url")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://example.com/your-webhook-endpoint'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[t._v("Settings")]),t._v(" -> "),s("code",[t._v("Webhooks")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[t._v("#")]),t._v(" Validate and process webhooks")]),t._v(" "),s("p",[t._v("You can use your Node.js Express web application to receive webhook requests from your BTCPay Server.")]),t._v(" "),s("p",[t._v("First you need a route so that your Node.js application can receive POST requests.\nBased on how you set up the express server this should look something like this:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/your-webhook-endpoint'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do stuff here")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("What's important is that the webhook sends a HTTP-header "),s("code",[t._v("BTCPAY-SIG")]),t._v(" which is the signed request using the "),s("code",[t._v("secret")]),t._v(" you got back from the previous step when registering the webhook. You can use that "),s("code",[t._v("secret")]),t._v(" and the raw payload (as bytes) you get from the webhook, hash it and compare it to "),s("code",[t._v("BTCPAY-SIG")]),t._v(". Therefore, you need "),s("code",[t._v("body-parser")]),t._v(" which is a middleware to parse the raw body of the request. For comparing the hashes you also need "),s("code",[t._v("crypto")]),t._v(" which is a built-in Node.js module.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" bodyParser "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'body-parser'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" crypto "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'crypto'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("You can parse the raw body of the request like this:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("use")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n bodyParser"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("verify")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" buf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" buf\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("This makes sure that in req.rawBody the correct content is parsed so that you can compare the hashed req.rawBody with the "),s("code",[t._v("BTCPAY-SIG")]),t._v(" header value.")]),t._v(" "),s("p",[t._v("However, if you are using TypeScript, you might run into this error:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("Property 'rawBody' does not exist on type 'Request'.\n")])])]),s("p",[t._v("The temporary fix is to use the "),s("code",[t._v("as")]),t._v(" keyword to tell the compiler to consider the "),s("code",[t._v("req")]),t._v(" object as another type when you accessing the "),s("code",[t._v("rawBody")]),t._v(". Here is an example of how to obtain "),s("code",[t._v("rawBody")]),t._v(" using this workaround, no need for the middleware code above:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" Request"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" Response "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"express-serve-static-core"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" https "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"firebase-functions"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\ntype FirebaseRequest "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" https"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Request\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("myFunc")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("req")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Request"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("res")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Response")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rawBody "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" FirebaseRequest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Replace "),s("code",[t._v("req.rawBody")]),t._v(" with "),s("code",[t._v("rawBody")]),t._v(" in the next sections if utilizing this method with TypeScript.")]),t._v(" "),s("p",[t._v("In your router it looks like this put all together: (Change "),s("code",[t._v("webhookSecret")]),t._v(" with the "),s("code",[t._v("secret")]),t._v(" you got back from the previous step when registering the webhook).")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/your-webhook-endpoint'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" sigHashAlg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sha256'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" sigHeaderName "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'BTCPAY-SIG'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" webhookSecret "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SECRET_FROM_REGISTERING_WEBHOOK'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// see previous step")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("500")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Request body empty'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" checksum "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Buffer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("from")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("||")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("''")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'utf8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" hmac "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createHmac")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sigHashAlg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" webhookSecret"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" digest "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Buffer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("from")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n sigHashAlg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'='")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" hmac"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("update")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("digest")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hex'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'utf8'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n checksum"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("length "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!==")]),t._v(" digest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("length "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("||")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("timingSafeEqual")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" checksum"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("Request body digest (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(") did not match ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(" (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("checksum"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("500")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("Request body digest (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(") did not match ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(" (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("checksum"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Your own processing code goes here. E.g. update your internal order id depending on the invoice payment status.")]),t._v("\n\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("200")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Success: request body was signed'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[t._v("#")]),t._v(" Issue a full refund of an invoice")]),t._v(" "),s("p",[t._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[t._v("invoice refund endpoint"),s("OutboundLink")],1),t._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" invoiceId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'EXISTING_INVOICE_ID'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/invoices/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("invoiceId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/refund")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("refundVariant")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'CurrentRate'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("paymentMethod")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'BTC'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[t._v("#")]),t._v(" BTCPay Server management examples")]),t._v(" "),s("p",[t._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),t._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[t._v("#")]),t._v(" Create a new user")]),t._v(" "),s("p",[t._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" adminApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_ADMIN_API_KEY'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/api/v1/users'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" adminApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("email")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("password")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SuperSecurePasswordsShouldBeQuiteLong123'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("isAdministrator")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-for-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-for-the-user"}},[t._v("#")]),t._v(" Create a new API key (for the user)")]),t._v(" "),s("p",[t._v("While we can use basic authentication to access the greenfield API, it is recommended to use API Keys to limit the scope of the credentials.")]),t._v(" "),s("p",[t._v("For example: If we want to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(" we need the "),s("code",[t._v("btcpay.store.canmodifystoresettings")]),t._v(" permission for the API key. Warning: If you do not pass any permission then the API key will have unrestricted access.")]),t._v(" "),s("p",[t._v("As mentioned above, you can do this through the BTCPay Server UI of your instance, but let's do it through the API using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(" where we with our admin API key create an API key for our new user.")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" adminApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_ADMIN_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" email "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'satoshi.nakamoto@example.com'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/users/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("email"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api-keys")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" adminApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("label")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Satoshi Nakamoto API Key'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("permissions")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'btcpay.store.canmodifystoresettings'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// returns apiKey")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-store"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-store"}},[t._v("#")]),t._v(" Create a new store")]),t._v(" "),s("p",[t._v("Now, we can use the api key to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayserverUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" userApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USER_API_KEY'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/api/v1/stores'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" userApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Satoshi Store'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[t._v("#")]),t._v(" Read store information")]),t._v(" "),s("p",[t._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("read store"),s("OutboundLink")],1),t._v(" information:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" userApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USER_API_KEY'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'STORE_ID'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" userApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GET'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[126],{859:function(t,s,a){"use strict";a.r(s);var n=a(17),e=Object(n.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-example-with-nodejs-javascript"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-example-with-nodejs-javascript"}},[t._v("#")]),t._v(" Greenfield API example with Node.js (JavaScript)")]),t._v(" "),s("p",[t._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Greenfield API"),s("OutboundLink")],1)]),t._v(" (also available on your instance on "),s("code",[t._v("/docs")]),t._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),t._v(" "),s("p",[t._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("Swagger file"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("In this guide, we will show you how to use it using Node.js/JavaScript.")]),t._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("p",[t._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),t._v(" "),s("p",[t._v("You can create a new API key in the BTCPay Server UI under "),s("code",[t._v("Account")]),t._v(" -> "),s("code",[t._v("Manage account")]),t._v(" -> "),s("code",[t._v("API keys")])]),t._v(" "),s("p",[t._v("For the ecommerce examples below the API key needs the following permissions:")]),t._v(" "),s("ul",[s("li",[t._v("View invoices")]),t._v(" "),s("li",[t._v("Create invoice")]),t._v(" "),s("li",[t._v("Modify invoices")]),t._v(" "),s("li",[t._v("Modify stores webhooks")]),t._v(" "),s("li",[t._v("View your stores")]),t._v(" "),s("li",[t._v("Create non-approved pull payments")])]),t._v(" "),s("p",[t._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[t._v("API documentation"),s("OutboundLink")],1),t._v(" or the permissions documented on each endpoint.")]),t._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[t._v("#")]),t._v(" eCommerce examples")]),t._v(" "),s("p",[t._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),t._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[t._v("#")]),t._v(" Create an invoice")]),t._v(" "),s("p",[t._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[t._v("create invoice endpoint"),s("OutboundLink")],1),t._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" amount "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" currency "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USD'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/invoices")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("amount")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" amount"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("currency")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" currency\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[t._v("#")]),t._v(" Register a webhook (optional)")]),t._v(" "),s("p",[t._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[t._v("create webhook endpoint"),s("OutboundLink")],1),t._v(" to register a webhook.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/webhooks")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("url")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://example.com/your-webhook-endpoint'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[t._v("Settings")]),t._v(" -> "),s("code",[t._v("Webhooks")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[t._v("#")]),t._v(" Validate and process webhooks")]),t._v(" "),s("p",[t._v("You can use your Node.js Express web application to receive webhook requests from your BTCPay Server.")]),t._v(" "),s("p",[t._v("First you need a route so that your Node.js application can receive POST requests.\nBased on how you set up the express server this should look something like this:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/your-webhook-endpoint'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Do stuff here")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("What's important is that the webhook sends a HTTP-header "),s("code",[t._v("BTCPAY-SIG")]),t._v(" which is the signed request using the "),s("code",[t._v("secret")]),t._v(" you got back from the previous step when registering the webhook. You can use that "),s("code",[t._v("secret")]),t._v(" and the raw payload (as bytes) you get from the webhook, hash it and compare it to "),s("code",[t._v("BTCPAY-SIG")]),t._v(". Therefore, you need "),s("code",[t._v("body-parser")]),t._v(" which is a middleware to parse the raw body of the request. For comparing the hashes you also need "),s("code",[t._v("crypto")]),t._v(" which is a built-in Node.js module.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" bodyParser "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'body-parser'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" crypto "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("require")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'crypto'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("You can parse the raw body of the request like this:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("use")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n bodyParser"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("verify")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" buf")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" buf\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("This makes sure that in req.rawBody the correct content is parsed so that you can compare the hashed req.rawBody with the "),s("code",[t._v("BTCPAY-SIG")]),t._v(" header value.")]),t._v(" "),s("p",[t._v("However, if you are using TypeScript, you might run into this error:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("Property 'rawBody' does not exist on type 'Request'.\n")])])]),s("p",[t._v("The temporary fix is to use the "),s("code",[t._v("as")]),t._v(" keyword to tell the compiler to consider the "),s("code",[t._v("req")]),t._v(" object as another type when you accessing the "),s("code",[t._v("rawBody")]),t._v(". Here is an example of how to obtain "),s("code",[t._v("rawBody")]),t._v(" using this workaround, no need for the middleware code above:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" Request"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" Response "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"express-serve-static-core"')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("import")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v(" https "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("from")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"firebase-functions"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\ntype FirebaseRequest "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" https"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("Request\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function-variable function"}},[t._v("myFunc")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("async")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("req")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Request"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("res")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" Response")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" rawBody "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" FirebaseRequest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Replace "),s("code",[t._v("req.rawBody")]),t._v(" with "),s("code",[t._v("rawBody")]),t._v(" in the next sections if utilizing this method with TypeScript.")]),t._v(" "),s("p",[t._v("In your router it looks like this put all together: (Change "),s("code",[t._v("webhookSecret")]),t._v(" with the "),s("code",[t._v("secret")]),t._v(" you got back from the previous step when registering the webhook).")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[t._v("app"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("post")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/your-webhook-endpoint'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" res")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" sigHashAlg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sha256'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" sigHeaderName "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'BTCPAY-SIG'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" webhookSecret "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SECRET_FROM_REGISTERING_WEBHOOK'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// see previous step")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("500")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Request body empty'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" checksum "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Buffer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("from")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("get")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("||")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("''")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'utf8'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" hmac "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createHmac")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("sigHashAlg"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" webhookSecret"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" digest "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" Buffer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("from")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n sigHashAlg "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'='")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" hmac"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("update")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("req"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("rawBody"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("digest")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'hex'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'utf8'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n checksum"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("length "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!==")]),t._v(" digest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),t._v("length "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("||")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("crypto"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("timingSafeEqual")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" checksum"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("Request body digest (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(") did not match ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(" (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("checksum"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("500")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("Request body digest (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("digest"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(") did not match ")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("sigHeaderName"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(" (")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("checksum"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("else")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Your own processing code goes here. E.g. update your internal order id depending on the invoice payment status.")]),t._v("\n\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("status")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("200")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Success: request body was signed'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[t._v("#")]),t._v(" Issue a full refund of an invoice")]),t._v(" "),s("p",[t._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[t._v("invoice refund endpoint"),s("OutboundLink")],1),t._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_STORE_ID'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" invoiceId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'EXISTING_INVOICE_ID'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/invoices/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("invoiceId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/refund")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("refundVariant")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'CurrentRate'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("paymentMethod")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'BTC'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[t._v("#")]),t._v(" BTCPay Server management examples")]),t._v(" "),s("p",[t._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),t._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[t._v("#")]),t._v(" Create a new user")]),t._v(" "),s("p",[t._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" adminApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_ADMIN_API_KEY'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/api/v1/users'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" adminApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("email")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("password")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'SuperSecurePasswordsShouldBeQuiteLong123'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("isAdministrator")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-for-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-for-the-user"}},[t._v("#")]),t._v(" Create a new API key (for the user)")]),t._v(" "),s("p",[t._v("While we can use basic authentication to access the greenfield API, it is recommended to use API Keys to limit the scope of the credentials.")]),t._v(" "),s("p",[t._v("For example: If we want to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(" we need the "),s("code",[t._v("btcpay.store.canmodifystoresettings")]),t._v(" permission for the API key. Warning: If you do not pass any permission then the API key will have unrestricted access.")]),t._v(" "),s("p",[t._v("As mentioned above, you can do this through the BTCPay Server UI of your instance, but let's do it through the API using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(" where we with our admin API key create an API key for our new user.")]),t._v(" "),s("div",{staticClass:"language-js extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" adminApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'YOUR_ADMIN_API_KEY'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" email "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'satoshi.nakamoto@example.com'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/users/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("email"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api-keys")]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" adminApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("label")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Satoshi Nakamoto API Key'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("permissions")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'btcpay.store.canmodifystoresettings'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// returns apiKey")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-store"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-store"}},[t._v("#")]),t._v(" Create a new store")]),t._v(" "),s("p",[t._v("Now, we can use the api key to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayserverUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" userApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USER_API_KEY'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/api/v1/stores'")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" userApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" payload "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("name")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'Satoshi Store'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'POST'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("body")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("stringify")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("payload"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[t._v("#")]),t._v(" Read store information")]),t._v(" "),s("p",[t._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("read store"),s("OutboundLink")],1),t._v(" information:")]),t._v(" "),s("div",{staticClass:"language-JS extra-class"},[s("pre",{pre:!0,attrs:{class:"language-js"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" userApiKey "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'USER_API_KEY'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" storeId "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'STORE_ID'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" apiEndpoint "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token template-string"}},[s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("/api/v1/stores/")]),s("span",{pre:!0,attrs:{class:"token interpolation"}},[s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("${")]),t._v("storeId"),s("span",{pre:!0,attrs:{class:"token interpolation-punctuation punctuation"}},[t._v("}")])]),s("span",{pre:!0,attrs:{class:"token template-punctuation string"}},[t._v("`")])]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("const")]),t._v(" headers "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string-property property"}},[t._v("'Content-Type'")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'application/json'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("Authorization")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'token '")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" userApiKey\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("fetch")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("btcpayServerUrl "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("+")]),t._v(" apiEndpoint"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("method")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'GET'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token literal-property property"}},[t._v("headers")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" headers\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("response")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" response"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("then")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token parameter"}},[t._v("data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n console"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("log")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n res"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(".")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("send")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("data"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=e.exports}}]); \ No newline at end of file diff --git a/assets/js/128.ccc0c2a3.js b/assets/js/128.ddd96668.js similarity index 99% rename from assets/js/128.ccc0c2a3.js rename to assets/js/128.ddd96668.js index 1fa3de7437..3df987702b 100644 --- a/assets/js/128.ccc0c2a3.js +++ b/assets/js/128.ddd96668.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[128],{859:function(t,s,a){"use strict";a.r(s);var e=a(17),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-examples-with-php"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-examples-with-php"}},[t._v("#")]),t._v(" Greenfield API examples with PHP")]),t._v(" "),s("p",[t._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Greenfield API"),s("OutboundLink")],1)]),t._v(" (also available on your instance on "),s("code",[t._v("/docs")]),t._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),t._v(" "),s("p",[t._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("Swagger file"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("For PHP we have a client library available which can be found "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(" and is also available for installation via Composer "),s("code",[t._v("composer require btcpayserver/btcpayserver-greenfield-php")])]),t._v(" "),s("p",[t._v("In this guide, we will give some examples how to use the Greenfield API with our PHP library for eCommerce and BTCPay management. Additional examples can be found "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("p",[t._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),t._v(" "),s("p",[t._v("You can create a new API key in the BTCPay Server UI under "),s("code",[t._v("Account")]),t._v(" -> "),s("code",[t._v("Manage account")]),t._v(" -> "),s("code",[t._v("API keys")])]),t._v(" "),s("p",[t._v("For the ecommerce examples below the API key needs the following permissions:")]),t._v(" "),s("ul",[s("li",[t._v("View invoices")]),t._v(" "),s("li",[t._v("Create invoice")]),t._v(" "),s("li",[t._v("Modify invoices")]),t._v(" "),s("li",[t._v("Modify stores webhooks")]),t._v(" "),s("li",[t._v("View your stores")]),t._v(" "),s("li",[t._v("Create non-approved pull payments")])]),t._v(" "),s("p",[t._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[t._v("API documentation"),s("OutboundLink")],1),t._v(" or the permissions documented on each endpoint.")]),t._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[t._v("#")]),t._v(" eCommerce examples")]),t._v(" "),s("p",[t._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),t._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[t._v("#")]),t._v(" Create an invoice")]),t._v(" "),s("p",[t._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[t._v("create invoice endpoint"),s("OutboundLink")],1),t._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$amount")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$currency")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USD'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$orderId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'SN21420'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Invoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createInvoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$currency")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified static-context"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Util"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("PreciseNumber")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("::")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("parseString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$amount")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$orderId")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[t._v("#")]),t._v(" Register a webhook (optional)")]),t._v(" "),s("p",[t._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[t._v("create webhook endpoint"),s("OutboundLink")],1),t._v(" to register a webhook.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$url")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://example.com/webhook'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$subscribedEvents")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will subscribe to all events.")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Webhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createWebhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$url")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$subscribedEvents")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[t._v("Settings")]),t._v(" -> "),s("code",[t._v("Webhooks")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[t._v("#")]),t._v(" Validate and process webhooks")]),t._v(" "),s("p",[t._v("The webhook payloads of BTCPay Server are signed, and therefore you can trust its content - but only after proper request validation. The validation of the provided "),s("code",[t._v("BTCPay-Sig")]),t._v(" HTTP-header and payload, is done by the library.")]),t._v(" "),s("p",[t._v("On webhook registration step (see above), you provided an "),s("code",[t._v("url")]),t._v(" that points to an endpoint route on your PHP site. e.g. "),s("code",[t._v("https://example.com/webhook")]),t._v(". The "),s("code",[t._v("secret")]),t._v(" which is used to sign the request was returned in our example above.")]),t._v(" "),s("p",[t._v("On your eCommerce site you can now validate and process the payload of your BTCPay Server webhook like this:")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookSecret")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'WEBHOOK_SECRET'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Get the data sent by BTCPay Server.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("file_get_contents")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'php://input'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$payload")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json_decode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("512")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON_THROW_ON_ERROR")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Get the BTCPay signature header.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is needed as some webservers camel-case the headers, some not.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$headers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getallheaders")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("foreach")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$headers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$key")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("strtolower")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$key")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'btcpay-sig'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$sig")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookClient")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Webhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Validate the webhook request.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookClient")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("isIncomingWebhookRequestValid")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$sig")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$secret")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throw")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("RuntimeException")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'Invalid BTCPay Server payment webhook message received - signature did not match.'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'Validation OK'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Your own processing code goes here. E.g. update your internal order id depending on the invoice payment status.")]),t._v("\n\n")])])]),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[t._v("#")]),t._v(" Issue a full refund of an invoice")]),t._v(" "),s("p",[t._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[t._v("invoice refund endpoint"),s("OutboundLink")],1),t._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$invoiceId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'EXISTING_INVOICE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Invoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$refund")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("refundInvoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$invoiceId")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$refund")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getViewLink")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[t._v("#")]),t._v(" BTCPay Server management examples")]),t._v(" "),s("p",[t._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),t._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[t._v("#")]),t._v(" Create a new user")]),t._v(" "),s("p",[t._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'ADMIN_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$email")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$password")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'SuperSecurePasswordsShouldBeQuiteLong123'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$isAdministrator")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("User")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createUser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$email")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$password")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$isAdministrator")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-for-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-for-the-user"}},[t._v("#")]),t._v(" Create a new API key (for the user)")]),t._v(" "),s("p",[t._v("While we can use basic authentication to access the greenfield API, it is recommended to use API Keys to limit the scope of the credentials.")]),t._v(" "),s("p",[t._v("For example: If we want to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(" we need the "),s("code",[t._v("btcpay.store.canmodifystoresettings")]),t._v(" permission for the API key. Warning: If you do not pass any permission then the API key will have unrestricted access.")]),t._v(" "),s("p",[t._v("As mentioned above, you can do this through the BTCPay Server UI of your instance, but let's do it through the API using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(" where we with our admin API key create an API key for our new user.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userEmail")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'ADMIN_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("ApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$generatedApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createApiKeyForUser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userEmail")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'api generated'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'btcpay.store.canmodifystoresettings'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$generatedApiKey")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getData")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'apiKey'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-store"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-store"}},[t._v("#")]),t._v(" Create a new store")]),t._v(" "),s("p",[t._v("Now, we can use the users API key to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USER_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Store")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createStore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'my new store'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[t._v("#")]),t._v(" Read store information")]),t._v(" "),s("p",[t._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("read store"),s("OutboundLink")],1),t._v(" information:")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USER_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Store")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getStore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Looking for more examples, you can find them "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[128],{860:function(t,s,a){"use strict";a.r(s);var e=a(17),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-examples-with-php"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-examples-with-php"}},[t._v("#")]),t._v(" Greenfield API examples with PHP")]),t._v(" "),s("p",[t._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Greenfield API"),s("OutboundLink")],1)]),t._v(" (also available on your instance on "),s("code",[t._v("/docs")]),t._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),t._v(" "),s("p",[t._v("Note that you can partially generate clients in the language of your choice by using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/swagger.json",target:"_blank",rel:"noopener noreferrer"}},[t._v("Swagger file"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("For PHP we have a client library available which can be found "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(" and is also available for installation via Composer "),s("code",[t._v("composer require btcpayserver/btcpayserver-greenfield-php")])]),t._v(" "),s("p",[t._v("In this guide, we will give some examples how to use the Greenfield API with our PHP library for eCommerce and BTCPay management. Additional examples can be found "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("p",[t._v("Unless for a few endpoints like creating a store and API key on behalf of a specific user, Basic Auth should be avoided and an API key should be used instead. Make sure that API keys only have the needed permissions and not more. E.g. if you only create invoices you should not give the API key the permission to manage your stores.")]),t._v(" "),s("p",[t._v("You can create a new API key in the BTCPay Server UI under "),s("code",[t._v("Account")]),t._v(" -> "),s("code",[t._v("Manage account")]),t._v(" -> "),s("code",[t._v("API keys")])]),t._v(" "),s("p",[t._v("For the ecommerce examples below the API key needs the following permissions:")]),t._v(" "),s("ul",[s("li",[t._v("View invoices")]),t._v(" "),s("li",[t._v("Create invoice")]),t._v(" "),s("li",[t._v("Modify invoices")]),t._v(" "),s("li",[t._v("Modify stores webhooks")]),t._v(" "),s("li",[t._v("View your stores")]),t._v(" "),s("li",[t._v("Create non-approved pull payments")])]),t._v(" "),s("p",[t._v("For an overview of available permissions see the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[t._v("API documentation"),s("OutboundLink")],1),t._v(" or the permissions documented on each endpoint.")]),t._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[t._v("#")]),t._v(" eCommerce examples")]),t._v(" "),s("p",[t._v("The following examples will show you how to create a basic eCommerce flow using the Greenfield API by creating an invoice, registering a webhook, processing webhooks, and issuing a full refund of an invoice.")]),t._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[t._v("#")]),t._v(" Create an invoice")]),t._v(" "),s("p",[t._v("We create an invoice using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice",target:"_blank",rel:"noopener noreferrer"}},[t._v("create invoice endpoint"),s("OutboundLink")],1),t._v(". This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$amount")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$currency")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USD'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$orderId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'SN21420'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Invoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createInvoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$currency")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified static-context"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Util"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("PreciseNumber")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("::")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("parseString")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$amount")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$orderId")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[t._v("#")]),t._v(" Register a webhook (optional)")]),t._v(" "),s("p",[t._v("Let's register a webhook to be notified when the invoice is paid. You can use the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Webhooks_CreateWebhook",target:"_blank",rel:"noopener noreferrer"}},[t._v("create webhook endpoint"),s("OutboundLink")],1),t._v(" to register a webhook.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$url")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://example.com/webhook'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$subscribedEvents")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Will subscribe to all events.")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Webhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createWebhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$url")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$subscribedEvents")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("null")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[t._v("Settings")]),t._v(" -> "),s("code",[t._v("Webhooks")]),t._v(".")]),t._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[t._v("#")]),t._v(" Validate and process webhooks")]),t._v(" "),s("p",[t._v("The webhook payloads of BTCPay Server are signed, and therefore you can trust its content - but only after proper request validation. The validation of the provided "),s("code",[t._v("BTCPay-Sig")]),t._v(" HTTP-header and payload, is done by the library.")]),t._v(" "),s("p",[t._v("On webhook registration step (see above), you provided an "),s("code",[t._v("url")]),t._v(" that points to an endpoint route on your PHP site. e.g. "),s("code",[t._v("https://example.com/webhook")]),t._v(". The "),s("code",[t._v("secret")]),t._v(" which is used to sign the request was returned in our example above.")]),t._v(" "),s("p",[t._v("On your eCommerce site you can now validate and process the payload of your BTCPay Server webhook like this:")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookSecret")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'WEBHOOK_SECRET'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Get the data sent by BTCPay Server.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("file_get_contents")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'php://input'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$payload")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("json_decode")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("512")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("JSON_THROW_ON_ERROR")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Get the BTCPay signature header.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// This is needed as some webservers camel-case the headers, some not.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$headers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getallheaders")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("foreach")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$headers")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("as")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$key")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=>")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("strtolower")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$key")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("===")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'btcpay-sig'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$sig")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$value")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookClient")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Webhook")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Validate the webhook request.")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$webhookClient")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("isIncomingWebhookRequestValid")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$raw_post_data")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$sig")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$secret")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("throw")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("RuntimeException")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'Invalid BTCPay Server payment webhook message received - signature did not match.'")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'Validation OK'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// Your own processing code goes here. E.g. update your internal order id depending on the invoice payment status.")]),t._v("\n\n")])])]),s("h3",{attrs:{id:"issue-a-full-refund-of-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#issue-a-full-refund-of-an-invoice"}},[t._v("#")]),t._v(" Issue a full refund of an invoice")]),t._v(" "),s("p",[t._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[t._v("invoice refund endpoint"),s("OutboundLink")],1),t._v(" you can issue a full (or even partial) refund of an invoice. This will return a link where the customer can claim the refund.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$invoiceId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'EXISTING_INVOICE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Invoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$apiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$refund")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("refundInvoice")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$invoiceId")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$refund")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getViewLink")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[t._v("#")]),t._v(" BTCPay Server management examples")]),t._v(" "),s("p",[t._v("Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.")]),t._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[t._v("#")]),t._v(" Create a new user")]),t._v(" "),s("p",[t._v("Creating a new user can be done by using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'ADMIN_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$email")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$password")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'SuperSecurePasswordsShouldBeQuiteLong123'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$isAdministrator")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("User")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createUser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$email")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$password")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$isAdministrator")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-for-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-for-the-user"}},[t._v("#")]),t._v(" Create a new API key (for the user)")]),t._v(" "),s("p",[t._v("While we can use basic authentication to access the greenfield API, it is recommended to use API Keys to limit the scope of the credentials.")]),t._v(" "),s("p",[t._v("For example: If we want to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(" we need the "),s("code",[t._v("btcpay.store.canmodifystoresettings")]),t._v(" permission for the API key. Warning: If you do not pass any permission then the API key will have unrestricted access.")]),t._v(" "),s("p",[t._v("As mentioned above, you can do this through the BTCPay Server UI of your instance, but let's do it through the API using "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/ApiKeys_CreateUserApiKey",target:"_blank",rel:"noopener noreferrer"}},[t._v("this endpoint"),s("OutboundLink")],1),t._v(" where we with our admin API key create an API key for our new user.")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userEmail")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'satoshi.nakamoto@example.com'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'ADMIN_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("ApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$adminApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$generatedApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createApiKeyForUser")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userEmail")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'api generated'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'btcpay.store.canmodifystoresettings'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$generatedApiKey")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getData")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'apiKey'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-store"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-store"}},[t._v("#")]),t._v(" Create a new store")]),t._v(" "),s("p",[t._v("Now, we can use the users API key to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("create a new store"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USER_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Store")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("createStore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'my new store'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[t._v("#")]),t._v(" Read store information")]),t._v(" "),s("p",[t._v("We can use the new apikey to "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_GetStore",target:"_blank",rel:"noopener noreferrer"}},[t._v("read store"),s("OutboundLink")],1),t._v(" information:")]),t._v(" "),s("div",{staticClass:"language-PHP extra-class"},[s("pre",{pre:!0,attrs:{class:"language-php"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("require")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token constant"}},[t._v("__DIR__")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'./vendor/autoload.php'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'https://mainnet.demo.btcpayserver.org'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'USER_API_KEY'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string single-quoted-string"}},[t._v("'STORE_ID'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("// From previous step")]),t._v("\n\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("try")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("new")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("BTCPayServer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Client"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Store")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$host")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$userApiKey")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("var_dump")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$client")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getStore")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$storeId")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("catch")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token class-name class-name-fully-qualified"}},[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),t._v("Throwable")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("echo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string double-quoted-string"}},[t._v('"Error: "')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(".")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$e")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("->")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("getMessage")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Looking for more examples, you can find them "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-greenfield-php/tree/master/examples",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/129.61159920.js b/assets/js/129.1012095c.js similarity index 99% rename from assets/js/129.61159920.js rename to assets/js/129.1012095c.js index 246c6b5c37..12dd75623e 100644 --- a/assets/js/129.61159920.js +++ b/assets/js/129.1012095c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[129],{862:function(t,s,a){"use strict";a.r(s);var e=a(17),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"invoice-metadata"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#invoice-metadata"}},[t._v("#")]),t._v(" Invoice metadata")]),t._v(" "),s("p",[t._v("Each invoice contains metadata, which is a customizable JSON object that can be tailored through the API during the creation of an invoice. Although it lacks a fixed schema, certain properties within the metadata can be interpreted by the UI.")]),t._v(" "),s("p",[t._v("This page provides an overview of these properties and explains how they are utilized within the BTCPay Server.")]),t._v(" "),s("h2",{attrs:{id:"well-known-properties"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#well-known-properties"}},[t._v("#")]),t._v(" Well-known properties")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Property path")]),t._v(" "),s("th",[t._v("Description")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v(".orderId")])]),t._v(" "),s("td",[t._v("Refers to the order ID from an external system, such as an e-commerce platform like WooCommerce. This property is indexed, allowing for efficient invoice searches using the "),s("code",[t._v("orderId")]),t._v(".")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".orderUrl")])]),t._v(" "),s("td",[t._v("Refers to a URL linking back to the order page of the external system. This link is displayed in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".paymentRequestId")])]),t._v(" "),s("td",[t._v("In the invoice details view, a link is provided for navigating to the payment request page associated with the invoice.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".posData")])]),t._v(" "),s("td",[t._v("A custom JSON object that represents information displayed in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".receiptData")])]),t._v(" "),s("td",[t._v("A custom JSON object that represents information displayed on the receipt page of an invoice.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerName")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerEmail")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerAddress1")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerAddress2")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerCity")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerState")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerZip")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerCountry")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerPhone")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".itemDesc")])]),t._v(" "),s("td",[t._v("When using the Point of Sale (except in keypad or cart view), this field is set to the item description of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".itemCode")])]),t._v(" "),s("td",[t._v("When using the Point of Sale (except in keypad or cart view), this field is set to the item code of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".physical")])]),t._v(" "),s("td",[t._v("Boolean value indicating whether this is a physical good; displayed in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".taxIncluded")])]),t._v(" "),s("td",[t._v("Number representing the tax amount in the invoice currency. This information will appear in the invoice details view. During invoice creation, the value is automatically rounded to significant digits and ensured not to be greater than the invoice's price.")])])])]),t._v(" "),s("h2",{attrs:{id:"examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),s("p",[t._v("Point of sale invoice (Product list view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemCode"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Green Tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Green Tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Lovely, fresh and tender, Meng Ding Gan Lu ('sweet dew') is grown in the lush Meng Ding Mountains of the southwestern province of Sichuan where it has been cultivated for over a thousand years.\"")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Point of sale invoice (Cart view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"posData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tip"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cart"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pu erh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"image"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/img/pos-sample/pu-erh.jpg"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"formatted"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$2.00"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pu Erh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inventory"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rooibos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"image"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/img/pos-sample/rooibos.jpg"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"formatted"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$1.20"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Rooibos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inventory"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.68")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"subTotal"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"customAmount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discountAmount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discountPercentage"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Tea shop"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Tip"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$0.48"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Cart"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Pu Erh"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$2.00 x 1 = $2.00"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Rooibos"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$1.20 x 1 = $1.20"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Point of sale invoice (Keypad view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"posData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"12.00"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"subTotal"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"12.00"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Tea shop"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[129],{861:function(t,s,a){"use strict";a.r(s);var e=a(17),n=Object(e.a)({},(function(){var t=this,s=t._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[s("h1",{attrs:{id:"invoice-metadata"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#invoice-metadata"}},[t._v("#")]),t._v(" Invoice metadata")]),t._v(" "),s("p",[t._v("Each invoice contains metadata, which is a customizable JSON object that can be tailored through the API during the creation of an invoice. Although it lacks a fixed schema, certain properties within the metadata can be interpreted by the UI.")]),t._v(" "),s("p",[t._v("This page provides an overview of these properties and explains how they are utilized within the BTCPay Server.")]),t._v(" "),s("h2",{attrs:{id:"well-known-properties"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#well-known-properties"}},[t._v("#")]),t._v(" Well-known properties")]),t._v(" "),s("table",[s("thead",[s("tr",[s("th",[t._v("Property path")]),t._v(" "),s("th",[t._v("Description")])])]),t._v(" "),s("tbody",[s("tr",[s("td",[s("code",[t._v(".orderId")])]),t._v(" "),s("td",[t._v("Refers to the order ID from an external system, such as an e-commerce platform like WooCommerce. This property is indexed, allowing for efficient invoice searches using the "),s("code",[t._v("orderId")]),t._v(".")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".orderUrl")])]),t._v(" "),s("td",[t._v("Refers to a URL linking back to the order page of the external system. This link is displayed in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".paymentRequestId")])]),t._v(" "),s("td",[t._v("In the invoice details view, a link is provided for navigating to the payment request page associated with the invoice.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".posData")])]),t._v(" "),s("td",[t._v("A custom JSON object that represents information displayed in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".receiptData")])]),t._v(" "),s("td",[t._v("A custom JSON object that represents information displayed on the receipt page of an invoice.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerName")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerEmail")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerAddress1")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerAddress2")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerCity")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerState")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerZip")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerCountry")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".buyerPhone")])]),t._v(" "),s("td",[t._v("Visible in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".itemDesc")])]),t._v(" "),s("td",[t._v("When using the Point of Sale (except in keypad or cart view), this field is set to the item description of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".itemCode")])]),t._v(" "),s("td",[t._v("When using the Point of Sale (except in keypad or cart view), this field is set to the item code of the purchased item. This information is included in the CSV invoice export feature and appears in the invoice details view.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".physical")])]),t._v(" "),s("td",[t._v("Boolean value indicating whether this is a physical good; displayed in the invoice details view and in the BitPay API-compatible endpoints.")])]),t._v(" "),s("tr",[s("td",[s("code",[t._v(".taxIncluded")])]),t._v(" "),s("td",[t._v("Number representing the tax amount in the invoice currency. This information will appear in the invoice details view. During invoice creation, the value is automatically rounded to significant digits and ensured not to be greater than the invoice's price.")])])])]),t._v(" "),s("h2",{attrs:{id:"examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),s("p",[t._v("Point of sale invoice (Product list view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemCode"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"green tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Green Tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Green Tea"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Description"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("\"Lovely, fresh and tender, Meng Ding Gan Lu ('sweet dew') is grown in the lush Meng Ding Mountains of the southwestern province of Sichuan where it has been cultivated for over a thousand years.\"")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Point of sale invoice (Cart view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"posData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"tip"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.48")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"cart"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pu erh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"image"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/img/pos-sample/pu-erh.jpg"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"formatted"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$2.00"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Pu Erh"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inventory"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"id"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"rooibos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"count"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"image"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"~/img/pos-sample/rooibos.jpg"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"price"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"type"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"value"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"formatted"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$1.20"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"title"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Rooibos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"inventory"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token null keyword"}},[t._v("null")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.68")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"subTotal"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3.2")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"customAmount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discountAmount"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"discountPercentage"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Tea shop"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Tip"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$0.48"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Cart"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Pu Erh"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$2.00 x 1 = $2.00"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Rooibos"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"$1.20 x 1 = $1.20"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("Point of sale invoice (Keypad view):")]),t._v(" "),s("div",{staticClass:"language-json extra-class"},[s("pre",{pre:!0,attrs:{class:"language-json"}},[s("code",[s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderId"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"pos-app_346KRC5BjXXXo8cRFKwTBmdR6ZJ4"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"posData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"total"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"12.00"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"subTotal"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"12.00"')]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"itemDesc"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Tea shop"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"orderUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:14142/apps/346KRC5BjXXXo8cRFKwTBmdR6ZJ4/pos"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"receiptData"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/13.7bdac7b1.js b/assets/js/13.387420a7.js similarity index 99% rename from assets/js/13.7bdac7b1.js rename to assets/js/13.387420a7.js index 6c8c30c887..8f9b89cf3a 100644 --- a/assets/js/13.7bdac7b1.js +++ b/assets/js/13.387420a7.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{341:function(e,t,o){e.exports=o.p+"assets/img/16_wix_btcpay-config.5f3fa8a9.png"},756:function(e,t,o){e.exports=o.p+"assets/img/01_wix_dev-mode.d3ebf3bb.png"},757:function(e,t,o){e.exports=o.p+"assets/img/02_wix_service-plugin-payment.99ffd208.png"},758:function(e,t,o){e.exports=o.p+"assets/img/03_wix_ppsp-start-now.044a2d88.png"},759:function(e,t,o){e.exports=o.p+"assets/img/04_wix_ppsp-legal-notice.658c1fe6.png"},760:function(e,t,o){e.exports=o.p+"assets/img/05_wix_ppsp-name.990dfe01.png"},761:function(e,t,o){e.exports=o.p+"assets/img/06_wix_ppsp-btcpay-config.5d4b9637.png"},762:function(e,t,o){e.exports=o.p+"assets/img/07_wix_gh-btcpay-config.a90cd4e2.png"},763:function(e,t,o){e.exports=o.p+"assets/img/08_wix_ppsp-btcpay-config-complete.06d14fc5.png"},764:function(e,t,o){e.exports=o.p+"assets/img/09_wix_gh-btcpay.f4ba84b1.png"},765:function(e,t,o){e.exports=o.p+"assets/img/10_wix_ppsp-btcpay.aa84c719.png"},766:function(e,t,o){e.exports=o.p+"assets/img/11_wix_backend-expose-site-api.a7733acf.png"},767:function(e,t,o){e.exports=o.p+"assets/img/12_wix_backend-http-functions.ba365413.png"},768:function(e,t,o){e.exports=o.p+"assets/img/13_wix_settings.9275944e.png"},769:function(e,t,o){e.exports=o.p+"assets/img/14_wix_accept-payments.984c3b09.png"},770:function(e,t,o){e.exports=o.p+"assets/img/15_wix_list-btcpay.aabe82d7.png"},771:function(e,t,o){e.exports=o.p+"assets/img/17_btcpay-api-key-page.a525c66b.png"},772:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-1.2a52f496.png"},773:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-2.4a634a53.png"},774:function(e,t,o){e.exports=o.p+"assets/img/19_btcpay-api-key-copy.4cb4fc6a.png"},775:function(e,t,o){e.exports=o.p+"assets/img/20_btcpay-store-id.62536621.png"},776:function(e,t,o){e.exports=o.p+"assets/img/21_btcpay-webhook-page.6ca3fd85.png"},777:function(e,t,o){e.exports=o.p+"assets/img/22_btcpay-webhook-saved.1e659e6d.png"},778:function(e,t,o){e.exports=o.p+"assets/img/23_wix_btcpay-config-saved.30337d07.png"},953:function(e,t,o){"use strict";o.r(t);var a=o(17),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-integration-for-wix"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-integration-for-wix"}},[e._v("#")]),e._v(" BTCPay Server integration for Wix")]),e._v(" "),t("p",[e._v("This guide will show you how you can enable Bitcoin payments using BTCPay Server on your Wix store. At the time of writing it is not possible to package this into a Wix app, so you will need to follow the steps below and copy and paste the code into your Wix editor.")]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[e._v("You have a "),t("a",{attrs:{href:"https://wix.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("Wix"),t("OutboundLink")],1),e._v(" account and online store up and running")]),e._v(" "),t("li",[e._v("You have a BTCPay Server version 1.10.0 or later, either "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("hosted by a third-party")]),e._v(".")],1),e._v(" "),t("li",[e._v("BTCPay needs to be reachable from the internet via a domain, e.g. https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("You've a registered account on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("You've a BTCPay store on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("You've a wallet connected to your store")]),e._v(" and/or "),t("RouterLink",{attrs:{to:"/LightningNetwork/"}},[e._v("Lightning Network")]),e._v(" enabled or connected.")],1)]),e._v(" "),t("h2",{attrs:{id:"create-a-payment-provider-service-plugin-ppsp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-a-payment-provider-service-plugin-ppsp"}},[e._v("#")]),e._v(" Create a payment provider service plugin (PPSP)")]),e._v(" "),t("ol",[t("li",[e._v("In your Wix site, open your Wix Editor.")]),e._v(" "),t("li",[e._v('At the top click on "'),t("strong",[e._v("Dev Mode")]),e._v('" and the "'),t("strong",[e._v("Turn on Dev Mode")]),e._v('" button to enable the developer mode.\n'),t("img",{attrs:{src:o(756),alt:"Dev Mode",title:"Dev Mode"}})]),e._v(" "),t("li",[e._v("Now on the left side, click on the "),t("code",[e._v("{ }")]),e._v(" icon to open the code editor.")]),e._v(" "),t("li",[e._v('In the section "Service Plugins" click on the '),t("strong",[e._v("(+)")]),e._v(' sign and select "'),t("strong",[e._v("Payment")]),e._v('"\n'),t("img",{attrs:{src:o(757),alt:"Add payment provider service plugin",title:"Add payment provider service plugin"}})]),e._v(" "),t("li",[e._v('On the following screen, click "'),t("strong",[e._v("Start now")]),e._v('"\n'),t("img",{attrs:{src:o(758),alt:"Start now",title:"Start now"}})]),e._v(" "),t("li",[e._v('On the legal terms page, check the terms and click "'),t("strong",[e._v("Accept")]),e._v('"\n'),t("img",{attrs:{src:o(759),alt:"Accept terms",title:"Accept terms"}})]),e._v(" "),t("li",[e._v('Now enter the name of the plugin: "'),t("strong",[e._v("BTCPay")]),e._v('" (you can use any name but this will make it easier to follow the guide). Then, click "Add & Edit Code":\n'),t("img",{attrs:{src:o(760),alt:"Add & Edit Code",title:"Add & Edit Code"}})]),e._v(" "),t("li",[e._v('This created the directory "BTCPay" containing two files: '),t("code",[e._v("BTCPay.js")]),e._v(" and "),t("code",[e._v("BTCPay-config.js")]),e._v(" which is open in the editor.\n"),t("img",{attrs:{src:o(761),alt:"BTCPay-config.js",title:"BTCPay-config.js"}})]),e._v(" "),t("li",[e._v("Next steps are to copy the contents of those two files from our "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix",target:"_blank",rel:"noopener noreferrer"}},[e._v("Git repository"),t("OutboundLink")],1),e._v(". You can see the same data structure as on your wix editor. In the "),t("code",[e._v("BTCPay-config.js")]),e._v(" file, paste the code from the same file on our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/service-plugins/payment-provider/BTCPay/BTCPay-config.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay-config.js"),t("OutboundLink")],1),e._v('. Easiest to click the "'),t("strong",[e._v("Copy raw file")]),e._v('" icon.\n'),t("img",{attrs:{src:o(762),alt:"BTCPay-config.js",title:"BTCPay-config.js"}})]),e._v(" "),t("li",[e._v("Make sure you delete example code on the "),t("code",[e._v("BTCPay-config.js")]),e._v(" file in the wix editor before pasting the new code.\n"),t("img",{attrs:{src:o(763),alt:"BTCPay-config.js completed",title:"BTCPay-config.js completed"}})]),e._v(" "),t("li",[e._v("Now, open the "),t("code",[e._v("BTCPay.js")]),e._v(" file in the wix editor and paste the code from our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/service-plugins/payment-provider/BTCPay/BTCPay.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay.js"),t("OutboundLink")],1),e._v(". Do not forget to remove all the example code from the file before pasting the copied code.\n"),t("img",{attrs:{src:o(764),alt:"BTCPay.js",title:"BTCPay.js"}}),e._v(" "),t("img",{attrs:{src:o(765),alt:"BTCPay.js",title:"BTCPay.js"}})]),e._v(" "),t("li",[e._v("Now we need to add the "),t("code",[e._v("http-functions.js")]),e._v(" file to the "),t("code",[e._v("backend")]),e._v(' directory. To do so, in the "backend" section of your editor click again on the '),t("strong",[e._v("(+)")]),e._v(' icon and select "'),t("strong",[e._v("Expose Site API")]),e._v('" which creates the mentioned '),t("code",[e._v("http-functions.js")]),e._v(" file. Note: If you already have that file present then you can skip this step.\n"),t("img",{attrs:{src:o(766),alt:"Create http-functions.js",title:"Create http-functions.js"}})]),e._v(" "),t("li",[e._v("Copy the code from our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/http-functions.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("http-functions.js"),t("OutboundLink")],1),e._v(". If you already had a "),t("code",[e._v("http-functions.js")]),e._v(" file, make sure to add the code from the Git repository to the existing file add the copied code below the existing code. If not then make sure you delete all the example code before pasting the code from GitHub.\n"),t("img",{attrs:{src:o(767),alt:"http-functions.js",title:"http-functions.js"}})]),e._v(" "),t("li",[e._v("Now the code is done it is important to click on publish to save the changes and make the plugin available.")])]),e._v(" "),t("h2",{attrs:{id:"configure-the-payment-service-provider-plugin-pspp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-the-payment-service-provider-plugin-pspp"}},[e._v("#")]),e._v(" Configure the payment service provider plugin (PSPP)")]),e._v(" "),t("ol",[t("li",[e._v("Go back to your site's dashboard. On the left menu click on \""),t("strong",[e._v("Settings")]),e._v('", on that page click "'),t("strong",[e._v("Accept Payments")]),e._v('"\n'),t("img",{attrs:{src:o(768),alt:"Settings",title:"Settings"}}),e._v(" "),t("img",{attrs:{src:o(769),alt:"Accept Payments",title:"Accept Payments"}})]),e._v(" "),t("li",[e._v('On the following page, you should see "Bitcoin Payments with BTCPay" as payment provider. If not, try to refresh the page to clear the Wix cache. Click on "Connect"\n'),t("img",{attrs:{src:o(770),alt:"BTCPay",title:"BTCPay"}})]),e._v(" "),t("li",[e._v("You are now on the configuration page. You need to enter the following fields:\n"),t("ul",[t("li",[t("strong",[e._v("BTCPay URL")]),e._v(": The URL of your BTCPay Server instance, e.g. "),t("code",[e._v("https://btcpay.example.com")])]),e._v(" "),t("li",[t("strong",[e._v("API Key")]),e._v(": The API key of your BTCPay store")]),e._v(" "),t("li",[t("strong",[e._v("Store ID")]),e._v(": The store ID of your BTCPay store")]),e._v(" "),t("li",[t("strong",[e._v("Webhook Secret")]),e._v(": The webhook secret of your BTCPay store\n"),t("img",{attrs:{src:o(341),alt:"Configuration",title:"Configuration"}})])])])]),e._v(" "),t("h3",{attrs:{id:"btcpay-server-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-url"}},[e._v("#")]),e._v(" BTCPay Server URL")]),e._v(" "),t("ol",[t("li",[e._v('First, enter the "'),t("strong",[e._v("BTCPay Server URL")]),e._v('", in our case '),t("code",[e._v("https://testing.btcpay.tech")])]),e._v(" "),t("li",[e._v('Next, you need to get the API Key, Store ID, and Webhook Secret from your BTCPay store. To do so, log in to your BTCPay store. We assume you already have a store setup, in our guide here it is called "Wix BTCPay Demo"')])]),e._v(" "),t("h3",{attrs:{id:"api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-key"}},[e._v("#")]),e._v(" API Key")]),e._v(" "),t("ol",[t("li",[e._v('Go to the API Keys page under "'),t("strong",[e._v("Account")]),e._v('" -> "'),t("strong",[e._v("API Keys")]),e._v('" (For BTCPay Server versions prior 2.0 it is under "Account" -> "Manage Account" -> "API Keys"). Click on "'),t("strong",[e._v("Generate Key")]),e._v('"\n'),t("img",{attrs:{src:o(771),alt:"API Keys",title:"API Keys"}})]),e._v(" "),t("li",[e._v('Enter a label such as "Wix API Key".')]),e._v(" "),t("li",[e._v('For the permissions, click on the "'),t("em",[t("strong",[e._v("Select specific stores")])]),e._v('" link and select the store you want to connect to Wix, in our example "Wix BTCPay Demo" - for the following permissions: '),t("code",[e._v("View invoices")]),e._v(", "),t("code",[e._v("Create invoice")]),e._v(", "),t("code",[e._v("Modify invoices")]),e._v(", "),t("code",[e._v("Modify stores webhooks")]),e._v(", "),t("code",[e._v("View your stores")]),e._v(", "),t("code",[e._v("Create non-approved pull payments")]),e._v(" (used for refunds in the future)\n"),t("img",{attrs:{src:o(772),alt:"API Key permissions 1",title:"API Key permissions 1"}}),e._v(" "),t("img",{attrs:{src:o(773),alt:"API Key permissions 2",title:"API Key permissions 2"}})]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Generate API Key")]),e._v('" button and on the following page copy the API Key shown at the top\n'),t("img",{attrs:{src:o(774),alt:"Copy generated API key",title:"Copy generated API key"}})]),e._v(" "),t("li",[e._v('In your Wix store: paste that copied API key into the "'),t("strong",[e._v("API Key")]),e._v('" field')])]),e._v(" "),t("h3",{attrs:{id:"store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#store-id"}},[e._v("#")]),e._v(" Store ID")]),e._v(" "),t("ol",[t("li",[e._v('Go back to your BTCPay store and copy the "'),t("strong",[e._v("Store ID")]),e._v('". Go to your store and click on "Settings" and copy the Store ID shown\n'),t("img",{attrs:{src:o(775),alt:"Copy Store ID",title:"Copy Store ID"}})]),e._v(" "),t("li",[e._v('In your Wix store: paste that copied Store ID into the "'),t("strong",[e._v("Store ID")]),e._v('" field')])]),e._v(" "),t("h3",{attrs:{id:"webhook-secret"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#webhook-secret"}},[e._v("#")]),e._v(" Webhook Secret")]),e._v(" "),t("ol",[t("li",[e._v('Go back to your BTCPay store and click on "Settings" -> "Webhooks". Click on "Create Webhook"\n'),t("img",{attrs:{src:o(776),alt:"Create webhook page",title:"Create webhook page"}})]),e._v(" "),t("li",[t("strong",[e._v("Payload URL")]),e._v(": Your Wix store URL where it can be reached combined with a callback path. E.g. "),t("code",[e._v("https://example.com/_functions/btcpayTrxWebHook")]),e._v(" (replace example.com with your Wix store URL)")]),e._v(" "),t("li",[t("strong",[e._v("Secret")]),e._v(': This is auto-generated by BTCPay, you can show it by clicking on the "eye" icon')]),e._v(" "),t("li",[e._v('Copy the "'),t("strong",[e._v("Secret")]),e._v('" and paste it into the "'),t("strong",[e._v("Webhook Secret")]),e._v("\" field in your Wix store e.g. 'YOURWEBHOOKSECRET' as shown in our example")]),e._v(" "),t("li",[e._v("Back on BTCPay webhook page, you can leave the other settings as is")]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Add Webhook")]),e._v('" to create the webhook on BTCPay. You should see the "The webhook has been created." message\n'),t("img",{attrs:{src:o(777),alt:"Webhook created successfully",title:"Webhook created successfully"}})])]),e._v(" "),t("h3",{attrs:{id:"save-the-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#save-the-configuration"}},[e._v("#")]),e._v(" Save the configuration")]),e._v(" "),t("ol",[t("li",[e._v('Back in your Wix store, click on "'),t("strong",[e._v("Connect")]),e._v('" to save the configuration\n'),t("img",{attrs:{src:o(341),alt:"Save configuration",title:"Save configuration"}}),e._v(" "),t("img",{attrs:{src:o(778),alt:"Configuration saved",title:"Configuration saved"}})])]),e._v(" "),t("h2",{attrs:{id:"testing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#testing"}},[e._v("#")]),e._v(" Testing")]),e._v(" "),t("p",[e._v('You are now ready to test your BTCPay integration on your Wix store. Add some products to the cart and go through the checkout process and select "'),t("strong",[e._v("Bitcoin payments with BTCPay")]),e._v('"')]),e._v(" "),t("h2",{attrs:{id:"troubleshooting-faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting-faq"}},[e._v("#")]),e._v(" Troubleshooting / FAQ")]),e._v(" "),t("h3",{attrs:{id:"it-does-not-work-what-can-i-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#it-does-not-work-what-can-i-do"}},[e._v("#")]),e._v(" It does not work, what can I do?")]),e._v(" "),t("ul",[t("li",[e._v("Make sure you followed the guide step by step and copied the right values into the right places")]),e._v(" "),t("li",[e._v('In Wix under "'),t("strong",[e._v("Developer tools")]),e._v('" select "'),t("strong",[e._v("Logging Tools")]),e._v('" and there open the "'),t("strong",[e._v("Wix Logs")]),e._v('", it will live log any errors. So try to do the checkout or save the configuration form to see if there is any error.')])]),e._v(" "),t("h3",{attrs:{id:"after-copying-the-code-from-the-git-repository-i-dont-see-the-payment-method-listed-in-accept-payments-"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#after-copying-the-code-from-the-git-repository-i-dont-see-the-payment-method-listed-in-accept-payments-"}},[e._v("#")]),e._v(' After copying the code from the Git repository, I don\'t see the payment method listed in "Accept payments"')]),e._v(" "),t("p",[e._v('Try to delete the browser cache and reload the page. You can also try to go into editor and click on "Publish" to save the changes. Then reload the payment method list page again.')]),e._v(" "),t("h3",{attrs:{id:"how-can-i-change-the-text-of-the-payment-method-bitcoin-payments-with-btcpay-in-the-checkout"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-change-the-text-of-the-payment-method-bitcoin-payments-with-btcpay-in-the-checkout"}},[e._v("#")]),e._v(' How can I change the text of the payment method, "Bitcoin Payments with BTCPay" in the checkout?')]),e._v(" "),t("p",[e._v("You need to go into your Wix Editor and edit the file "),t("code",[e._v("BTCPay-config.js")]),e._v(". You can change the text in the "),t("code",[e._v("title")]),e._v(" field")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("...\nhostedPage: {\n title: 'Bitcoin Payments with BTCPay', // change this line\n billingAddressMandatoryFields: ['EMAIL'],\n...\n")])])]),t("h3",{attrs:{id:"i-still-have-a-problem-where-can-i-get-help"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-still-have-a-problem-where-can-i-get-help"}},[e._v("#")]),e._v(" I still have a problem, where can I get help?")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://chat.btcpayserver.org/"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[13],{341:function(e,t,o){e.exports=o.p+"assets/img/16_wix_btcpay-config.5f3fa8a9.png"},756:function(e,t,o){e.exports=o.p+"assets/img/01_wix_dev-mode.d3ebf3bb.png"},757:function(e,t,o){e.exports=o.p+"assets/img/02_wix_service-plugin-payment.99ffd208.png"},758:function(e,t,o){e.exports=o.p+"assets/img/03_wix_ppsp-start-now.044a2d88.png"},759:function(e,t,o){e.exports=o.p+"assets/img/04_wix_ppsp-legal-notice.658c1fe6.png"},760:function(e,t,o){e.exports=o.p+"assets/img/05_wix_ppsp-name.990dfe01.png"},761:function(e,t,o){e.exports=o.p+"assets/img/06_wix_ppsp-btcpay-config.5d4b9637.png"},762:function(e,t,o){e.exports=o.p+"assets/img/07_wix_gh-btcpay-config.a90cd4e2.png"},763:function(e,t,o){e.exports=o.p+"assets/img/08_wix_ppsp-btcpay-config-complete.06d14fc5.png"},764:function(e,t,o){e.exports=o.p+"assets/img/09_wix_gh-btcpay.f4ba84b1.png"},765:function(e,t,o){e.exports=o.p+"assets/img/10_wix_ppsp-btcpay.aa84c719.png"},766:function(e,t,o){e.exports=o.p+"assets/img/11_wix_backend-expose-site-api.a7733acf.png"},767:function(e,t,o){e.exports=o.p+"assets/img/12_wix_backend-http-functions.ba365413.png"},768:function(e,t,o){e.exports=o.p+"assets/img/13_wix_settings.9275944e.png"},769:function(e,t,o){e.exports=o.p+"assets/img/14_wix_accept-payments.984c3b09.png"},770:function(e,t,o){e.exports=o.p+"assets/img/15_wix_list-btcpay.aabe82d7.png"},771:function(e,t,o){e.exports=o.p+"assets/img/17_btcpay-api-key-page.a525c66b.png"},772:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-1.2a52f496.png"},773:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-2.4a634a53.png"},774:function(e,t,o){e.exports=o.p+"assets/img/19_btcpay-api-key-copy.4cb4fc6a.png"},775:function(e,t,o){e.exports=o.p+"assets/img/20_btcpay-store-id.62536621.png"},776:function(e,t,o){e.exports=o.p+"assets/img/21_btcpay-webhook-page.6ca3fd85.png"},777:function(e,t,o){e.exports=o.p+"assets/img/22_btcpay-webhook-saved.1e659e6d.png"},778:function(e,t,o){e.exports=o.p+"assets/img/23_wix_btcpay-config-saved.30337d07.png"},952:function(e,t,o){"use strict";o.r(t);var a=o(17),i=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-integration-for-wix"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-integration-for-wix"}},[e._v("#")]),e._v(" BTCPay Server integration for Wix")]),e._v(" "),t("p",[e._v("This guide will show you how you can enable Bitcoin payments using BTCPay Server on your Wix store. At the time of writing it is not possible to package this into a Wix app, so you will need to follow the steps below and copy and paste the code into your Wix editor.")]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[e._v("You have a "),t("a",{attrs:{href:"https://wix.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("Wix"),t("OutboundLink")],1),e._v(" account and online store up and running")]),e._v(" "),t("li",[e._v("You have a BTCPay Server version 1.10.0 or later, either "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("hosted by a third-party")]),e._v(".")],1),e._v(" "),t("li",[e._v("BTCPay needs to be reachable from the internet via a domain, e.g. https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("You've a registered account on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("You've a BTCPay store on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("You've a wallet connected to your store")]),e._v(" and/or "),t("RouterLink",{attrs:{to:"/LightningNetwork/"}},[e._v("Lightning Network")]),e._v(" enabled or connected.")],1)]),e._v(" "),t("h2",{attrs:{id:"create-a-payment-provider-service-plugin-ppsp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-a-payment-provider-service-plugin-ppsp"}},[e._v("#")]),e._v(" Create a payment provider service plugin (PPSP)")]),e._v(" "),t("ol",[t("li",[e._v("In your Wix site, open your Wix Editor.")]),e._v(" "),t("li",[e._v('At the top click on "'),t("strong",[e._v("Dev Mode")]),e._v('" and the "'),t("strong",[e._v("Turn on Dev Mode")]),e._v('" button to enable the developer mode.\n'),t("img",{attrs:{src:o(756),alt:"Dev Mode",title:"Dev Mode"}})]),e._v(" "),t("li",[e._v("Now on the left side, click on the "),t("code",[e._v("{ }")]),e._v(" icon to open the code editor.")]),e._v(" "),t("li",[e._v('In the section "Service Plugins" click on the '),t("strong",[e._v("(+)")]),e._v(' sign and select "'),t("strong",[e._v("Payment")]),e._v('"\n'),t("img",{attrs:{src:o(757),alt:"Add payment provider service plugin",title:"Add payment provider service plugin"}})]),e._v(" "),t("li",[e._v('On the following screen, click "'),t("strong",[e._v("Start now")]),e._v('"\n'),t("img",{attrs:{src:o(758),alt:"Start now",title:"Start now"}})]),e._v(" "),t("li",[e._v('On the legal terms page, check the terms and click "'),t("strong",[e._v("Accept")]),e._v('"\n'),t("img",{attrs:{src:o(759),alt:"Accept terms",title:"Accept terms"}})]),e._v(" "),t("li",[e._v('Now enter the name of the plugin: "'),t("strong",[e._v("BTCPay")]),e._v('" (you can use any name but this will make it easier to follow the guide). Then, click "Add & Edit Code":\n'),t("img",{attrs:{src:o(760),alt:"Add & Edit Code",title:"Add & Edit Code"}})]),e._v(" "),t("li",[e._v('This created the directory "BTCPay" containing two files: '),t("code",[e._v("BTCPay.js")]),e._v(" and "),t("code",[e._v("BTCPay-config.js")]),e._v(" which is open in the editor.\n"),t("img",{attrs:{src:o(761),alt:"BTCPay-config.js",title:"BTCPay-config.js"}})]),e._v(" "),t("li",[e._v("Next steps are to copy the contents of those two files from our "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix",target:"_blank",rel:"noopener noreferrer"}},[e._v("Git repository"),t("OutboundLink")],1),e._v(". You can see the same data structure as on your wix editor. In the "),t("code",[e._v("BTCPay-config.js")]),e._v(" file, paste the code from the same file on our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/service-plugins/payment-provider/BTCPay/BTCPay-config.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay-config.js"),t("OutboundLink")],1),e._v('. Easiest to click the "'),t("strong",[e._v("Copy raw file")]),e._v('" icon.\n'),t("img",{attrs:{src:o(762),alt:"BTCPay-config.js",title:"BTCPay-config.js"}})]),e._v(" "),t("li",[e._v("Make sure you delete example code on the "),t("code",[e._v("BTCPay-config.js")]),e._v(" file in the wix editor before pasting the new code.\n"),t("img",{attrs:{src:o(763),alt:"BTCPay-config.js completed",title:"BTCPay-config.js completed"}})]),e._v(" "),t("li",[e._v("Now, open the "),t("code",[e._v("BTCPay.js")]),e._v(" file in the wix editor and paste the code from our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/service-plugins/payment-provider/BTCPay/BTCPay.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay.js"),t("OutboundLink")],1),e._v(". Do not forget to remove all the example code from the file before pasting the copied code.\n"),t("img",{attrs:{src:o(764),alt:"BTCPay.js",title:"BTCPay.js"}}),e._v(" "),t("img",{attrs:{src:o(765),alt:"BTCPay.js",title:"BTCPay.js"}})]),e._v(" "),t("li",[e._v("Now we need to add the "),t("code",[e._v("http-functions.js")]),e._v(" file to the "),t("code",[e._v("backend")]),e._v(' directory. To do so, in the "backend" section of your editor click again on the '),t("strong",[e._v("(+)")]),e._v(' icon and select "'),t("strong",[e._v("Expose Site API")]),e._v('" which creates the mentioned '),t("code",[e._v("http-functions.js")]),e._v(" file. Note: If you already have that file present then you can skip this step.\n"),t("img",{attrs:{src:o(766),alt:"Create http-functions.js",title:"Create http-functions.js"}})]),e._v(" "),t("li",[e._v("Copy the code from our Git repository: "),t("a",{attrs:{href:"https://github.com/btcpayserver/wix/blob/main/backend/http-functions.js",target:"_blank",rel:"noopener noreferrer"}},[e._v("http-functions.js"),t("OutboundLink")],1),e._v(". If you already had a "),t("code",[e._v("http-functions.js")]),e._v(" file, make sure to add the code from the Git repository to the existing file add the copied code below the existing code. If not then make sure you delete all the example code before pasting the code from GitHub.\n"),t("img",{attrs:{src:o(767),alt:"http-functions.js",title:"http-functions.js"}})]),e._v(" "),t("li",[e._v("Now the code is done it is important to click on publish to save the changes and make the plugin available.")])]),e._v(" "),t("h2",{attrs:{id:"configure-the-payment-service-provider-plugin-pspp"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-the-payment-service-provider-plugin-pspp"}},[e._v("#")]),e._v(" Configure the payment service provider plugin (PSPP)")]),e._v(" "),t("ol",[t("li",[e._v("Go back to your site's dashboard. On the left menu click on \""),t("strong",[e._v("Settings")]),e._v('", on that page click "'),t("strong",[e._v("Accept Payments")]),e._v('"\n'),t("img",{attrs:{src:o(768),alt:"Settings",title:"Settings"}}),e._v(" "),t("img",{attrs:{src:o(769),alt:"Accept Payments",title:"Accept Payments"}})]),e._v(" "),t("li",[e._v('On the following page, you should see "Bitcoin Payments with BTCPay" as payment provider. If not, try to refresh the page to clear the Wix cache. Click on "Connect"\n'),t("img",{attrs:{src:o(770),alt:"BTCPay",title:"BTCPay"}})]),e._v(" "),t("li",[e._v("You are now on the configuration page. You need to enter the following fields:\n"),t("ul",[t("li",[t("strong",[e._v("BTCPay URL")]),e._v(": The URL of your BTCPay Server instance, e.g. "),t("code",[e._v("https://btcpay.example.com")])]),e._v(" "),t("li",[t("strong",[e._v("API Key")]),e._v(": The API key of your BTCPay store")]),e._v(" "),t("li",[t("strong",[e._v("Store ID")]),e._v(": The store ID of your BTCPay store")]),e._v(" "),t("li",[t("strong",[e._v("Webhook Secret")]),e._v(": The webhook secret of your BTCPay store\n"),t("img",{attrs:{src:o(341),alt:"Configuration",title:"Configuration"}})])])])]),e._v(" "),t("h3",{attrs:{id:"btcpay-server-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-url"}},[e._v("#")]),e._v(" BTCPay Server URL")]),e._v(" "),t("ol",[t("li",[e._v('First, enter the "'),t("strong",[e._v("BTCPay Server URL")]),e._v('", in our case '),t("code",[e._v("https://testing.btcpay.tech")])]),e._v(" "),t("li",[e._v('Next, you need to get the API Key, Store ID, and Webhook Secret from your BTCPay store. To do so, log in to your BTCPay store. We assume you already have a store setup, in our guide here it is called "Wix BTCPay Demo"')])]),e._v(" "),t("h3",{attrs:{id:"api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-key"}},[e._v("#")]),e._v(" API Key")]),e._v(" "),t("ol",[t("li",[e._v('Go to the API Keys page under "'),t("strong",[e._v("Account")]),e._v('" -> "'),t("strong",[e._v("API Keys")]),e._v('" (For BTCPay Server versions prior 2.0 it is under "Account" -> "Manage Account" -> "API Keys"). Click on "'),t("strong",[e._v("Generate Key")]),e._v('"\n'),t("img",{attrs:{src:o(771),alt:"API Keys",title:"API Keys"}})]),e._v(" "),t("li",[e._v('Enter a label such as "Wix API Key".')]),e._v(" "),t("li",[e._v('For the permissions, click on the "'),t("em",[t("strong",[e._v("Select specific stores")])]),e._v('" link and select the store you want to connect to Wix, in our example "Wix BTCPay Demo" - for the following permissions: '),t("code",[e._v("View invoices")]),e._v(", "),t("code",[e._v("Create invoice")]),e._v(", "),t("code",[e._v("Modify invoices")]),e._v(", "),t("code",[e._v("Modify stores webhooks")]),e._v(", "),t("code",[e._v("View your stores")]),e._v(", "),t("code",[e._v("Create non-approved pull payments")]),e._v(" (used for refunds in the future)\n"),t("img",{attrs:{src:o(772),alt:"API Key permissions 1",title:"API Key permissions 1"}}),e._v(" "),t("img",{attrs:{src:o(773),alt:"API Key permissions 2",title:"API Key permissions 2"}})]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Generate API Key")]),e._v('" button and on the following page copy the API Key shown at the top\n'),t("img",{attrs:{src:o(774),alt:"Copy generated API key",title:"Copy generated API key"}})]),e._v(" "),t("li",[e._v('In your Wix store: paste that copied API key into the "'),t("strong",[e._v("API Key")]),e._v('" field')])]),e._v(" "),t("h3",{attrs:{id:"store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#store-id"}},[e._v("#")]),e._v(" Store ID")]),e._v(" "),t("ol",[t("li",[e._v('Go back to your BTCPay store and copy the "'),t("strong",[e._v("Store ID")]),e._v('". Go to your store and click on "Settings" and copy the Store ID shown\n'),t("img",{attrs:{src:o(775),alt:"Copy Store ID",title:"Copy Store ID"}})]),e._v(" "),t("li",[e._v('In your Wix store: paste that copied Store ID into the "'),t("strong",[e._v("Store ID")]),e._v('" field')])]),e._v(" "),t("h3",{attrs:{id:"webhook-secret"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#webhook-secret"}},[e._v("#")]),e._v(" Webhook Secret")]),e._v(" "),t("ol",[t("li",[e._v('Go back to your BTCPay store and click on "Settings" -> "Webhooks". Click on "Create Webhook"\n'),t("img",{attrs:{src:o(776),alt:"Create webhook page",title:"Create webhook page"}})]),e._v(" "),t("li",[t("strong",[e._v("Payload URL")]),e._v(": Your Wix store URL where it can be reached combined with a callback path. E.g. "),t("code",[e._v("https://example.com/_functions/btcpayTrxWebHook")]),e._v(" (replace example.com with your Wix store URL)")]),e._v(" "),t("li",[t("strong",[e._v("Secret")]),e._v(': This is auto-generated by BTCPay, you can show it by clicking on the "eye" icon')]),e._v(" "),t("li",[e._v('Copy the "'),t("strong",[e._v("Secret")]),e._v('" and paste it into the "'),t("strong",[e._v("Webhook Secret")]),e._v("\" field in your Wix store e.g. 'YOURWEBHOOKSECRET' as shown in our example")]),e._v(" "),t("li",[e._v("Back on BTCPay webhook page, you can leave the other settings as is")]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Add Webhook")]),e._v('" to create the webhook on BTCPay. You should see the "The webhook has been created." message\n'),t("img",{attrs:{src:o(777),alt:"Webhook created successfully",title:"Webhook created successfully"}})])]),e._v(" "),t("h3",{attrs:{id:"save-the-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#save-the-configuration"}},[e._v("#")]),e._v(" Save the configuration")]),e._v(" "),t("ol",[t("li",[e._v('Back in your Wix store, click on "'),t("strong",[e._v("Connect")]),e._v('" to save the configuration\n'),t("img",{attrs:{src:o(341),alt:"Save configuration",title:"Save configuration"}}),e._v(" "),t("img",{attrs:{src:o(778),alt:"Configuration saved",title:"Configuration saved"}})])]),e._v(" "),t("h2",{attrs:{id:"testing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#testing"}},[e._v("#")]),e._v(" Testing")]),e._v(" "),t("p",[e._v('You are now ready to test your BTCPay integration on your Wix store. Add some products to the cart and go through the checkout process and select "'),t("strong",[e._v("Bitcoin payments with BTCPay")]),e._v('"')]),e._v(" "),t("h2",{attrs:{id:"troubleshooting-faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting-faq"}},[e._v("#")]),e._v(" Troubleshooting / FAQ")]),e._v(" "),t("h3",{attrs:{id:"it-does-not-work-what-can-i-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#it-does-not-work-what-can-i-do"}},[e._v("#")]),e._v(" It does not work, what can I do?")]),e._v(" "),t("ul",[t("li",[e._v("Make sure you followed the guide step by step and copied the right values into the right places")]),e._v(" "),t("li",[e._v('In Wix under "'),t("strong",[e._v("Developer tools")]),e._v('" select "'),t("strong",[e._v("Logging Tools")]),e._v('" and there open the "'),t("strong",[e._v("Wix Logs")]),e._v('", it will live log any errors. So try to do the checkout or save the configuration form to see if there is any error.')])]),e._v(" "),t("h3",{attrs:{id:"after-copying-the-code-from-the-git-repository-i-dont-see-the-payment-method-listed-in-accept-payments-"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#after-copying-the-code-from-the-git-repository-i-dont-see-the-payment-method-listed-in-accept-payments-"}},[e._v("#")]),e._v(' After copying the code from the Git repository, I don\'t see the payment method listed in "Accept payments"')]),e._v(" "),t("p",[e._v('Try to delete the browser cache and reload the page. You can also try to go into editor and click on "Publish" to save the changes. Then reload the payment method list page again.')]),e._v(" "),t("h3",{attrs:{id:"how-can-i-change-the-text-of-the-payment-method-bitcoin-payments-with-btcpay-in-the-checkout"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-change-the-text-of-the-payment-method-bitcoin-payments-with-btcpay-in-the-checkout"}},[e._v("#")]),e._v(' How can I change the text of the payment method, "Bitcoin Payments with BTCPay" in the checkout?')]),e._v(" "),t("p",[e._v("You need to go into your Wix Editor and edit the file "),t("code",[e._v("BTCPay-config.js")]),e._v(". You can change the text in the "),t("code",[e._v("title")]),e._v(" field")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("...\nhostedPage: {\n title: 'Bitcoin Payments with BTCPay', // change this line\n billingAddressMandatoryFields: ['EMAIL'],\n...\n")])])]),t("h3",{attrs:{id:"i-still-have-a-problem-where-can-i-get-help"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-still-have-a-problem-where-can-i-get-help"}},[e._v("#")]),e._v(" I still have a problem, where can I get help?")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://chat.btcpayserver.org/"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/130.200d2fd4.js b/assets/js/130.d2c8df6c.js similarity index 99% rename from assets/js/130.200d2fd4.js rename to assets/js/130.d2c8df6c.js index 9cada910d3..c90beae980 100644 --- a/assets/js/130.200d2fd4.js +++ b/assets/js/130.d2c8df6c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[130],{861:function(e,t,r){"use strict";r.r(t);var s=r(17),a=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-development"}},[e._v("#")]),e._v(" Local development")]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites")]),e._v(" "),t("p",[e._v("For the "),t("strong",[e._v("development environment")]),e._v(" you need to install these tools:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Docker: "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-windows/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Windows"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-mac/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mac OS"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/install/linux/docker-ce/ubuntu/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Linux"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("p",[e._v("To execute tests and run the project for debugging, you need to run a number of "),t("strong",[e._v("dependencies")]),e._v(".")]),e._v(" "),t("p",[e._v("We wrapped all our dependencies in a docker-compose file that you can use to bootstrap the development environment:\nThe file "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(" can be used to spin everything up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver.git\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver/BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" up dev\n")])])]),t("h2",{attrs:{id:"which-ide"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#which-ide"}},[e._v("#")]),e._v(" Which IDE?")]),e._v(" "),t("p",[e._v("We recommend using Visual Studio 2022 (Windows Only) or Rider (cross platform). Visual Studio Code (cross platform) should also be possible, but isn't as straightforward to setup for a comfortable development environment.\nYou can of course use VIM if you are hardcore, .NET Core is easy to use via command-line.")]),e._v(" "),t("p",[e._v("Visual Studio Code, Visual Studio and Rider will run the launch profile "),t("code",[e._v("Bitcoin")]),e._v(".\nThis will run a "),t("strong",[e._v("BTCPay Server instance connecting to the services in your Docker service")]),e._v(", so you can easily debug and step through the code.")]),e._v(" "),t("h2",{attrs:{id:"build-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-configuration"}},[e._v("#")]),e._v(" Build configuration")]),e._v(" "),t("p",[e._v("A build configuration defines how to "),t("strong",[e._v("build BTCPay Server")]),e._v(". For example, whether to include some source files, whether to optimize for debugging or performance.")]),e._v(" "),t("p",[e._v("There are several build configurations:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Debug")])]),e._v(" "),t("li",[t("code",[e._v("Release")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Debug")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Release")])])]),e._v(" "),t("p",[e._v("How to use a different one during your local development depends on your IDE.\nBy default "),t("code",[e._v("Debug")]),e._v(" is used, this is a Bitcoin only build excluding any altcoin dependencies. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("You can select which build to use via the "),t("code",[e._v("-c")]),e._v(" switch in "),t("code",[e._v("dotnet")]),e._v(" command line. If you use command line and want to run a Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("h2",{attrs:{id:"launch-profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#launch-profiles"}},[e._v("#")]),e._v(" Launch profiles")]),e._v(" "),t("p",[e._v("When you "),t("strong",[e._v("start BTCPay Server locally for local development")]),e._v(", it needs the right parameter so it can connect to the development time dependencies in the docker-compose file.")]),e._v(" "),t("p",[e._v("Those parameters are wrapped into the dotnet concept of "),t("code",[e._v("launch profile")]),e._v(".")]),e._v(" "),t("p",[e._v("The launch profiles are specified in the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Properties/launchSettings.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchSettings.json"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("There are currently three launch profiles:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Bitcoin")])]),e._v(" "),t("li",[t("code",[e._v("Bitcoin-HTTPS")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-HTTPS")])])]),e._v(" "),t("p",[e._v("By default, "),t("code",[e._v("Bitcoin")]),e._v(" is used. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("If you use command line, "),t("code",[e._v("dotnet run")]),e._v(" allows you to select the launch profile of your choice:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run --launch-profile Bitcoin\n")])])]),t("h2",{attrs:{id:"running-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#running-tests"}},[e._v("#")]),e._v(" Running tests")]),e._v(" "),t("p",[e._v("Running tests is functioning in the exact same way as running the development time BTCPay Server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The concept of "),t("code",[e._v("launch profile")]),e._v(" does not apply for tests, but the concept of build configuration does. For example, if I want to run tests on the Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("p",[e._v("The tests are already configured to use the development time dependencies in the docker-compose presented earlier.")]),e._v(" "),t("p",[e._v("You can use the "),t("code",[e._v("--f")]),e._v(" (filter) switch to run a specific test.")]),e._v(" "),t("p",[e._v("If you use an IDE, consult your IDE documentation to run tests or switch to different configurations.")]),e._v(" "),t("h2",{attrs:{id:"altcoin-support-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#altcoin-support-development"}},[e._v("#")]),e._v(" Altcoin support development")]),e._v(" "),t("p",[e._v("By default, your IDE or simple "),t("code",[e._v("dotnet run")]),e._v(" will use "),t("code",[e._v("Bitcoin")]),e._v(" launch profile on "),t("code",[e._v("Debug")]),e._v(" build.")]),e._v(" "),t("ul",[t("li",[e._v("This means that BTCPay Server will be hosted on a local HTTP port, building without altcoin support,")]),e._v(" "),t("li",[e._v("Run BTCPay Server to connect to Bitcoin only dependencies specified in "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("p",[e._v("If you want to "),t("strong",[e._v("develop with altcoins support")]),e._v(" you need to use the "),t("code",[e._v("Altcoins-HTTPS")]),e._v(" launch profile, on the "),t("code",[e._v("Altcoins-Debug")]),e._v(" build, and run the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.altcoins.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.altcoins.yml"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If using command line:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" docker-compose.altcoins.yml up dev\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v("/BTCPayServer\ndotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug --launch-profile Altcoins-HTTPS\n")])])]),t("p",[e._v("For tests")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug\n")])])]),t("h2",{attrs:{id:"https-support-for-local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#https-support-for-local-development"}},[e._v("#")]),e._v(" HTTPS support for local development")]),e._v(" "),t("p",[e._v("Some browser security features may require that you use "),t("strong",[e._v("HTTPS")]),e._v(" to be properly tested.")]),e._v(" "),t("p",[e._v("In this case, use "),t("code",[e._v("Bitcoin-HTTPS")]),e._v(" (or "),t("code",[e._v("Altcoin-HTTPS")]),e._v(") launch profile. This will create a self signed certificate for your development purpose.")]),e._v(" "),t("p",[e._v("However, your browser will not trust it, making it difficult to debug.")]),e._v(" "),t("p",[e._v("You can instruct your OS to trust this development time certificate by running:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet dev-certs https "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--trust")]),e._v("\n")])])]),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("For more information check out these videos:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=ZePbMPSIvHM",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to contribute to BTCPay Server Development (Windows)"),t("OutboundLink")],1),e._v(" by Nicolas Dorier")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=j486T_Rk-yw",target:"_blank",rel:"noopener noreferrer"}},[e._v("Setting up BTCPayServer development environment on Linux (Ubuntu)"),t("OutboundLink")],1),e._v(" by RockStarDev")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=GWR_CcMsEV0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Development - Testing pull request, payments (MacOS)"),t("OutboundLink")],1),e._v(" by Pavlenex")])]),e._v(" "),t("p",[e._v("and these notes:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get started with development"),t("OutboundLink")],1),e._v(" by Nicolas Dorier (covering relevant docker commands, paying regtest invoices)")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[130],{862:function(e,t,r){"use strict";r.r(t);var s=r(17),a=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-development"}},[e._v("#")]),e._v(" Local development")]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites")]),e._v(" "),t("p",[e._v("For the "),t("strong",[e._v("development environment")]),e._v(" you need to install these tools:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Docker: "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-windows/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Windows"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-mac/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mac OS"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/install/linux/docker-ce/ubuntu/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Linux"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("p",[e._v("To execute tests and run the project for debugging, you need to run a number of "),t("strong",[e._v("dependencies")]),e._v(".")]),e._v(" "),t("p",[e._v("We wrapped all our dependencies in a docker-compose file that you can use to bootstrap the development environment:\nThe file "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(" can be used to spin everything up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver.git\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver/BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" up dev\n")])])]),t("h2",{attrs:{id:"which-ide"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#which-ide"}},[e._v("#")]),e._v(" Which IDE?")]),e._v(" "),t("p",[e._v("We recommend using Visual Studio 2022 (Windows Only) or Rider (cross platform). Visual Studio Code (cross platform) should also be possible, but isn't as straightforward to setup for a comfortable development environment.\nYou can of course use VIM if you are hardcore, .NET Core is easy to use via command-line.")]),e._v(" "),t("p",[e._v("Visual Studio Code, Visual Studio and Rider will run the launch profile "),t("code",[e._v("Bitcoin")]),e._v(".\nThis will run a "),t("strong",[e._v("BTCPay Server instance connecting to the services in your Docker service")]),e._v(", so you can easily debug and step through the code.")]),e._v(" "),t("h2",{attrs:{id:"build-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-configuration"}},[e._v("#")]),e._v(" Build configuration")]),e._v(" "),t("p",[e._v("A build configuration defines how to "),t("strong",[e._v("build BTCPay Server")]),e._v(". For example, whether to include some source files, whether to optimize for debugging or performance.")]),e._v(" "),t("p",[e._v("There are several build configurations:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Debug")])]),e._v(" "),t("li",[t("code",[e._v("Release")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Debug")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Release")])])]),e._v(" "),t("p",[e._v("How to use a different one during your local development depends on your IDE.\nBy default "),t("code",[e._v("Debug")]),e._v(" is used, this is a Bitcoin only build excluding any altcoin dependencies. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("You can select which build to use via the "),t("code",[e._v("-c")]),e._v(" switch in "),t("code",[e._v("dotnet")]),e._v(" command line. If you use command line and want to run a Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("h2",{attrs:{id:"launch-profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#launch-profiles"}},[e._v("#")]),e._v(" Launch profiles")]),e._v(" "),t("p",[e._v("When you "),t("strong",[e._v("start BTCPay Server locally for local development")]),e._v(", it needs the right parameter so it can connect to the development time dependencies in the docker-compose file.")]),e._v(" "),t("p",[e._v("Those parameters are wrapped into the dotnet concept of "),t("code",[e._v("launch profile")]),e._v(".")]),e._v(" "),t("p",[e._v("The launch profiles are specified in the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Properties/launchSettings.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchSettings.json"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("There are currently three launch profiles:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Bitcoin")])]),e._v(" "),t("li",[t("code",[e._v("Bitcoin-HTTPS")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-HTTPS")])])]),e._v(" "),t("p",[e._v("By default, "),t("code",[e._v("Bitcoin")]),e._v(" is used. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("If you use command line, "),t("code",[e._v("dotnet run")]),e._v(" allows you to select the launch profile of your choice:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run --launch-profile Bitcoin\n")])])]),t("h2",{attrs:{id:"running-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#running-tests"}},[e._v("#")]),e._v(" Running tests")]),e._v(" "),t("p",[e._v("Running tests is functioning in the exact same way as running the development time BTCPay Server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The concept of "),t("code",[e._v("launch profile")]),e._v(" does not apply for tests, but the concept of build configuration does. For example, if I want to run tests on the Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("p",[e._v("The tests are already configured to use the development time dependencies in the docker-compose presented earlier.")]),e._v(" "),t("p",[e._v("You can use the "),t("code",[e._v("--f")]),e._v(" (filter) switch to run a specific test.")]),e._v(" "),t("p",[e._v("If you use an IDE, consult your IDE documentation to run tests or switch to different configurations.")]),e._v(" "),t("h2",{attrs:{id:"altcoin-support-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#altcoin-support-development"}},[e._v("#")]),e._v(" Altcoin support development")]),e._v(" "),t("p",[e._v("By default, your IDE or simple "),t("code",[e._v("dotnet run")]),e._v(" will use "),t("code",[e._v("Bitcoin")]),e._v(" launch profile on "),t("code",[e._v("Debug")]),e._v(" build.")]),e._v(" "),t("ul",[t("li",[e._v("This means that BTCPay Server will be hosted on a local HTTP port, building without altcoin support,")]),e._v(" "),t("li",[e._v("Run BTCPay Server to connect to Bitcoin only dependencies specified in "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("p",[e._v("If you want to "),t("strong",[e._v("develop with altcoins support")]),e._v(" you need to use the "),t("code",[e._v("Altcoins-HTTPS")]),e._v(" launch profile, on the "),t("code",[e._v("Altcoins-Debug")]),e._v(" build, and run the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.altcoins.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.altcoins.yml"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If using command line:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" docker-compose.altcoins.yml up dev\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v("/BTCPayServer\ndotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug --launch-profile Altcoins-HTTPS\n")])])]),t("p",[e._v("For tests")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug\n")])])]),t("h2",{attrs:{id:"https-support-for-local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#https-support-for-local-development"}},[e._v("#")]),e._v(" HTTPS support for local development")]),e._v(" "),t("p",[e._v("Some browser security features may require that you use "),t("strong",[e._v("HTTPS")]),e._v(" to be properly tested.")]),e._v(" "),t("p",[e._v("In this case, use "),t("code",[e._v("Bitcoin-HTTPS")]),e._v(" (or "),t("code",[e._v("Altcoin-HTTPS")]),e._v(") launch profile. This will create a self signed certificate for your development purpose.")]),e._v(" "),t("p",[e._v("However, your browser will not trust it, making it difficult to debug.")]),e._v(" "),t("p",[e._v("You can instruct your OS to trust this development time certificate by running:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet dev-certs https "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--trust")]),e._v("\n")])])]),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("For more information check out these videos:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=ZePbMPSIvHM",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to contribute to BTCPay Server Development (Windows)"),t("OutboundLink")],1),e._v(" by Nicolas Dorier")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=j486T_Rk-yw",target:"_blank",rel:"noopener noreferrer"}},[e._v("Setting up BTCPayServer development environment on Linux (Ubuntu)"),t("OutboundLink")],1),e._v(" by RockStarDev")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=GWR_CcMsEV0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Development - Testing pull request, payments (MacOS)"),t("OutboundLink")],1),e._v(" by Pavlenex")])]),e._v(" "),t("p",[e._v("and these notes:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get started with development"),t("OutboundLink")],1),e._v(" by Nicolas Dorier (covering relevant docker commands, paying regtest invoices)")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/131.a204fc5c.js b/assets/js/131.fc4520f1.js similarity index 99% rename from assets/js/131.a204fc5c.js rename to assets/js/131.fc4520f1.js index ab0366d18d..f264e75ca9 100644 --- a/assets/js/131.a204fc5c.js +++ b/assets/js/131.fc4520f1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[131],{860:function(e,t,s){"use strict";s.r(t);var a=s(17),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-development"}},[e._v("#")]),e._v(" Local development")]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites")]),e._v(" "),t("p",[e._v("For the "),t("strong",[e._v("development environment")]),e._v(" you need to install these tools:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Docker: "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-windows/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Windows"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-mac/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mac OS"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/install/linux/docker-ce/ubuntu/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Linux"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("p",[e._v("To execute tests and run the project for debugging, you need to run a number of "),t("strong",[e._v("dependencies")]),e._v(".")]),e._v(" "),t("p",[e._v("We wrapped all our dependencies in a docker-compose file that you can use to bootstrap the development environment:\nThe file "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(" can be used to spin everything up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver.git\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver/BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" up dev\n")])])]),t("h2",{attrs:{id:"which-ide"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#which-ide"}},[e._v("#")]),e._v(" Which IDE?")]),e._v(" "),t("p",[e._v("We recommend using Visual Studio 2022 (Windows Only) or Rider (cross platform). Visual Studio Code (cross platform) should also be possible, but isn't as straightforward to setup for a comfortable development environment.\nYou can of course use VIM if you are hardcore, .NET Core is easy to use via command-line.")]),e._v(" "),t("p",[e._v("Visual Studio Code, Visual Studio and Rider will run the launch profile "),t("code",[e._v("Bitcoin")]),e._v(".\nThis will run a "),t("strong",[e._v("BTCPay Server instance connecting to the services in your Docker service")]),e._v(", so you can easily debug and step through the code.")]),e._v(" "),t("h2",{attrs:{id:"build-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-configuration"}},[e._v("#")]),e._v(" Build configuration")]),e._v(" "),t("p",[e._v("A build configuration defines how to "),t("strong",[e._v("build BTCPay Server")]),e._v(". For example, whether to include some source files, whether to optimize for debugging or performance.")]),e._v(" "),t("p",[e._v("There are several build configurations:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Debug")])]),e._v(" "),t("li",[t("code",[e._v("Release")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Debug")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Release")])])]),e._v(" "),t("p",[e._v("How to use a different one during your local development depends on your IDE.\nBy default "),t("code",[e._v("Debug")]),e._v(" is used, this is a Bitcoin only build excluding any altcoin dependencies. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("You can select which build to use via the "),t("code",[e._v("-c")]),e._v(" switch in "),t("code",[e._v("dotnet")]),e._v(" command line. If you use command line and want to run a Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("h2",{attrs:{id:"launch-profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#launch-profiles"}},[e._v("#")]),e._v(" Launch profiles")]),e._v(" "),t("p",[e._v("When you "),t("strong",[e._v("start BTCPay Server locally for local development")]),e._v(", it needs the right parameter so it can connect to the development time dependencies in the docker-compose file.")]),e._v(" "),t("p",[e._v("Those parameters are wrapped into the dotnet concept of "),t("code",[e._v("launch profile")]),e._v(".")]),e._v(" "),t("p",[e._v("The launch profiles are specified in the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Properties/launchSettings.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchSettings.json"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("There are currently three launch profiles:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Bitcoin")])]),e._v(" "),t("li",[t("code",[e._v("Bitcoin-HTTPS")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-HTTPS")])])]),e._v(" "),t("p",[e._v("By default, "),t("code",[e._v("Bitcoin")]),e._v(" is used. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("If you use command line, "),t("code",[e._v("dotnet run")]),e._v(" allows you to select the launch profile of your choice:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run --launch-profile Bitcoin\n")])])]),t("h2",{attrs:{id:"running-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#running-tests"}},[e._v("#")]),e._v(" Running tests")]),e._v(" "),t("p",[e._v("Running tests is functioning in the exact same way as running the development time BTCPay Server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The concept of "),t("code",[e._v("launch profile")]),e._v(" does not apply for tests, but the concept of build configuration does. For example, if I want to run tests on the Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("p",[e._v("The tests are already configured to use the development time dependencies in the docker-compose presented earlier.")]),e._v(" "),t("p",[e._v("You can use the "),t("code",[e._v("--f")]),e._v(" (filter) switch to run a specific test.")]),e._v(" "),t("p",[e._v("If you use an IDE, consult your IDE documentation to run tests or switch to different configurations.")]),e._v(" "),t("h2",{attrs:{id:"altcoin-support-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#altcoin-support-development"}},[e._v("#")]),e._v(" Altcoin support development")]),e._v(" "),t("p",[e._v("By default, your IDE or simple "),t("code",[e._v("dotnet run")]),e._v(" will use "),t("code",[e._v("Bitcoin")]),e._v(" launch profile on "),t("code",[e._v("Debug")]),e._v(" build.")]),e._v(" "),t("ul",[t("li",[e._v("This means that BTCPay Server will be hosted on a local HTTP port, building without altcoin support,")]),e._v(" "),t("li",[e._v("Run BTCPay Server to connect to Bitcoin only dependencies specified in "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("p",[e._v("If you want to "),t("strong",[e._v("develop with altcoins support")]),e._v(" you need to use the "),t("code",[e._v("Altcoins-HTTPS")]),e._v(" launch profile, on the "),t("code",[e._v("Altcoins-Debug")]),e._v(" build, and run the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.altcoins.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.altcoins.yml"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If using command line:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" docker-compose.altcoins.yml up dev\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v("/BTCPayServer\ndotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug --launch-profile Altcoins-HTTPS\n")])])]),t("p",[e._v("For tests")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug\n")])])]),t("h2",{attrs:{id:"https-support-for-local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#https-support-for-local-development"}},[e._v("#")]),e._v(" HTTPS support for local development")]),e._v(" "),t("p",[e._v("Some browser security features may require that you use "),t("strong",[e._v("HTTPS")]),e._v(" to be properly tested.")]),e._v(" "),t("p",[e._v("In this case, use "),t("code",[e._v("Bitcoin-HTTPS")]),e._v(" (or "),t("code",[e._v("Altcoin-HTTPS")]),e._v(") launch profile. This will create a self signed certificate for your development purpose.")]),e._v(" "),t("p",[e._v("However, your browser will not trust it, making it difficult to debug.")]),e._v(" "),t("p",[e._v("You can instruct your OS to trust this development time certificate by running:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet dev-certs https "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--trust")]),e._v("\n")])])]),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("For more information check out these videos:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=ZePbMPSIvHM",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to contribute to BTCPay Server Development (Windows)"),t("OutboundLink")],1),e._v(" by Nicolas Dorier")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=j486T_Rk-yw",target:"_blank",rel:"noopener noreferrer"}},[e._v("Setting up BTCPayServer development environment on Linux (Ubuntu)"),t("OutboundLink")],1),e._v(" by RockStarDev")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=GWR_CcMsEV0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Development - Testing pull request, payments (MacOS)"),t("OutboundLink")],1),e._v(" by Pavlenex")])]),e._v(" "),t("p",[e._v("and these notes:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get started with development"),t("OutboundLink")],1),e._v(" by Nicolas Dorier (covering relevant docker commands, paying regtest invoices)")])]),e._v(" "),t("h2",{attrs:{id:"how-to-manually-test-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-manually-test-payments"}},[e._v("#")]),e._v(" How to manually test payments")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-bitcoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-bitcoin-cli"}},[e._v("#")]),e._v(" Using the test bitcoin-cli")]),e._v(" "),t("p",[e._v("You can call bitcoin-cli inside the container with "),t("code",[e._v("docker exec")]),e._v(".\nFor example, if you want to send "),t("code",[e._v("0.23111090")]),e._v(" to "),t("code",[e._v("mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-bitcoin-cli.sh sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0.23111090")]),e._v("\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" 0"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("23111090\n")])])]),t("p",[e._v("You can also generate blocks:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-generate"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 3\n")])])]),t("h3",{attrs:{id:"using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a Lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h3",{attrs:{id:"using-the-test-litecoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-litecoin-cli"}},[e._v("#")]),e._v(" Using the test litecoin-cli")]),e._v(" "),t("p",[e._v("Same as bitcoin-cli, but with "),t("code",[e._v(".\\docker-litecoin-cli.ps1")]),e._v(" and "),t("code",[e._v(".\\docker-litecoin-cli.sh")]),e._v(" instead.")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-lightning-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-lightning-cli"}},[e._v("#")]),e._v(" Using the test lightning-cli")]),e._v(" "),t("p",[e._v("If you are using Linux:")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-customer-lightning-cli.sh pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-customer-lightning-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you get this message:")]),e._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("205")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"message"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Could not find a route"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"data"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"getroute_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sendpay_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("Please, run the test "),t("code",[e._v("CanSetLightningServer")]),e._v(", this will establish a channel between the customer and the merchant, then, retry.")]),e._v(" "),t("p",[e._v("Alternatively you can run the "),t("code",[e._v("./docker-lightning-channel-setup.sh")]),e._v(" script to establish the channel connection.\nThe "),t("code",[e._v("./docker-lightning-channel-teardown.sh")]),e._v(" script closes any existing lightning channels.")]),e._v(" "),t("h3",{attrs:{id:"alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Alternative Lightning testing: Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h2",{attrs:{id:"faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),t("h3",{attrs:{id:"docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[e._v("#")]),e._v(" "),t("code",[e._v("docker-compose up dev")]),e._v(" failed or tests are not passing, what should I do?")]),e._v(" "),t("ol",[t("li",[e._v("Run "),t("code",[e._v("docker-compose down --volumes")]),e._v(" (this will reset your test environment)")]),e._v(" "),t("li",[e._v("Run "),t("code",[e._v("docker-compose pull")]),e._v(" (this will ensure you have the latest images)")]),e._v(" "),t("li",[e._v("Run again with "),t("code",[e._v("docker-compose up dev")])])]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-altcoin-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-altcoin-environment"}},[e._v("#")]),e._v(" How to run the Altcoin environment?")]),e._v(" "),t("p",[t("code",[e._v("docker-compose -f docker-compose.altcoins.yml up dev")])]),e._v(" "),t("p",[e._v("If you still have issues, try to restart docker.")]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-selenium-test-with-a-browser"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-selenium-test-with-a-browser"}},[e._v("#")]),e._v(" How to run the Selenium test with a browser?")]),e._v(" "),t("p",[e._v("Run "),t("code",[e._v("dotnet user-secrets set RunSeleniumInBrowser true")]),e._v(" to run tests in browser.")]),e._v(" "),t("p",[e._v("To switch back to headless mode (recommended) you can run "),t("code",[e._v("dotnet user-secrets remove RunSeleniumInBrowser")]),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[e._v("#")]),e._v(" Session not created: This version of ChromeDriver only supports Chrome version 88")]),e._v(" "),t("p",[e._v("When you run tests for selenium, you may end up with this error.\nThis happen when we update the selenium packages on BTCPay Server while you did not update your chrome version.")]),e._v(" "),t("p",[e._v("If you want to use a older chrome driver on "),t("a",{attrs:{href:"https://chromedriver.chromium.org/downloads",target:"_blank",rel:"noopener noreferrer"}},[e._v("this page"),t("OutboundLink")],1),e._v(" then point to it with")]),e._v(" "),t("p",[t("code",[e._v('dotnet user-secrets set ChromeDriverDirectory "path/to/the/driver/directory"')])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[131],{863:function(e,t,s){"use strict";s.r(t);var a=s(17),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-development"}},[e._v("#")]),e._v(" Local development")]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites")]),e._v(" "),t("p",[e._v("For the "),t("strong",[e._v("development environment")]),e._v(" you need to install these tools:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Docker: "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-windows/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Windows"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-mac/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mac OS"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/install/linux/docker-ce/ubuntu/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Linux"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("p",[e._v("To execute tests and run the project for debugging, you need to run a number of "),t("strong",[e._v("dependencies")]),e._v(".")]),e._v(" "),t("p",[e._v("We wrapped all our dependencies in a docker-compose file that you can use to bootstrap the development environment:\nThe file "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(" can be used to spin everything up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver.git\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver/BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" up dev\n")])])]),t("h2",{attrs:{id:"which-ide"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#which-ide"}},[e._v("#")]),e._v(" Which IDE?")]),e._v(" "),t("p",[e._v("We recommend using Visual Studio 2022 (Windows Only) or Rider (cross platform). Visual Studio Code (cross platform) should also be possible, but isn't as straightforward to setup for a comfortable development environment.\nYou can of course use VIM if you are hardcore, .NET Core is easy to use via command-line.")]),e._v(" "),t("p",[e._v("Visual Studio Code, Visual Studio and Rider will run the launch profile "),t("code",[e._v("Bitcoin")]),e._v(".\nThis will run a "),t("strong",[e._v("BTCPay Server instance connecting to the services in your Docker service")]),e._v(", so you can easily debug and step through the code.")]),e._v(" "),t("h2",{attrs:{id:"build-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-configuration"}},[e._v("#")]),e._v(" Build configuration")]),e._v(" "),t("p",[e._v("A build configuration defines how to "),t("strong",[e._v("build BTCPay Server")]),e._v(". For example, whether to include some source files, whether to optimize for debugging or performance.")]),e._v(" "),t("p",[e._v("There are several build configurations:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Debug")])]),e._v(" "),t("li",[t("code",[e._v("Release")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Debug")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Release")])])]),e._v(" "),t("p",[e._v("How to use a different one during your local development depends on your IDE.\nBy default "),t("code",[e._v("Debug")]),e._v(" is used, this is a Bitcoin only build excluding any altcoin dependencies. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("You can select which build to use via the "),t("code",[e._v("-c")]),e._v(" switch in "),t("code",[e._v("dotnet")]),e._v(" command line. If you use command line and want to run a Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("h2",{attrs:{id:"launch-profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#launch-profiles"}},[e._v("#")]),e._v(" Launch profiles")]),e._v(" "),t("p",[e._v("When you "),t("strong",[e._v("start BTCPay Server locally for local development")]),e._v(", it needs the right parameter so it can connect to the development time dependencies in the docker-compose file.")]),e._v(" "),t("p",[e._v("Those parameters are wrapped into the dotnet concept of "),t("code",[e._v("launch profile")]),e._v(".")]),e._v(" "),t("p",[e._v("The launch profiles are specified in the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Properties/launchSettings.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchSettings.json"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("There are currently three launch profiles:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Bitcoin")])]),e._v(" "),t("li",[t("code",[e._v("Bitcoin-HTTPS")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-HTTPS")])])]),e._v(" "),t("p",[e._v("By default, "),t("code",[e._v("Bitcoin")]),e._v(" is used. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("If you use command line, "),t("code",[e._v("dotnet run")]),e._v(" allows you to select the launch profile of your choice:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run --launch-profile Bitcoin\n")])])]),t("h2",{attrs:{id:"running-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#running-tests"}},[e._v("#")]),e._v(" Running tests")]),e._v(" "),t("p",[e._v("Running tests is functioning in the exact same way as running the development time BTCPay Server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The concept of "),t("code",[e._v("launch profile")]),e._v(" does not apply for tests, but the concept of build configuration does. For example, if I want to run tests on the Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("p",[e._v("The tests are already configured to use the development time dependencies in the docker-compose presented earlier.")]),e._v(" "),t("p",[e._v("You can use the "),t("code",[e._v("--f")]),e._v(" (filter) switch to run a specific test.")]),e._v(" "),t("p",[e._v("If you use an IDE, consult your IDE documentation to run tests or switch to different configurations.")]),e._v(" "),t("h2",{attrs:{id:"altcoin-support-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#altcoin-support-development"}},[e._v("#")]),e._v(" Altcoin support development")]),e._v(" "),t("p",[e._v("By default, your IDE or simple "),t("code",[e._v("dotnet run")]),e._v(" will use "),t("code",[e._v("Bitcoin")]),e._v(" launch profile on "),t("code",[e._v("Debug")]),e._v(" build.")]),e._v(" "),t("ul",[t("li",[e._v("This means that BTCPay Server will be hosted on a local HTTP port, building without altcoin support,")]),e._v(" "),t("li",[e._v("Run BTCPay Server to connect to Bitcoin only dependencies specified in "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("p",[e._v("If you want to "),t("strong",[e._v("develop with altcoins support")]),e._v(" you need to use the "),t("code",[e._v("Altcoins-HTTPS")]),e._v(" launch profile, on the "),t("code",[e._v("Altcoins-Debug")]),e._v(" build, and run the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.altcoins.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.altcoins.yml"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If using command line:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" docker-compose.altcoins.yml up dev\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v("/BTCPayServer\ndotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug --launch-profile Altcoins-HTTPS\n")])])]),t("p",[e._v("For tests")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug\n")])])]),t("h2",{attrs:{id:"https-support-for-local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#https-support-for-local-development"}},[e._v("#")]),e._v(" HTTPS support for local development")]),e._v(" "),t("p",[e._v("Some browser security features may require that you use "),t("strong",[e._v("HTTPS")]),e._v(" to be properly tested.")]),e._v(" "),t("p",[e._v("In this case, use "),t("code",[e._v("Bitcoin-HTTPS")]),e._v(" (or "),t("code",[e._v("Altcoin-HTTPS")]),e._v(") launch profile. This will create a self signed certificate for your development purpose.")]),e._v(" "),t("p",[e._v("However, your browser will not trust it, making it difficult to debug.")]),e._v(" "),t("p",[e._v("You can instruct your OS to trust this development time certificate by running:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet dev-certs https "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--trust")]),e._v("\n")])])]),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("For more information check out these videos:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=ZePbMPSIvHM",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to contribute to BTCPay Server Development (Windows)"),t("OutboundLink")],1),e._v(" by Nicolas Dorier")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=j486T_Rk-yw",target:"_blank",rel:"noopener noreferrer"}},[e._v("Setting up BTCPayServer development environment on Linux (Ubuntu)"),t("OutboundLink")],1),e._v(" by RockStarDev")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=GWR_CcMsEV0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Development - Testing pull request, payments (MacOS)"),t("OutboundLink")],1),e._v(" by Pavlenex")])]),e._v(" "),t("p",[e._v("and these notes:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get started with development"),t("OutboundLink")],1),e._v(" by Nicolas Dorier (covering relevant docker commands, paying regtest invoices)")])]),e._v(" "),t("h2",{attrs:{id:"how-to-manually-test-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-manually-test-payments"}},[e._v("#")]),e._v(" How to manually test payments")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-bitcoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-bitcoin-cli"}},[e._v("#")]),e._v(" Using the test bitcoin-cli")]),e._v(" "),t("p",[e._v("You can call bitcoin-cli inside the container with "),t("code",[e._v("docker exec")]),e._v(".\nFor example, if you want to send "),t("code",[e._v("0.23111090")]),e._v(" to "),t("code",[e._v("mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-bitcoin-cli.sh sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0.23111090")]),e._v("\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" 0"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("23111090\n")])])]),t("p",[e._v("You can also generate blocks:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-generate"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 3\n")])])]),t("h3",{attrs:{id:"using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a Lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h3",{attrs:{id:"using-the-test-litecoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-litecoin-cli"}},[e._v("#")]),e._v(" Using the test litecoin-cli")]),e._v(" "),t("p",[e._v("Same as bitcoin-cli, but with "),t("code",[e._v(".\\docker-litecoin-cli.ps1")]),e._v(" and "),t("code",[e._v(".\\docker-litecoin-cli.sh")]),e._v(" instead.")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-lightning-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-lightning-cli"}},[e._v("#")]),e._v(" Using the test lightning-cli")]),e._v(" "),t("p",[e._v("If you are using Linux:")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-customer-lightning-cli.sh pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-customer-lightning-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you get this message:")]),e._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("205")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"message"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Could not find a route"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"data"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"getroute_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sendpay_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("Please, run the test "),t("code",[e._v("CanSetLightningServer")]),e._v(", this will establish a channel between the customer and the merchant, then, retry.")]),e._v(" "),t("p",[e._v("Alternatively you can run the "),t("code",[e._v("./docker-lightning-channel-setup.sh")]),e._v(" script to establish the channel connection.\nThe "),t("code",[e._v("./docker-lightning-channel-teardown.sh")]),e._v(" script closes any existing lightning channels.")]),e._v(" "),t("h3",{attrs:{id:"alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Alternative Lightning testing: Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h2",{attrs:{id:"faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),t("h3",{attrs:{id:"docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[e._v("#")]),e._v(" "),t("code",[e._v("docker-compose up dev")]),e._v(" failed or tests are not passing, what should I do?")]),e._v(" "),t("ol",[t("li",[e._v("Run "),t("code",[e._v("docker-compose down --volumes")]),e._v(" (this will reset your test environment)")]),e._v(" "),t("li",[e._v("Run "),t("code",[e._v("docker-compose pull")]),e._v(" (this will ensure you have the latest images)")]),e._v(" "),t("li",[e._v("Run again with "),t("code",[e._v("docker-compose up dev")])])]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-altcoin-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-altcoin-environment"}},[e._v("#")]),e._v(" How to run the Altcoin environment?")]),e._v(" "),t("p",[t("code",[e._v("docker-compose -f docker-compose.altcoins.yml up dev")])]),e._v(" "),t("p",[e._v("If you still have issues, try to restart docker.")]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-selenium-test-with-a-browser"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-selenium-test-with-a-browser"}},[e._v("#")]),e._v(" How to run the Selenium test with a browser?")]),e._v(" "),t("p",[e._v("Run "),t("code",[e._v("dotnet user-secrets set RunSeleniumInBrowser true")]),e._v(" to run tests in browser.")]),e._v(" "),t("p",[e._v("To switch back to headless mode (recommended) you can run "),t("code",[e._v("dotnet user-secrets remove RunSeleniumInBrowser")]),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[e._v("#")]),e._v(" Session not created: This version of ChromeDriver only supports Chrome version 88")]),e._v(" "),t("p",[e._v("When you run tests for selenium, you may end up with this error.\nThis happen when we update the selenium packages on BTCPay Server while you did not update your chrome version.")]),e._v(" "),t("p",[e._v("If you want to use a older chrome driver on "),t("a",{attrs:{href:"https://chromedriver.chromium.org/downloads",target:"_blank",rel:"noopener noreferrer"}},[e._v("this page"),t("OutboundLink")],1),e._v(" then point to it with")]),e._v(" "),t("p",[t("code",[e._v('dotnet user-secrets set ChromeDriverDirectory "path/to/the/driver/directory"')])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/133.71c8ccb1.js b/assets/js/133.01afc6ea.js similarity index 99% rename from assets/js/133.71c8ccb1.js rename to assets/js/133.01afc6ea.js index 67b3748702..508ca5593e 100644 --- a/assets/js/133.71c8ccb1.js +++ b/assets/js/133.01afc6ea.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[133],{867:function(e,t,r){"use strict";r.r(t);var a=r(17),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"introduction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[e._v("#")]),e._v(" Introduction")]),e._v(" "),t("p",[e._v("While "),t("RouterLink",{attrs:{to:"/LunaNodeWebDeployment/"}},[e._v("our instructions")]),e._v(" cover how to install BTCPayServer in one click on Azure or Lunanode, BTCPay Server is not limited to those options.")],1),e._v(" "),t("p",[e._v("You will find below information about how you can install BTCPay Server easily in any environment having docker available.")]),e._v(" "),t("h1",{attrs:{id:"architecture"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[e._v("#")]),e._v(" Architecture")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://github.com/btcpayserver/btcpayserver-doc/raw/master/docs/img/Architecture.png",alt:"Architecture",title:"Architecture"}})]),e._v(" "),t("p",[e._v("As you can see, BTCPay depends on several pieces of infrastructure, mainly:")]),e._v(" "),t("ul",[t("li",[e._v("A lightweight block explorer (NBXplorer),")]),e._v(" "),t("li",[e._v("A database (PostgreSQL),")]),e._v(" "),t("li",[e._v("A full node (eg. Bitcoin Core)")])]),e._v(" "),t("p",[e._v("There can be more dependencies if you support more than just standard Bitcoin transactions, including:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/ElementsProject/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Core Lightning (CLN)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/litecoin-project/litecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("LitecoinD"),t("OutboundLink")],1),e._v(" and other coin daemons")]),e._v(" "),t("li",[e._v("And more...")])]),e._v(" "),t("p",[e._v("Note: The setup process can be time consuming, but is heavily automated to make it a fun and easy experience.")]),e._v(" "),t("p",[e._v("Take a look at how BTCPay works in a video below.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/nr0UNbz3AoQ/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=nr0UNbz3AoQ",title:"YouTube","data-id":"nr0UNbz3AoQ"}},[t("iframe",{attrs:{title:"YouTube","data-src":"https://www.youtube-nocookie.com/embed/nr0UNbz3AoQ?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("p",[e._v("Here is a presentation of the global architecture at Advancing Bitcoin conference.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Up0dvorzSNM/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=Up0dvorzSNM",title:"BTCPay - Architecture overview","data-id":"Up0dvorzSNM"}},[t("iframe",{attrs:{title:"BTCPay - Architecture overview","data-src":"https://www.youtube-nocookie.com/embed/Up0dvorzSNM?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h1",{attrs:{id:"full-installation-for-technical-users"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#full-installation-for-technical-users"}},[e._v("#")]),e._v(" Full installation (for technical users)")]),e._v(" "),t("p",[e._v("You can also install BTCPay Server on your own machine or VPS instance.")]),e._v(" "),t("p",[e._v("The officially supported setup is driven by Docker (and Docker-Compose).")]),e._v(" "),t("p",[e._v("First, make sure you have a domain name pointing to your host "),t("code",[e._v("A record")]),e._v(", with ports "),t("code",[e._v("443")]),e._v(" and "),t("code",[e._v("80")]),e._v(" externally accessible. For Lightning Network, port "),t("code",[e._v("9735")]),e._v(" is required ("),t("code",[e._v("9736")]),e._v(" if you use Litecoin Lightning). Otherwise, you will have to set a domain manually by running "),t("code",[e._v("changedomain.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Let's assume your domain is "),t("code",[e._v("btcpay.EXAMPLE.com")]),e._v(".")]),e._v(" "),t("p",[e._v("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 "),t("a",{attrs:{href:"#generated-docker-compose"}},[e._v("modify")]),e._v(" or ignore if you have enough disk space for a full node. Finally, your domain is "),t("code",[e._v("btcpay.EXAMPLE.com")]),e._v(" should reflect your actual domain name.")]),e._v(" "),t("p",[t("a",{attrs:{href:"#environment-variables"}},[e._v("Environment variables")]),e._v(" can be tailored to your needs. Some variables require additional storage space.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Login as root")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Create a folder for BTCPay")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mkdir")]),e._v(" BTCPayServer\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Clone this repository")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Run btcpay-setup.sh with the right parameters")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpay.EXAMPLE.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage-s"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("true\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exit")]),e._v("\n")])])]),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" will then:")]),e._v(" "),t("ul",[t("li",[e._v("Install Docker")]),e._v(" "),t("li",[e._v("Install Docker-Compose")]),e._v(" "),t("li",[e._v("Make sure BTCPay starts at reboot via upstart or systemd")]),e._v(" "),t("li",[e._v("Setup environment variables to use BTCPay utilities")]),e._v(" "),t("li",[e._v("Add BTCPay utilities in /usr/bin")]),e._v(" "),t("li",[e._v("Start BTCPay Server")])]),e._v(" "),t("p",[e._v("Video below guides you step by step on how to set up BTCPay Server on a VPS with Docker.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/x6hqTFgHqhA/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=x6hqTFgHqhA",title:"YouTube","data-id":"x6hqTFgHqhA"}},[t("iframe",{attrs:{title:"YouTube","data-src":"https://www.youtube-nocookie.com/embed/x6hqTFgHqhA?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("p",[e._v("Check out this video if you're interested in learning more about setting up "),t("a",{attrs:{href:"https://www.youtube.com/playlist?list=PLH4m2oS2ratfaprAFx9E3ZDjwxNKvCk4e",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay with Docker Compose"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("figure",[t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver/",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://img.shields.io/docker/automated/btcpayserver/btcpayserver.svg",alt:"Docker automated build",title:"Docker automated build"}}),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"environment-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#environment-variables"}},[e._v("#")]),e._v(" Environment variables")]),e._v(" "),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" will use the following environment variables:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("BTCPAY_HOST")]),e._v(": The hostname of your website (eg. "),t("code",[e._v("btcpay.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_ADDITIONAL_HOSTS")]),e._v(": Optional, specify additional domains to your BTCPayServer with https support if enabled. (eg. example2.com,example3.com)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(": The public port the reverse proxy binds to for HTTP traffic (default: 80)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_HTTPS_PORT")]),e._v(": The public port the reverse proxy binds to for HTTPS traffic (default: 443)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_DEFAULT_HOST")]),e._v(": 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.")]),e._v(" "),t("li",[t("code",[e._v("NOREVERSEPROXY_HTTP_PORT")]),e._v(": Optional, if not using a reverse proxy, specify which port should be opened for HTTP traffic. (default: 80)")]),e._v(" "),t("li",[t("code",[e._v("NBITCOIN_NETWORK")]),e._v(": The type of network to use (eg. "),t("code",[e._v("mainnet")]),e._v(", "),t("code",[e._v("testnet")]),e._v(", or "),t("code",[e._v("regtest")]),e._v(". Default: "),t("code",[e._v("mainnet")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("LIGHTNING_ALIAS")]),e._v(": An alias for your lightning network node, if used")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTO1")]),e._v(": First supported crypto currency (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("btc")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTO2")]),e._v(": Second supported crypto currency (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTON")]),e._v(": N'th supported crypto currency where N is 9 at maximum. (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_REVERSEPROXY")]),e._v(": Specify reverse proxy to use; NGinx has HTTPS support. (eg. "),t("code",[e._v("nginx")]),e._v(", "),t("code",[e._v("traefik")]),e._v(", "),t("code",[e._v("(empty)")]),e._v(". Default: "),t("code",[e._v("nginx")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_LIGHTNING")]),e._v(": Lightning network implementation to use (eg. "),t("code",[e._v("clightning")]),e._v(", "),t("code",[e._v("lnd")]),e._v(", Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_SUBNAME")]),e._v(": The subname of the generated docker-compose file, where the full name is "),t("code",[e._v("Generated/docker-compose.SUBNAME.yml")]),e._v(" (Default: "),t("code",[e._v("generated")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(": Semicolon-separated list of additional fragments you want to use (eg. "),t("code",[e._v("opt-save-storage")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("LETSENCRYPT_EMAIL")]),e._v(": An email will be sent to this address if certificate expires and fails to renew automatically (eg. "),t("code",[e._v("me@example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("ACME_CA_URI")]),e._v(": The API endpoint to ask for HTTPS certificate (Default: "),t("code",[e._v("production")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_ENABLE_SSH")]),e._v(": 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)")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_DOCKER_IMAGE")]),e._v(": Optional, Specify which generator image to use if you have customized the C# generator. Set to "),t("code",[e._v("btcpayserver/docker-compose-generator:local")]),e._v(" to build the generator locally at runtime.")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_IMAGE")]),e._v(": Optional, Specify which btcpayserver image to use if you have a customized btcpayserver.")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_EXCLUDE_FRAGMENTS")]),e._v(": Semicolon-separated list of fragments you want to forcefully exclude (eg. "),t("code",[e._v("litecoin-clightning")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("TOR_RELAY_NICKNAME")]),e._v(": If tor relay is activated with opt-add-tor-relay, the relay nickname")]),e._v(" "),t("li",[t("code",[e._v("TOR_RELAY_EMAIL")]),e._v(": If tor relay is activated with opt-add-tor-relay, the email for Tor to contact you regarding your relay")])]),e._v(" "),t("p",[e._v("Additionally, there are specific environment variables for some addons:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("LIBREPATRON_HOST")]),e._v(": If libre patron is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-librepatron.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-librepatron"),t("OutboundLink")],1),e._v(", the hostname of your libre patron website (eg. "),t("code",[e._v("librepatron.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("ZAMMAD_HOST")]),e._v(": If zammad is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-zammad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-zammad"),t("OutboundLink")],1),e._v(", the hostname of your zammad website (eg. "),t("code",[e._v("zammad.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("WOOCOMMERCE_HOST")]),e._v(": If woocommerce is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-woocommerce.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-woocommerce"),t("OutboundLink")],1),e._v(", the hostname of your woocommerce website (eg. "),t("code",[e._v("store.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("EPS_XPUB")]),e._v(": If Electrum Personal Server (EPS) is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps"),t("OutboundLink")],1),e._v(", 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.")]),e._v(" "),t("li",[e._v("If Bitcoin Wallet Tracker is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-bwt.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-bwt"),t("OutboundLink")],1),e._v(", you can use "),t("code",[e._v("BWT_XPUB")]),e._v("/"),t("code",[e._v("BWT_XPUB_*")]),e._v(" (to set your XPUB/YPUB/ZPUB), "),t("code",[e._v("BWT_DESCRIPTOR")]),e._v("/"),t("code",[e._v("BWT_DESCRIPTOR_*")]),e._v(" (for script descriptors), "),t("code",[e._v("BWT_RESCAN_SINCE")]),e._v(" (set to the wallet creation date in YYYY-MM-DD to speed up the rescan), "),t("code",[e._v("BWT_BITCOIND_WALLET")]),e._v(" and "),t("code",[e._v("BWT_GAP_LIMIT")]),e._v(".")]),e._v(" "),t("li",[t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(": If LND watchtower is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-wtclient"),t("OutboundLink")],1),e._v(", you can use "),t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(" to change the sweep fee used in constructing the justice transaction (default is 10 sat/byte)")]),e._v(" "),t("li",[t("code",[e._v("FIREFLY_HOST")]),e._v(": If fireflyiii is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-fireflyiii"),t("OutboundLink")],1),e._v(", the hostname of your fireflyiii website (eg. "),t("code",[e._v("firefly.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("CLOUDFLARE_TUNNEL_TOKEN")]),e._v(": Used to expose your instance to clearnet with a Cloudflare Argo Tunnel (if cloudflare tunnel is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-cloudflared.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-cloudflared"),t("OutboundLink")],1),e._v(", for setup instructions "),t("RouterLink",{attrs:{to:"/Docker/cloudflare-tunnel/"}},[e._v("see documentation")]),e._v(")")],1)]),e._v(" "),t("h1",{attrs:{id:"tooling"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#tooling"}},[e._v("#")]),e._v(" Tooling")]),e._v(" "),t("p",[e._v("A wide variety of useful scripts are available once BTCPay is installed:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("bitcoin-cli.sh")]),e._v(": Access your Bitcoin node instance (for RPC)")]),e._v(" "),t("li",[t("code",[e._v("bitcoin-lightning-cli.sh")]),e._v(": Access your CLN node instance (for RPC)")]),e._v(" "),t("li",[t("code",[e._v("changedomain.sh")]),e._v(": Change the domain of your BTCPayServer (remember to disable 2FA/U2F first, as you risk being unable to log in to your account)")]),e._v(" "),t("li",[t("code",[e._v("btcpay-update.sh")]),e._v(": Update BTCPayServer to the latest version")]),e._v(" "),t("li",[t("code",[e._v("btcpay-up.sh")]),e._v(": Run "),t("code",[e._v("docker-compose up")])]),e._v(" "),t("li",[t("code",[e._v("btcpay-down.sh")]),e._v(": Run "),t("code",[e._v("docker-compose down")])]),e._v(" "),t("li",[t("code",[e._v("btcpay-setup.sh")]),e._v(": Change the settings of your server")]),e._v(" "),t("li",[t("code",[e._v("btcpay-clean.sh")]),e._v(": Purge any unused docker images")]),e._v(" "),t("li",[t("code",[e._v(". ./btcpay-setup.sh")]),e._v(": Information about additional parameters")]),e._v(" "),t("li",[t("code",[e._v(". ./btcpay-setup.sh -i")]),e._v(": Set up your BTCPayServer")]),e._v(" "),t("li",[t("code",[e._v("btcpay-restart.sh")]),e._v(": Restart your BTCPayServer")])]),e._v(" "),t("h1",{attrs:{id:"under-the-hood"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#under-the-hood"}},[e._v("#")]),e._v(" Under the hood")]),e._v(" "),t("h2",{attrs:{id:"generated-docker-compose"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generated-docker-compose"}},[e._v("#")]),e._v(" Generated docker-compose")]),e._v(" "),t("p",[e._v("When you run "),t("code",[e._v("btcpay-setup.sh")]),e._v(", your environment variables are used by "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/build.sh",target:"_blank",rel:"noopener noreferrer"}},[e._v("build.sh"),t("OutboundLink")],1),e._v(" (or "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/build.ps1",target:"_blank",rel:"noopener noreferrer"}},[e._v("build.ps1"),t("OutboundLink")],1),e._v(") to generate a docker-compose adapted for your needs. For the full list of options, see: "),t("a",{attrs:{href:"#environment-variables"}},[e._v("Environment variables")])]),e._v(" "),t("p",[e._v("By default, the generated file is "),t("code",[e._v("Generated/docker-compose.generated.yml")]),e._v(", constructed from the relevant "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments",target:"_blank",rel:"noopener noreferrer"}},[e._v("Docker fragments"),t("OutboundLink")],1),e._v(" for your setup.")]),e._v(" "),t("p",[e._v("Available "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" currently are:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage"),t("OutboundLink")],1),e._v(" will keep around 1 year of blocks (prune BTC for 100 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-s.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-s"),t("OutboundLink")],1),e._v(" will keep around 6 months of blocks (prune BTC for 50 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-xs.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-xs"),t("OutboundLink")],1),e._v(" will keep around 3 months of blocks (prune BTC for 25 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-xxs.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-xxs"),t("OutboundLink")],1),e._v(" will keep around 2 weeks of blocks (prune BTC for 5 GB) (lightning not supported)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-autocompact.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-autocompact"),t("OutboundLink")],1),e._v(" will activate auto compacting of LND database.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-autopilot.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-autopilot"),t("OutboundLink")],1),e._v(" will activate auto pilot on LND. (5 channels, 60% of allocation)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-keysend.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-keysend"),t("OutboundLink")],1),e._v(" will activate keysend on LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-wtclient"),t("OutboundLink")],1),e._v(" will activate the watchtower client on LND. "),t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(" can be used to override the default 10 sat/byte justice transaction fee")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-watchtower.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-watchtower"),t("OutboundLink")],1),e._v(" will activate the LND watchtower RPC")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-memory.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-memory"),t("OutboundLink")],1),e._v(" will decrease the default dbcache at the expense of longer synchronization time. (Useful if your machine is less than 2GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-more-memory.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-more-memory"),t("OutboundLink")],1),e._v(" will increase the default dbcache to make synchronization faster (Useful if your machine is has around 4GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-btcqbo.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-btcqbo"),t("OutboundLink")],1),e._v(" will allow you to create an invoice on Quickbooks which include a way for your customer to pay on BTCPay Server (More information on this "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr/btcqbo/",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1),e._v(", this add-on is maintained by "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr",target:"_blank",rel:"noopener noreferrer"}},[e._v("JeffVandrewJr"),t("OutboundLink")],1),e._v(", see more on "),t("a",{attrs:{href:"https://www.youtube.com/watch?v=srgwL9ozg6c",target:"_blank",rel:"noopener noreferrer"}},[e._v("this video"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-librepatron.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-librepatron"),t("OutboundLink")],1),e._v(", for a self-hosted Patreon alternative backed by BTCPay (More information on this "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr/patron",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1),e._v(", this add-on is maintained by "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr",target:"_blank",rel:"noopener noreferrer"}},[e._v("JeffVandrewJr"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-woocommerce.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-woocommerce"),t("OutboundLink")],1),e._v(", for a self-hosted woocommerce with BTCPay Server plugin pre installed.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tor.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tor"),t("OutboundLink")],1),e._v(", for exposing BTCPayServer, Woocommerce, your lightning nodes as hidden services and accept onion peers for your full node. Warning: This options is for working around NAT and firewall problems as well as to help protect your customer's privacy. This will not protect your privacy against a targeted attack against you.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-btctransmuter.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-btctransmuter"),t("OutboundLink")],1),e._v(", for a self-hosted IFTTT style service for crypto services such as fiat settlement. (More information on this "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcTransmuter/",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-txindex.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-txindex"),t("OutboundLink")],1),e._v(", to enable txindex=1 in bitcoin.conf if you require txindexing for Bisq, DOJO, etc.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-expose-unsafe.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-expose-unsafe"),t("OutboundLink")],1),e._v(", to unsafely expose bitcoind P2P port 8333 if you require P2P for Bisq, DOJO, Esplora, etc. WARNING: ONLY USE ON TRUSTED LAN OR WITH FIREWALL RULES WHITELISTING SPECIFIC HOSTS")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tor-relay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tor-relay"),t("OutboundLink")],1),e._v(", for a non-exit tor relay. Make sure to have port 9001 accessible externally. "),t("a",{attrs:{href:"https://community.torproject.org/relay/community-resources/eff-tor-legal-faq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Please read the legal implications of running a tor relay"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://trac.torproject.org/projects/tor/wiki/TorRelayGuide#RelayRequirements",target:"_blank",rel:"noopener noreferrer"}},[e._v("what resources are used to operate the relay"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrumx"),t("OutboundLink")],1),e._v(", to integrate a full ElectrumX server (from official source) with BTCPay, using the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet. You can also open port 50002 up to the internet on your router etc, to be part of the ElectrumX network, helping other Electrum wallet users to get connected. The bitcoin option "),t("code",[e._v("-txindex")]),e._v(" is mandatory for ElectrumX, and this fragment will enable it on your BTCPay server automatically - No need to use the fragment opt-txindex.yml.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps"),t("OutboundLink")],1),e._v(", to integrate Electrum Personal Server (EPS) with BTCPay (EPS is a single-user alternative to the ElectrumX Server option above). EPS will also use the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet, for your own personal use (i.e. other users cannot use your server to verify transactions). Also, the bitcoin option "),t("code",[e._v("-txindex")]),e._v(" is NOT mandatory for EPS, and it will run on a pruned node (unlike ElectrumX). You will need to add your XPUB/YPUB/ZPUB as environment variable "),t("code",[e._v("EPS_XPUB")]),e._v(" before enabling EPS for the first time (see above section on environment variables, and see "),t("RouterLink",{attrs:{to:"/ElectrumPersonalServer/"}},[e._v("full documentation")]),e._v(" for details).")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-bwt.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-bwt"),t("OutboundLink")],1),e._v(", to integrate the "),t("a",{attrs:{href:"https://github.com/bwt-dev/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Wallet Tracker"),t("OutboundLink")],1),e._v(" Electrum server, which uses a personal wallet index model similar to that of EPS. You will need to set "),t("code",[e._v("BWT_XPUB")]),e._v(" with your XPUB/YPUB/ZPUB (see environment variables section). The server will only be available locally and through an onion service.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-configurator.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-configurator"),t("OutboundLink")],1),e._v(", to integrate the "),t("a",{attrs:{href:"https://install.btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Configurator"),t("OutboundLink")],1),e._v(" to manage your BTCPay deployment through a UI, and to allow new deployments elsewhere easily.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-pihole.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-pihole"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/pihole/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-ndlc.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-ndlc"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/ndlc/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-lightning-terminal"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning Terminal/LiT"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-mempool.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-mempool"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mempool"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-sphinxrelay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-sphinxrelay"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/stakwork/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("Sphinx Relay"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tallycoin-connect.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tallycoin-connect"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("Tallycoin Connect"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-thunderhub.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-thunderhub"),t("OutboundLink")],1),e._v(" for a LND Lightning Node Manager in your Browser. Maintained by "),t("a",{attrs:{href:"https://github.com/apotdevin",target:"_blank",rel:"noopener noreferrer"}},[e._v("apotdevin"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-teos.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-teos"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/talaia-labs/python-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("The Eye Of Satoshi"),t("OutboundLink")],1),e._v(", a BOLT13 Lightning Watchtower. Use port 9814 on your server or Tor to connect.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-chatwoot.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-chatwoot"),t("OutboundLink")],1),e._v(" for open source chat support system. ("),t("RouterLink",{attrs:{to:"/Docker/chatwoot/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-zammad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-zammad"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://zammad.com/features",target:"_blank",rel:"noopener noreferrer"}},[e._v("Zammad"),t("OutboundLink")],1),e._v(", a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-monero-expose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-monero-expose"),t("OutboundLink")],1),e._v(" to expose monero node's RPC port at 127.0.0.1:18081 to connect your own wallet. Use f.e. ssh port forwarding to forward to your own computer.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-fireflyiii"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/fireflyiii/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-joinmarket.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-joinmarket"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/joinmarket/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-helipad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-helipad"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/Podcastindex-org/helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("Podcastindex.org Helipad"),t("OutboundLink")],1),e._v(". Requires LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-nostr-relay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-nostr-relay"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/kukks/Nnostr",target:"_blank",rel:"noopener noreferrer"}},[e._v("Nostr Relay"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-cloudflared.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-cloudflared"),t("OutboundLink")],1),e._v(" to expose your local server on clearnet painlessly ("),t("RouterLink",{attrs:{to:"/Docker/cloudflare-tunnel/"}},[e._v("see documentation")]),e._v(").")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-torq.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-torq"),t("OutboundLink")],1),e._v(" to install "),t("a",{attrs:{href:"https://github.com/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Torq"),t("OutboundLink")],1),e._v(" node management application. Requires LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-snapdrop.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-snapdrop"),t("OutboundLink")],1),e._v(" to install "),t("a",{attrs:{href:"https://snapdrop.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Snapdrop"),t("OutboundLink")],1),e._v(". You can then browse to "),t("code",[e._v("/snapdrop")]),e._v(" of your server to access it.")])]),e._v(" "),t("p",[e._v("You can also create your own "),t("a",{attrs:{href:"#how-can-i-customize-the-generated-docker-compose-file"}},[e._v("custom fragments")]),e._v(".")]),e._v(" "),t("p",[e._v("If you want to add an option to "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" and re-configure your install:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-lnd-autopilot"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("p",[e._v("For example, if you want "),t("code",[e._v("btc")]),e._v(" and "),t("code",[e._v("ltc")]),e._v(" support with "),t("code",[e._v("nginx")]),e._v(" and "),t("code",[e._v("clightning")]),e._v(" inside "),t("code",[e._v("Generated/docker-compose.custom.yml")]),e._v(":")]),e._v(" "),t("p",[e._v("Note: The first run might take a while, but following runs are instantaneous.")]),e._v(" "),t("p",[e._v("On Windows (run in "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell",target:"_blank",rel:"noopener noreferrer"}},[e._v("powershell"),t("OutboundLink")],1),e._v("):")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("Invoke-Command")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_CRYPTO1")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_CRYPTO2")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ltc"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_REVERSEPROXY")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_LIGHTNING")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_SUBNAME")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"custom"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\build"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("On Linux:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO2")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ltc"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_SUBNAME")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"custom"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n./build.sh\n")])])]),t("p",[e._v("Next, you will need to configure the runtime environment variables for "),t("code",[e._v("Generated/docker-compose.custom.yml")]),e._v(":")]),e._v(" "),t("ul",[t("li",[e._v("If you are using NGinx, "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/Production/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[e._v("If you are not using NGinx, "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/Production-NoReverseProxy/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this instead"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("h2",{attrs:{id:"again-what-does-btcpay-setupsh-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#again-what-does-btcpay-setupsh-do"}},[e._v("#")]),e._v(" Again, what does "),t("code",[e._v("btcpay-setup.sh")]),e._v(" do?")]),e._v(" "),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" is a utility which does the following:")]),e._v(" "),t("ol",[t("li",[e._v("Makes sure docker and docker-compose are installed on your system")]),e._v(" "),t("li",[e._v("Generates a docker-compose via "),t("code",[e._v("./build.sh")])]),e._v(" "),t("li",[e._v("Sets up an "),t("a",{attrs:{href:"https://docs.docker.com/compose/env-file/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Environment File"),t("OutboundLink")],1),e._v(" to configure your docker-compose")]),e._v(" "),t("li",[e._v("Sets up environment variables so the tools described in "),t("a",{attrs:{href:"#tooling"}},[e._v("Tooling")]),e._v(" can work")]),e._v(" "),t("li",[e._v("Adds symlinks of those tools into "),t("code",[e._v("/usr/bin")])]),e._v(" "),t("li",[e._v("Makes sure BTCPay restarts on reboot via upstart or systemd")]),e._v(" "),t("li",[e._v("Starts BTCPay via docker-compose")])]),e._v(" "),t("h2",{attrs:{id:"overview-of-files-generated-by-btcpay-setupsh"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview-of-files-generated-by-btcpay-setupsh"}},[e._v("#")]),e._v(" Overview of files generated by "),t("code",[e._v("btcpay-setup.sh")])]),e._v(" "),t("p",[t("code",[e._v("/etc/profile.d/btcpay-env.sh")]),e._v(" ensures that your environment variables are correctly setup when you login, so you can use the tools:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_OLD_PREGEN")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"false"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO2")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO3")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO4")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO5")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO6")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO7")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO8")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO9")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_DOCKER_COMPOSE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0/btcpayserver-docker/Production/docker-compose.generated.yml"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_BASE_DIRECTORY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ENV_FILE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0/.env"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST_SSHKEYFILE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/root/.ssh/id_rsa_btcpay"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("if")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cat")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_ENV_FILE")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&>")]),e._v(" /dev/null"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("then")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-v")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'^#'")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_ENV_FILE")]),e._v('"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("xargs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("fi")]),e._v("\n")])])]),t("p",[t("code",[e._v("/etc/systemd/system/btcpayserver.service")]),e._v(" ensures that you can control btcpay via "),t("code",[e._v("systemctl")]),e._v(", and that BTCPayServer starts on reboot:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Unit")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Description")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("BTCPayServer service")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("After")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("docker.service network-online.target")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Requires")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("docker.service network-online.target")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Service")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Type")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("oneshot")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("RemainAfterExit")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("yes")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecStart")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_up'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecStop")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_down'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecReload")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_restart'")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Install")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("WantedBy")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("multi-user.target")]),e._v("\n")])])]),t("p",[t("code",[e._v(".env")]),e._v(" ("),t("code",[e._v("$BTCPAY_ENV_FILE")]),e._v(") contains environment variables passed to the containers managed by your docker-compose:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("btcpay.EXAMPLE.com")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ACME_CA_URI")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("production")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("mainnet")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("me@EXAMPLE.com")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_SSHTRUSTEDFINGERPRINTS")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("SHA256:eSCD7NtQ/Q6IBl2iRB9caAQ3lDZd8s8iUL6SdeNnhpA")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_SSHKEYFILE")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/datadir/id_rsa")]),e._v("\n")])])]),t("h1",{attrs:{id:"how-can-i-add-an-altcoin-to-btcpayserver"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-add-an-altcoin-to-btcpayserver"}},[e._v("#")]),e._v(" How can I add an altcoin to BTCPayServer?")]),e._v(" "),t("ol",[t("li",[e._v("Add support for your crypto to "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBitcoin"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBxplorer"),t("OutboundLink")],1),e._v(", and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer"),t("OutboundLink")],1),e._v(". (Use examples from other coins)")]),e._v(" "),t("li",[e._v("Create your own docker image ("),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/docker-bitcoin/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Create a docker-compose fragment ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/bitcoin.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Add your "),t("code",[e._v("CryptoDefinition")]),e._v(" ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("p",[t("code",[e._v("build.sh")]),e._v(" is using a pre-built image of the "),t("code",[e._v("docker-compose generator")]),e._v(" on "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-compose-generator/",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker hub"),t("OutboundLink")],1),e._v(".\nIf you modify the code source of "),t("code",[e._v("docker-compose generator")]),e._v(" (for example, the "),t("code",[e._v("CryptoDefinition")]),e._v(" "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v("), you need to configure "),t("code",[e._v("build.sh")]),e._v(" to use your own image by setting the environment variable "),t("code",[e._v("BTCPAYGEN_DOCKER_IMAGE")]),e._v(" to "),t("code",[e._v("btcpayserver/docker-compose-generator:local")]),e._v(".")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" docker-compose-generator\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_DOCKER_IMAGE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpayserver/docker-compose-generator:local"')]),e._v("\n")])])]),t("p",[e._v("Or on powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[e._v("cd docker-compose-generator\n"),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_DOCKER_IMAGE")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpayserver/docker-compose-generator:local"')]),e._v("\n")])])]),t("p",[e._v("Then run "),t("code",[e._v("./build.sh")]),e._v(" or "),t("code",[e._v(". .\\build.ps1")]),e._v(".\nThis will generate your docker-compose in the "),t("code",[e._v("Generated")]),e._v(" folder, which you can then run and test.")]),e._v(" "),t("p",[e._v("Note that BTCPayServer developers will not spend excessive time testing your image, so make sure it works.")]),e._v(" "),t("h1",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Image")]),e._v(" "),t("th",[e._v("Version")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("x64")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("arm32v7")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("arm64v8")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("links")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("btcpayserver/docker-compose-generator")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-compose-generator",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/lightning")]),e._v(" "),t("td",[e._v("v24.08.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.08.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.08.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.08.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("shahanafarooqui/rtl")]),e._v(" "),t("td",[e._v("v0.15.4")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.4/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.4/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.4/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Ride-The-Lightning/RTL",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/shahanafarooqui/rtl",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/lnd")]),e._v(" "),t("td",[e._v("v0.18.3-beta")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/bitcoin")]),e._v(" "),t("td",[e._v("26.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btcpayserver")]),e._v(" "),t("td",[e._v("2.0.5")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v2.0.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v2.0.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v2.0.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/monero")]),e._v(" "),t("td",[e._v("0.18.3.4")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.4/Monero/0.18.3.4/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.4/Monero/0.18.3.4/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.4/Monero/0.18.3.4/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/monero",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nicolasdorier/nbxplorer")]),e._v(" "),t("td",[e._v("2.5.16")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dgarage/nbxplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/nbxplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/letsencrypt-nginx-proxy-companion")]),e._v(" "),t("td",[e._v("2.2.9-2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/letsencrypt-nginx-proxy-companion",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nginx")]),e._v(" "),t("td",[e._v("1.25.3-bookworm")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/nginxinc/docker-nginx",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/nginx",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/docker-gen")]),e._v(" "),t("td",[e._v("0.10.7")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/docker-gen",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-gen",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btctransmuter")]),e._v(" "),t("td",[e._v("0.0.59")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btctransmuter",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btctransmuter",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/cloudflared")]),e._v(" "),t("td",[e._v("2023.10.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/cloudflared",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btcpayserver-configurator")]),e._v(" "),t("td",[e._v("0.0.21")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-configurator",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver-configurator",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/eps")]),e._v(" "),t("td",[e._v("0.2.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/eps",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/joinmarket")]),e._v(" "),t("td",[e._v("0.9.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/joinmarket",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nicolasdorier/ndlc-cli")]),e._v(" "),t("td",[e._v("1.0.1")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dgarage/ndlc",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/ndlc-cli",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("pihole/pihole")]),e._v(" "),t("td",[e._v("2023.05.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/pi-hole/docker-pi-hole",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/pihole/pihole",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/snapdrop")]),e._v(" "),t("td",[e._v("1.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/snapdrop",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/tor")]),e._v(" "),t("td",[e._v("0.4.8.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/tor",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/woocommerce")]),e._v(" "),t("td",[e._v("3.1.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/woocommerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/postgres")]),e._v(" "),t("td",[e._v("13.18")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.18/Postgres/13.18/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.18/Postgres/13.18/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.18/Postgres/13.18/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/postgres",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kamigawabul/btglnd")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/vutov/lnd/master/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/vutov/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kamigawabul/btglnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kamigawabul/docker-bitcoingold")]),e._v(" "),t("td",[e._v("0.15.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Vutov/docker-bitcoin/master/bitcoingold/0.15.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Vutov/docker-bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kamigawabul/docker-bitcoingold",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("acinq/eclair")]),e._v(" "),t("td",[e._v("release-0.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ACINQ/eclair/v0.7.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ACINQ/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/acinq/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-bitcoinplus")]),e._v(" "),t("td",[e._v("2.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/bitcoinplus/2.7.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-bitcoinplus",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("dalijolijo/docker-bitcore")]),e._v(" "),t("td",[e._v("0.90.9.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dalijolijo/btcpayserver-docker-bitcore/master/docker-bitcored/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dalijolijo/btcpayserver-docker-bitcore",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/dalijolijo/docker-bitcore",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/dash")]),e._v(" "),t("td",[e._v("20.1.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/20.1.0/Dash/20.1.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/20.1.0/Dash/20.1.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/dash",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/dogecoin")]),e._v(" "),t("td",[e._v("1.14.7")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dogecoin/1.14.7/Dogecoin/1.14.7/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/dogecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-feathercoin")]),e._v(" "),t("td",[e._v("0.16.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/feathercoin/0.16.3/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-feathercoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/lightning")]),e._v(" "),t("td",[e._v("v23.05")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/lightning/v23.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/groestlcoin-lightning-charge")]),e._v(" "),t("td",[e._v("version-0.4.22")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/groestlcoin-lightning-charge/v0.4.22/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/groestlcoin-lightning-charge",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/groestlcoin-lightning-charge",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/groestlcoin-spark")]),e._v(" "),t("td",[e._v("version-0.2.16")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/groestlcoin-spark/v0.2.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/groestlcoin-spark",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/groestlcoin-spark",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/eclair")]),e._v(" "),t("td",[e._v("v0.6.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/eclair/v0.6.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/lnd")]),e._v(" "),t("td",[e._v("v0.10.0-grs")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/lnd/v0.10.0-grs/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/groestlcoin")]),e._v(" "),t("td",[e._v("25.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/groestlcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/elements")]),e._v(" "),t("td",[e._v("23.2.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/elements",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/litecoin")]),e._v(" "),t("td",[e._v("0.21.2.1-2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/litecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("wakiyamap/docker-monacoin")]),e._v(" "),t("td",[e._v("0.20.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/wakiyamap/docker-bitcoin/master/monacoin/0.20.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/wakiyamap/docker-bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/wakiyamap/docker-monacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("redis")]),e._v(" "),t("td",[e._v("6.2.2-buster")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/redis/f1a8498333ae3ab340b5b39fbac1d7e1dc0d628c/5.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/redis",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/redis",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/btcqbo")]),e._v(" "),t("td",[e._v("0.3.36")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/btcqbo/v0.3.36/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/btcqbo",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/btcqbo",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("shesek/bwt")]),e._v(" "),t("td",[e._v("0.2.2-electrum")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/bwt-dev/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/shesek/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chatwoot/chatwoot")]),e._v(" "),t("td",[e._v("v1.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/chatwoot/chatwoot",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chatwoot/chatwoot",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lukechilds/electrumx")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lukechilds/docker-electrumx/master/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lukechilds/electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("fireflyiii/core")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/_git/MainImage",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/fireflyiii/core",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("podcastindexorg/podcasting20-helipad")]),e._v(" "),t("td",[e._v("v0.1.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Podcastindex-org/helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/podcastindexorg/podcasting20-helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/librepatron")]),e._v(" "),t("td",[e._v("0.7.39")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/patron/v0.7.39/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/patron",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/librepatron",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/isso")]),e._v(" "),t("td",[e._v("atron.22")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/isso/patron.22/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/isso",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/isso",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lightninglabs/lightning-terminal")]),e._v(" "),t("td",[e._v("v0.13.5-alpha-path-prefix")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.13.5-alpha/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.13.5-alpha/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mempool/frontend")]),e._v(" "),t("td",[e._v("v2.5.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/mempool/frontend",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mempool/backend")]),e._v(" "),t("td",[e._v("v2.5.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/mempool/backend",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mariadb")]),e._v(" "),t("td",[e._v("10.11")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/mariadb/master/10.11/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/mariadb",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/mariadb",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kukks/nnostr-relay")]),e._v(" "),t("td",[e._v("v0.0.23")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/kukks/nnostr",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kukks/nnostr-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("sphinxlightning/sphinx-relay")]),e._v(" "),t("td",[e._v("v2.2.9")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/stakwork/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/sphinxlightning/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("djbooth007/tallycoin_connect")]),e._v(" "),t("td",[e._v("v1.8.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm32v7",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm64v8",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("benjaminchodroff/rust-teos")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/benjaminchodroff/rust-teos/master/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/benjaminchodroff/rust-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/benjaminchodroff/rust-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("apotdevin/thunderhub")]),e._v(" "),t("td",[e._v("base-v0.13.31")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/apotdevin/thunderhub",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/apotdevin/thunderhub",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lncapital/torq")]),e._v(" "),t("td",[e._v("0.20.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("timescale/timescaledb")]),e._v(" "),t("td",[e._v("latest-pg14")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/timescale/timescaledb-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/timescale/timescaledb",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("zammad/zammad-docker-compose")]),e._v(" "),t("td",[e._v("zammad-postgresql-3.4.0-4")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/zammad/zammad-docker-compose/ff20084ce2829486076e9781fe27407ca6cc09bb/containers/zammad-postgresql/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/zammad/zammad-docker-compose",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/zammad/zammad-docker-compose",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("memcached")]),e._v(" "),t("td",[e._v("1.5.22-alpine")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/memcached/eb38bf28263b8e5bb7367797cb7b181b65d769bd/alpine/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/memcached",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/memcached",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("traefik")]),e._v(" "),t("td",[e._v("v2.6")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/containous/traefik-library-image/master/scratch/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/containous/traefik-library-image",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/traefik",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-trezarcoin")]),e._v(" "),t("td",[e._v("0.13.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/trezarcoin/1.2.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-trezarcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("romanornr/docker-viacoin")]),e._v(" "),t("td",[e._v("0.15.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/viacoin/docker-viacoin/master/viacoin/0.15.2/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/viacoin/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/romanornr/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])])])]),e._v(" "),t("h1",{attrs:{id:"faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),t("h2",{attrs:{id:"how-can-i-modify-my-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-modify-my-environment"}},[e._v("#")]),e._v(" How can I modify my environment?")]),e._v(" "),t("p",[e._v("As root, run "),t("code",[e._v(". btcpay-setup.sh")]),e._v("; this will show you the environment variable it is expecting.\nFor example, if you support "),t("code",[e._v("btc")]),e._v(" and "),t("code",[e._v("ltc")]),e._v(" already, and want to add "),t("code",[e._v("btg")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO3")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'btg'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("h2",{attrs:{id:"i-deployed-before-btcpay-setupsh-existed-before-may-17-2018-can-i-migrate-to-this-new-system"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-deployed-before-btcpay-setupsh-existed-before-may-17-2018-can-i-migrate-to-this-new-system"}},[e._v("#")]),e._v(" I deployed before "),t("code",[e._v("btcpay-setup.sh")]),e._v(" existed (before May 17, 2018), can I migrate to this new system?")]),e._v(" "),t("p",[e._v("Yes, run the following commands to update:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$DOWNLOAD_ROOT")]),e._v("/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout master\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" pull\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout 9acb5d8067cb5c46f59858137feb699b41ac9f19\nbtcpay-update.sh\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout master\nbtcpay-update.sh\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exit")]),e._v("\n")])])]),t("h2",{attrs:{id:"im-getting-an-error-on-windows-cannot-create-container-for-service-docker-mount-denied"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#im-getting-an-error-on-windows-cannot-create-container-for-service-docker-mount-denied"}},[e._v("#")]),e._v(" I'm getting an error on Windows: "),t("code",[e._v("Cannot create container for service docker: Mount denied")]),e._v("?")]),e._v(" "),t("p",[e._v("If you see this error:")]),e._v(" "),t("p",[t("code",[e._v("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'")]),e._v(".")]),e._v(" "),t("p",[e._v("Run this in "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell",target:"_blank",rel:"noopener noreferrer"}},[e._v("powershell"),t("OutboundLink")],1),e._v(":")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$Env")]),e._v(":COMPOSE_CONVERT_WINDOWS_PATHS=1\n")])])]),t("p",[e._v("Then, run "),t("code",[e._v("docker-compose -f EXAMPLE.yml up")]),e._v(".")]),e._v(" "),t("p",[e._v("This bug comes from Docker for Windows and is "),t("a",{attrs:{href:"https://github.com/docker/for-win/issues/1829",target:"_blank",rel:"noopener noreferrer"}},[e._v("tracked on Github"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-i-can-prune-my-nodes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-i-can-prune-my-nodes"}},[e._v("#")]),e._v(" How I can prune my node(s)?")]),e._v(" "),t("p",[e._v("This will prune your Bitcoin full node to a maximum of 100GB (of blocks):")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("p",[e._v("Other options are "),t("a",{attrs:{href:"#generated-docker-compose"}},[e._v("documented here")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-can-i-customize-the-generated-docker-compose-file"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-customize-the-generated-docker-compose-file"}},[e._v("#")]),e._v(" How can I customize the generated docker-compose file?")]),e._v(" "),t("p",[e._v("In some instances, you might want to customize your environment in more detail. While you could modify "),t("code",[e._v("Generated/docker-compose.generated.yml")]),e._v(" manually, your changes would be overwritten the next time you run "),t("code",[e._v("btcpay-update.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Luckily, you can leverage "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" for this!")]),e._v(" "),t("p",[e._v("Let's enable "),t("strong",[e._v("pruning to 60 GB")]),e._v(", for example:")]),e._v(" "),t("p",[e._v("First, copy "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage"),t("OutboundLink")],1),e._v(" into the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments",target:"_blank",rel:"noopener noreferrer"}},[e._v("the docker fragment folder"),t("OutboundLink")],1),e._v(" as "),t("code",[e._v("opt-save-storage.custom.yml")]),e._v(". "),t("strong",[e._v("Important:")]),e._v(" the file must end with "),t("code",[e._v(".custom.yml")]),e._v(", or there will be git conflicts whenever you run "),t("code",[e._v("btcpay-update.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Modify the new "),t("code",[e._v("opt-save-storage.custom.yml")]),e._v(" file to your taste:")]),e._v(" "),t("div",{staticClass:"language-diff extra-class"},[t("pre",{pre:!0,attrs:{class:"language-diff"}},[t("code",[e._v('@@ -14,8 +14,7 @@ version: "3"\n'),t("span",{pre:!0,attrs:{class:"token unchanged"}},[t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v("services:\n")]),t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" bitcoind:\n")]),t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" environment:\n")])]),t("span",{pre:!0,attrs:{class:"token deleted-sign deleted"}},[t("span",{pre:!0,attrs:{class:"token prefix deleted"}},[e._v("-")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" BITCOIN_EXTRA_ARGS: prune=100000\n")])]),t("span",{pre:!0,attrs:{class:"token inserted-sign inserted"}},[t("span",{pre:!0,attrs:{class:"token prefix inserted"}},[e._v("+")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" BITCOIN_EXTRA_ARGS: prune=60000\n")])])])])]),t("p",[e._v("Then set it up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-save-storage.custom"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("h2",{attrs:{id:"can-i-run-btcpay-server-on-ports-other-than-80-and-443"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-run-btcpay-server-on-ports-other-than-80-and-443"}},[e._v("#")]),e._v(" Can I run BTCPay Server on ports other than 80 and 443?")]),e._v(" "),t("p",[e._v("You can change the ports for HTTP and HTTPS by setting the environment variables "),t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(" and "),t("code",[e._v("REVERSEPROXY_HTTPS_PORT")]),e._v(". 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.")]),e._v(" "),t("p",[e._v("When you set "),t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(" 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.")]),e._v(" "),t("p",[e._v("If you need to run on a different port, it's best to terminate SSL using another web proxy and forward your traffic.")]),e._v(" "),t("h2",{attrs:{id:"can-i-offload-https-termination"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-offload-https-termination"}},[e._v("#")]),e._v(" Can I offload HTTPS termination?")]),e._v(" "),t("p",[e._v("Yes. Please "),t("RouterLink",{attrs:{to:"/FAQ/FAQ-Deployment/#can-i-use-an-existing-nginx-server-as-a-reverse-proxy-with-ssl-termination"}},[e._v("see the documentation")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-can-i-back-up-my-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-back-up-my-btcpay-server"}},[e._v("#")]),e._v(" How can I back up my BTCPay Server?")]),e._v(" "),t("p",[e._v("See the "),t("RouterLink",{attrs:{to:"/Docker/backup-restore/"}},[e._v("Backup & Restore")]),e._v(" guide in our documentation.")],1),e._v(" "),t("details",[t("summary",[e._v("For backwards compatibility: Click here for the description of the old backup.sh process")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("Please consider switching to the "),t("RouterLink",{attrs:{to:"/Docker/backup-restore/"}},[e._v("new Backup & Restore process")]),e._v(", because the "),t("code",[e._v("backup.sh")]),e._v(" will not be maintained anymore.")],1)]),e._v(" "),t("p",[e._v("We provide a backup script that dumps the database and saves the important files:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n./backup.sh\n")])])]),t("p",[e._v("This will save the backup locally as "),t("code",[e._v("/var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz")]),e._v(".\nThese are the options to customize the backup name and location:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("BACKUP_TIMESTAMP=true")]),e._v(" saves the backup with datetime as part of the file name, so that backups do not get overwritten.")]),e._v(" "),t("li",[t("code",[e._v("BACKUP_PROVIDER=SCP")]),e._v(" saves the backup remotely, requires additional "),t("code",[e._v("SCP_TARGET")]),e._v(" environment variable (see below).")]),e._v(" "),t("li",[t("code",[e._v("BACKUP_PROVIDER=Dropbox")]),e._v(" saves the backup to Dropbox, requires additional "),t("code",[e._v("DROPBOX_TOKEN")]),e._v(" environment variable (see below).")])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup with custom file name and timestamp:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_TIMESTAMP")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("true ./backup.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup via SCP:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_PROVIDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("SCP "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("SCP_TARGET")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("myhost:backups/btcpay ./backup.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup to Dropbox:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_PROVIDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("Dropbox "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("DROPBOX_TOKEN")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("myDropboxToken ./backup.sh\n")])])]),t("p",[e._v("You can also choose to only dump the database.\nThis option does not need to stop and restart the docker-containers:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n./backup.sh --only-db\n")])])])]),e._v(" "),t("h2",{attrs:{id:"how-can-i-connect-to-the-database"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-connect-to-the-database"}},[e._v("#")]),e._v(" How can I connect to the database?")]),e._v(" "),t("p",[e._v("On the server you can open a database session by connecting via "),t("code",[e._v("psql")]),e._v(" as the postgres user:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exec")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-ti")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("ps")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-q")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"name=postgres_1"')]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v(" psql "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-U")]),e._v(" postgres\n")])])]),t("p",[e._v("Then, inside "),t("code",[e._v("psql")]),e._v(" you can select a database and interact with the tables:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list databases")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("l\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# connect to database")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("c btcpayservermainnet\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list tables")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("dt\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list users")]),e._v("\nSELECT "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Id"')]),e._v(", "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Email"')]),e._v(" FROM "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"AspNetUsers"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# end session")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("q\n")])])]),t("p",[e._v("The main BTCPay Server database tables are part of the "),t("code",[e._v("public")]),e._v(" schema.\nPlugins have their own schema, named after the plugin.")]),e._v(" "),t("p",[e._v("By default, only the tables of the "),t("code",[e._v("public")]),e._v(" schema are shown.\nIf you want to also see and select the plugin tables, you need to extend the search path:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list plugin schemas")]),e._v("\nSELECT * FROM pg_catalog.pg_namespace WHERE nspname LIKE "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'BTCPayServer.%'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# extend search path")]),e._v("\nSET search_path TO "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"BTCPayServer.Plugins.MyPlugin"')]),e._v(", public"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# table list now also shows the MyPlugin tables")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("dt\n")])])]),t("h2",{attrs:{id:"how-do-i-upgrade-my-btcpay-server-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-do-i-upgrade-my-btcpay-server-docker"}},[e._v("#")]),e._v(" How do I upgrade my BTCPay Server docker?")]),e._v(" "),t("p",[e._v("Run the script "),t("code",[e._v("./btcpay-update.sh")]),e._v(" and patiently wait for your server to be upgraded.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[133],{868:function(e,t,r){"use strict";r.r(t);var a=r(17),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"introduction"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[e._v("#")]),e._v(" Introduction")]),e._v(" "),t("p",[e._v("While "),t("RouterLink",{attrs:{to:"/LunaNodeWebDeployment/"}},[e._v("our instructions")]),e._v(" cover how to install BTCPayServer in one click on Azure or Lunanode, BTCPay Server is not limited to those options.")],1),e._v(" "),t("p",[e._v("You will find below information about how you can install BTCPay Server easily in any environment having docker available.")]),e._v(" "),t("h1",{attrs:{id:"architecture"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#architecture"}},[e._v("#")]),e._v(" Architecture")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://github.com/btcpayserver/btcpayserver-doc/raw/master/docs/img/Architecture.png",alt:"Architecture",title:"Architecture"}})]),e._v(" "),t("p",[e._v("As you can see, BTCPay depends on several pieces of infrastructure, mainly:")]),e._v(" "),t("ul",[t("li",[e._v("A lightweight block explorer (NBXplorer),")]),e._v(" "),t("li",[e._v("A database (PostgreSQL),")]),e._v(" "),t("li",[e._v("A full node (eg. Bitcoin Core)")])]),e._v(" "),t("p",[e._v("There can be more dependencies if you support more than just standard Bitcoin transactions, including:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/ElementsProject/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Core Lightning (CLN)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/litecoin-project/litecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("LitecoinD"),t("OutboundLink")],1),e._v(" and other coin daemons")]),e._v(" "),t("li",[e._v("And more...")])]),e._v(" "),t("p",[e._v("Note: The setup process can be time consuming, but is heavily automated to make it a fun and easy experience.")]),e._v(" "),t("p",[e._v("Take a look at how BTCPay works in a video below.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/nr0UNbz3AoQ/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=nr0UNbz3AoQ",title:"YouTube","data-id":"nr0UNbz3AoQ"}},[t("iframe",{attrs:{title:"YouTube","data-src":"https://www.youtube-nocookie.com/embed/nr0UNbz3AoQ?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("p",[e._v("Here is a presentation of the global architecture at Advancing Bitcoin conference.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Up0dvorzSNM/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=Up0dvorzSNM",title:"BTCPay - Architecture overview","data-id":"Up0dvorzSNM"}},[t("iframe",{attrs:{title:"BTCPay - Architecture overview","data-src":"https://www.youtube-nocookie.com/embed/Up0dvorzSNM?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h1",{attrs:{id:"full-installation-for-technical-users"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#full-installation-for-technical-users"}},[e._v("#")]),e._v(" Full installation (for technical users)")]),e._v(" "),t("p",[e._v("You can also install BTCPay Server on your own machine or VPS instance.")]),e._v(" "),t("p",[e._v("The officially supported setup is driven by Docker (and Docker-Compose).")]),e._v(" "),t("p",[e._v("First, make sure you have a domain name pointing to your host "),t("code",[e._v("A record")]),e._v(", with ports "),t("code",[e._v("443")]),e._v(" and "),t("code",[e._v("80")]),e._v(" externally accessible. For Lightning Network, port "),t("code",[e._v("9735")]),e._v(" is required ("),t("code",[e._v("9736")]),e._v(" if you use Litecoin Lightning). Otherwise, you will have to set a domain manually by running "),t("code",[e._v("changedomain.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Let's assume your domain is "),t("code",[e._v("btcpay.EXAMPLE.com")]),e._v(".")]),e._v(" "),t("p",[e._v("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 "),t("a",{attrs:{href:"#generated-docker-compose"}},[e._v("modify")]),e._v(" or ignore if you have enough disk space for a full node. Finally, your domain is "),t("code",[e._v("btcpay.EXAMPLE.com")]),e._v(" should reflect your actual domain name.")]),e._v(" "),t("p",[t("a",{attrs:{href:"#environment-variables"}},[e._v("Environment variables")]),e._v(" can be tailored to your needs. Some variables require additional storage space.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Login as root")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Create a folder for BTCPay")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("mkdir")]),e._v(" BTCPayServer\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Clone this repository")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Run btcpay-setup.sh with the right parameters")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpay.EXAMPLE.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage-s"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("true\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exit")]),e._v("\n")])])]),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" will then:")]),e._v(" "),t("ul",[t("li",[e._v("Install Docker")]),e._v(" "),t("li",[e._v("Install Docker-Compose")]),e._v(" "),t("li",[e._v("Make sure BTCPay starts at reboot via upstart or systemd")]),e._v(" "),t("li",[e._v("Setup environment variables to use BTCPay utilities")]),e._v(" "),t("li",[e._v("Add BTCPay utilities in /usr/bin")]),e._v(" "),t("li",[e._v("Start BTCPay Server")])]),e._v(" "),t("p",[e._v("Video below guides you step by step on how to set up BTCPay Server on a VPS with Docker.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/x6hqTFgHqhA/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=x6hqTFgHqhA",title:"YouTube","data-id":"x6hqTFgHqhA"}},[t("iframe",{attrs:{title:"YouTube","data-src":"https://www.youtube-nocookie.com/embed/x6hqTFgHqhA?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("p",[e._v("Check out this video if you're interested in learning more about setting up "),t("a",{attrs:{href:"https://www.youtube.com/playlist?list=PLH4m2oS2ratfaprAFx9E3ZDjwxNKvCk4e",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay with Docker Compose"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("figure",[t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver/",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://img.shields.io/docker/automated/btcpayserver/btcpayserver.svg",alt:"Docker automated build",title:"Docker automated build"}}),t("OutboundLink")],1)]),e._v(" "),t("h1",{attrs:{id:"environment-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#environment-variables"}},[e._v("#")]),e._v(" Environment variables")]),e._v(" "),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" will use the following environment variables:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("BTCPAY_HOST")]),e._v(": The hostname of your website (eg. "),t("code",[e._v("btcpay.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_ADDITIONAL_HOSTS")]),e._v(": Optional, specify additional domains to your BTCPayServer with https support if enabled. (eg. example2.com,example3.com)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(": The public port the reverse proxy binds to for HTTP traffic (default: 80)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_HTTPS_PORT")]),e._v(": The public port the reverse proxy binds to for HTTPS traffic (default: 443)")]),e._v(" "),t("li",[t("code",[e._v("REVERSEPROXY_DEFAULT_HOST")]),e._v(": 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.")]),e._v(" "),t("li",[t("code",[e._v("NOREVERSEPROXY_HTTP_PORT")]),e._v(": Optional, if not using a reverse proxy, specify which port should be opened for HTTP traffic. (default: 80)")]),e._v(" "),t("li",[t("code",[e._v("NBITCOIN_NETWORK")]),e._v(": The type of network to use (eg. "),t("code",[e._v("mainnet")]),e._v(", "),t("code",[e._v("testnet")]),e._v(", or "),t("code",[e._v("regtest")]),e._v(". Default: "),t("code",[e._v("mainnet")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("LIGHTNING_ALIAS")]),e._v(": An alias for your lightning network node, if used")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTO1")]),e._v(": First supported crypto currency (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("btc")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTO2")]),e._v(": Second supported crypto currency (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_CRYPTON")]),e._v(": N'th supported crypto currency where N is 9 at maximum. (eg. "),t("code",[e._v("btc")]),e._v(", "),t("code",[e._v("ltc")]),e._v(". Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_REVERSEPROXY")]),e._v(": Specify reverse proxy to use; NGinx has HTTPS support. (eg. "),t("code",[e._v("nginx")]),e._v(", "),t("code",[e._v("traefik")]),e._v(", "),t("code",[e._v("(empty)")]),e._v(". Default: "),t("code",[e._v("nginx")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_LIGHTNING")]),e._v(": Lightning network implementation to use (eg. "),t("code",[e._v("clightning")]),e._v(", "),t("code",[e._v("lnd")]),e._v(", Default: "),t("code",[e._v("(empty)")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_SUBNAME")]),e._v(": The subname of the generated docker-compose file, where the full name is "),t("code",[e._v("Generated/docker-compose.SUBNAME.yml")]),e._v(" (Default: "),t("code",[e._v("generated")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(": Semicolon-separated list of additional fragments you want to use (eg. "),t("code",[e._v("opt-save-storage")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("LETSENCRYPT_EMAIL")]),e._v(": An email will be sent to this address if certificate expires and fails to renew automatically (eg. "),t("code",[e._v("me@example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("ACME_CA_URI")]),e._v(": The API endpoint to ask for HTTPS certificate (Default: "),t("code",[e._v("production")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_ENABLE_SSH")]),e._v(": 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)")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_DOCKER_IMAGE")]),e._v(": Optional, Specify which generator image to use if you have customized the C# generator. Set to "),t("code",[e._v("btcpayserver/docker-compose-generator:local")]),e._v(" to build the generator locally at runtime.")]),e._v(" "),t("li",[t("code",[e._v("BTCPAY_IMAGE")]),e._v(": Optional, Specify which btcpayserver image to use if you have a customized btcpayserver.")]),e._v(" "),t("li",[t("code",[e._v("BTCPAYGEN_EXCLUDE_FRAGMENTS")]),e._v(": Semicolon-separated list of fragments you want to forcefully exclude (eg. "),t("code",[e._v("litecoin-clightning")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("TOR_RELAY_NICKNAME")]),e._v(": If tor relay is activated with opt-add-tor-relay, the relay nickname")]),e._v(" "),t("li",[t("code",[e._v("TOR_RELAY_EMAIL")]),e._v(": If tor relay is activated with opt-add-tor-relay, the email for Tor to contact you regarding your relay")])]),e._v(" "),t("p",[e._v("Additionally, there are specific environment variables for some addons:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("LIBREPATRON_HOST")]),e._v(": If libre patron is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-librepatron.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-librepatron"),t("OutboundLink")],1),e._v(", the hostname of your libre patron website (eg. "),t("code",[e._v("librepatron.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("ZAMMAD_HOST")]),e._v(": If zammad is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-zammad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-zammad"),t("OutboundLink")],1),e._v(", the hostname of your zammad website (eg. "),t("code",[e._v("zammad.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("WOOCOMMERCE_HOST")]),e._v(": If woocommerce is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-woocommerce.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-woocommerce"),t("OutboundLink")],1),e._v(", the hostname of your woocommerce website (eg. "),t("code",[e._v("store.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("EPS_XPUB")]),e._v(": If Electrum Personal Server (EPS) is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps"),t("OutboundLink")],1),e._v(", 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.")]),e._v(" "),t("li",[e._v("If Bitcoin Wallet Tracker is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-bwt.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-bwt"),t("OutboundLink")],1),e._v(", you can use "),t("code",[e._v("BWT_XPUB")]),e._v("/"),t("code",[e._v("BWT_XPUB_*")]),e._v(" (to set your XPUB/YPUB/ZPUB), "),t("code",[e._v("BWT_DESCRIPTOR")]),e._v("/"),t("code",[e._v("BWT_DESCRIPTOR_*")]),e._v(" (for script descriptors), "),t("code",[e._v("BWT_RESCAN_SINCE")]),e._v(" (set to the wallet creation date in YYYY-MM-DD to speed up the rescan), "),t("code",[e._v("BWT_BITCOIND_WALLET")]),e._v(" and "),t("code",[e._v("BWT_GAP_LIMIT")]),e._v(".")]),e._v(" "),t("li",[t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(": If LND watchtower is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-wtclient"),t("OutboundLink")],1),e._v(", you can use "),t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(" to change the sweep fee used in constructing the justice transaction (default is 10 sat/byte)")]),e._v(" "),t("li",[t("code",[e._v("FIREFLY_HOST")]),e._v(": If fireflyiii is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-fireflyiii"),t("OutboundLink")],1),e._v(", the hostname of your fireflyiii website (eg. "),t("code",[e._v("firefly.example.com")]),e._v(")")]),e._v(" "),t("li",[t("code",[e._v("CLOUDFLARE_TUNNEL_TOKEN")]),e._v(": Used to expose your instance to clearnet with a Cloudflare Argo Tunnel (if cloudflare tunnel is activated with "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-cloudflared.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-cloudflared"),t("OutboundLink")],1),e._v(", for setup instructions "),t("RouterLink",{attrs:{to:"/Docker/cloudflare-tunnel/"}},[e._v("see documentation")]),e._v(")")],1)]),e._v(" "),t("h1",{attrs:{id:"tooling"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#tooling"}},[e._v("#")]),e._v(" Tooling")]),e._v(" "),t("p",[e._v("A wide variety of useful scripts are available once BTCPay is installed:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("bitcoin-cli.sh")]),e._v(": Access your Bitcoin node instance (for RPC)")]),e._v(" "),t("li",[t("code",[e._v("bitcoin-lightning-cli.sh")]),e._v(": Access your CLN node instance (for RPC)")]),e._v(" "),t("li",[t("code",[e._v("changedomain.sh")]),e._v(": Change the domain of your BTCPayServer (remember to disable 2FA/U2F first, as you risk being unable to log in to your account)")]),e._v(" "),t("li",[t("code",[e._v("btcpay-update.sh")]),e._v(": Update BTCPayServer to the latest version")]),e._v(" "),t("li",[t("code",[e._v("btcpay-up.sh")]),e._v(": Run "),t("code",[e._v("docker-compose up")])]),e._v(" "),t("li",[t("code",[e._v("btcpay-down.sh")]),e._v(": Run "),t("code",[e._v("docker-compose down")])]),e._v(" "),t("li",[t("code",[e._v("btcpay-setup.sh")]),e._v(": Change the settings of your server")]),e._v(" "),t("li",[t("code",[e._v("btcpay-clean.sh")]),e._v(": Purge any unused docker images")]),e._v(" "),t("li",[t("code",[e._v(". ./btcpay-setup.sh")]),e._v(": Information about additional parameters")]),e._v(" "),t("li",[t("code",[e._v(". ./btcpay-setup.sh -i")]),e._v(": Set up your BTCPayServer")]),e._v(" "),t("li",[t("code",[e._v("btcpay-restart.sh")]),e._v(": Restart your BTCPayServer")])]),e._v(" "),t("h1",{attrs:{id:"under-the-hood"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#under-the-hood"}},[e._v("#")]),e._v(" Under the hood")]),e._v(" "),t("h2",{attrs:{id:"generated-docker-compose"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generated-docker-compose"}},[e._v("#")]),e._v(" Generated docker-compose")]),e._v(" "),t("p",[e._v("When you run "),t("code",[e._v("btcpay-setup.sh")]),e._v(", your environment variables are used by "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/build.sh",target:"_blank",rel:"noopener noreferrer"}},[e._v("build.sh"),t("OutboundLink")],1),e._v(" (or "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/build.ps1",target:"_blank",rel:"noopener noreferrer"}},[e._v("build.ps1"),t("OutboundLink")],1),e._v(") to generate a docker-compose adapted for your needs. For the full list of options, see: "),t("a",{attrs:{href:"#environment-variables"}},[e._v("Environment variables")])]),e._v(" "),t("p",[e._v("By default, the generated file is "),t("code",[e._v("Generated/docker-compose.generated.yml")]),e._v(", constructed from the relevant "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments",target:"_blank",rel:"noopener noreferrer"}},[e._v("Docker fragments"),t("OutboundLink")],1),e._v(" for your setup.")]),e._v(" "),t("p",[e._v("Available "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" currently are:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage"),t("OutboundLink")],1),e._v(" will keep around 1 year of blocks (prune BTC for 100 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-s.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-s"),t("OutboundLink")],1),e._v(" will keep around 6 months of blocks (prune BTC for 50 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-xs.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-xs"),t("OutboundLink")],1),e._v(" will keep around 3 months of blocks (prune BTC for 25 GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage-xxs.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage-xxs"),t("OutboundLink")],1),e._v(" will keep around 2 weeks of blocks (prune BTC for 5 GB) (lightning not supported)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-autocompact.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-autocompact"),t("OutboundLink")],1),e._v(" will activate auto compacting of LND database.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-autopilot.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-autopilot"),t("OutboundLink")],1),e._v(" will activate auto pilot on LND. (5 channels, 60% of allocation)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-keysend.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-keysend"),t("OutboundLink")],1),e._v(" will activate keysend on LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-wtclient.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-wtclient"),t("OutboundLink")],1),e._v(" will activate the watchtower client on LND. "),t("code",[e._v("LND_WTCLIENT_SWEEP_FEE")]),e._v(" can be used to override the default 10 sat/byte justice transaction fee")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-lnd-watchtower.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-lnd-watchtower"),t("OutboundLink")],1),e._v(" will activate the LND watchtower RPC")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-memory.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-memory"),t("OutboundLink")],1),e._v(" will decrease the default dbcache at the expense of longer synchronization time. (Useful if your machine is less than 2GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-more-memory.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-more-memory"),t("OutboundLink")],1),e._v(" will increase the default dbcache to make synchronization faster (Useful if your machine is has around 4GB)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-btcqbo.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-btcqbo"),t("OutboundLink")],1),e._v(" will allow you to create an invoice on Quickbooks which include a way for your customer to pay on BTCPay Server (More information on this "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr/btcqbo/",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1),e._v(", this add-on is maintained by "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr",target:"_blank",rel:"noopener noreferrer"}},[e._v("JeffVandrewJr"),t("OutboundLink")],1),e._v(", see more on "),t("a",{attrs:{href:"https://www.youtube.com/watch?v=srgwL9ozg6c",target:"_blank",rel:"noopener noreferrer"}},[e._v("this video"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-librepatron.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-librepatron"),t("OutboundLink")],1),e._v(", for a self-hosted Patreon alternative backed by BTCPay (More information on this "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr/patron",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1),e._v(", this add-on is maintained by "),t("a",{attrs:{href:"https://github.com/JeffVandrewJr",target:"_blank",rel:"noopener noreferrer"}},[e._v("JeffVandrewJr"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-woocommerce.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-woocommerce"),t("OutboundLink")],1),e._v(", for a self-hosted woocommerce with BTCPay Server plugin pre installed.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tor.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tor"),t("OutboundLink")],1),e._v(", for exposing BTCPayServer, Woocommerce, your lightning nodes as hidden services and accept onion peers for your full node. Warning: This options is for working around NAT and firewall problems as well as to help protect your customer's privacy. This will not protect your privacy against a targeted attack against you.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-btctransmuter.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-btctransmuter"),t("OutboundLink")],1),e._v(", for a self-hosted IFTTT style service for crypto services such as fiat settlement. (More information on this "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcTransmuter/",target:"_blank",rel:"noopener noreferrer"}},[e._v("github repository"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-txindex.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-txindex"),t("OutboundLink")],1),e._v(", to enable txindex=1 in bitcoin.conf if you require txindexing for Bisq, DOJO, etc.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-expose-unsafe.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-expose-unsafe"),t("OutboundLink")],1),e._v(", to unsafely expose bitcoind P2P port 8333 if you require P2P for Bisq, DOJO, Esplora, etc. WARNING: ONLY USE ON TRUSTED LAN OR WITH FIREWALL RULES WHITELISTING SPECIFIC HOSTS")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tor-relay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tor-relay"),t("OutboundLink")],1),e._v(", for a non-exit tor relay. Make sure to have port 9001 accessible externally. "),t("a",{attrs:{href:"https://community.torproject.org/relay/community-resources/eff-tor-legal-faq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Please read the legal implications of running a tor relay"),t("OutboundLink")],1),e._v(" and "),t("a",{attrs:{href:"https://trac.torproject.org/projects/tor/wiki/TorRelayGuide#RelayRequirements",target:"_blank",rel:"noopener noreferrer"}},[e._v("what resources are used to operate the relay"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrumx"),t("OutboundLink")],1),e._v(", to integrate a full ElectrumX server (from official source) with BTCPay, using the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet. You can also open port 50002 up to the internet on your router etc, to be part of the ElectrumX network, helping other Electrum wallet users to get connected. The bitcoin option "),t("code",[e._v("-txindex")]),e._v(" is mandatory for ElectrumX, and this fragment will enable it on your BTCPay server automatically - No need to use the fragment opt-txindex.yml.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrum-ps.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-ps"),t("OutboundLink")],1),e._v(", to integrate Electrum Personal Server (EPS) with BTCPay (EPS is a single-user alternative to the ElectrumX Server option above). EPS will also use the BTCPay server's full bitcoin node for complete privacy when using your own Electrum wallet, for your own personal use (i.e. other users cannot use your server to verify transactions). Also, the bitcoin option "),t("code",[e._v("-txindex")]),e._v(" is NOT mandatory for EPS, and it will run on a pruned node (unlike ElectrumX). You will need to add your XPUB/YPUB/ZPUB as environment variable "),t("code",[e._v("EPS_XPUB")]),e._v(" before enabling EPS for the first time (see above section on environment variables, and see "),t("RouterLink",{attrs:{to:"/ElectrumPersonalServer/"}},[e._v("full documentation")]),e._v(" for details).")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-bwt.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-electrum-bwt"),t("OutboundLink")],1),e._v(", to integrate the "),t("a",{attrs:{href:"https://github.com/bwt-dev/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Wallet Tracker"),t("OutboundLink")],1),e._v(" Electrum server, which uses a personal wallet index model similar to that of EPS. You will need to set "),t("code",[e._v("BWT_XPUB")]),e._v(" with your XPUB/YPUB/ZPUB (see environment variables section). The server will only be available locally and through an onion service.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-configurator.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-configurator"),t("OutboundLink")],1),e._v(", to integrate the "),t("a",{attrs:{href:"https://install.btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Configurator"),t("OutboundLink")],1),e._v(" to manage your BTCPay deployment through a UI, and to allow new deployments elsewhere easily.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-pihole.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-pihole"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/pihole/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-ndlc.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-ndlc"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/ndlc/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-lightning-terminal.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-lightning-terminal"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning Terminal/LiT"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-mempool.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-mempool"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mempool"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-sphinxrelay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-sphinxrelay"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/stakwork/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("Sphinx Relay"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-tallycoin-connect.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-tallycoin-connect"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("Tallycoin Connect"),t("OutboundLink")],1),e._v(". Maintained by "),t("a",{attrs:{href:"https://github.com/dennisreimann",target:"_blank",rel:"noopener noreferrer"}},[e._v("dennisreimann"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-thunderhub.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-thunderhub"),t("OutboundLink")],1),e._v(" for a LND Lightning Node Manager in your Browser. Maintained by "),t("a",{attrs:{href:"https://github.com/apotdevin",target:"_blank",rel:"noopener noreferrer"}},[e._v("apotdevin"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-teos.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-teos"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/talaia-labs/python-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("The Eye Of Satoshi"),t("OutboundLink")],1),e._v(", a BOLT13 Lightning Watchtower. Use port 9814 on your server or Tor to connect.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-chatwoot.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-chatwoot"),t("OutboundLink")],1),e._v(" for open source chat support system. ("),t("RouterLink",{attrs:{to:"/Docker/chatwoot/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-zammad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-zammad"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://zammad.com/features",target:"_blank",rel:"noopener noreferrer"}},[e._v("Zammad"),t("OutboundLink")],1),e._v(", a web based open source helpdesk/customer support system with many features to manage customer communication via several channels like telephone, facebook, twitter, chat and e-mails")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-monero-expose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-monero-expose"),t("OutboundLink")],1),e._v(" to expose monero node's RPC port at 127.0.0.1:18081 to connect your own wallet. Use f.e. ssh port forwarding to forward to your own computer.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-fireflyiii.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-fireflyiii"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/fireflyiii/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-joinmarket.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-joinmarket"),t("OutboundLink")],1),e._v(" ("),t("RouterLink",{attrs:{to:"/Docker/joinmarket/"}},[e._v("See the documentation")]),e._v(")")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-helipad.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-helipad"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/Podcastindex-org/helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("Podcastindex.org Helipad"),t("OutboundLink")],1),e._v(". Requires LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-nostr-relay.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-nostr-relay"),t("OutboundLink")],1),e._v(" for "),t("a",{attrs:{href:"https://github.com/kukks/Nnostr",target:"_blank",rel:"noopener noreferrer"}},[e._v("Nostr Relay"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-cloudflared.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-cloudflared"),t("OutboundLink")],1),e._v(" to expose your local server on clearnet painlessly ("),t("RouterLink",{attrs:{to:"/Docker/cloudflare-tunnel/"}},[e._v("see documentation")]),e._v(").")],1),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-torq.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-torq"),t("OutboundLink")],1),e._v(" to install "),t("a",{attrs:{href:"https://github.com/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Torq"),t("OutboundLink")],1),e._v(" node management application. Requires LND.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-snapdrop.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-add-snapdrop"),t("OutboundLink")],1),e._v(" to install "),t("a",{attrs:{href:"https://snapdrop.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Snapdrop"),t("OutboundLink")],1),e._v(". You can then browse to "),t("code",[e._v("/snapdrop")]),e._v(" of your server to access it.")])]),e._v(" "),t("p",[e._v("You can also create your own "),t("a",{attrs:{href:"#how-can-i-customize-the-generated-docker-compose-file"}},[e._v("custom fragments")]),e._v(".")]),e._v(" "),t("p",[e._v("If you want to add an option to "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" and re-configure your install:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-lnd-autopilot"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("p",[e._v("For example, if you want "),t("code",[e._v("btc")]),e._v(" and "),t("code",[e._v("ltc")]),e._v(" support with "),t("code",[e._v("nginx")]),e._v(" and "),t("code",[e._v("clightning")]),e._v(" inside "),t("code",[e._v("Generated/docker-compose.custom.yml")]),e._v(":")]),e._v(" "),t("p",[e._v("Note: The first run might take a while, but following runs are instantaneous.")]),e._v(" "),t("p",[e._v("On Windows (run in "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell",target:"_blank",rel:"noopener noreferrer"}},[e._v("powershell"),t("OutboundLink")],1),e._v("):")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("Invoke-Command")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_CRYPTO1")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_CRYPTO2")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ltc"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_REVERSEPROXY")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_LIGHTNING")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_SUBNAME")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"custom"')]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\build"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("On Linux:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO2")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"ltc"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_SUBNAME")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"custom"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("\n./build.sh\n")])])]),t("p",[e._v("Next, you will need to configure the runtime environment variables for "),t("code",[e._v("Generated/docker-compose.custom.yml")]),e._v(":")]),e._v(" "),t("ul",[t("li",[e._v("If you are using NGinx, "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/Production/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("li",[e._v("If you are not using NGinx, "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/Production-NoReverseProxy/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this instead"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("h2",{attrs:{id:"again-what-does-btcpay-setupsh-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#again-what-does-btcpay-setupsh-do"}},[e._v("#")]),e._v(" Again, what does "),t("code",[e._v("btcpay-setup.sh")]),e._v(" do?")]),e._v(" "),t("p",[t("code",[e._v("btcpay-setup.sh")]),e._v(" is a utility which does the following:")]),e._v(" "),t("ol",[t("li",[e._v("Makes sure docker and docker-compose are installed on your system")]),e._v(" "),t("li",[e._v("Generates a docker-compose via "),t("code",[e._v("./build.sh")])]),e._v(" "),t("li",[e._v("Sets up an "),t("a",{attrs:{href:"https://docs.docker.com/compose/env-file/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Environment File"),t("OutboundLink")],1),e._v(" to configure your docker-compose")]),e._v(" "),t("li",[e._v("Sets up environment variables so the tools described in "),t("a",{attrs:{href:"#tooling"}},[e._v("Tooling")]),e._v(" can work")]),e._v(" "),t("li",[e._v("Adds symlinks of those tools into "),t("code",[e._v("/usr/bin")])]),e._v(" "),t("li",[e._v("Makes sure BTCPay restarts on reboot via upstart or systemd")]),e._v(" "),t("li",[e._v("Starts BTCPay via docker-compose")])]),e._v(" "),t("h2",{attrs:{id:"overview-of-files-generated-by-btcpay-setupsh"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#overview-of-files-generated-by-btcpay-setupsh"}},[e._v("#")]),e._v(" Overview of files generated by "),t("code",[e._v("btcpay-setup.sh")])]),e._v(" "),t("p",[t("code",[e._v("/etc/profile.d/btcpay-env.sh")]),e._v(" ensures that your environment variables are correctly setup when you login, so you can use the tools:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_OLD_PREGEN")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"false"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO2")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO3")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO4")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO5")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO6")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO7")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO8")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO9")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"clightning"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_DOCKER_COMPOSE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0/btcpayserver-docker/Production/docker-compose.generated.yml"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_BASE_DIRECTORY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ENV_FILE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/var/lib/waagent/custom-script/download/0/.env"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST_SSHKEYFILE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/root/.ssh/id_rsa_btcpay"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("if")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cat")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_ENV_FILE")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("&>")]),e._v(" /dev/null"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("then")]),e._v("\n "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-v")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'^#'")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_ENV_FILE")]),e._v('"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("xargs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("fi")]),e._v("\n")])])]),t("p",[t("code",[e._v("/etc/systemd/system/btcpayserver.service")]),e._v(" ensures that you can control btcpay via "),t("code",[e._v("systemctl")]),e._v(", and that BTCPayServer starts on reboot:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Unit")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Description")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("BTCPayServer service")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("After")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("docker.service network-online.target")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Requires")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("docker.service network-online.target")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Service")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("Type")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("oneshot")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("RemainAfterExit")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("yes")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecStart")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_up'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecStop")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_down'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ExecReload")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/bin/bash -c '. /etc/profile.d/btcpay-env.sh && cd \"$BTCPAY_BASE_DIRECTORY/btcpayserver-docker\" && . helpers.sh && btcpay_restart'")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token section"}},[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("[")]),t("span",{pre:!0,attrs:{class:"token section-name selector"}},[e._v("Install")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("]")])]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("WantedBy")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("multi-user.target")]),e._v("\n")])])]),t("p",[t("code",[e._v(".env")]),e._v(" ("),t("code",[e._v("$BTCPAY_ENV_FILE")]),e._v(") contains environment variables passed to the containers managed by your docker-compose:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("btcpay.EXAMPLE.com")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("ACME_CA_URI")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("production")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("mainnet")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("me@EXAMPLE.com")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_SSHTRUSTEDFINGERPRINTS")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("SHA256:eSCD7NtQ/Q6IBl2iRB9caAQ3lDZd8s8iUL6SdeNnhpA")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("BTCPAY_SSHKEYFILE")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("/datadir/id_rsa")]),e._v("\n")])])]),t("h1",{attrs:{id:"how-can-i-add-an-altcoin-to-btcpayserver"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-add-an-altcoin-to-btcpayserver"}},[e._v("#")]),e._v(" How can I add an altcoin to BTCPayServer?")]),e._v(" "),t("ol",[t("li",[e._v("Add support for your crypto to "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBitcoin"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBxplorer"),t("OutboundLink")],1),e._v(", and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer"),t("OutboundLink")],1),e._v(". (Use examples from other coins)")]),e._v(" "),t("li",[e._v("Create your own docker image ("),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/docker-bitcoin/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Create a docker-compose fragment ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/bitcoin.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Add your "),t("code",[e._v("CryptoDefinition")]),e._v(" ("),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v(")")])]),e._v(" "),t("p",[t("code",[e._v("build.sh")]),e._v(" is using a pre-built image of the "),t("code",[e._v("docker-compose generator")]),e._v(" on "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-compose-generator/",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker hub"),t("OutboundLink")],1),e._v(".\nIf you modify the code source of "),t("code",[e._v("docker-compose generator")]),e._v(" (for example, the "),t("code",[e._v("CryptoDefinition")]),e._v(" "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/src/CryptoDefinition.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Example for BTC"),t("OutboundLink")],1),e._v("), you need to configure "),t("code",[e._v("build.sh")]),e._v(" to use your own image by setting the environment variable "),t("code",[e._v("BTCPAYGEN_DOCKER_IMAGE")]),e._v(" to "),t("code",[e._v("btcpayserver/docker-compose-generator:local")]),e._v(".")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" docker-compose-generator\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_DOCKER_IMAGE")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpayserver/docker-compose-generator:local"')]),e._v("\n")])])]),t("p",[e._v("Or on powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[e._v("cd docker-compose-generator\n"),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_DOCKER_IMAGE")]),e._v("="),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btcpayserver/docker-compose-generator:local"')]),e._v("\n")])])]),t("p",[e._v("Then run "),t("code",[e._v("./build.sh")]),e._v(" or "),t("code",[e._v(". .\\build.ps1")]),e._v(".\nThis will generate your docker-compose in the "),t("code",[e._v("Generated")]),e._v(" folder, which you can then run and test.")]),e._v(" "),t("p",[e._v("Note that BTCPayServer developers will not spend excessive time testing your image, so make sure it works.")]),e._v(" "),t("h1",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("table",[t("thead",[t("tr",[t("th",[e._v("Image")]),e._v(" "),t("th",[e._v("Version")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("x64")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("arm32v7")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("arm64v8")]),e._v(" "),t("th",{staticStyle:{"text-align":"center"}},[e._v("links")])])]),e._v(" "),t("tbody",[t("tr",[t("td",[e._v("btcpayserver/docker-compose-generator")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-docker/dcg-latest/docker-compose-generator/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-compose-generator",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/lightning")]),e._v(" "),t("td",[e._v("v24.08.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.08.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.08.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.08.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("shahanafarooqui/rtl")]),e._v(" "),t("td",[e._v("v0.15.4")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.4/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.4/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Ride-The-Lightning/RTL/v0.15.4/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Ride-The-Lightning/RTL",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/shahanafarooqui/rtl",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/lnd")]),e._v(" "),t("td",[e._v("v0.18.3-beta")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lnd/basedon-v0.18.3-beta/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/bitcoin")]),e._v(" "),t("td",[e._v("26.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Bitcoin/26.0/Bitcoin/26.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btcpayserver")]),e._v(" "),t("td",[e._v("2.0.5")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v2.0.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v2.0.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v2.0.5/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/monero")]),e._v(" "),t("td",[e._v("0.18.3.4")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.4/Monero/0.18.3.4/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.4/Monero/0.18.3.4/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Monero/0.18.3.4/Monero/0.18.3.4/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/monero",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nicolasdorier/nbxplorer")]),e._v(" "),t("td",[e._v("2.5.16")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dgarage/nbxplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/nbxplorer",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/letsencrypt-nginx-proxy-companion")]),e._v(" "),t("td",[e._v("2.2.9-2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion/v2.2.9-2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/docker-letsencrypt-nginx-proxy-companion",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/letsencrypt-nginx-proxy-companion",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nginx")]),e._v(" "),t("td",[e._v("1.25.3-bookworm")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/nginxinc/docker-nginx/1.23.2/stable/debian/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/nginxinc/docker-nginx",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/nginx",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/docker-gen")]),e._v(" "),t("td",[e._v("0.10.7")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/docker-gen/0.10.7/Dockerfile.alpine",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/docker-gen",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/docker-gen",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btctransmuter")]),e._v(" "),t("td",[e._v("0.0.59")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btctransmuter/v0.0.59/Dockerfiles/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btctransmuter",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btctransmuter",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/cloudflared")]),e._v(" "),t("td",[e._v("2023.10.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Cloudflared/2023.10.0/Cloudflared/2023.10.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/cloudflared",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/btcpayserver-configurator")]),e._v(" "),t("td",[e._v("0.0.21")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver-configurator/v0.0.21/Dockerfiles/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-configurator",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/btcpayserver-configurator",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/eps")]),e._v(" "),t("td",[e._v("0.2.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/EPS/0.2.2/EPS/0.2.2/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/eps",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/joinmarket")]),e._v(" "),t("td",[e._v("0.9.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/JoinMarket/0.9.10/JoinMarket/0.9.10/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/joinmarket",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("nicolasdorier/ndlc-cli")]),e._v(" "),t("td",[e._v("1.0.1")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/amd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/ndlc/releases/1.0.1/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dgarage/ndlc",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/ndlc-cli",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("pihole/pihole")]),e._v(" "),t("td",[e._v("2023.05.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/pi-hole/docker-pi-hole/2023.05.2/src/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/pi-hole/docker-pi-hole",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/pihole/pihole",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/snapdrop")]),e._v(" "),t("td",[e._v("1.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Snapdrop/1.2/Snapdrop/1.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/snapdrop",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/tor")]),e._v(" "),t("td",[e._v("0.4.8.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Tor/0.4.8.10/Tor/0.4.8.10/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/tor",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/woocommerce")]),e._v(" "),t("td",[e._v("3.1.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/WooCommerce/3.1.0/WooCommerce/3.1.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/woocommerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/postgres")]),e._v(" "),t("td",[e._v("13.18")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.18/Postgres/13.18/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.18/Postgres/13.18/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.18/Postgres/13.18/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/postgres",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kamigawabul/btglnd")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/vutov/lnd/master/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/vutov/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kamigawabul/btglnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kamigawabul/docker-bitcoingold")]),e._v(" "),t("td",[e._v("0.15.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Vutov/docker-bitcoin/master/bitcoingold/0.15.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Vutov/docker-bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kamigawabul/docker-bitcoingold",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("acinq/eclair")]),e._v(" "),t("td",[e._v("release-0.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ACINQ/eclair/v0.7.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ACINQ/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/acinq/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-bitcoinplus")]),e._v(" "),t("td",[e._v("2.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/bitcoinplus/2.7.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-bitcoinplus",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("dalijolijo/docker-bitcore")]),e._v(" "),t("td",[e._v("0.90.9.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dalijolijo/btcpayserver-docker-bitcore/master/docker-bitcored/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/dalijolijo/btcpayserver-docker-bitcore",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/dalijolijo/docker-bitcore",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/dash")]),e._v(" "),t("td",[e._v("20.1.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/20.1.0/Dash/20.1.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dash/20.1.0/Dash/20.1.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/dash",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/dogecoin")]),e._v(" "),t("td",[e._v("1.14.7")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Dogecoin/1.14.7/Dogecoin/1.14.7/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/dogecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-feathercoin")]),e._v(" "),t("td",[e._v("0.16.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/feathercoin/0.16.3/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-feathercoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/lightning")]),e._v(" "),t("td",[e._v("v23.05")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/lightning/v23.05/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/lightning",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/groestlcoin-lightning-charge")]),e._v(" "),t("td",[e._v("version-0.4.22")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/groestlcoin-lightning-charge/v0.4.22/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/groestlcoin-lightning-charge",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/groestlcoin-lightning-charge",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/groestlcoin-spark")]),e._v(" "),t("td",[e._v("version-0.2.16")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/groestlcoin-spark/v0.2.16/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/groestlcoin-spark",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/groestlcoin-spark",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/eclair")]),e._v(" "),t("td",[e._v("v0.6.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/eclair/v0.6.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/eclair",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("groestlcoin/lnd")]),e._v(" "),t("td",[e._v("v0.10.0-grs")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Groestlcoin/lnd/v0.10.0-grs/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Groestlcoin/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/groestlcoin/lnd",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/groestlcoin")]),e._v(" "),t("td",[e._v("25.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Groestlcoin/25.0/Groestlcoin/25.0/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/groestlcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/elements")]),e._v(" "),t("td",[e._v("23.2.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Elements/23.2.3/Elements/23.2.3/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/elements",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("btcpayserver/litecoin")]),e._v(" "),t("td",[e._v("0.21.2.1-2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxamd64.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxarm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Litecoin/0.21.2.1-2/Litecoin/0.21.2.1/linuxarm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/btcpayserver/dockerfile-deps",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/btcpayserver/litecoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("wakiyamap/docker-monacoin")]),e._v(" "),t("td",[e._v("0.20.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/wakiyamap/docker-bitcoin/master/monacoin/0.20.2/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/wakiyamap/docker-bitcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/wakiyamap/docker-monacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("redis")]),e._v(" "),t("td",[e._v("6.2.2-buster")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/redis/f1a8498333ae3ab340b5b39fbac1d7e1dc0d628c/5.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/redis",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/redis",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/btcqbo")]),e._v(" "),t("td",[e._v("0.3.36")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/btcqbo/v0.3.36/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/btcqbo",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/btcqbo",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("shesek/bwt")]),e._v(" "),t("td",[e._v("0.2.2-electrum")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm32v7.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/bwt-dev/bwt/v0.2.2/docker/arm64v8.Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/bwt-dev/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/shesek/bwt",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chatwoot/chatwoot")]),e._v(" "),t("td",[e._v("v1.7.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/chatwoot/chatwoot/v1.7.0/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/chatwoot/chatwoot",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chatwoot/chatwoot",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lukechilds/electrumx")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lukechilds/docker-electrumx/master/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lukechilds/electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("fireflyiii/core")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/66fb773b-063e-42d7-b6a5-e7729a22e8b3/_apis/git/repositories/e9c3dcf8-4533-4ef1-83cc-75527cab3377/items?path=%2FDockerfile&versionDescriptor%5BversionOptions%5D=0&versionDescriptor%5BversionType%5D=0&versionDescriptor%5Bversion%5D=main&resolveLfs=true&%24format=octetStream&api-version=5.0&download=true",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://dev.azure.com/Firefly-III/_git/MainImage",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/fireflyiii/core",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("podcastindexorg/podcasting20-helipad")]),e._v(" "),t("td",[e._v("v0.1.10")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/Podcastindex-org/helipad/v0.1.10/umbrel/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/Podcastindex-org/helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/podcastindexorg/podcasting20-helipad",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/librepatron")]),e._v(" "),t("td",[e._v("0.7.39")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/patron/v0.7.39/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/patron",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/librepatron",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("jvandrew/isso")]),e._v(" "),t("td",[e._v("atron.22")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/JeffVandrewJr/isso/patron.22/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/JeffVandrewJr/isso",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/jvandrew/isso",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lightninglabs/lightning-terminal")]),e._v(" "),t("td",[e._v("v0.13.5-alpha-path-prefix")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.13.5-alpha/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.13.5-alpha/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mempool/frontend")]),e._v(" "),t("td",[e._v("v2.5.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/frontend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/mempool/frontend",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mempool/backend")]),e._v(" "),t("td",[e._v("v2.5.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/mempool/mempool/v2.5.0/docker/backend/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/mempool/mempool",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/mempool/backend",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("mariadb")]),e._v(" "),t("td",[e._v("10.11")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/mariadb/master/10.11/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/mariadb",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/mariadb",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("kukks/nnostr-relay")]),e._v(" "),t("td",[e._v("v0.0.23")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/kukks/nnostr/Relay/v0.0.23/Relay/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/kukks/nnostr",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/kukks/nnostr-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("sphinxlightning/sphinx-relay")]),e._v(" "),t("td",[e._v("v2.2.9")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/stakwork/sphinx-relay/v2.2.9/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/stakwork/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/sphinxlightning/sphinx-relay",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("djbooth007/tallycoin_connect")]),e._v(" "),t("td",[e._v("v1.8.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm32v7",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/djbooth007/tallycoin_connect/v1.8.0/Dockerfile.arm64v8",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/djbooth007/tallycoin_connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("benjaminchodroff/rust-teos")]),e._v(" "),t("td",[e._v("latest")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/benjaminchodroff/rust-teos/master/docker/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/benjaminchodroff/rust-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/benjaminchodroff/rust-teos",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("apotdevin/thunderhub")]),e._v(" "),t("td",[e._v("base-v0.13.31")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/apotdevin/thunderhub/v0.13.31/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/apotdevin/thunderhub",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/apotdevin/thunderhub",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("lncapital/torq")]),e._v(" "),t("td",[e._v("0.20.3")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lncapital/torq/master/README.md",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/lncapital/torq",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("timescale/timescaledb")]),e._v(" "),t("td",[e._v("latest-pg14")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/timescale/timescaledb-docker/main/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/timescale/timescaledb-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/timescale/timescaledb",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("zammad/zammad-docker-compose")]),e._v(" "),t("td",[e._v("zammad-postgresql-3.4.0-4")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/zammad/zammad-docker-compose/ff20084ce2829486076e9781fe27407ca6cc09bb/containers/zammad-postgresql/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/zammad/zammad-docker-compose",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/zammad/zammad-docker-compose",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("memcached")]),e._v(" "),t("td",[e._v("1.5.22-alpine")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/docker-library/memcached/eb38bf28263b8e5bb7367797cb7b181b65d769bd/alpine/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/docker-library/memcached",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/memcached",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("traefik")]),e._v(" "),t("td",[e._v("v2.6")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/containous/traefik-library-image/master/scratch/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/containous/traefik-library-image",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/_/traefik",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("chekaz/docker-trezarcoin")]),e._v(" "),t("td",[e._v("0.13.0")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/ChekaZ/docker/master/trezarcoin/1.2.0/Dockerfile",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/ChekaZ/docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/chekaz/docker-trezarcoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])]),e._v(" "),t("tr",[t("td",[e._v("romanornr/docker-viacoin")]),e._v(" "),t("td",[e._v("0.15.2")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/viacoin/docker-viacoin/master/viacoin/0.15.2/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[t("OutboundLink")],1)]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}}),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://github.com/viacoin/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" - "),t("a",{attrs:{href:"https://hub.docker.com/r/romanornr/docker-viacoin",target:"_blank",rel:"noopener noreferrer"}},[e._v("DockerHub"),t("OutboundLink")],1)])])])]),e._v(" "),t("h1",{attrs:{id:"faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),t("h2",{attrs:{id:"how-can-i-modify-my-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-modify-my-environment"}},[e._v("#")]),e._v(" How can I modify my environment?")]),e._v(" "),t("p",[e._v("As root, run "),t("code",[e._v(". btcpay-setup.sh")]),e._v("; this will show you the environment variable it is expecting.\nFor example, if you support "),t("code",[e._v("btc")]),e._v(" and "),t("code",[e._v("ltc")]),e._v(" already, and want to add "),t("code",[e._v("btg")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO3")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'btg'")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("h2",{attrs:{id:"i-deployed-before-btcpay-setupsh-existed-before-may-17-2018-can-i-migrate-to-this-new-system"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-deployed-before-btcpay-setupsh-existed-before-may-17-2018-can-i-migrate-to-this-new-system"}},[e._v("#")]),e._v(" I deployed before "),t("code",[e._v("btcpay-setup.sh")]),e._v(" existed (before May 17, 2018), can I migrate to this new system?")]),e._v(" "),t("p",[e._v("Yes, run the following commands to update:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$DOWNLOAD_ROOT")]),e._v("/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout master\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" pull\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout 9acb5d8067cb5c46f59858137feb699b41ac9f19\nbtcpay-update.sh\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" checkout master\nbtcpay-update.sh\n\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exit")]),e._v("\n")])])]),t("h2",{attrs:{id:"im-getting-an-error-on-windows-cannot-create-container-for-service-docker-mount-denied"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#im-getting-an-error-on-windows-cannot-create-container-for-service-docker-mount-denied"}},[e._v("#")]),e._v(" I'm getting an error on Windows: "),t("code",[e._v("Cannot create container for service docker: Mount denied")]),e._v("?")]),e._v(" "),t("p",[e._v("If you see this error:")]),e._v(" "),t("p",[t("code",[e._v("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'")]),e._v(".")]),e._v(" "),t("p",[e._v("Run this in "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/powershell/scripting/windows-powershell/starting-windows-powershell",target:"_blank",rel:"noopener noreferrer"}},[e._v("powershell"),t("OutboundLink")],1),e._v(":")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$Env")]),e._v(":COMPOSE_CONVERT_WINDOWS_PATHS=1\n")])])]),t("p",[e._v("Then, run "),t("code",[e._v("docker-compose -f EXAMPLE.yml up")]),e._v(".")]),e._v(" "),t("p",[e._v("This bug comes from Docker for Windows and is "),t("a",{attrs:{href:"https://github.com/docker/for-win/issues/1829",target:"_blank",rel:"noopener noreferrer"}},[e._v("tracked on Github"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-i-can-prune-my-nodes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-i-can-prune-my-nodes"}},[e._v("#")]),e._v(" How I can prune my node(s)?")]),e._v(" "),t("p",[e._v("This will prune your Bitcoin full node to a maximum of 100GB (of blocks):")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("p",[e._v("Other options are "),t("a",{attrs:{href:"#generated-docker-compose"}},[e._v("documented here")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-can-i-customize-the-generated-docker-compose-file"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-customize-the-generated-docker-compose-file"}},[e._v("#")]),e._v(" How can I customize the generated docker-compose file?")]),e._v(" "),t("p",[e._v("In some instances, you might want to customize your environment in more detail. While you could modify "),t("code",[e._v("Generated/docker-compose.generated.yml")]),e._v(" manually, your changes would be overwritten the next time you run "),t("code",[e._v("btcpay-update.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Luckily, you can leverage "),t("code",[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(" for this!")]),e._v(" "),t("p",[e._v("Let's enable "),t("strong",[e._v("pruning to 60 GB")]),e._v(", for example:")]),e._v(" "),t("p",[e._v("First, copy "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-save-storage.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("opt-save-storage"),t("OutboundLink")],1),e._v(" into the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments",target:"_blank",rel:"noopener noreferrer"}},[e._v("the docker fragment folder"),t("OutboundLink")],1),e._v(" as "),t("code",[e._v("opt-save-storage.custom.yml")]),e._v(". "),t("strong",[e._v("Important:")]),e._v(" the file must end with "),t("code",[e._v(".custom.yml")]),e._v(", or there will be git conflicts whenever you run "),t("code",[e._v("btcpay-update.sh")]),e._v(".")]),e._v(" "),t("p",[e._v("Modify the new "),t("code",[e._v("opt-save-storage.custom.yml")]),e._v(" file to your taste:")]),e._v(" "),t("div",{staticClass:"language-diff extra-class"},[t("pre",{pre:!0,attrs:{class:"language-diff"}},[t("code",[e._v('@@ -14,8 +14,7 @@ version: "3"\n'),t("span",{pre:!0,attrs:{class:"token unchanged"}},[t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v("services:\n")]),t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" bitcoind:\n")]),t("span",{pre:!0,attrs:{class:"token prefix unchanged"}},[e._v(" ")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" environment:\n")])]),t("span",{pre:!0,attrs:{class:"token deleted-sign deleted"}},[t("span",{pre:!0,attrs:{class:"token prefix deleted"}},[e._v("-")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" BITCOIN_EXTRA_ARGS: prune=100000\n")])]),t("span",{pre:!0,attrs:{class:"token inserted-sign inserted"}},[t("span",{pre:!0,attrs:{class:"token prefix inserted"}},[e._v("+")]),t("span",{pre:!0,attrs:{class:"token line"}},[e._v(" BITCOIN_EXTRA_ARGS: prune=60000\n")])])])])]),t("p",[e._v("Then set it up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-save-storage.custom"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("h2",{attrs:{id:"can-i-run-btcpay-server-on-ports-other-than-80-and-443"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-run-btcpay-server-on-ports-other-than-80-and-443"}},[e._v("#")]),e._v(" Can I run BTCPay Server on ports other than 80 and 443?")]),e._v(" "),t("p",[e._v("You can change the ports for HTTP and HTTPS by setting the environment variables "),t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(" and "),t("code",[e._v("REVERSEPROXY_HTTPS_PORT")]),e._v(". 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.")]),e._v(" "),t("p",[e._v("When you set "),t("code",[e._v("REVERSEPROXY_HTTP_PORT")]),e._v(" 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.")]),e._v(" "),t("p",[e._v("If you need to run on a different port, it's best to terminate SSL using another web proxy and forward your traffic.")]),e._v(" "),t("h2",{attrs:{id:"can-i-offload-https-termination"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#can-i-offload-https-termination"}},[e._v("#")]),e._v(" Can I offload HTTPS termination?")]),e._v(" "),t("p",[e._v("Yes. Please "),t("RouterLink",{attrs:{to:"/FAQ/FAQ-Deployment/#can-i-use-an-existing-nginx-server-as-a-reverse-proxy-with-ssl-termination"}},[e._v("see the documentation")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-can-i-back-up-my-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-back-up-my-btcpay-server"}},[e._v("#")]),e._v(" How can I back up my BTCPay Server?")]),e._v(" "),t("p",[e._v("See the "),t("RouterLink",{attrs:{to:"/Docker/backup-restore/"}},[e._v("Backup & Restore")]),e._v(" guide in our documentation.")],1),e._v(" "),t("details",[t("summary",[e._v("For backwards compatibility: Click here for the description of the old backup.sh process")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("Please consider switching to the "),t("RouterLink",{attrs:{to:"/Docker/backup-restore/"}},[e._v("new Backup & Restore process")]),e._v(", because the "),t("code",[e._v("backup.sh")]),e._v(" will not be maintained anymore.")],1)]),e._v(" "),t("p",[e._v("We provide a backup script that dumps the database and saves the important files:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n./backup.sh\n")])])]),t("p",[e._v("This will save the backup locally as "),t("code",[e._v("/var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz")]),e._v(".\nThese are the options to customize the backup name and location:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("BACKUP_TIMESTAMP=true")]),e._v(" saves the backup with datetime as part of the file name, so that backups do not get overwritten.")]),e._v(" "),t("li",[t("code",[e._v("BACKUP_PROVIDER=SCP")]),e._v(" saves the backup remotely, requires additional "),t("code",[e._v("SCP_TARGET")]),e._v(" environment variable (see below).")]),e._v(" "),t("li",[t("code",[e._v("BACKUP_PROVIDER=Dropbox")]),e._v(" saves the backup to Dropbox, requires additional "),t("code",[e._v("DROPBOX_TOKEN")]),e._v(" environment variable (see below).")])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup with custom file name and timestamp:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_TIMESTAMP")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("true ./backup.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup via SCP:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_PROVIDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("SCP "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("SCP_TARGET")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("myhost:backups/btcpay ./backup.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Backup to Dropbox:")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BACKUP_PROVIDER")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("Dropbox "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("DROPBOX_TOKEN")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("myDropboxToken ./backup.sh\n")])])]),t("p",[e._v("You can also choose to only dump the database.\nThis option does not need to stop and restart the docker-containers:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v('/btcpayserver-docker"')]),e._v("\n./backup.sh --only-db\n")])])])]),e._v(" "),t("h2",{attrs:{id:"how-can-i-connect-to-the-database"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-connect-to-the-database"}},[e._v("#")]),e._v(" How can I connect to the database?")]),e._v(" "),t("p",[e._v("On the server you can open a database session by connecting via "),t("code",[e._v("psql")]),e._v(" as the postgres user:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("exec")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-ti")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("ps")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-q")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"name=postgres_1"')]),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v(")")])]),e._v(" psql "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-U")]),e._v(" postgres\n")])])]),t("p",[e._v("Then, inside "),t("code",[e._v("psql")]),e._v(" you can select a database and interact with the tables:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list databases")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("l\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# connect to database")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("c btcpayservermainnet\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list tables")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("dt\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list users")]),e._v("\nSELECT "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Id"')]),e._v(", "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Email"')]),e._v(" FROM "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"AspNetUsers"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# end session")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("q\n")])])]),t("p",[e._v("The main BTCPay Server database tables are part of the "),t("code",[e._v("public")]),e._v(" schema.\nPlugins have their own schema, named after the plugin.")]),e._v(" "),t("p",[e._v("By default, only the tables of the "),t("code",[e._v("public")]),e._v(" schema are shown.\nIf you want to also see and select the plugin tables, you need to extend the search path:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# list plugin schemas")]),e._v("\nSELECT * FROM pg_catalog.pg_namespace WHERE nspname LIKE "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v("'BTCPayServer.%'")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# extend search path")]),e._v("\nSET search_path TO "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"BTCPayServer.Plugins.MyPlugin"')]),e._v(", public"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(";")]),e._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# table list now also shows the MyPlugin tables")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("\\")]),e._v("dt\n")])])]),t("h2",{attrs:{id:"how-do-i-upgrade-my-btcpay-server-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-do-i-upgrade-my-btcpay-server-docker"}},[e._v("#")]),e._v(" How do I upgrade my BTCPay Server docker?")]),e._v(" "),t("p",[e._v("Run the script "),t("code",[e._v("./btcpay-update.sh")]),e._v(" and patiently wait for your server to be upgraded.")])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/134.6e21a6d8.js b/assets/js/134.34e8d418.js similarity index 99% rename from assets/js/134.6e21a6d8.js rename to assets/js/134.34e8d418.js index 9ac12fe44f..fe039d10be 100644 --- a/assets/js/134.6e21a6d8.js +++ b/assets/js/134.34e8d418.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[134],{869:function(e,t,a){"use strict";a.r(t);var s=a(17),r=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"backup-restore"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#backup-restore"}},[e._v("#")]),e._v(" Backup & Restore")]),e._v(" "),t("p",[e._v("This guide gets you up to speed with the "),t("RouterLink",{attrs:{to:"/Docker/"}},[e._v("Docker deployment")]),e._v("'s Backup & Restore process.\nYou will learn about what to keep in mind when doing a backup and how to restore a backup.")],1),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#remarks-and-considerations"}},[e._v("Remarks and Considerations")]),t("ul",[t("li",[t("a",{attrs:{href:"#lightning-channel-backup"}},[e._v("Lightning channel backup")])])])]),t("li",[t("a",{attrs:{href:"#how-does-the-backup-work"}},[e._v("How does the backup work?")]),t("ul",[t("li",[t("a",{attrs:{href:"#set-a-backup-passphrase"}},[e._v("Set a backup passphrase")])]),t("li",[t("a",{attrs:{href:"#automation-by-crontab"}},[e._v("Automation by crontab")])])])]),t("li",[t("a",{attrs:{href:"#how-to-restore"}},[e._v("How to restore?")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"remarks-and-considerations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#remarks-and-considerations"}},[e._v("#")]),e._v(" Remarks and Considerations")]),e._v(" "),t("p",[e._v("The original backups strategy in BTCPay Server still exists and can be found "),t("RouterLink",{attrs:{to:"/Docker/#how-can-i-back-up-my-btcpay-server"}},[e._v("here")]),e._v(".\nWhile this documentation covers the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/pull/641",target:"_blank",rel:"noopener noreferrer"}},[e._v("new process"),t("OutboundLink")],1),e._v(", the old "),t("code",[e._v("backup.sh")]),e._v(" script still works.")],1),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("BTCPay Server is and will never be responsible for your backup.\nPlease make sure the backup includes the files and data you want to store.\nAlso, test the restore process before starting to rely on it.")])]),e._v(" "),t("h3",{attrs:{id:"lightning-channel-backup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lightning-channel-backup"}},[e._v("#")]),e._v(" Lightning channel backup")]),e._v(" "),t("p",[e._v("Please be aware of this important issue:\nOld Lightning channel state is toxic!\nYou can lose all your funds if you close a channel based on an outdated state and the state changes often!\nIf you publish an old state (say from yesterday's backup), you will most likely lose all your funds in the channel because the counterparty might publish a "),t("a",{attrs:{href:"https://www.d11n.net/lightning-network-payment-channel-lifecycle.html#what-happens-in-case-of-a-false-close%3F",target:"_blank",rel:"noopener noreferrer"}},[e._v("revocation transaction"),t("OutboundLink")],1),e._v("!")]),e._v(" "),t("p",[e._v("There is a high chance of failure in a disaster recovery scenario, where you may do a backup once per night and need to restore that one backup.")]),e._v(" "),t("p",[e._v("The Lightning channel backup from the "),t("code",[e._v("btcpay-backup.sh")]),e._v(" script will be sufficient in a migration case, where the shutdown of the old server happens cleanly.\nThe old server should not be started after the restoration and start of the new server.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("The Lightning static channel backup should be watched by a script and copied over to a remote server to ensure you always have the latest state available.\nWe will provide such a script with a future update.\nFor now, keep the above in mind when restoring from the backup!")])]),e._v(" "),t("h2",{attrs:{id:"how-does-the-backup-work"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-does-the-backup-work"}},[e._v("#")]),e._v(" How does the backup work?")]),e._v(" "),t("p",[e._v("The backup process is run with the "),t("code",[e._v("btcpay-backup.sh")]),e._v(" script.")]),e._v(" "),t("p",[e._v("Log in to your server, switch to the "),t("code",[e._v("root")]),e._v(" user and type the following:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# The backup script needs to be run as the root user")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# As the other scripts, it is inside the BTCPay base directory")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v("/btcpayserver-docker\n./btcpay-backup.sh\n")])])]),t("p",[e._v("The backup process needs to be run as "),t("code",[e._v("root")]),e._v(".\nIt will check for and let you know if you have to switch users.")]),e._v(" "),t("p",[e._v("The script will do the following steps:")]),e._v(" "),t("ul",[t("li",[e._v("Ensure the database container is running")]),e._v(" "),t("li",[e._v("Make a dump of the database")]),e._v(" "),t("li",[e._v("Stop BTCPay Server")]),e._v(" "),t("li",[e._v("Archive the Docker volumes and database dump\n"),t("ul",[t("li",[e._v("Excluding the blockchains "),t("code",[e._v("blocks")]),e._v(" and "),t("code",[e._v("chainstate")]),e._v(" directories")]),e._v(" "),t("li",[e._v("Optional: "),t("a",{attrs:{href:"#set-a-backup-passphrase"}},[e._v("Encrypt the archive")])])])]),e._v(" "),t("li",[e._v("Restart BTCPay Server")]),e._v(" "),t("li",[e._v("Cleanup: Remove temporary files like the database dump")])]),e._v(" "),t("p",[e._v("If the backup directory doesn't exist yet, the script will create it.\nWith these preparations taken, the backup process is now starting.")]),e._v(" "),t("p",[e._v("The script has checks to ensure it either works or fails with a comprehensive error message at every step of the way.\nIf there are errors, you will be notified like this:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" Database container could not be started or found.\n")])])]),t("p",[e._v("If everything works smoothly, you will see multiple completed marks in your console.\nWhenever the backup has completed successfully, it will state:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" Backup done => /var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz\n")])])]),t("p",[e._v("Your BTCPay Server has now finished the backup process.\nYou must store these backups safely, for instance, by copying them to a remote server.")]),e._v(" "),t("p",[e._v("After making a backup the first time, it is always wise to at least test your backup in a restore scenario.\nWe will go over the extra options you can set with your backup in the next topic.")]),e._v(" "),t("h3",{attrs:{id:"set-a-backup-passphrase"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#set-a-backup-passphrase"}},[e._v("#")]),e._v(" Set a backup passphrase")]),e._v(" "),t("p",[e._v("You can set the "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" environment variable for encrypting the backup.\nThis passphrase will be used by the backup and restore scripts to encrypt and decrypt the backup file.\nFor the backup script, this would look like the following:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Set the passphrase without adding it to the shell history")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-s")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-p")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Enter passphrase: "')]),e._v(" BTCPAY_BACKUP_PASSPHRASE\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" BTCPAY_BACKUP_PASSPHRASE\n\n./btcpay-backup.sh\n")])])]),t("p",[e._v("This "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" if set, is necessary to be in the "),t("a",{attrs:{href:"#how-to-restore"}},[e._v("restore process")]),e._v(" as well.")]),e._v(" "),t("h3",{attrs:{id:"automation-by-crontab"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#automation-by-crontab"}},[e._v("#")]),e._v(" Automation by crontab")]),e._v(" "),t("p",[e._v("Here is an example of a crontab script that does a nightly backup at 4:15 AM:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("SHELL=/bin/bash\nPATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin\n15 4 * * * /root/BTCPayServer/btcpayserver-docker/btcpay-backup.sh >/dev/null 2>&1\n")])])]),t("p",[e._v("You need to set the right "),t("code",[e._v("SHELL")]),e._v(" and "),t("code",[e._v("PATH")]),e._v(", so that the script can run with the correct context.\nYou might also want to set the "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" environment variable.")]),e._v(" "),t("p",[e._v("Also ensure the base path (here "),t("code",[e._v("/root/BTCPayServer")]),e._v(") matches the output of "),t("code",[e._v("echo $BTCPAY_BASE_DIRECTORY")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-to-restore"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-restore"}},[e._v("#")]),e._v(" How to restore?")]),e._v(" "),t("p",[e._v("It's very similar to the "),t("code",[e._v("btcpay-backup.sh")]),e._v(" process but in reverse.\nThe "),t("code",[e._v("btcpay-restore.sh")]),e._v(" script needs to be run with the path to your "),t("code",[e._v("backup.tar.gz")]),e._v(" file.")]),e._v(" "),t("p",[e._v("First off, open a terminal and type the following as root.\nRemember that if you set "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" on the backup, you also need to provide it for decryption :")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# The restore script needs to be run as the root user")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# As the other scripts, it is inside the BTCPay base directory")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v("/btcpayserver-docker\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Optional: Set the passphrase if you have used one for the backup")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-s")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-p")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Enter passphrase: "')]),e._v(" BTCPAY_BACKUP_PASSPHRASE\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" BTCPAY_BACKUP_PASSPHRASE\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Run the restore script with the full path to the backup file")]),e._v("\n./btcpay-restore.sh /var/backups/backup.tar.gz.gpg\n")])])]),t("p",[e._v("The script will do the following steps:")]),e._v(" "),t("ul",[t("li",[e._v("Extract (and decrypt) the backup archive")]),e._v(" "),t("li",[e._v("Stop BTCPay Server")]),e._v(" "),t("li",[e._v("Restore the Docker volumes")]),e._v(" "),t("li",[e._v("Start the database container")]),e._v(" "),t("li",[e._v("Import the database dump")]),e._v(" "),t("li",[e._v("Restart BTCPay Server")]),e._v(" "),t("li",[e._v("Cleanup: Remove the temporary restore directory")])]),e._v(" "),t("p",[e._v("If the backup file cannot be found in the provided path, the script will exit with an error.")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" /var/backups/backup.tar.gz.gpg does not exist.\n")])])]),t("p",[e._v("Just as the "),t("code",[e._v("btcpay-backup.sh")]),e._v(" script, the restore will stop at ANY error it may encounter.\nIf the backup file was created while the "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" was set but not used on restoring, the following error would occur:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" Decryption failed. Please check the error message above.\n")])])]),t("p",[e._v("When the restore has completed, you get the message:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" Restore done\n")])])]),t("p",[e._v("Everything should be up and running again when the restore is complete.\nYou've successfully restored your BTCPay Server. Congratulations!")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("Always make sure your backup strategy is tested and fits your needs.\nNo one solution fits all, and we tried to cover the basic cases.\nFor the latest updates, always feel free to ask on the BTCPay Server community channels.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[134],{870:function(e,t,a){"use strict";a.r(t);var s=a(17),r=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"backup-restore"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#backup-restore"}},[e._v("#")]),e._v(" Backup & Restore")]),e._v(" "),t("p",[e._v("This guide gets you up to speed with the "),t("RouterLink",{attrs:{to:"/Docker/"}},[e._v("Docker deployment")]),e._v("'s Backup & Restore process.\nYou will learn about what to keep in mind when doing a backup and how to restore a backup.")],1),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#remarks-and-considerations"}},[e._v("Remarks and Considerations")]),t("ul",[t("li",[t("a",{attrs:{href:"#lightning-channel-backup"}},[e._v("Lightning channel backup")])])])]),t("li",[t("a",{attrs:{href:"#how-does-the-backup-work"}},[e._v("How does the backup work?")]),t("ul",[t("li",[t("a",{attrs:{href:"#set-a-backup-passphrase"}},[e._v("Set a backup passphrase")])]),t("li",[t("a",{attrs:{href:"#automation-by-crontab"}},[e._v("Automation by crontab")])])])]),t("li",[t("a",{attrs:{href:"#how-to-restore"}},[e._v("How to restore?")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"remarks-and-considerations"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#remarks-and-considerations"}},[e._v("#")]),e._v(" Remarks and Considerations")]),e._v(" "),t("p",[e._v("The original backups strategy in BTCPay Server still exists and can be found "),t("RouterLink",{attrs:{to:"/Docker/#how-can-i-back-up-my-btcpay-server"}},[e._v("here")]),e._v(".\nWhile this documentation covers the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/pull/641",target:"_blank",rel:"noopener noreferrer"}},[e._v("new process"),t("OutboundLink")],1),e._v(", the old "),t("code",[e._v("backup.sh")]),e._v(" script still works.")],1),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("BTCPay Server is and will never be responsible for your backup.\nPlease make sure the backup includes the files and data you want to store.\nAlso, test the restore process before starting to rely on it.")])]),e._v(" "),t("h3",{attrs:{id:"lightning-channel-backup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lightning-channel-backup"}},[e._v("#")]),e._v(" Lightning channel backup")]),e._v(" "),t("p",[e._v("Please be aware of this important issue:\nOld Lightning channel state is toxic!\nYou can lose all your funds if you close a channel based on an outdated state and the state changes often!\nIf you publish an old state (say from yesterday's backup), you will most likely lose all your funds in the channel because the counterparty might publish a "),t("a",{attrs:{href:"https://www.d11n.net/lightning-network-payment-channel-lifecycle.html#what-happens-in-case-of-a-false-close%3F",target:"_blank",rel:"noopener noreferrer"}},[e._v("revocation transaction"),t("OutboundLink")],1),e._v("!")]),e._v(" "),t("p",[e._v("There is a high chance of failure in a disaster recovery scenario, where you may do a backup once per night and need to restore that one backup.")]),e._v(" "),t("p",[e._v("The Lightning channel backup from the "),t("code",[e._v("btcpay-backup.sh")]),e._v(" script will be sufficient in a migration case, where the shutdown of the old server happens cleanly.\nThe old server should not be started after the restoration and start of the new server.")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("The Lightning static channel backup should be watched by a script and copied over to a remote server to ensure you always have the latest state available.\nWe will provide such a script with a future update.\nFor now, keep the above in mind when restoring from the backup!")])]),e._v(" "),t("h2",{attrs:{id:"how-does-the-backup-work"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-does-the-backup-work"}},[e._v("#")]),e._v(" How does the backup work?")]),e._v(" "),t("p",[e._v("The backup process is run with the "),t("code",[e._v("btcpay-backup.sh")]),e._v(" script.")]),e._v(" "),t("p",[e._v("Log in to your server, switch to the "),t("code",[e._v("root")]),e._v(" user and type the following:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# The backup script needs to be run as the root user")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# As the other scripts, it is inside the BTCPay base directory")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v("/btcpayserver-docker\n./btcpay-backup.sh\n")])])]),t("p",[e._v("The backup process needs to be run as "),t("code",[e._v("root")]),e._v(".\nIt will check for and let you know if you have to switch users.")]),e._v(" "),t("p",[e._v("The script will do the following steps:")]),e._v(" "),t("ul",[t("li",[e._v("Ensure the database container is running")]),e._v(" "),t("li",[e._v("Make a dump of the database")]),e._v(" "),t("li",[e._v("Stop BTCPay Server")]),e._v(" "),t("li",[e._v("Archive the Docker volumes and database dump\n"),t("ul",[t("li",[e._v("Excluding the blockchains "),t("code",[e._v("blocks")]),e._v(" and "),t("code",[e._v("chainstate")]),e._v(" directories")]),e._v(" "),t("li",[e._v("Optional: "),t("a",{attrs:{href:"#set-a-backup-passphrase"}},[e._v("Encrypt the archive")])])])]),e._v(" "),t("li",[e._v("Restart BTCPay Server")]),e._v(" "),t("li",[e._v("Cleanup: Remove temporary files like the database dump")])]),e._v(" "),t("p",[e._v("If the backup directory doesn't exist yet, the script will create it.\nWith these preparations taken, the backup process is now starting.")]),e._v(" "),t("p",[e._v("The script has checks to ensure it either works or fails with a comprehensive error message at every step of the way.\nIf there are errors, you will be notified like this:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" Database container could not be started or found.\n")])])]),t("p",[e._v("If everything works smoothly, you will see multiple completed marks in your console.\nWhenever the backup has completed successfully, it will state:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" Backup done => /var/lib/docker/volumes/backup_datadir/_data/backup.tar.gz\n")])])]),t("p",[e._v("Your BTCPay Server has now finished the backup process.\nYou must store these backups safely, for instance, by copying them to a remote server.")]),e._v(" "),t("p",[e._v("After making a backup the first time, it is always wise to at least test your backup in a restore scenario.\nWe will go over the extra options you can set with your backup in the next topic.")]),e._v(" "),t("h3",{attrs:{id:"set-a-backup-passphrase"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#set-a-backup-passphrase"}},[e._v("#")]),e._v(" Set a backup passphrase")]),e._v(" "),t("p",[e._v("You can set the "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" environment variable for encrypting the backup.\nThis passphrase will be used by the backup and restore scripts to encrypt and decrypt the backup file.\nFor the backup script, this would look like the following:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Set the passphrase without adding it to the shell history")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-s")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-p")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Enter passphrase: "')]),e._v(" BTCPAY_BACKUP_PASSPHRASE\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" BTCPAY_BACKUP_PASSPHRASE\n\n./btcpay-backup.sh\n")])])]),t("p",[e._v("This "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" if set, is necessary to be in the "),t("a",{attrs:{href:"#how-to-restore"}},[e._v("restore process")]),e._v(" as well.")]),e._v(" "),t("h3",{attrs:{id:"automation-by-crontab"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#automation-by-crontab"}},[e._v("#")]),e._v(" Automation by crontab")]),e._v(" "),t("p",[e._v("Here is an example of a crontab script that does a nightly backup at 4:15 AM:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("SHELL=/bin/bash\nPATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin\n15 4 * * * /root/BTCPayServer/btcpayserver-docker/btcpay-backup.sh >/dev/null 2>&1\n")])])]),t("p",[e._v("You need to set the right "),t("code",[e._v("SHELL")]),e._v(" and "),t("code",[e._v("PATH")]),e._v(", so that the script can run with the correct context.\nYou might also want to set the "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" environment variable.")]),e._v(" "),t("p",[e._v("Also ensure the base path (here "),t("code",[e._v("/root/BTCPayServer")]),e._v(") matches the output of "),t("code",[e._v("echo $BTCPAY_BASE_DIRECTORY")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-to-restore"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-restore"}},[e._v("#")]),e._v(" How to restore?")]),e._v(" "),t("p",[e._v("It's very similar to the "),t("code",[e._v("btcpay-backup.sh")]),e._v(" process but in reverse.\nThe "),t("code",[e._v("btcpay-restore.sh")]),e._v(" script needs to be run with the path to your "),t("code",[e._v("backup.tar.gz")]),e._v(" file.")]),e._v(" "),t("p",[e._v("First off, open a terminal and type the following as root.\nRemember that if you set "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" on the backup, you also need to provide it for decryption :")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# The restore script needs to be run as the root user")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# As the other scripts, it is inside the BTCPay base directory")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v("/btcpayserver-docker\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Optional: Set the passphrase if you have used one for the backup")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("read")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-s")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-p")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Enter passphrase: "')]),e._v(" BTCPAY_BACKUP_PASSPHRASE\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" BTCPAY_BACKUP_PASSPHRASE\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Run the restore script with the full path to the backup file")]),e._v("\n./btcpay-restore.sh /var/backups/backup.tar.gz.gpg\n")])])]),t("p",[e._v("The script will do the following steps:")]),e._v(" "),t("ul",[t("li",[e._v("Extract (and decrypt) the backup archive")]),e._v(" "),t("li",[e._v("Stop BTCPay Server")]),e._v(" "),t("li",[e._v("Restore the Docker volumes")]),e._v(" "),t("li",[e._v("Start the database container")]),e._v(" "),t("li",[e._v("Import the database dump")]),e._v(" "),t("li",[e._v("Restart BTCPay Server")]),e._v(" "),t("li",[e._v("Cleanup: Remove the temporary restore directory")])]),e._v(" "),t("p",[e._v("If the backup file cannot be found in the provided path, the script will exit with an error.")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" /var/backups/backup.tar.gz.gpg does not exist.\n")])])]),t("p",[e._v("Just as the "),t("code",[e._v("btcpay-backup.sh")]),e._v(" script, the restore will stop at ANY error it may encounter.\nIf the backup file was created while the "),t("code",[e._v("BTCPAY_BACKUP_PASSPHRASE")]),e._v(" was set but not used on restoring, the following error would occur:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" Decryption failed. Please check the error message above.\n")])])]),t("p",[e._v("When the restore has completed, you get the message:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(" Restore done\n")])])]),t("p",[e._v("Everything should be up and running again when the restore is complete.\nYou've successfully restored your BTCPay Server. Congratulations!")]),e._v(" "),t("div",{staticClass:"custom-block tip"},[t("p",{staticClass:"custom-block-title"},[e._v("TIP")]),e._v(" "),t("p",[e._v("Always make sure your backup strategy is tested and fits your needs.\nNo one solution fits all, and we tried to cover the basic cases.\nFor the latest updates, always feel free to ask on the BTCPay Server community channels.")])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/135.3d82884e.js b/assets/js/135.6bfb45ec.js similarity index 98% rename from assets/js/135.3d82884e.js rename to assets/js/135.6bfb45ec.js index ffeff7c85f..4231d1d758 100644 --- a/assets/js/135.3d82884e.js +++ b/assets/js/135.6bfb45ec.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[135],{870:function(t,a,s){"use strict";s.r(a);var e=s(17),r=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"chatwoot-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#chatwoot-support"}},[t._v("#")]),t._v(" Chatwoot support")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.chatwoot.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Chatwoot"),a("OutboundLink")],1),t._v(" is a customer support tool for instant messaging channels which can help businesses provide exceptional customer support.")]),t._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),a("ol",[a("li",[t._v("Connect as root to your server")]),t._v(" "),a("li",[t._v("create chatwoot configuration file where "),a("code",[t._v("{CONFIG DATA HERE}")]),t._v(" is replaced by settings from "),a("a",{attrs:{href:"https://www.chatwoot.com/docs/environment-variables",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">>")]),t._v(" Generated/chatwoot-config.env "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("EOL\n{CONFIG DATA HERE}\n{CONFIG DATA HERE}\nEOL")]),t._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Add chatwoot as an option to your BTCPay deployment and set the host to use (point DNS to server as well)")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("CHATWOOT_HOST")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"chatwoot.xpayserver.com"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-chatwoot"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Wait for BTPay to be online and then create the database for chatwoot")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("exec")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" chatwoot "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sh")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"export DISABLE_DATABASE_ENVIRONMENT_CHECK=1 && bundle exec rails db:reset"')]),t._v("\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Go to chatwoot website at https://chatwoot.xpayserver.com and set up.")])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[135],{871:function(t,a,s){"use strict";s.r(a);var e=s(17),r=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"chatwoot-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#chatwoot-support"}},[t._v("#")]),t._v(" Chatwoot support")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.chatwoot.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Chatwoot"),a("OutboundLink")],1),t._v(" is a customer support tool for instant messaging channels which can help businesses provide exceptional customer support.")]),t._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),a("ol",[a("li",[t._v("Connect as root to your server")]),t._v(" "),a("li",[t._v("create chatwoot configuration file where "),a("code",[t._v("{CONFIG DATA HERE}")]),t._v(" is replaced by settings from "),a("a",{attrs:{href:"https://www.chatwoot.com/docs/environment-variables",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">>")]),t._v(" Generated/chatwoot-config.env "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("EOL\n{CONFIG DATA HERE}\n{CONFIG DATA HERE}\nEOL")]),t._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Add chatwoot as an option to your BTCPay deployment and set the host to use (point DNS to server as well)")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("CHATWOOT_HOST")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"chatwoot.xpayserver.com"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-chatwoot"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Wait for BTPay to be online and then create the database for chatwoot")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("exec")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" chatwoot "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sh")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"export DISABLE_DATABASE_ENVIRONMENT_CHECK=1 && bundle exec rails db:reset"')]),t._v("\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Go to chatwoot website at https://chatwoot.xpayserver.com and set up.")])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/136.c0c02fbc.js b/assets/js/136.12ebfad3.js similarity index 97% rename from assets/js/136.c0c02fbc.js rename to assets/js/136.12ebfad3.js index 7c0708e53c..2c0db2d534 100644 --- a/assets/js/136.c0c02fbc.js +++ b/assets/js/136.12ebfad3.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[136],{878:function(s,e,t){"use strict";t.r(e);var a=t(17),r=Object(a.a)({},(function(){var s=this,e=s._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[e("h1",{attrs:{id:"firefly-iii-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#firefly-iii-support"}},[s._v("#")]),s._v(" Firefly III support")]),s._v(" "),e("p",[e("a",{attrs:{href:"https://www.firefly-iii.org/",target:"_blank",rel:"noopener noreferrer"}},[s._v("Firefly III"),e("OutboundLink")],1),s._v(" is a self-hosted financial manager.\nIt can help you keep track of expenses, income, budgets and everything in between. It supports credit cards, shared household accounts and savings accounts. Its pretty fancy. You should use it to save and organise money.")]),s._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[s._v("#")]),s._v(" How to use")]),s._v(" "),e("ol",[e("li",[s._v("Connect as root to your server")]),s._v(" "),e("li",[s._v("Configure a domain's DNS to point to your server ip. e.g. "),e("code",[s._v("firefly.yourserver.org")])]),s._v(" "),e("li",[s._v("Add fireflyiii as an option to your docker deployment")])]),s._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[s._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[s._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),s._v(';opt-add-fireflyiii"')]),s._v("\n"),e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIREFLY_HOST")]),e("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firefly.yourserver.org"')]),s._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v(".")]),s._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[s._v("-i")]),s._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v(".")]),s._v(" ./Tools/fireflyiii/init.sh\n")])])]),e("ol",{attrs:{start:"4"}},[e("li",[s._v("Access Firefly III at "),e("code",[s._v("firefly.yourserver.org")]),s._v(" and create your admin account.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[136],{873:function(s,e,t){"use strict";t.r(e);var a=t(17),r=Object(a.a)({},(function(){var s=this,e=s._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":s.$parent.slotKey}},[e("h1",{attrs:{id:"firefly-iii-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#firefly-iii-support"}},[s._v("#")]),s._v(" Firefly III support")]),s._v(" "),e("p",[e("a",{attrs:{href:"https://www.firefly-iii.org/",target:"_blank",rel:"noopener noreferrer"}},[s._v("Firefly III"),e("OutboundLink")],1),s._v(" is a self-hosted financial manager.\nIt can help you keep track of expenses, income, budgets and everything in between. It supports credit cards, shared household accounts and savings accounts. Its pretty fancy. You should use it to save and organise money.")]),s._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[s._v("#")]),s._v(" How to use")]),s._v(" "),e("ol",[e("li",[s._v("Connect as root to your server")]),s._v(" "),e("li",[s._v("Configure a domain's DNS to point to your server ip. e.g. "),e("code",[s._v("firefly.yourserver.org")])]),s._v(" "),e("li",[s._v("Add fireflyiii as an option to your docker deployment")])]),s._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[s._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[s._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),s._v(';opt-add-fireflyiii"')]),s._v("\n"),e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s._v("FIREFLY_HOST")]),e("span",{pre:!0,attrs:{class:"token operator"}},[s._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[s._v('"firefly.yourserver.org"')]),s._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v(".")]),s._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[s._v("-i")]),s._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[s._v(".")]),s._v(" ./Tools/fireflyiii/init.sh\n")])])]),e("ol",{attrs:{start:"4"}},[e("li",[s._v("Access Firefly III at "),e("code",[s._v("firefly.yourserver.org")]),s._v(" and create your admin account.")])])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/137.8956159c.js b/assets/js/137.8f464279.js similarity index 99% rename from assets/js/137.8956159c.js rename to assets/js/137.8f464279.js index 455686c289..62bc4736db 100644 --- a/assets/js/137.8956159c.js +++ b/assets/js/137.8f464279.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[137],{874:function(a,e,t){"use strict";t.r(e);var s=t(17),r=Object(s.a)({},(function(){var a=this,e=a._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[e("h1",{attrs:{id:"joinmarket-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#joinmarket-support"}},[a._v("#")]),a._v(" Joinmarket support")]),a._v(" "),e("p",[a._v("JoinMarket is software to create a special kind of bitcoin transaction called a CoinJoin transaction. Its aim is to improve the confidentiality and privacy of bitcoin transactions.")]),a._v(" "),e("p",[a._v("You will be able to use your bitcoin to help other protect their privacy, while earning a yield for this service.")]),a._v(" "),e("p",[a._v("See "),e("a",{attrs:{href:"https://github.com/JoinMarket-Org/JoinMarket-Docs/blob/master/High-level-design.md",target:"_blank",rel:"noopener noreferrer"}},[a._v("the documentation of the joinmarket project"),e("OutboundLink")],1),a._v(" for more details.")]),a._v(" "),e("p",[a._v("This is a very advanced functionality, and there is no easy way to recover if something goes wrong.")]),a._v(" "),e("p",[a._v("For hardcore bitcoiners only.")]),a._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[a._v("#")]),a._v(" How to use")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a._v(';opt-add-joinmarket"')]),a._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),e("p",[a._v("Then you need to setup your default joinmarket wallet:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh wallet-tool-generate\njm.sh set-wallet "),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),a._v("wallet_file_name"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),a._v("password"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v("\n")])])]),e("p",[a._v("Once done, you will need to send some money to the joinmarket wallet:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh wallet-tool\n")])])]),e("h2",{attrs:{id:"how-to-change-joinmarket-configuration"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-change-joinmarket-configuration"}},[a._v("#")]),a._v(" How to change joinmarket configuration?")]),a._v(" "),e("p",[a._v("Connect to your container, and edit your configuration:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$CONFIG")]),a._v("\n")])])]),e("h2",{attrs:{id:"managing-your-wallet"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#managing-your-wallet"}},[a._v("#")]),a._v(" Managing your wallet")]),a._v(" "),e("p",[a._v("By running "),e("code",[a._v("jm.sh")]),a._v(" without parameter, you will get a bunch of command that you can run such as:")]),a._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[a._v("Usage:\n------\n\nTooling to setup your joinmarket yield generator\n\n wallet-tool: Run wallet-tools.py on the wallet\n wallet-tool-generate: Generate a new wallet\n set-wallet: Set the wallet that the yield generator need to use\n bash: Open an interactive bash session in the joinmarket container\n receive-payjoin: Receive a payjoin payment\n sendpayment: Send a payjoin through coinjoin (password needed)\n\nExample:\n * jm.sh wallet-tool-generate\n * jm.sh set-wallet wallet.jmdat mypassword\n * jm.sh wallet-tool\n * jm.sh receive-payjoin \n * jm.sh sendpayment
    \n * jm.sh wallet-tool history\n * jm.sh bash\n")])])]),e("p",[a._v("Note "),e("code",[a._v("jm.sh")]),a._v(" commands are wrapper around joinmarket scripts. Those are just convenience command, you can always directly connect to the container via "),e("code",[a._v("jm.sh bash")]),a._v(" and achieve the same result with the joinmarket python scripts.")]),a._v(" "),e("h2",{attrs:{id:"getting-command-prompt-into-the-container"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getting-command-prompt-into-the-container"}},[a._v("#")]),a._v(" Getting command prompt into the container")]),a._v(" "),e("p",[a._v("You can connect to the container and have direct access to joinmarket scripts such as:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\nsendpayment.py wallet.jmdat "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v(".\n")])])]),e("h2",{attrs:{id:"managing-the-services-such-as-yield-generators"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#managing-the-services-such-as-yield-generators"}},[a._v("#")]),a._v(" Managing the services such as yield generators")]),a._v(" "),e("p",[a._v("First connect to the container's bash")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\n")])])]),e("p",[a._v("You can list available services to run:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl status\n")])])]),e("p",[a._v("Which might show you")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("root"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" supervisorctl status\nob-watcher STOPPED Not started\nyg-privacyenhanced STOPPED Not started\nyield-generator-basic STOPPED Not started\n")])])]),e("p",[a._v("You can start a yield generator with:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl start yg-privacyenhanced\n")])])]),e("p",[a._v("*** Note that services will NOT be restarted automatically if the container restart. ***")]),a._v(" "),e("p",[a._v("If you want to automatically restart the service when the container restart,")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$AUTO_START")]),a._v("\n")])])]),e("p",[a._v("Then remove the comment "),e("code",[a._v("#")]),a._v(" in front of the service name you want to automatically restart.")]),a._v(" "),e("h2",{attrs:{id:"ob-watcher"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ob-watcher"}},[a._v("#")]),a._v(" OB-Watcher")]),a._v(" "),e("p",[a._v("The "),e("code",[a._v("ob-watcher")]),a._v(" service allows you to "),e("a",{attrs:{href:"https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/master/docs/orderbook.md",target:"_blank",rel:"noopener noreferrer"}},[a._v("see an order book"),e("OutboundLink")],1),a._v(".")]),a._v(" "),e("p",[a._v("You can activate it:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl start ob-watcher\n")])])]),e("p",[a._v("Then you can browse it by browsing "),e("code",[a._v("https://.com/obwatch/")])]),a._v(" "),e("h2",{attrs:{id:"troubleshooting"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[a._v("#")]),a._v(" Troubleshooting")]),a._v(" "),e("h3",{attrs:{id:"error-failed-to-load-wallet-you-need-to-remove-the-lock-file"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#error-failed-to-load-wallet-you-need-to-remove-the-lock-file"}},[a._v("#")]),a._v(" Error: Failed to load wallet, you need to remove the lock file")]),a._v(" "),e("p",[a._v("You might sometimes get the following error when running a python script for joinmarket:")]),a._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[a._v("Failed to load wallet, error message: RetryableStorageError('File is currently in use (locked by pid 12822). If this is a leftover from a crashed instance you need to remove the lock file `/root/.joinmarket/wallets/.wallet.jmdat.lock` manually.')\n")])])]),e("p",[a._v("This is because a service using the wallet is running, so you need to shut it down before running the command.")]),a._v(" "),e("p",[a._v("Check which service is running:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl status\n")])])]),e("p",[a._v("And stop it")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl stop yg-privacyenhanced\n")])])]),e("h3",{attrs:{id:"read-the-logs-of-services"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#read-the-logs-of-services"}},[a._v("#")]),a._v(" Read the logs of services")]),a._v(" "),e("p",[a._v("You can use the "),e("code",[a._v("supervisorctl tail")]),a._v(" command:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("tail")]),a._v(" yg-privacyenhanced\n")])])]),e("p",[a._v("You can also check the logs in the "),e("code",[a._v("$DATADIR/logs")]),a._v(" folder.")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[137],{875:function(a,e,t){"use strict";t.r(e);var s=t(17),r=Object(s.a)({},(function(){var a=this,e=a._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[e("h1",{attrs:{id:"joinmarket-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#joinmarket-support"}},[a._v("#")]),a._v(" Joinmarket support")]),a._v(" "),e("p",[a._v("JoinMarket is software to create a special kind of bitcoin transaction called a CoinJoin transaction. Its aim is to improve the confidentiality and privacy of bitcoin transactions.")]),a._v(" "),e("p",[a._v("You will be able to use your bitcoin to help other protect their privacy, while earning a yield for this service.")]),a._v(" "),e("p",[a._v("See "),e("a",{attrs:{href:"https://github.com/JoinMarket-Org/JoinMarket-Docs/blob/master/High-level-design.md",target:"_blank",rel:"noopener noreferrer"}},[a._v("the documentation of the joinmarket project"),e("OutboundLink")],1),a._v(" for more details.")]),a._v(" "),e("p",[a._v("This is a very advanced functionality, and there is no easy way to recover if something goes wrong.")]),a._v(" "),e("p",[a._v("For hardcore bitcoiners only.")]),a._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[a._v("#")]),a._v(" How to use")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a._v(';opt-add-joinmarket"')]),a._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),e("p",[a._v("Then you need to setup your default joinmarket wallet:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh wallet-tool-generate\njm.sh set-wallet "),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),a._v("wallet_file_name"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v("<")]),a._v("password"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v("\n")])])]),e("p",[a._v("Once done, you will need to send some money to the joinmarket wallet:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh wallet-tool\n")])])]),e("h2",{attrs:{id:"how-to-change-joinmarket-configuration"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-change-joinmarket-configuration"}},[a._v("#")]),a._v(" How to change joinmarket configuration?")]),a._v(" "),e("p",[a._v("Connect to your container, and edit your configuration:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\n"),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$CONFIG")]),a._v("\n")])])]),e("h2",{attrs:{id:"managing-your-wallet"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#managing-your-wallet"}},[a._v("#")]),a._v(" Managing your wallet")]),a._v(" "),e("p",[a._v("By running "),e("code",[a._v("jm.sh")]),a._v(" without parameter, you will get a bunch of command that you can run such as:")]),a._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[a._v("Usage:\n------\n\nTooling to setup your joinmarket yield generator\n\n wallet-tool: Run wallet-tools.py on the wallet\n wallet-tool-generate: Generate a new wallet\n set-wallet: Set the wallet that the yield generator need to use\n bash: Open an interactive bash session in the joinmarket container\n receive-payjoin: Receive a payjoin payment\n sendpayment: Send a payjoin through coinjoin (password needed)\n\nExample:\n * jm.sh wallet-tool-generate\n * jm.sh set-wallet wallet.jmdat mypassword\n * jm.sh wallet-tool\n * jm.sh receive-payjoin \n * jm.sh sendpayment
    \n * jm.sh wallet-tool history\n * jm.sh bash\n")])])]),e("p",[a._v("Note "),e("code",[a._v("jm.sh")]),a._v(" commands are wrapper around joinmarket scripts. Those are just convenience command, you can always directly connect to the container via "),e("code",[a._v("jm.sh bash")]),a._v(" and achieve the same result with the joinmarket python scripts.")]),a._v(" "),e("h2",{attrs:{id:"getting-command-prompt-into-the-container"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#getting-command-prompt-into-the-container"}},[a._v("#")]),a._v(" Getting command prompt into the container")]),a._v(" "),e("p",[a._v("You can connect to the container and have direct access to joinmarket scripts such as:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\nsendpayment.py wallet.jmdat "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v(".\n")])])]),e("h2",{attrs:{id:"managing-the-services-such-as-yield-generators"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#managing-the-services-such-as-yield-generators"}},[a._v("#")]),a._v(" Managing the services such as yield generators")]),a._v(" "),e("p",[a._v("First connect to the container's bash")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("jm.sh "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("bash")]),a._v("\n")])])]),e("p",[a._v("You can list available services to run:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl status\n")])])]),e("p",[a._v("Which might show you")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("root"),e("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" supervisorctl status\nob-watcher STOPPED Not started\nyg-privacyenhanced STOPPED Not started\nyield-generator-basic STOPPED Not started\n")])])]),e("p",[a._v("You can start a yield generator with:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl start yg-privacyenhanced\n")])])]),e("p",[a._v("*** Note that services will NOT be restarted automatically if the container restart. ***")]),a._v(" "),e("p",[a._v("If you want to automatically restart the service when the container restart,")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token function"}},[a._v("vim")]),a._v(" "),e("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$AUTO_START")]),a._v("\n")])])]),e("p",[a._v("Then remove the comment "),e("code",[a._v("#")]),a._v(" in front of the service name you want to automatically restart.")]),a._v(" "),e("h2",{attrs:{id:"ob-watcher"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ob-watcher"}},[a._v("#")]),a._v(" OB-Watcher")]),a._v(" "),e("p",[a._v("The "),e("code",[a._v("ob-watcher")]),a._v(" service allows you to "),e("a",{attrs:{href:"https://github.com/JoinMarket-Org/joinmarket-clientserver/blob/master/docs/orderbook.md",target:"_blank",rel:"noopener noreferrer"}},[a._v("see an order book"),e("OutboundLink")],1),a._v(".")]),a._v(" "),e("p",[a._v("You can activate it:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl start ob-watcher\n")])])]),e("p",[a._v("Then you can browse it by browsing "),e("code",[a._v("https://.com/obwatch/")])]),a._v(" "),e("h2",{attrs:{id:"troubleshooting"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[a._v("#")]),a._v(" Troubleshooting")]),a._v(" "),e("h3",{attrs:{id:"error-failed-to-load-wallet-you-need-to-remove-the-lock-file"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#error-failed-to-load-wallet-you-need-to-remove-the-lock-file"}},[a._v("#")]),a._v(" Error: Failed to load wallet, you need to remove the lock file")]),a._v(" "),e("p",[a._v("You might sometimes get the following error when running a python script for joinmarket:")]),a._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[a._v("Failed to load wallet, error message: RetryableStorageError('File is currently in use (locked by pid 12822). If this is a leftover from a crashed instance you need to remove the lock file `/root/.joinmarket/wallets/.wallet.jmdat.lock` manually.')\n")])])]),e("p",[a._v("This is because a service using the wallet is running, so you need to shut it down before running the command.")]),a._v(" "),e("p",[a._v("Check which service is running:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl status\n")])])]),e("p",[a._v("And stop it")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl stop yg-privacyenhanced\n")])])]),e("h3",{attrs:{id:"read-the-logs-of-services"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#read-the-logs-of-services"}},[a._v("#")]),a._v(" Read the logs of services")]),a._v(" "),e("p",[a._v("You can use the "),e("code",[a._v("supervisorctl tail")]),a._v(" command:")]),a._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[a._v("supervisorctl "),e("span",{pre:!0,attrs:{class:"token function"}},[a._v("tail")]),a._v(" yg-privacyenhanced\n")])])]),e("p",[a._v("You can also check the logs in the "),e("code",[a._v("$DATADIR/logs")]),a._v(" folder.")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/138.1ce578d6.js b/assets/js/138.82244a3d.js similarity index 97% rename from assets/js/138.1ce578d6.js rename to assets/js/138.82244a3d.js index 271d9cfacb..ee6690aead 100644 --- a/assets/js/138.1ce578d6.js +++ b/assets/js/138.82244a3d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[138],{873:function(a,t,s){"use strict";s.r(t);var e=s(17),n=Object(e.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"lightning-terminal-lit"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lightning-terminal-lit"}},[a._v("#")]),a._v(" Lightning Terminal (LiT)")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning Terminal"),t("OutboundLink")],1),a._v(" (LiT) is a browser-based interface for managing channel liquidity.\nIt integrates the Lightning Labs services Loop, Poold and Faraday all in one and offers a web UI to manage them.\nLND required.")]),a._v(" "),t("h2",{attrs:{id:"installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[a._v("#")]),a._v(" Installation")]),a._v(" "),t("p",[a._v("To install the Lightning Terminal service, you need to set a password for the login.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Set password")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LIT_PASSWD")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"sUpErSeCuRe"')]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Add fragment and run setup")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a._v(';opt-add-lightning-terminal"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("Afterwards you should see Lightning Terminal appear as a service on the Server Settings > Services page in BTCPay Server.")]),a._v(" "),t("h2",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[a._v("#")]),a._v(" Troubleshooting")]),a._v(" "),t("p",[a._v("To see the logs of the Lightning Terminal service, you can run this command:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v(" logs "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-f")]),a._v(" generated_lnd_lit_1\n")])])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[138],{876:function(a,t,s){"use strict";s.r(t);var e=s(17),n=Object(e.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"lightning-terminal-lit"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lightning-terminal-lit"}},[a._v("#")]),a._v(" Lightning Terminal (LiT)")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://github.com/lightninglabs/lightning-terminal",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning Terminal"),t("OutboundLink")],1),a._v(" (LiT) is a browser-based interface for managing channel liquidity.\nIt integrates the Lightning Labs services Loop, Poold and Faraday all in one and offers a web UI to manage them.\nLND required.")]),a._v(" "),t("h2",{attrs:{id:"installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation"}},[a._v("#")]),a._v(" Installation")]),a._v(" "),t("p",[a._v("To install the Lightning Terminal service, you need to set a password for the login.")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Set password")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("LIT_PASSWD")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"sUpErSeCuRe"')]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Add fragment and run setup")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a._v(';opt-add-lightning-terminal"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("Afterwards you should see Lightning Terminal appear as a service on the Server Settings > Services page in BTCPay Server.")]),a._v(" "),t("h2",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[a._v("#")]),a._v(" Troubleshooting")]),a._v(" "),t("p",[a._v("To see the logs of the Lightning Terminal service, you can run this command:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v(" logs "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-f")]),a._v(" generated_lnd_lit_1\n")])])])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/139.984c6749.js b/assets/js/139.2d08ba15.js similarity index 98% rename from assets/js/139.984c6749.js rename to assets/js/139.2d08ba15.js index 59c2f6addd..9fc842014d 100644 --- a/assets/js/139.984c6749.js +++ b/assets/js/139.2d08ba15.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[139],{875:function(t,e,a){"use strict";a.r(e);var o=a(17),s=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"ndlc-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ndlc-support"}},[t._v("#")]),t._v(" NDLC support")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Disclaimer")]),t._v(" "),e("p",[t._v("This project is experimental and based on a protocol which is still evolving everyday.\nUse with caution.")]),t._v(" "),e("p",[t._v("I will take no attempt at maintaining backwards compatibility at this stage.")])]),t._v(" "),e("h2",{attrs:{id:"introduction"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[t._v("#")]),t._v(" Introduction")]),t._v(" "),e("p",[t._v("A DLC can be seen as a smart contract involving two "),e("code",[t._v("parties")]),t._v(", a future "),e("code",[t._v("event")]),t._v(", a set of outcomes and a "),e("code",[t._v("payoff function")]),t._v(".\nAn "),e("code",[t._v("outcome")]),t._v(" can be "),e("code",[t._v("attested")]),t._v(" by an "),e("code",[t._v("oracle")]),t._v(". The "),e("code",[t._v("oracle")]),t._v(" does not need to interact with either party, and its only role is to "),e("code",[t._v("attest")]),t._v(" the outcome of the event.")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("payoff function")]),t._v(" determines the two parties' profit or loss depending on which outcome get "),e("code",[t._v("attested")]),t._v(".")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("oracle")]),t._v(" roles is to define the "),e("code",[t._v("event")]),t._v(" and "),e("code",[t._v("attest")]),t._v(" a single outcome of the event.")]),t._v(" "),e("p",[t._v("Let's call Alice and Bob the two parties of the contract, and Olivia the oracle.")]),t._v(" "),e("p",[t._v("A DLC will show two transactions on the chain:")]),t._v(" "),e("ul",[e("li",[t._v("The Funding Transaction")]),t._v(" "),e("li",[t._v("The Contract Execution Transaction (CET)")])]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("Funding Transaction")]),t._v(" is a transaction built by the two parties of the contract, locking their collateral for the contract.")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("Contract Execution Transaction")]),t._v(" (or "),e("code",[t._v("CET")]),t._v(") is the transaction distributing the locked collateral according to the "),e("code",[t._v("payoff function")]),t._v(" for the outcome attested by the oracle.")]),t._v(" "),e("p",[t._v("The following documentation is also explained in this video.")]),t._v(" "),e("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/DakwshnNkho/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=DakwshnNkho",title:"How to make a DLC with NDLC-CLI","data-id":"DakwshnNkho"}},[e("iframe",{attrs:{title:"How to make a DLC with NDLC-CLI","data-src":"https://www.youtube-nocookie.com/embed/DakwshnNkho?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),t._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),e("p",[t._v("You need to add ndlc's docker fragment to your install with:")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-ndlc"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),e("p",[t._v("You can then use "),e("code",[t._v("ndlc-cli.sh")]),t._v(" to run use ndlc-cli, for example:")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[t._v("ndlc.sh oracle generate MyOwnOracle\n")])])]),e("p",[t._v("Read our documentation on our "),e("a",{attrs:{href:"https://github.com/dgarage/NDLC/blob/master/docs/Concepts.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub repository"),e("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[139],{877:function(t,e,a){"use strict";a.r(e);var o=a(17),s=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"ndlc-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#ndlc-support"}},[t._v("#")]),t._v(" NDLC support")]),t._v(" "),e("div",{staticClass:"custom-block danger"},[e("p",{staticClass:"custom-block-title"},[t._v("Disclaimer")]),t._v(" "),e("p",[t._v("This project is experimental and based on a protocol which is still evolving everyday.\nUse with caution.")]),t._v(" "),e("p",[t._v("I will take no attempt at maintaining backwards compatibility at this stage.")])]),t._v(" "),e("h2",{attrs:{id:"introduction"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#introduction"}},[t._v("#")]),t._v(" Introduction")]),t._v(" "),e("p",[t._v("A DLC can be seen as a smart contract involving two "),e("code",[t._v("parties")]),t._v(", a future "),e("code",[t._v("event")]),t._v(", a set of outcomes and a "),e("code",[t._v("payoff function")]),t._v(".\nAn "),e("code",[t._v("outcome")]),t._v(" can be "),e("code",[t._v("attested")]),t._v(" by an "),e("code",[t._v("oracle")]),t._v(". The "),e("code",[t._v("oracle")]),t._v(" does not need to interact with either party, and its only role is to "),e("code",[t._v("attest")]),t._v(" the outcome of the event.")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("payoff function")]),t._v(" determines the two parties' profit or loss depending on which outcome get "),e("code",[t._v("attested")]),t._v(".")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("oracle")]),t._v(" roles is to define the "),e("code",[t._v("event")]),t._v(" and "),e("code",[t._v("attest")]),t._v(" a single outcome of the event.")]),t._v(" "),e("p",[t._v("Let's call Alice and Bob the two parties of the contract, and Olivia the oracle.")]),t._v(" "),e("p",[t._v("A DLC will show two transactions on the chain:")]),t._v(" "),e("ul",[e("li",[t._v("The Funding Transaction")]),t._v(" "),e("li",[t._v("The Contract Execution Transaction (CET)")])]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("Funding Transaction")]),t._v(" is a transaction built by the two parties of the contract, locking their collateral for the contract.")]),t._v(" "),e("p",[t._v("The "),e("code",[t._v("Contract Execution Transaction")]),t._v(" (or "),e("code",[t._v("CET")]),t._v(") is the transaction distributing the locked collateral according to the "),e("code",[t._v("payoff function")]),t._v(" for the outcome attested by the oracle.")]),t._v(" "),e("p",[t._v("The following documentation is also explained in this video.")]),t._v(" "),e("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/DakwshnNkho/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=DakwshnNkho",title:"How to make a DLC with NDLC-CLI","data-id":"DakwshnNkho"}},[e("iframe",{attrs:{title:"How to make a DLC with NDLC-CLI","data-src":"https://www.youtube-nocookie.com/embed/DakwshnNkho?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),t._v(" "),e("h2",{attrs:{id:"how-to-use"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),e("p",[t._v("You need to add ndlc's docker fragment to your install with:")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[e("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),e("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-ndlc"')]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),e("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),e("p",[t._v("You can then use "),e("code",[t._v("ndlc-cli.sh")]),t._v(" to run use ndlc-cli, for example:")]),t._v(" "),e("div",{staticClass:"language-bash extra-class"},[e("pre",{pre:!0,attrs:{class:"language-bash"}},[e("code",[t._v("ndlc.sh oracle generate MyOwnOracle\n")])])]),e("p",[t._v("Read our documentation on our "),e("a",{attrs:{href:"https://github.com/dgarage/NDLC/blob/master/docs/Concepts.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("GitHub repository"),e("OutboundLink")],1),t._v(".")])])}),[],!1,null,null,null);e.default=s.exports}}]); \ No newline at end of file diff --git a/assets/js/140.1044f935.js b/assets/js/140.a7e34fe5.js similarity index 98% rename from assets/js/140.1044f935.js rename to assets/js/140.a7e34fe5.js index 7fc82493e9..edf1b93805 100644 --- a/assets/js/140.1044f935.js +++ b/assets/js/140.a7e34fe5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[140],{876:function(e,a,t){"use strict";t.r(a);var s=t(17),r=Object(s.a)({},(function(){var e=this,a=e._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"pi-hole-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#pi-hole-support"}},[e._v("#")]),e._v(" Pi-Hole support")]),e._v(" "),a("p",[a("a",{attrs:{href:"https://pi-hole.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Pi-Hole"),a("OutboundLink")],1),e._v(" is a black hole for internet advertisement.\nIt works as a DNS server which blacklist domains tied to advertisement. If you use it as your main DNS server and it detects your query is trying to resolve a domain belonging to an advertisement company, it will resolve the domain to IP "),a("code",[e._v("0.0.0.0")]),e._v(", preventing the advertisement to load on any computer using this DNS server.")]),e._v(" "),a("p",[e._v("Note that our pi-hole integration is meant to be used in a "),a("strong",[e._v("local network")]),e._v(". Please do not try to use this option on a VPS.")]),e._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[e._v("#")]),e._v(" How to use")]),e._v(" "),a("p",[e._v("Let's imagine the local IP of your BTCPay Server is "),a("code",[e._v("192.168.1.2")]),e._v(".")]),e._v(" "),a("ol",[a("li",[e._v("Connect as root to your server")]),e._v(" "),a("li",[e._v("Add pihole as an option to your docker deployment")])]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-add-pihole"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[e._v("If your server has a firewall, make sure it allow incoming traffic to port "),a("code",[e._v("53 (UDP)")]),e._v(".")]),e._v(" "),a("li",[e._v("Configure your home router DHCP server to use "),a("code",[e._v("192.168.1.2")]),e._v(" as primary DNS server.")])]),e._v(" "),a("p",[e._v("From now everytime a device will connect to your local network, they will automatically use pi-hole as a DNS server. Advertisements will go to a black hole for all devices.")]),e._v(" "),a("h2",{attrs:{id:"using-the-dashboard"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-the-dashboard"}},[e._v("#")]),e._v(" Using the dashboard")]),e._v(" "),a("p",[e._v("Pi-Hole comes with a very nice admin dashboard to monitor its activity.\nIt is disabled by default. To enable it, you need to configure "),a("code",[e._v("PIHOLE_SERVERIP")]),e._v(" to the IP of your server:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("PIHOLE_SERVERIP")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"192.168.1.2"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("p",[e._v("If your device is using pi-hole as a DNS server, you should now be able to browse "),a("code",[e._v("http://pi.hole/admin")]),e._v(" to connect to your dashboard.")]),e._v(" "),a("p",[e._v("You can find the admin password in the logs of pihole:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs pihole "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" random\n")])])]),a("p",[e._v("If the password does not work, you can try to reset the password:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("pihole.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-p")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" restart pihole\n")])])]),a("p",[e._v("Then running again")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs pihole "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" random\n")])])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[140],{878:function(e,a,t){"use strict";t.r(a);var s=t(17),r=Object(s.a)({},(function(){var e=this,a=e._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"pi-hole-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#pi-hole-support"}},[e._v("#")]),e._v(" Pi-Hole support")]),e._v(" "),a("p",[a("a",{attrs:{href:"https://pi-hole.net/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Pi-Hole"),a("OutboundLink")],1),e._v(" is a black hole for internet advertisement.\nIt works as a DNS server which blacklist domains tied to advertisement. If you use it as your main DNS server and it detects your query is trying to resolve a domain belonging to an advertisement company, it will resolve the domain to IP "),a("code",[e._v("0.0.0.0")]),e._v(", preventing the advertisement to load on any computer using this DNS server.")]),e._v(" "),a("p",[e._v("Note that our pi-hole integration is meant to be used in a "),a("strong",[e._v("local network")]),e._v(". Please do not try to use this option on a VPS.")]),e._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[e._v("#")]),e._v(" How to use")]),e._v(" "),a("p",[e._v("Let's imagine the local IP of your BTCPay Server is "),a("code",[e._v("192.168.1.2")]),e._v(".")]),e._v(" "),a("ol",[a("li",[e._v("Connect as root to your server")]),e._v(" "),a("li",[e._v("Add pihole as an option to your docker deployment")])]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),e._v(';opt-add-pihole"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[e._v("If your server has a firewall, make sure it allow incoming traffic to port "),a("code",[e._v("53 (UDP)")]),e._v(".")]),e._v(" "),a("li",[e._v("Configure your home router DHCP server to use "),a("code",[e._v("192.168.1.2")]),e._v(" as primary DNS server.")])]),e._v(" "),a("p",[e._v("From now everytime a device will connect to your local network, they will automatically use pi-hole as a DNS server. Advertisements will go to a black hole for all devices.")]),e._v(" "),a("h2",{attrs:{id:"using-the-dashboard"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#using-the-dashboard"}},[e._v("#")]),e._v(" Using the dashboard")]),e._v(" "),a("p",[e._v("Pi-Hole comes with a very nice admin dashboard to monitor its activity.\nIt is disabled by default. To enable it, you need to configure "),a("code",[e._v("PIHOLE_SERVERIP")]),e._v(" to the IP of your server:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("PIHOLE_SERVERIP")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"192.168.1.2"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("p",[e._v("If your device is using pi-hole as a DNS server, you should now be able to browse "),a("code",[e._v("http://pi.hole/admin")]),e._v(" to connect to your dashboard.")]),e._v(" "),a("p",[e._v("You can find the admin password in the logs of pihole:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs pihole "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" random\n")])])]),a("p",[e._v("If the password does not work, you can try to reset the password:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("pihole.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-a")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-p")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" restart pihole\n")])])]),a("p",[e._v("Then running again")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs pihole "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("|")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("grep")]),e._v(" random\n")])])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/142.3ace671d.js b/assets/js/142.58ca1a53.js similarity index 99% rename from assets/js/142.3ace671d.js rename to assets/js/142.58ca1a53.js index 365f89a284..555c7a797f 100644 --- a/assets/js/142.3ace671d.js +++ b/assets/js/142.58ca1a53.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{886:function(e,t,r){"use strict";r.r(t);var a=r(17),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"accept-bitcoin-on-your-drupal-commerce-store-using-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#accept-bitcoin-on-your-drupal-commerce-store-using-btcpay-server"}},[e._v("#")]),e._v(" Accept Bitcoin on your Drupal Commerce Store using BTCPay Server")]),e._v(" "),t("p",[e._v("Introducing BTCPay Server payment module for "),t("a",{attrs:{href:"https://www.drupal.org/project/commerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("Drupal Commerce 2.x"),t("OutboundLink")],1),e._v(". Drupal Commerce Store owners can now accept payments using Bitcoin and other cryptocurrencies directly through BTCPay Server without any third-party intermediary.")]),e._v(" "),t("p",[e._v("BTCPay Server supports a wide range of cryptocurrencies, with the potential for future extensions. Here are the currencies you can use now on BTCPay Server:")]),e._v(" "),t("ul",[t("li",[e._v("BTC (Bitcoin)")]),e._v(" "),t("li",[e._v("Bitcoin layer-two network (the Lightning Network) for fast and zero/low-fee transactions")]),e._v(" "),t("li",[e._v("Altcoins with full node integration including coins like Monero (XMR) and Litecoin (LTC).")]),e._v(" "),t("li",[e._v("Other Major Altcoins: Supported through plugins via platforms such as "),t("RouterLink",{attrs:{to:"/Trocador/"}},[e._v("Trocador")]),e._v(", "),t("RouterLink",{attrs:{to:"/SideShift/"}},[e._v("SideShift")]),e._v(", and FixedFloat.")],1)]),e._v(" "),t("p",[e._v("Want to accept Bitcoin on your Drupal Commerce store? Visit the "),t("a",{attrs:{href:"https://drupal.org/project/commerce_btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("project page on Drupal.org"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"demo-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#demo-store"}},[e._v("#")]),e._v(" Demo store")]),e._v(" "),t("p",[e._v("A Drupal Commerce demo store connected with a (testnet) BTCPay Server where you can try the checkout (Bitcoin + Lightning Network) can be found here:"),t("br"),e._v(" "),t("a",{attrs:{href:"http://drupal.demo.btcpay.tech/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://drupal.demo.btcpay.tech"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Server ("),t("a",{attrs:{href:"/deployment/deployment"}},[e._v("self hosted or 3rd party")]),e._v(" or "),t("a",{attrs:{href:"/btcpay-basics/tryitout"}},[e._v("quick start with a testserver")]),e._v(")")]),e._v(" "),t("li",[e._v("Drupal Commerce 2.x installed ("),t("a",{attrs:{href:"https://docs.drupalcommerce.org/commerce2/developer-guide/install-update/installation",target:"_blank",rel:"noopener noreferrer"}},[e._v("installation guide"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Drupal: "),t("a",{attrs:{href:"https://www.drupal.org/docs/8/core/modules/file/overview#content-accessing-private-files",target:"_blank",rel:"noopener noreferrer"}},[e._v("configured and writable private file system"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"installation-and-configuration-guide-for-the-btcpay-server-drupal-commerce-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation-and-configuration-guide-for-the-btcpay-server-drupal-commerce-integration"}},[e._v("#")]),e._v(" Installation and configuration Guide for the BTCPay Server - Drupal Commerce Integration")]),e._v(" "),t("p",[e._v("Ready to accept Bitcoin on your Drupal Commerce Store? Follow this quick and easy guide to install and configure the BTCPay Drupal Commerce module. For a quick run through, check out our installation and configuration screencast:")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/XBZwyC2v48s/hqdefault.jpg)"},attrs:{href:"https://youtube.com/watch?v=XBZwyC2v48s",title:"BTCPay Server - Drupal Commerce 2.x quick walkthrough","data-id":"XBZwyC2v48s"}},[t("iframe",{attrs:{title:"BTCPay Server - Drupal Commerce 2.x quick walkthrough","data-src":"https://www.youtube-nocookie.com/embed/XBZwyC2v48s?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h3",{attrs:{id:"easy-setup-steps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#easy-setup-steps"}},[e._v("#")]),e._v(" Easy setup steps")]),e._v(" "),t("h4",{attrs:{id:"generate-pairing-code-on-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generate-pairing-code-on-btcpay-server"}},[e._v("#")]),e._v(" Generate pairing code on BTCPay server")]),e._v(" "),t("ol",[t("li",[t("strong",[e._v("Setup your store:")]),e._v(" You'd need a BTCPay server instance to get started. Don't have one? click "),t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("here")]),e._v(" for a step by step guide.")],1),e._v(" "),t("li",[t("strong",[e._v("Access Tokens:")]),e._v(' Once you have your BTCPay Server instance setup and store created, navigate to the store settings and select "'),t("strong",[e._v("Access Tokens")]),e._v('"')]),e._v(" "),t("li",[e._v("Create a new token by clicking on "),t("strong",[e._v("[Create a new token]")])]),e._v(" "),t("li",[t("strong",[e._v("Label:")]),e._v(" enter some label (eg. my store)")]),e._v(" "),t("li",[t("strong",[e._v("Public key:")]),e._v(" this needs to be left "),t("strong",[e._v("empty")])]),e._v(" "),t("li",[t("strong",[e._v("Facade:")]),e._v(' Type in "merchant"')]),e._v(" "),t("li",[e._v("Click on "),t("strong",[e._v("[Request pairing]")])]),e._v(" "),t("li",[e._v("On the next screen choose your configured store in ** Pair to** select dropdown and click on "),t("strong",[e._v("[approve]")])]),e._v(" "),t("li",[e._v('Note down the displayed 7-digit code at the top status message, e.g. "d7afaXr"'),t("br"),e._v("\n(you will need that code below on gateway configuration, see below)")])]),e._v(" "),t("h4",{attrs:{id:"commerce-btcpay-installation-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#commerce-btcpay-installation-configuration"}},[e._v("#")]),e._v(" Commerce BTCPay: Installation + configuration")]),e._v(" "),t("ol",[t("li",[e._v("Install module: "),t("code",[e._v("composer require drupal/commerce_btcpay")])]),e._v(" "),t("li",[e._v("Enable the module: "),t("code",[e._v("drush en commerce_btcpay -y")])]),e._v(" "),t("li",[e._v("Make sure you have configured "),t("a",{attrs:{href:"https://www.drupal.org/docs/8/core/modules/file/overview#content-accessing-private-files",target:"_blank",rel:"noopener noreferrer"}},[e._v("private file system"),t("OutboundLink")],1),e._v(" (needed to store encrypted public+private key)")]),e._v(" "),t("li",[e._v("Commerce BTCPay configuration ("),t("strong",[e._v("Commerce -> Configuration -> Payment -> Payment gateways")]),e._v("):")]),e._v(" "),t("li",[e._v('Add payment method "BTCPay"\n'),t("ul",[t("li",[t("strong",[e._v("Mode")]),e._v(": Test or Live (you can configure both individually)")]),e._v(" "),t("li",[t("strong",[e._v("Test/Live server host")]),e._v(": enter your URL without https:// prefix e.g. btcpay.yourserver.com (Note - valid SSL certificate needed)")]),e._v(" "),t("li",[t("strong",[e._v("Test/Live Paring code")]),e._v(': enter the 7-digit pairing code from BTCPay "Access tokens" page')]),e._v(" "),t("li",[e._v("Click "),t("strong",[e._v("Save")]),e._v(" to finalize the setup."),t("br"),e._v("\nYou should see a message that the tokens were successfully created.")])])])]),e._v(" "),t("h2",{attrs:{id:"status"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#status"}},[e._v("#")]),e._v(" Status")]),e._v(" "),t("p",[t("strong",[e._v("This module is currently in alpha stage but has proven stable without issues.")]),t("br"),e._v("\nFuture updates and releases will be available on the "),t("a",{attrs:{href:"https://drupal.org/project/commerce_btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("project page on drupal.org"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"about-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#about-btcpay-server"}},[e._v("#")]),e._v(" About BTCPay Server")]),e._v(" "),t("blockquote",[t("p",[t("a",{attrs:{href:"https://btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server"),t("OutboundLink")],1),e._v(" is a self-hosted, open-source cryptocurrency payment processor know for its security, privacy, and censorship resistance.")])]),e._v(" "),t("p",[e._v("It's free to use and allows you to become your own payment processor.\n"),t("strong",[e._v("To get a full overview check out our "),t("a",{attrs:{href:""}},[e._v("documentationhttps://github.com/btcpayserver/commerce_btcpay/blob/master/")]),e._v(".")])]),e._v(" "),t("h2",{attrs:{id:"compatible-with-bitpay-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#compatible-with-bitpay-api"}},[e._v("#")]),e._v(" Compatible with BitPay API")]),e._v(" "),t("p",[e._v("BTCPay was created to be an alternative to 3rd party payment provider "),t("a",{attrs:{href:"https://bitpay.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("BitPay"),t("OutboundLink")],1),e._v(". Therefore, BTCPay is invoice API compatible and you can use this payment plugin also with the official BitPay API and sites. The power of BTCPay is that you can become your own payment provider.")]),e._v(" "),t("p",[e._v("Teaser: future versions of this plugin will be based on the BTCPay Server Greenfield API which is much more powerful and allows more features.")]),e._v(" "),t("h2",{attrs:{id:"get-support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#get-support"}},[e._v("#")]),e._v(" Get Support")]),e._v(" "),t("p",[e._v("You can open an issue on our "),t("a",{attrs:{href:"https://github.com/btcpayserver/commerce_btcpay/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github repository"),t("OutboundLink")],1),e._v(" or reach us on "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"http://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost chat"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{889:function(e,t,r){"use strict";r.r(t);var a=r(17),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"accept-bitcoin-on-your-drupal-commerce-store-using-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#accept-bitcoin-on-your-drupal-commerce-store-using-btcpay-server"}},[e._v("#")]),e._v(" Accept Bitcoin on your Drupal Commerce Store using BTCPay Server")]),e._v(" "),t("p",[e._v("Introducing BTCPay Server payment module for "),t("a",{attrs:{href:"https://www.drupal.org/project/commerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("Drupal Commerce 2.x"),t("OutboundLink")],1),e._v(". Drupal Commerce Store owners can now accept payments using Bitcoin and other cryptocurrencies directly through BTCPay Server without any third-party intermediary.")]),e._v(" "),t("p",[e._v("BTCPay Server supports a wide range of cryptocurrencies, with the potential for future extensions. Here are the currencies you can use now on BTCPay Server:")]),e._v(" "),t("ul",[t("li",[e._v("BTC (Bitcoin)")]),e._v(" "),t("li",[e._v("Bitcoin layer-two network (the Lightning Network) for fast and zero/low-fee transactions")]),e._v(" "),t("li",[e._v("Altcoins with full node integration including coins like Monero (XMR) and Litecoin (LTC).")]),e._v(" "),t("li",[e._v("Other Major Altcoins: Supported through plugins via platforms such as "),t("RouterLink",{attrs:{to:"/Trocador/"}},[e._v("Trocador")]),e._v(", "),t("RouterLink",{attrs:{to:"/SideShift/"}},[e._v("SideShift")]),e._v(", and FixedFloat.")],1)]),e._v(" "),t("p",[e._v("Want to accept Bitcoin on your Drupal Commerce store? Visit the "),t("a",{attrs:{href:"https://drupal.org/project/commerce_btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("project page on Drupal.org"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"demo-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#demo-store"}},[e._v("#")]),e._v(" Demo store")]),e._v(" "),t("p",[e._v("A Drupal Commerce demo store connected with a (testnet) BTCPay Server where you can try the checkout (Bitcoin + Lightning Network) can be found here:"),t("br"),e._v(" "),t("a",{attrs:{href:"http://drupal.demo.btcpay.tech/",target:"_blank",rel:"noopener noreferrer"}},[e._v("http://drupal.demo.btcpay.tech"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Server ("),t("a",{attrs:{href:"/deployment/deployment"}},[e._v("self hosted or 3rd party")]),e._v(" or "),t("a",{attrs:{href:"/btcpay-basics/tryitout"}},[e._v("quick start with a testserver")]),e._v(")")]),e._v(" "),t("li",[e._v("Drupal Commerce 2.x installed ("),t("a",{attrs:{href:"https://docs.drupalcommerce.org/commerce2/developer-guide/install-update/installation",target:"_blank",rel:"noopener noreferrer"}},[e._v("installation guide"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("Drupal: "),t("a",{attrs:{href:"https://www.drupal.org/docs/8/core/modules/file/overview#content-accessing-private-files",target:"_blank",rel:"noopener noreferrer"}},[e._v("configured and writable private file system"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"installation-and-configuration-guide-for-the-btcpay-server-drupal-commerce-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#installation-and-configuration-guide-for-the-btcpay-server-drupal-commerce-integration"}},[e._v("#")]),e._v(" Installation and configuration Guide for the BTCPay Server - Drupal Commerce Integration")]),e._v(" "),t("p",[e._v("Ready to accept Bitcoin on your Drupal Commerce Store? Follow this quick and easy guide to install and configure the BTCPay Drupal Commerce module. For a quick run through, check out our installation and configuration screencast:")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/XBZwyC2v48s/hqdefault.jpg)"},attrs:{href:"https://youtube.com/watch?v=XBZwyC2v48s",title:"BTCPay Server - Drupal Commerce 2.x quick walkthrough","data-id":"XBZwyC2v48s"}},[t("iframe",{attrs:{title:"BTCPay Server - Drupal Commerce 2.x quick walkthrough","data-src":"https://www.youtube-nocookie.com/embed/XBZwyC2v48s?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h3",{attrs:{id:"easy-setup-steps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#easy-setup-steps"}},[e._v("#")]),e._v(" Easy setup steps")]),e._v(" "),t("h4",{attrs:{id:"generate-pairing-code-on-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generate-pairing-code-on-btcpay-server"}},[e._v("#")]),e._v(" Generate pairing code on BTCPay server")]),e._v(" "),t("ol",[t("li",[t("strong",[e._v("Setup your store:")]),e._v(" You'd need a BTCPay server instance to get started. Don't have one? click "),t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("here")]),e._v(" for a step by step guide.")],1),e._v(" "),t("li",[t("strong",[e._v("Access Tokens:")]),e._v(' Once you have your BTCPay Server instance setup and store created, navigate to the store settings and select "'),t("strong",[e._v("Access Tokens")]),e._v('"')]),e._v(" "),t("li",[e._v("Create a new token by clicking on "),t("strong",[e._v("[Create a new token]")])]),e._v(" "),t("li",[t("strong",[e._v("Label:")]),e._v(" enter some label (eg. my store)")]),e._v(" "),t("li",[t("strong",[e._v("Public key:")]),e._v(" this needs to be left "),t("strong",[e._v("empty")])]),e._v(" "),t("li",[t("strong",[e._v("Facade:")]),e._v(' Type in "merchant"')]),e._v(" "),t("li",[e._v("Click on "),t("strong",[e._v("[Request pairing]")])]),e._v(" "),t("li",[e._v("On the next screen choose your configured store in ** Pair to** select dropdown and click on "),t("strong",[e._v("[approve]")])]),e._v(" "),t("li",[e._v('Note down the displayed 7-digit code at the top status message, e.g. "d7afaXr"'),t("br"),e._v("\n(you will need that code below on gateway configuration, see below)")])]),e._v(" "),t("h4",{attrs:{id:"commerce-btcpay-installation-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#commerce-btcpay-installation-configuration"}},[e._v("#")]),e._v(" Commerce BTCPay: Installation + configuration")]),e._v(" "),t("ol",[t("li",[e._v("Install module: "),t("code",[e._v("composer require drupal/commerce_btcpay")])]),e._v(" "),t("li",[e._v("Enable the module: "),t("code",[e._v("drush en commerce_btcpay -y")])]),e._v(" "),t("li",[e._v("Make sure you have configured "),t("a",{attrs:{href:"https://www.drupal.org/docs/8/core/modules/file/overview#content-accessing-private-files",target:"_blank",rel:"noopener noreferrer"}},[e._v("private file system"),t("OutboundLink")],1),e._v(" (needed to store encrypted public+private key)")]),e._v(" "),t("li",[e._v("Commerce BTCPay configuration ("),t("strong",[e._v("Commerce -> Configuration -> Payment -> Payment gateways")]),e._v("):")]),e._v(" "),t("li",[e._v('Add payment method "BTCPay"\n'),t("ul",[t("li",[t("strong",[e._v("Mode")]),e._v(": Test or Live (you can configure both individually)")]),e._v(" "),t("li",[t("strong",[e._v("Test/Live server host")]),e._v(": enter your URL without https:// prefix e.g. btcpay.yourserver.com (Note - valid SSL certificate needed)")]),e._v(" "),t("li",[t("strong",[e._v("Test/Live Paring code")]),e._v(': enter the 7-digit pairing code from BTCPay "Access tokens" page')]),e._v(" "),t("li",[e._v("Click "),t("strong",[e._v("Save")]),e._v(" to finalize the setup."),t("br"),e._v("\nYou should see a message that the tokens were successfully created.")])])])]),e._v(" "),t("h2",{attrs:{id:"status"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#status"}},[e._v("#")]),e._v(" Status")]),e._v(" "),t("p",[t("strong",[e._v("This module is currently in alpha stage but has proven stable without issues.")]),t("br"),e._v("\nFuture updates and releases will be available on the "),t("a",{attrs:{href:"https://drupal.org/project/commerce_btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("project page on drupal.org"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"about-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#about-btcpay-server"}},[e._v("#")]),e._v(" About BTCPay Server")]),e._v(" "),t("blockquote",[t("p",[t("a",{attrs:{href:"https://btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server"),t("OutboundLink")],1),e._v(" is a self-hosted, open-source cryptocurrency payment processor know for its security, privacy, and censorship resistance.")])]),e._v(" "),t("p",[e._v("It's free to use and allows you to become your own payment processor.\n"),t("strong",[e._v("To get a full overview check out our "),t("a",{attrs:{href:""}},[e._v("documentationhttps://github.com/btcpayserver/commerce_btcpay/blob/master/")]),e._v(".")])]),e._v(" "),t("h2",{attrs:{id:"compatible-with-bitpay-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#compatible-with-bitpay-api"}},[e._v("#")]),e._v(" Compatible with BitPay API")]),e._v(" "),t("p",[e._v("BTCPay was created to be an alternative to 3rd party payment provider "),t("a",{attrs:{href:"https://bitpay.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("BitPay"),t("OutboundLink")],1),e._v(". Therefore, BTCPay is invoice API compatible and you can use this payment plugin also with the official BitPay API and sites. The power of BTCPay is that you can become your own payment provider.")]),e._v(" "),t("p",[e._v("Teaser: future versions of this plugin will be based on the BTCPay Server Greenfield API which is much more powerful and allows more features.")]),e._v(" "),t("h2",{attrs:{id:"get-support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#get-support"}},[e._v("#")]),e._v(" Get Support")]),e._v(" "),t("p",[e._v("You can open an issue on our "),t("a",{attrs:{href:"https://github.com/btcpayserver/commerce_btcpay/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github repository"),t("OutboundLink")],1),e._v(" or reach us on "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"http://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost chat"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/145.1f5588e5.js b/assets/js/145.821d7c2c.js similarity index 99% rename from assets/js/145.1f5588e5.js rename to assets/js/145.821d7c2c.js index 98b57b7c1e..b9101cf991 100644 --- a/assets/js/145.1f5588e5.js +++ b/assets/js/145.821d7c2c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[145],{885:function(e,t,r){"use strict";r.r(t);var a=r(17),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrumx"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrumx"}},[e._v("#")]),e._v(" ElectrumX")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("connect Electrum Wallet to an ElectrumX Server")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Note:")]),e._v(" the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker version of BTCPay Server"),t("OutboundLink")],1),e._v(" (since Nov 7th 2019, version 1.0.3.137) supports full integration with "),t("a",{attrs:{href:"https://electrumx.readthedocs.io/en/latest/features.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX"),t("OutboundLink")],1),e._v(" is the most widely implemented software used for Electrum public servers that your local Electrum wallet relies upon to get all the details of, or broadcast transactions to the bitcoin blockchain. Skip to Section 2 below, to read more on what this all means, and how to set it up on your BTCPay stack.")]),e._v(" "),t("h2",{attrs:{id:"how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[e._v("#")]),e._v(" How to integrate ElectrumX into your BTCPay Server and connect your Electrum Wallet to it for your complete privacy")]),e._v(" "),t("h3",{attrs:{id:"only-available-in-btcpay-docker-version"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#only-available-in-btcpay-docker-version"}},[e._v("#")]),e._v(" (only available in BTCPay docker version)")]),e._v(" "),t("p",[e._v("Before we proceed, it is important to understand how your Electrum wallet on your PC/Mac functions so well/fast, without having its own bitcoin full node. In actual fact, Electrum Wallet relies on a community effort to maintain a bunch of servers all around the world with a bitcoin full node that do this job for you! They are called Electrum Servers, and you can be a part of that community to make that network even stronger, lets see how.")]),e._v(" "),t("p",[e._v("When you click the little traffic light at the bottom of your Electrum Wallet here:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v('You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "Select Server Automatically" already checked:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v('While using Electrum Wallet with "Select Server Automatically" on is the easiest, every transaction that you make/browse/broadcast in your Electrum Wallet will be done via someone else\'s server - this is a privacy risk, that will be mitigated by setting up and using your own ElectrumX Server.')]),e._v(" "),t("h2",{attrs:{id:"section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[e._v("#")]),e._v(" Section 2.1 Enable Your Own ElectrumX Server (fully integrated with your BTCPay Server's full bitcoin node)")]),e._v(" "),t("h3",{attrs:{id:"prerequisites-mandatory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites-mandatory"}},[e._v("#")]),e._v(" Prerequisites (mandatory):")]),e._v(" "),t("ol",[t("li",[e._v("Docker only: Only the "),t("RouterLink",{attrs:{to:"/Docker/"}},[e._v("Docker version of BTCPay Server")]),e._v(" is supported.")],1),e._v(" "),t("li",[e._v("Unpruned BTCPay node: Make sure your BTCPay implementation is NOT "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/#can-i-skip-the-synchronization"}},[e._v("pruned")]),e._v(" (i.e. you have synched and stored from genesis block. Check that you do NOT use the opt-save-storage "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("Environment Variable")]),e._v(")")],1),e._v(" "),t("li",[e._v("Drive space: At least 400GB of drive space on the device where your docker volumes are stored is required (as at the writing of this documentation on 9th Nov 2019, the total hard drive space used is 333GB - with full node and ElectrumX enabled - and of course this will grow further over time).")]),e._v(" "),t("li",[e._v("Additional Fragments: You are familiar with how to use BTCPay's "),t("RouterLink",{attrs:{to:"/Docker/#environment-variables"}},[e._v("Additional Fragment")]),e._v(" feature as part of your environment variable setup.")],1),e._v(" "),t("li",[e._v("Server architecture: The (official) "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX docker"),t("OutboundLink")],1),e._v(" used here is only tested on a BTCPay Server running on x86_64 architecture. So far it is tested extensively on Ubuntu 18.04 and Debian Buster. Unless it is overhauled and tested well on Raspberry Pi (and other architectures) it likely will not work.")]),e._v(" "),t("li",[e._v("Basic Linux command line knowledge: is assumed.")])]),e._v(" "),t("h3",{attrs:{id:"how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[e._v("#")]),e._v(" How will enabling ElectrumX Server affect an existing BTCPay implementation?:")]),e._v(" "),t("p",[e._v("Fundamentally, setting up ElectrumX in BTCPay server is simple, and will not affect the rest of your implementation. The only pre-requisites are as above. The "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX official docker release"),t("OutboundLink")],1),e._v(" is enabled in BTCPay by activating the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("additional fragment")]),e._v(" called "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[t("code",[e._v("opt-add-electumx")]),t("OutboundLink")],1),e._v(". This fragment will not only enable and start the ElectrumX server, it will also enable "),t("code",[e._v("txindex=1")]),e._v(" in your bitcoin full node. "),t("code",[e._v("txindex=1")]),e._v(" (Transaction Index=ON) is a bitcoin core feature required for ElectrumX to be able to serve your Electrum Wallet detailed transaction data for any transaction, directly from the blockchain, without getting it from any third party server.")],1),e._v(" "),t("p",[e._v("If you have been running your BTCPay Server for a while but haven't had "),t("code",[e._v("txindex=1")]),e._v(" set until now, then it might take a few hours to build the index, this is no issue and it should not involve downtime of more than a few hours - better to set this to run overnight though when nobody will be using your node. Note: If you want to rebuild the index from scratch, launch bitcoind once with the "),t("code",[e._v("reindex=1")]),e._v(" option (warning: this reindex option may take a VERY long time, and is not enabled out of the box as you likely dont need it, and hence is not in scope of this document).")]),e._v(" "),t("h3",{attrs:{id:"steps-to-enable-electrumx-server-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-enable-electrumx-server-in-btcpay"}},[e._v("#")]),e._v(" Steps to enable ElectrumX Server in BTCPay:")]),e._v(" "),t("p",[e._v("Here are all the steps to "),t("strong",[e._v("enable ElectrumX Server in your BTCPay node")]),e._v(' (read carefully as you may need to adjust for your specific setup, especially if you use other custom or conflicting "fragments" (pruning, less-memory etc. To reiterate, you should NOT proceed further here if you run a pruned BTCPay node.')]),e._v(" "),t("ol",[t("li",[t("p",[e._v("ElectrumX Server is accessible for Electrum Wallets via TCP port 50002. You need to open this port up fully at least to be available within your own network to any PC or Android device running Electrum Wallet, and turn on port forwarding (you can also port forward 50002 from your Internet/WAN, to enable other Electrum Wallet users from the Internet to query your server).")])]),e._v(" "),t("li",[t("p",[e._v("Enable the Docker Additional Fragment on your BTCPay node by running the following commands (this is assuming a brand new BTCPay installation with LND and ElectrumX, please tweak accordingly using the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("relevant documentation")]),e._v(":")],1)]),e._v(" "),t("li",[t("p",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#full-installation-for-technical-users",target:"_blank",rel:"noopener noreferrer"}},[e._v("normal setup and install of BTCPay Server"),t("OutboundLink")],1),e._v(", then after this command "),t("code",[e._v("cd btcpayserver-docker")]),e._v(", follow the below instructions instead of those in the link. If you already have a BTCPay Server running, then just follow from the next step.")])]),e._v(" "),t("li",[t("p",[e._v("Set your environment variables:")])])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"YOURHOST.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"lnd"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LIGHTNING_ALIAS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"MY_LN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"you@example.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-add-electrumx;opt-more-memory"')]),e._v("\n")])])]),t("p",[e._v("You can run all of that as one command after you tweak it to your needs. The main part for our purposes in this guide of course is "),t("code",[e._v('BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-add-electrumx"')]),e._v(". Note: "),t("code",[e._v("opt-more-memory")]),e._v(" can be removed if you like, but I really recommend it if your system has more than 1GB of RAM/memory that you can assign to BTCPay server, it will speed synching your node and the general performance of ElectrumX up drastically.")]),e._v(" "),t("ol",{attrs:{start:"5"}},[t("li",[t("p",[e._v("Set up or reconfigure BTCPay Server with ElectrumX:")]),e._v(" "),t("p",[t("code",[e._v("cd ~/BTCPayServer/btcpayserver-docker && . ./btcpay-setup.sh -i")])]),e._v(" "),t("p",[e._v('This will setup (or re-setup) your server with everything needed including ElectrumX, and it all should "just work". But, it will trigger at least a couple of hours of syncing the '),t("code",[e._v("txindex")]),e._v(", and if it is a new server, could be a couple of days depending on your hardware.")])]),e._v(" "),t("li",[t("p",[e._v("WAIT for your node to fully sync:\nYou can check the status of bitcoin core sync by going to your domain for BTCPay server, and it will show you on the front page. Or, you can check from the command line as well, using these commands:")]),e._v(" "),t("p",[t("code",[e._v("docker logs btcpayserver_bitcoind")]),e._v(" - this will show you the bitcoin core blockchain sync status (and ALL other info about your node, including any errors)")]),e._v(" "),t("p",[t("code",[e._v("docker logs generated_electrumx_1")]),e._v(" - this will show you the ElectrumX sync status. Note: ElectrumX will NOT start syncing until bitcoin full node has finished syncing, you will see errors until that is finished and these can be ignored.")])])]),e._v(" "),t("p",[e._v("Once all syncing for both bitcoin and ElectrumX has finished you can proceed to the next step. (Note: Electrum wallets will not connect to an Electrum server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[e._v("#")]),e._v(" Section 2.2 Connect your Electrum Wallet (Desktop or Android) to your ElectrumX Server")]),e._v(" "),t("h3",{attrs:{id:"connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[e._v("#")]),e._v(" Connect to ElectrumX from Electrum Wallet on your Mac/PC/Linux Machine:")]),e._v(" "),t("p",[e._v('Read all of this first before proceeding. You may wish to do just the "Protip" below instead of the manual steps in the Electrum Wallet GUI.')]),e._v(" "),t("p",[e._v("Open Electrum Wallet. When you click the traffic light at the bottom of your Electrum Wallet:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v("You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "),t("code",[e._v("Select Server Automatically")]),e._v(" already checked:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v("Now is the time to UNCHECK that "),t("code",[e._v("Select Server Automatically")]),e._v(" setting, which will enable you to enter the IP address or domain or hostname of your ElectrumX Server. In the case below, the ElectrumX server is on the local network at "),t("code",[e._v("192.168.1.3")]),e._v(" so we enter that manually (leave port as 50002) and press "),t("code",[e._v("close")]),e._v(".")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68496320-4e276580-0252-11ea-8caf-facc8a246d70.png",alt:"EnterElectrumXServerIP",title:"EnterElectrumXServerIP"}})]),e._v(" "),t("p",[e._v("If all of the above worked well, and your node is healthy, you will get a green traffic light down the bottom right of the wallet interface as pictured here - that means success!:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("h4",{attrs:{id:"protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[e._v("#")]),e._v(" Protip - optionally perform the above steps directly in Electrum Wallet config file before even opening the wallet GUI:")]),e._v(" "),t("p",[e._v("If you prefer to avoid connecting to other servers from the outset when you open Electrum Wallet, do the following before you open Electrum Wallet GUI.")]),e._v(" "),t("p",[e._v("In the Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is), open and edit the "),t("code",[e._v("config")]),e._v(" file like this:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"auto_connect": true,')]),e._v(" and switch it to: "),t("code",[e._v('"auto_connect": false,')]),e._v(" - this will prevent your Electrum Wallet from auto-connecting to other 3rd party Electrum Servers at launch time (to obtain block headers and transaction information).")])]),e._v(" "),t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"oneserver": false,')]),e._v(" and switch it to: "),t("code",[e._v('"oneserver": true,')]),e._v(" - ensures that all data is obtained from just one server.")])]),e._v(" "),t("li",[t("p",[e._v("Find or add line: "),t("code",[e._v('"server": "SOMEIPADDRESS:50002:s",')]),e._v("and switch it to your own ElectrumX Server's IP address, in the example above this would be: "),t("code",[e._v('"server": "192.168.1.3:50002:s",')]),e._v("- hard code your IP address as the default upon opening the Wallet.")])])]),e._v(" "),t("p",[e._v("These 3 steps optional but recommended for full privacy by locking down Electrum Wallet to one single connection with your private server ("),t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server#how-to",target:"_blank",rel:"noopener noreferrer"}},[e._v("Reference"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("h3",{attrs:{id:"reflection-on-what-has-been-achieved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#reflection-on-what-has-been-achieved"}},[e._v("#")]),e._v(" Reflection on what has been achieved:")]),e._v(" "),t("p",[e._v("You are now running your very "),t("strong",[e._v("own private ElectrumX Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your ElectrumX Server and the bitcoin blockchain, without going over any other 3rd party servers. You have attained full bitcoin transaction privacy (at least from the perspective of your blockchain queries and transactions, payment/receive addresses etc - nobody except you and the blockchain can see what you are doing).")]),e._v(" "),t("h3",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting:")]),e._v(" "),t("p",[e._v("So there is one thing you may encounter, where even after you did everything correctly, you still get a red traffic light (which means not connected to any server) in the steps above. Any other troubleshooting tips that people encounter can be added, I would suggest to make a PR to this document directly.")]),e._v(" "),t("ul",[t("li",[e._v("If you get a red traffic light, shutdown Electrum Wallet completely, then go to your Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is).")])]),e._v(" "),t("p",[e._v("Inside the Electrum Wallet folder (in this case below, it is what it looks like on a Mac) locate the "),t("code",[e._v("certs")]),e._v(" directory and delete the certificate for the server you are trying to connect to, in this case "),t("code",[e._v("192.168.1.3")]),e._v(", by dragging it to the Trash.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68497330-9a73a500-0254-11ea-9349-71bdb3bd9511.png",alt:"Certs",title:"Certs"}})]),e._v(" "),t("p",[e._v("Start up Electrum Wallet again, and connect to your ElectrumX server. If it is fully synched, it will now likely show a green traffic light, and you are good to go.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[145],{883:function(e,t,r){"use strict";r.r(t);var a=r(17),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrumx"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrumx"}},[e._v("#")]),e._v(" ElectrumX")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("connect Electrum Wallet to an ElectrumX Server")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Note:")]),e._v(" the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker version of BTCPay Server"),t("OutboundLink")],1),e._v(" (since Nov 7th 2019, version 1.0.3.137) supports full integration with "),t("a",{attrs:{href:"https://electrumx.readthedocs.io/en/latest/features.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX"),t("OutboundLink")],1),e._v(" is the most widely implemented software used for Electrum public servers that your local Electrum wallet relies upon to get all the details of, or broadcast transactions to the bitcoin blockchain. Skip to Section 2 below, to read more on what this all means, and how to set it up on your BTCPay stack.")]),e._v(" "),t("h2",{attrs:{id:"how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[e._v("#")]),e._v(" How to integrate ElectrumX into your BTCPay Server and connect your Electrum Wallet to it for your complete privacy")]),e._v(" "),t("h3",{attrs:{id:"only-available-in-btcpay-docker-version"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#only-available-in-btcpay-docker-version"}},[e._v("#")]),e._v(" (only available in BTCPay docker version)")]),e._v(" "),t("p",[e._v("Before we proceed, it is important to understand how your Electrum wallet on your PC/Mac functions so well/fast, without having its own bitcoin full node. In actual fact, Electrum Wallet relies on a community effort to maintain a bunch of servers all around the world with a bitcoin full node that do this job for you! They are called Electrum Servers, and you can be a part of that community to make that network even stronger, lets see how.")]),e._v(" "),t("p",[e._v("When you click the little traffic light at the bottom of your Electrum Wallet here:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v('You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "Select Server Automatically" already checked:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v('While using Electrum Wallet with "Select Server Automatically" on is the easiest, every transaction that you make/browse/broadcast in your Electrum Wallet will be done via someone else\'s server - this is a privacy risk, that will be mitigated by setting up and using your own ElectrumX Server.')]),e._v(" "),t("h2",{attrs:{id:"section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[e._v("#")]),e._v(" Section 2.1 Enable Your Own ElectrumX Server (fully integrated with your BTCPay Server's full bitcoin node)")]),e._v(" "),t("h3",{attrs:{id:"prerequisites-mandatory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites-mandatory"}},[e._v("#")]),e._v(" Prerequisites (mandatory):")]),e._v(" "),t("ol",[t("li",[e._v("Docker only: Only the "),t("RouterLink",{attrs:{to:"/Docker/"}},[e._v("Docker version of BTCPay Server")]),e._v(" is supported.")],1),e._v(" "),t("li",[e._v("Unpruned BTCPay node: Make sure your BTCPay implementation is NOT "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/#can-i-skip-the-synchronization"}},[e._v("pruned")]),e._v(" (i.e. you have synched and stored from genesis block. Check that you do NOT use the opt-save-storage "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("Environment Variable")]),e._v(")")],1),e._v(" "),t("li",[e._v("Drive space: At least 400GB of drive space on the device where your docker volumes are stored is required (as at the writing of this documentation on 9th Nov 2019, the total hard drive space used is 333GB - with full node and ElectrumX enabled - and of course this will grow further over time).")]),e._v(" "),t("li",[e._v("Additional Fragments: You are familiar with how to use BTCPay's "),t("RouterLink",{attrs:{to:"/Docker/#environment-variables"}},[e._v("Additional Fragment")]),e._v(" feature as part of your environment variable setup.")],1),e._v(" "),t("li",[e._v("Server architecture: The (official) "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX docker"),t("OutboundLink")],1),e._v(" used here is only tested on a BTCPay Server running on x86_64 architecture. So far it is tested extensively on Ubuntu 18.04 and Debian Buster. Unless it is overhauled and tested well on Raspberry Pi (and other architectures) it likely will not work.")]),e._v(" "),t("li",[e._v("Basic Linux command line knowledge: is assumed.")])]),e._v(" "),t("h3",{attrs:{id:"how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[e._v("#")]),e._v(" How will enabling ElectrumX Server affect an existing BTCPay implementation?:")]),e._v(" "),t("p",[e._v("Fundamentally, setting up ElectrumX in BTCPay server is simple, and will not affect the rest of your implementation. The only pre-requisites are as above. The "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX official docker release"),t("OutboundLink")],1),e._v(" is enabled in BTCPay by activating the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("additional fragment")]),e._v(" called "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[t("code",[e._v("opt-add-electumx")]),t("OutboundLink")],1),e._v(". This fragment will not only enable and start the ElectrumX server, it will also enable "),t("code",[e._v("txindex=1")]),e._v(" in your bitcoin full node. "),t("code",[e._v("txindex=1")]),e._v(" (Transaction Index=ON) is a bitcoin core feature required for ElectrumX to be able to serve your Electrum Wallet detailed transaction data for any transaction, directly from the blockchain, without getting it from any third party server.")],1),e._v(" "),t("p",[e._v("If you have been running your BTCPay Server for a while but haven't had "),t("code",[e._v("txindex=1")]),e._v(" set until now, then it might take a few hours to build the index, this is no issue and it should not involve downtime of more than a few hours - better to set this to run overnight though when nobody will be using your node. Note: If you want to rebuild the index from scratch, launch bitcoind once with the "),t("code",[e._v("reindex=1")]),e._v(" option (warning: this reindex option may take a VERY long time, and is not enabled out of the box as you likely dont need it, and hence is not in scope of this document).")]),e._v(" "),t("h3",{attrs:{id:"steps-to-enable-electrumx-server-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-enable-electrumx-server-in-btcpay"}},[e._v("#")]),e._v(" Steps to enable ElectrumX Server in BTCPay:")]),e._v(" "),t("p",[e._v("Here are all the steps to "),t("strong",[e._v("enable ElectrumX Server in your BTCPay node")]),e._v(' (read carefully as you may need to adjust for your specific setup, especially if you use other custom or conflicting "fragments" (pruning, less-memory etc. To reiterate, you should NOT proceed further here if you run a pruned BTCPay node.')]),e._v(" "),t("ol",[t("li",[t("p",[e._v("ElectrumX Server is accessible for Electrum Wallets via TCP port 50002. You need to open this port up fully at least to be available within your own network to any PC or Android device running Electrum Wallet, and turn on port forwarding (you can also port forward 50002 from your Internet/WAN, to enable other Electrum Wallet users from the Internet to query your server).")])]),e._v(" "),t("li",[t("p",[e._v("Enable the Docker Additional Fragment on your BTCPay node by running the following commands (this is assuming a brand new BTCPay installation with LND and ElectrumX, please tweak accordingly using the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("relevant documentation")]),e._v(":")],1)]),e._v(" "),t("li",[t("p",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#full-installation-for-technical-users",target:"_blank",rel:"noopener noreferrer"}},[e._v("normal setup and install of BTCPay Server"),t("OutboundLink")],1),e._v(", then after this command "),t("code",[e._v("cd btcpayserver-docker")]),e._v(", follow the below instructions instead of those in the link. If you already have a BTCPay Server running, then just follow from the next step.")])]),e._v(" "),t("li",[t("p",[e._v("Set your environment variables:")])])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"YOURHOST.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"lnd"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LIGHTNING_ALIAS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"MY_LN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"you@example.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-add-electrumx;opt-more-memory"')]),e._v("\n")])])]),t("p",[e._v("You can run all of that as one command after you tweak it to your needs. The main part for our purposes in this guide of course is "),t("code",[e._v('BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-add-electrumx"')]),e._v(". Note: "),t("code",[e._v("opt-more-memory")]),e._v(" can be removed if you like, but I really recommend it if your system has more than 1GB of RAM/memory that you can assign to BTCPay server, it will speed synching your node and the general performance of ElectrumX up drastically.")]),e._v(" "),t("ol",{attrs:{start:"5"}},[t("li",[t("p",[e._v("Set up or reconfigure BTCPay Server with ElectrumX:")]),e._v(" "),t("p",[t("code",[e._v("cd ~/BTCPayServer/btcpayserver-docker && . ./btcpay-setup.sh -i")])]),e._v(" "),t("p",[e._v('This will setup (or re-setup) your server with everything needed including ElectrumX, and it all should "just work". But, it will trigger at least a couple of hours of syncing the '),t("code",[e._v("txindex")]),e._v(", and if it is a new server, could be a couple of days depending on your hardware.")])]),e._v(" "),t("li",[t("p",[e._v("WAIT for your node to fully sync:\nYou can check the status of bitcoin core sync by going to your domain for BTCPay server, and it will show you on the front page. Or, you can check from the command line as well, using these commands:")]),e._v(" "),t("p",[t("code",[e._v("docker logs btcpayserver_bitcoind")]),e._v(" - this will show you the bitcoin core blockchain sync status (and ALL other info about your node, including any errors)")]),e._v(" "),t("p",[t("code",[e._v("docker logs generated_electrumx_1")]),e._v(" - this will show you the ElectrumX sync status. Note: ElectrumX will NOT start syncing until bitcoin full node has finished syncing, you will see errors until that is finished and these can be ignored.")])])]),e._v(" "),t("p",[e._v("Once all syncing for both bitcoin and ElectrumX has finished you can proceed to the next step. (Note: Electrum wallets will not connect to an Electrum server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[e._v("#")]),e._v(" Section 2.2 Connect your Electrum Wallet (Desktop or Android) to your ElectrumX Server")]),e._v(" "),t("h3",{attrs:{id:"connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[e._v("#")]),e._v(" Connect to ElectrumX from Electrum Wallet on your Mac/PC/Linux Machine:")]),e._v(" "),t("p",[e._v('Read all of this first before proceeding. You may wish to do just the "Protip" below instead of the manual steps in the Electrum Wallet GUI.')]),e._v(" "),t("p",[e._v("Open Electrum Wallet. When you click the traffic light at the bottom of your Electrum Wallet:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v("You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "),t("code",[e._v("Select Server Automatically")]),e._v(" already checked:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v("Now is the time to UNCHECK that "),t("code",[e._v("Select Server Automatically")]),e._v(" setting, which will enable you to enter the IP address or domain or hostname of your ElectrumX Server. In the case below, the ElectrumX server is on the local network at "),t("code",[e._v("192.168.1.3")]),e._v(" so we enter that manually (leave port as 50002) and press "),t("code",[e._v("close")]),e._v(".")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68496320-4e276580-0252-11ea-8caf-facc8a246d70.png",alt:"EnterElectrumXServerIP",title:"EnterElectrumXServerIP"}})]),e._v(" "),t("p",[e._v("If all of the above worked well, and your node is healthy, you will get a green traffic light down the bottom right of the wallet interface as pictured here - that means success!:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("h4",{attrs:{id:"protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[e._v("#")]),e._v(" Protip - optionally perform the above steps directly in Electrum Wallet config file before even opening the wallet GUI:")]),e._v(" "),t("p",[e._v("If you prefer to avoid connecting to other servers from the outset when you open Electrum Wallet, do the following before you open Electrum Wallet GUI.")]),e._v(" "),t("p",[e._v("In the Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is), open and edit the "),t("code",[e._v("config")]),e._v(" file like this:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"auto_connect": true,')]),e._v(" and switch it to: "),t("code",[e._v('"auto_connect": false,')]),e._v(" - this will prevent your Electrum Wallet from auto-connecting to other 3rd party Electrum Servers at launch time (to obtain block headers and transaction information).")])]),e._v(" "),t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"oneserver": false,')]),e._v(" and switch it to: "),t("code",[e._v('"oneserver": true,')]),e._v(" - ensures that all data is obtained from just one server.")])]),e._v(" "),t("li",[t("p",[e._v("Find or add line: "),t("code",[e._v('"server": "SOMEIPADDRESS:50002:s",')]),e._v("and switch it to your own ElectrumX Server's IP address, in the example above this would be: "),t("code",[e._v('"server": "192.168.1.3:50002:s",')]),e._v("- hard code your IP address as the default upon opening the Wallet.")])])]),e._v(" "),t("p",[e._v("These 3 steps optional but recommended for full privacy by locking down Electrum Wallet to one single connection with your private server ("),t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server#how-to",target:"_blank",rel:"noopener noreferrer"}},[e._v("Reference"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("h3",{attrs:{id:"reflection-on-what-has-been-achieved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#reflection-on-what-has-been-achieved"}},[e._v("#")]),e._v(" Reflection on what has been achieved:")]),e._v(" "),t("p",[e._v("You are now running your very "),t("strong",[e._v("own private ElectrumX Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your ElectrumX Server and the bitcoin blockchain, without going over any other 3rd party servers. You have attained full bitcoin transaction privacy (at least from the perspective of your blockchain queries and transactions, payment/receive addresses etc - nobody except you and the blockchain can see what you are doing).")]),e._v(" "),t("h3",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting:")]),e._v(" "),t("p",[e._v("So there is one thing you may encounter, where even after you did everything correctly, you still get a red traffic light (which means not connected to any server) in the steps above. Any other troubleshooting tips that people encounter can be added, I would suggest to make a PR to this document directly.")]),e._v(" "),t("ul",[t("li",[e._v("If you get a red traffic light, shutdown Electrum Wallet completely, then go to your Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is).")])]),e._v(" "),t("p",[e._v("Inside the Electrum Wallet folder (in this case below, it is what it looks like on a Mac) locate the "),t("code",[e._v("certs")]),e._v(" directory and delete the certificate for the server you are trying to connect to, in this case "),t("code",[e._v("192.168.1.3")]),e._v(", by dragging it to the Trash.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68497330-9a73a500-0254-11ea-9349-71bdb3bd9511.png",alt:"Certs",title:"Certs"}})]),e._v(" "),t("p",[e._v("Start up Electrum Wallet again, and connect to your ElectrumX server. If it is fully synched, it will now likely show a green traffic light, and you are good to go.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/146.73720689.js b/assets/js/146.0732c044.js similarity index 99% rename from assets/js/146.73720689.js rename to assets/js/146.0732c044.js index 9f4afd44e9..853a7cfcd2 100644 --- a/assets/js/146.73720689.js +++ b/assets/js/146.0732c044.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[146],{883:function(t,a,e){"use strict";e.r(a);var o=e(17),n=Object(o.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"altcoins-faq"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#altcoins-faq"}},[t._v("#")]),t._v(" Altcoins FAQ")]),t._v(" "),a("p",[t._v("This page answers some of the common questions about alternative cryptocurrencies - altcoins.")]),t._v(" "),a("p"),a("div",{staticClass:"table-of-contents"},[a("ul",[a("li",[a("a",{attrs:{href:"#which-coins-does-btcpay-server-support"}},[t._v("Which coins does BTCPay Server support?")])]),a("li",[a("a",{attrs:{href:"#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("Can an XYZ coin be added in BTCPay?")])]),a("li",[a("a",{attrs:{href:"#how-to-add-an-altcoin-in-btcpay"}},[t._v("How to add an altcoin in BTCPay?")])]),a("li",[a("a",{attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("How to add an altcoin to an existing BTCPay deployment?")])]),a("li",[a("a",{attrs:{href:"#how-to-remove-a-coin-from-btcpay"}},[t._v("How to remove a coin from BTCPay?")])])])]),a("p"),t._v(" "),a("h2",{attrs:{id:"which-coins-does-btcpay-server-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#which-coins-does-btcpay-server-support"}},[t._v("#")]),t._v(" Which coins does BTCPay Server support?")]),t._v(" "),a("p",[t._v("Bitcoin is the only focus of the project and its core developers. However, opt in integrations are present for several altcoins:")]),t._v(" "),a("ul",[a("li",[t._v("BGold (BTG) (also known as Bitcoin Gold)")]),t._v(" "),a("li",[t._v("BPlus (XBC) (also known as Bitcoin Plus)")]),t._v(" "),a("li",[t._v("Bitcore (BTX)")]),t._v(" "),a("li",[t._v("Dash (DASH)")]),t._v(" "),a("li",[t._v("Dogecoin (DOGE)")]),t._v(" "),a("li",[t._v("Feathercoin (FTC)")]),t._v(" "),a("li",[t._v("Groestlcoin (GRS)")]),t._v(" "),a("li",[t._v("Htmlcoin (HTML) (also known as Althash)")]),t._v(" "),a("li",[t._v("Liquid Bitcoin (LBTC) (comes with Liquid Tether support USDt) "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/1282",target:"_blank",rel:"noopener noreferrer"}},[t._v("(notes on deployment & usage)"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Litecoin (LTC)")]),t._v(" "),a("li",[t._v("Monacoin (MONA)")]),t._v(" "),a("li",[t._v("Monero (XMR) "),a("a",{attrs:{href:"https://sethforprivacy.com/guides/accepting-monero-via-btcpay-server/",target:"_blank",rel:"noopener noreferrer"}},[t._v("(guide on deployment and usage)"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Polis (POLIS)")]),t._v(" "),a("li",[t._v("Viacoin (VIA)")])]),t._v(" "),a("p",[t._v("Altcoins are maintained by their respective communities and are listed here only for convenience. For support regarding Altcoin deployment, functionalities or issues, please contact the Altcoin maintainer or community directly.")]),t._v(" "),a("h2",{attrs:{id:"can-an-xyz-coin-be-added-in-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("#")]),t._v(" Can an XYZ coin be added in BTCPay?")]),t._v(" "),a("p",[t._v("No. BTCPay developers don't add alternative coins on request. Adding a new coin explicitly depends on the community and developers of those coins. Furthermore, BTCPay developers do not spend excessive time testing nor maintaining the altcoins. If you're submitting a PR for a new coin, make sure that it works. If the altcoin integration is not actively maintained it will be removed from BTCPay.")]),t._v(" "),a("h2",{attrs:{id:"how-to-add-an-altcoin-in-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin-in-btcpay"}},[t._v("#")]),t._v(" How to add an altcoin in BTCPay?")]),t._v(" "),a("p",[t._v("To add a new coin to BTCPay, please "),a("RouterLink",{attrs:{to:"/Development/Altcoins/#how-can-i-add-an-altcoin-to-btcpayserver"}},[t._v("follow the instructions here")]),t._v(".")],1),t._v(" "),a("h2",{attrs:{id:"how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("#")]),t._v(" How to add an altcoin to an existing BTCPay deployment?")]),t._v(" "),a("p",[t._v("If you want to expand the number of coins in your existing BTCPay Server installation, make sure that you have enough storage space on your machine.")]),t._v(" "),a("p",[t._v("In this example, we only have Bitcoin, and we're adding Litecoin to our docker deployment.")]),t._v(" "),a("p",[t._v("The coin structure:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("BTCPAYGEN_CRYPTO1: First supported cryptocurrency (e.g., BTC, LTC. Default: btc)\nBTCPAYGEN_CRYPTO2: Second supported crypto currency (e.g. btc, ltc. Default: (empty))\nBTCPAYGEN_CRYPTON: N'th supported crypto currency where N is 9 at maximum. (eg. btc, ltc. Default: (empty))\n")])])]),a("p",[t._v("To add Litecoin, as your second coin (CRYPTO2) do this :")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_CRYPTO2")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ltc"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),a("h2",{attrs:{id:"how-to-remove-a-coin-from-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-remove-a-coin-from-btcpay"}},[t._v("#")]),t._v(" How to remove a coin from BTCPay?")]),t._v(" "),a("p",[t._v("In the "),a("a",{attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("example above")]),t._v(" we've added Litecoin as the second coin. To remove a particular coin, use the following command:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_CRYPTO2")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),a("p",[t._v("Where CRYPTO"),a("strong",[t._v("2")]),t._v(" should be replaced with a coin number you wish to remove. If you have an XYZ coin as "),a("code",[t._v("BTCPAYGEN_CRYPTO3")]),t._v(", and you want to remove it, you should use CRYPTO"),a("strong",[t._v("3")]),t._v(".")])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[146],{884:function(t,a,e){"use strict";e.r(a);var o=e(17),n=Object(o.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"altcoins-faq"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#altcoins-faq"}},[t._v("#")]),t._v(" Altcoins FAQ")]),t._v(" "),a("p",[t._v("This page answers some of the common questions about alternative cryptocurrencies - altcoins.")]),t._v(" "),a("p"),a("div",{staticClass:"table-of-contents"},[a("ul",[a("li",[a("a",{attrs:{href:"#which-coins-does-btcpay-server-support"}},[t._v("Which coins does BTCPay Server support?")])]),a("li",[a("a",{attrs:{href:"#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("Can an XYZ coin be added in BTCPay?")])]),a("li",[a("a",{attrs:{href:"#how-to-add-an-altcoin-in-btcpay"}},[t._v("How to add an altcoin in BTCPay?")])]),a("li",[a("a",{attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("How to add an altcoin to an existing BTCPay deployment?")])]),a("li",[a("a",{attrs:{href:"#how-to-remove-a-coin-from-btcpay"}},[t._v("How to remove a coin from BTCPay?")])])])]),a("p"),t._v(" "),a("h2",{attrs:{id:"which-coins-does-btcpay-server-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#which-coins-does-btcpay-server-support"}},[t._v("#")]),t._v(" Which coins does BTCPay Server support?")]),t._v(" "),a("p",[t._v("Bitcoin is the only focus of the project and its core developers. However, opt in integrations are present for several altcoins:")]),t._v(" "),a("ul",[a("li",[t._v("BGold (BTG) (also known as Bitcoin Gold)")]),t._v(" "),a("li",[t._v("BPlus (XBC) (also known as Bitcoin Plus)")]),t._v(" "),a("li",[t._v("Bitcore (BTX)")]),t._v(" "),a("li",[t._v("Dash (DASH)")]),t._v(" "),a("li",[t._v("Dogecoin (DOGE)")]),t._v(" "),a("li",[t._v("Feathercoin (FTC)")]),t._v(" "),a("li",[t._v("Groestlcoin (GRS)")]),t._v(" "),a("li",[t._v("Htmlcoin (HTML) (also known as Althash)")]),t._v(" "),a("li",[t._v("Liquid Bitcoin (LBTC) (comes with Liquid Tether support USDt) "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/1282",target:"_blank",rel:"noopener noreferrer"}},[t._v("(notes on deployment & usage)"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Litecoin (LTC)")]),t._v(" "),a("li",[t._v("Monacoin (MONA)")]),t._v(" "),a("li",[t._v("Monero (XMR) "),a("a",{attrs:{href:"https://sethforprivacy.com/guides/accepting-monero-via-btcpay-server/",target:"_blank",rel:"noopener noreferrer"}},[t._v("(guide on deployment and usage)"),a("OutboundLink")],1)]),t._v(" "),a("li",[t._v("Polis (POLIS)")]),t._v(" "),a("li",[t._v("Viacoin (VIA)")])]),t._v(" "),a("p",[t._v("Altcoins are maintained by their respective communities and are listed here only for convenience. For support regarding Altcoin deployment, functionalities or issues, please contact the Altcoin maintainer or community directly.")]),t._v(" "),a("h2",{attrs:{id:"can-an-xyz-coin-be-added-in-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("#")]),t._v(" Can an XYZ coin be added in BTCPay?")]),t._v(" "),a("p",[t._v("No. BTCPay developers don't add alternative coins on request. Adding a new coin explicitly depends on the community and developers of those coins. Furthermore, BTCPay developers do not spend excessive time testing nor maintaining the altcoins. If you're submitting a PR for a new coin, make sure that it works. If the altcoin integration is not actively maintained it will be removed from BTCPay.")]),t._v(" "),a("h2",{attrs:{id:"how-to-add-an-altcoin-in-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin-in-btcpay"}},[t._v("#")]),t._v(" How to add an altcoin in BTCPay?")]),t._v(" "),a("p",[t._v("To add a new coin to BTCPay, please "),a("RouterLink",{attrs:{to:"/Development/Altcoins/#how-can-i-add-an-altcoin-to-btcpayserver"}},[t._v("follow the instructions here")]),t._v(".")],1),t._v(" "),a("h2",{attrs:{id:"how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("#")]),t._v(" How to add an altcoin to an existing BTCPay deployment?")]),t._v(" "),a("p",[t._v("If you want to expand the number of coins in your existing BTCPay Server installation, make sure that you have enough storage space on your machine.")]),t._v(" "),a("p",[t._v("In this example, we only have Bitcoin, and we're adding Litecoin to our docker deployment.")]),t._v(" "),a("p",[t._v("The coin structure:")]),t._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[t._v("BTCPAYGEN_CRYPTO1: First supported cryptocurrency (e.g., BTC, LTC. Default: btc)\nBTCPAYGEN_CRYPTO2: Second supported crypto currency (e.g. btc, ltc. Default: (empty))\nBTCPAYGEN_CRYPTON: N'th supported crypto currency where N is 9 at maximum. (eg. btc, ltc. Default: (empty))\n")])])]),a("p",[t._v("To add Litecoin, as your second coin (CRYPTO2) do this :")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_CRYPTO2")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"ltc"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),a("h2",{attrs:{id:"how-to-remove-a-coin-from-btcpay"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-remove-a-coin-from-btcpay"}},[t._v("#")]),t._v(" How to remove a coin from BTCPay?")]),t._v(" "),a("p",[t._v("In the "),a("a",{attrs:{href:"#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("example above")]),t._v(" we've added Litecoin as the second coin. To remove a particular coin, use the following command:")]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("export")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_CRYPTO2")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n")])])]),a("p",[t._v("Where CRYPTO"),a("strong",[t._v("2")]),t._v(" should be replaced with a coin number you wish to remove. If you have an XYZ coin as "),a("code",[t._v("BTCPAYGEN_CRYPTO3")]),t._v(", and you want to remove it, you should use CRYPTO"),a("strong",[t._v("3")]),t._v(".")])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/148.0c8969d7.js b/assets/js/148.0f1b78a1.js similarity index 99% rename from assets/js/148.0c8969d7.js rename to assets/js/148.0f1b78a1.js index d4060ecdd7..0f12734ee5 100644 --- a/assets/js/148.0c8969d7.js +++ b/assets/js/148.0f1b78a1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[148],{894:function(e,a,t){"use strict";t.r(a);var s=t(17),n=Object(s.a)({},(function(){var e=this,a=e._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"synchronization-faq"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#synchronization-faq"}},[e._v("#")]),e._v(" Synchronization FAQ")]),e._v(" "),a("p",[e._v("This document covers the most common questions and issues that may occur during BTCPay sync.")]),e._v(" "),a("p"),a("div",{staticClass:"table-of-contents"},[a("ul",[a("li",[a("a",{attrs:{href:"#why-does-btcpay-sync"}},[e._v("Why does BTCPay sync?")])]),a("li",[a("a",{attrs:{href:"#can-i-skip-the-synchronization"}},[e._v("Can I skip the synchronization?")])]),a("li",[a("a",{attrs:{href:"#how-do-i-know-that-btcpay-synced-completely"}},[e._v("How do I know that BTCPay synced completely?")])]),a("li",[a("a",{attrs:{href:"#how-can-i-check-the-block-height-of-my-bitcoin-node"}},[e._v("How can I check the block height of my bitcoin node?")])]),a("li",[a("a",{attrs:{href:"#btcpay-server-takes-forever-to-synchronize"}},[e._v("BTCPay Server takes forever to synchronize")]),a("ul",[a("li",[a("a",{attrs:{href:"#cause-1-not-enough-cpu"}},[e._v("Cause 1: Not enough CPU")])]),a("li",[a("a",{attrs:{href:"#cause-2-using-swap-memory"}},[e._v("Cause 2: Using swap memory")])])])]),a("li",[a("a",{attrs:{href:"#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[e._v("BTCPay Server keeps showing that my node is always starting")]),a("ul",[a("li",[a("a",{attrs:{href:"#cause-1-you-do-not-have-enough-ram"}},[e._v("Cause 1: You do not have enough RAM")])]),a("li",[a("a",{attrs:{href:"#cause-2-you-do-not-have-enough-storage"}},[e._v("Cause 2: You do not have enough storage")])]),a("li",[a("a",{attrs:{href:"#cause-3-you-accidentally-disabled-pruning"}},[e._v("Cause 3: You accidentally disabled pruning")])]),a("li",[a("a",{attrs:{href:"#cause-4-your-bitcoin-data-directory-is-corrupted"}},[e._v("Cause 4: Your bitcoin data directory is corrupted")])]),a("li",[a("a",{attrs:{href:"#cause-5-your-last-wallet-synchronisation-goes-beyond-pruned-data"}},[e._v("Cause 5: Your last wallet synchronisation goes beyond pruned data")])])])]),a("li",[a("a",{attrs:{href:"#im-running-a-full-node-and-have-a-synched-blockchain-can-btcpay-use-it-so-that-it-doesnt-have-to-do-a-full-sync"}},[e._v("I'm running a full node and have a synched blockchain, can BTCPay use it so that it doesn't have to do a full sync?")])]),a("li",[a("a",{attrs:{href:"#how-to-enable-bitcoin-node-pruning"}},[e._v("How to enable Bitcoin node pruning?")])]),a("li",[a("a",{attrs:{href:"#how-to-disable-bitcoin-node-pruning"}},[e._v("How to disable Bitcoin node pruning?")])])])]),a("p"),e._v(" "),a("h2",{attrs:{id:"why-does-btcpay-sync"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#why-does-btcpay-sync"}},[e._v("#")]),e._v(" Why does BTCPay sync?")]),e._v(" "),a("p",[e._v("After deployment, your BTCPay Server needs to sync the entire blockchain and validate all the consensus rules. Depending on your machine specifications, bandwidth and number of altcoins you added, this process may take between 1-5 days.")]),e._v(" "),a("p",[e._v("It may seem tedious, but it's a critical step of running your own full node and not having to trust or rely on anyone. Your node will not only download ~300GB of data (less if you're using a pruned node) but also validate all the rules of the consensus. You can find more information about the importance of blockchain synchronization in "),a("a",{attrs:{href:"https://www.youtube.com/watch?v=OrYDehC-8TU",target:"_blank",rel:"noopener noreferrer"}},[e._v("this video"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("If you are only interested in learning about BTCPay Server i.e. simply "),a("RouterLink",{attrs:{to:"/TryItOut/"}},[e._v("trying it out")]),e._v(" without deploying your own instance, you can avoid sync by using a "),a("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("Third-Party host")]),e._v(".")],1),e._v(" "),a("h2",{attrs:{id:"can-i-skip-the-synchronization"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#can-i-skip-the-synchronization"}},[e._v("#")]),e._v(" Can I skip the synchronization?")]),e._v(" "),a("p",[e._v("You can't skip synchronization if you are deploying a BTCPay Server, but you can drastically decrease the time it takes. If you're comfortable with using the command line, you can use FastSync to synchronize your node faster. Be sure to "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/tree/master/contrib/FastSync",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this FastSync document"),a("OutboundLink")],1),e._v(" to understand the potential trust issues involved with this feature.")]),e._v(" "),a("p",[e._v("To use FastSync, make sure your deployment has a "),a("a",{attrs:{href:"#how-to-enable-bitcoin-node-pruning"}},[e._v("pruning option enabled")]),e._v(" by using an "),a("code",[e._v("opt-save-storage")]),e._v(" environment variable, otherwise bitcoind will not be able to sync. First step is to "),a("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-ssh-into-my-btcpay-running-on-vps"}},[e._v("ssh into")]),e._v(" your BTCPayServer instance and run the following commands:")],1),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v("/btcpayserver-docker/\nbtcpay-down.sh\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" contrib/FastSync\n./load-utxo-set.sh\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Once FastSync has completed")]),e._v("\nbtcpay-up.sh\n")])])]),a("p",[e._v("After FastSync is complete and you have brought back up your instance, refresh your BTCPay domain and wait for remaining blockchain synchronization. You can also follow "),a("a",{attrs:{href:"https://youtube.com/watch?v=VNMnd-dX9Q8?t=1730",target:"_blank",rel:"noopener noreferrer"}},[e._v("this video"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("If your FastSync returns "),a("code",[e._v("You need to delete your Bitcoin Core wallet")]),e._v(" after you load the uxto set, or you find this error: "),a("code",[e._v("Last wallet synchronisation goes beyond pruned data")]),e._v(", see the cause of "),a("a",{attrs:{href:"#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[e._v("BTCPay Server keeps showing that my node is always starting")]),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"how-do-i-know-that-btcpay-synced-completely"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-do-i-know-that-btcpay-synced-completely"}},[e._v("#")]),e._v(" How do I know that BTCPay synced completely?")]),e._v(" "),a("p",[e._v("When you do not see a pop-up message in the bottom right corner, which shows the sync progress, that means that your server is fully synced and you can "),a("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("begin using it")]),e._v(".")],1),e._v(" "),a("p",[e._v("If you want to check that your BTCPay Server Bitcoin node is synchronized with the most recent block in the Bitcoin blockchain, "),a("a",{attrs:{href:"#how-can-i-check-the-block-height-of-my-bitcoin-node"}},[e._v("check your node height")]),e._v(" matches the current block height using any blockchain explorer.")]),e._v(" "),a("h2",{attrs:{id:"how-can-i-check-the-block-height-of-my-bitcoin-node"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-check-the-block-height-of-my-bitcoin-node"}},[e._v("#")]),e._v(" How can I check the block height of my bitcoin node?")]),e._v(" "),a("p",[e._v("To verify the sync status of your Bitcoin node, you can use bitcoin-cli commands inside your server's Bitcoin container. SSH into your server and navigate to the directory where you "),a("RouterLink",{attrs:{to:"/Troubleshooting/#23-bitcoin-node-logs"}},[e._v("view Bitcoin logs")]),e._v(" run the command: "),a("code",[e._v("bitcoin-cli.sh getblockcount")]),e._v(" to view the current block of your server's Bitcoin node.")],1),e._v(" "),a("h2",{attrs:{id:"btcpay-server-takes-forever-to-synchronize"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-takes-forever-to-synchronize"}},[e._v("#")]),e._v(" BTCPay Server takes forever to synchronize")]),e._v(" "),a("p",[e._v("Synchronizing a Full Bitcoin node should take between 1 and 5 days. It should sync quickly at first and more slowly at the end.")]),e._v(" "),a("p",[e._v("If the node appears to not be syncing, verify:")]),e._v(" "),a("ul",[a("li",[e._v("Not enough CPU")]),e._v(" "),a("li",[e._v("Using swap memory")])]),e._v(" "),a("h3",{attrs:{id:"cause-1-not-enough-cpu"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-1-not-enough-cpu"}},[e._v("#")]),e._v(" Cause 1: Not enough CPU")]),e._v(" "),a("p",[e._v("We recommend 2 CPU while synchronizing; however some hosting providers throttle your CPU if you use too much.")]),e._v(" "),a("p",[e._v("Check with")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" stats\n")])])]),a("p",[e._v("If you see more than 100% CPU usage, while being very slow to sync:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("8e7ac41e6e2a btcpayserver_bitcoind 100% 560.5MiB / 3.853GiB 14.20% 4.17\n")])])]),a("p",[e._v("Then you need to scale up your machine specification.")]),e._v(" "),a("p",[e._v("If you see very low CPU usage (less than 10%) during synchronization:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("8e7ac41e6e2a btcpayserver_bitcoind 10% 560.5MiB / 3.853GiB 14.20% 4.17\n")])])]),a("p",[e._v("Your hosting provider might throttle your CPU. Please make sure your host supports the high use of CPU for an extended period.")]),e._v(" "),a("p",[e._v("If they don't allow it, shut down your server until they stop throttling you. Then you can limit the CPU via docker, and restart the server:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" update btcpayserver_bitcoind "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--cpus")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('".8"')]),e._v("\n")])])]),a("h3",{attrs:{id:"cause-2-using-swap-memory"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-2-using-swap-memory"}},[e._v("#")]),e._v(" Cause 2: Using swap memory")]),e._v(" "),a("p",[e._v("If you are synching and don't have enough memory, your server may use swap memory to continue operating:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("free")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-h")]),e._v("\n")])])]),a("p",[e._v("If you see swap memory usage:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v(" total used "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("free")]),e._v(" shared buff/cache available\nMem: "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G 0M 66M 0G 0M\nSwap: "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(".0G 200M 800M\n")])])]),a("p",[e._v("Then it means you need to scale up your server by adding more memory.")]),e._v(" "),a("h2",{attrs:{id:"btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[e._v("#")]),e._v(" BTCPay Server keeps showing that my node is always starting")]),e._v(" "),a("p",[e._v("Possible cause:")]),e._v(" "),a("ul",[a("li",[e._v("You do not have enough RAM")]),e._v(" "),a("li",[e._v("You do not have enough storage")]),e._v(" "),a("li",[e._v("You accidentally disabled pruning")]),e._v(" "),a("li",[e._v("Your bitcoin data directory is corrupted")]),e._v(" "),a("li",[e._v("Your last wallet synchronisation goes beyond pruned data")])]),e._v(" "),a("h3",{attrs:{id:"cause-1-you-do-not-have-enough-ram"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-1-you-do-not-have-enough-ram"}},[e._v("#")]),e._v(" Cause 1: You do not have enough RAM")]),e._v(" "),a("p",[e._v("Check your RAM:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("free")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-h")]),e._v("\n")])])]),a("p",[e._v("If you see that you have no "),a("code",[e._v("free")]),e._v(" or very little "),a("code",[e._v("available")]),e._v(" memory:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v(" total used "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("free")]),e._v(" shared buff/cache available\nMem: "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G 0M 66M 0G 0M\nSwap: 0B 0B 0B\n")])])]),a("p",[e._v("Then you need more memory. If you have already synched your node, you can add some swap memory. If you haven't, your server specs are too limited.")]),e._v(" "),a("p",[e._v("If you have already synched, you can add 2G of swap memory with:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("fallocate "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-l")]),e._v(" 2G /mnt/swapfile\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("chmod")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("600")]),e._v(" /mnt/swapfile\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("mkswap")]),e._v(" /mnt/swapfile\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("swapon")]),e._v(" /mnt/swapfile\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("echo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/mnt/swapfile none swap sw 0 0"')]),e._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">>")]),e._v(" /etc/fstab\n")])])]),a("h3",{attrs:{id:"cause-2-you-do-not-have-enough-storage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-2-you-do-not-have-enough-storage"}},[e._v("#")]),e._v(" Cause 2: You do not have enough storage")]),e._v(" "),a("p",[e._v("Check the storage of your machine:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("df")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-h")]),e._v("\n")])])]),a("p",[e._v("If you see you don't have any storage left (/dev/sda1 in my case)")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("Filesystem Size Used Avail Use% Mounted on\nudev "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("% /dev\ntmpfs 395M 41M 354M "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("11")]),e._v("% /run\n/dev/sda1 125G 125G 0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("100")]),e._v("% /\ntmpfs "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("% /dev/shm\ntmpfs "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),e._v(".0M "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),e._v(".0M "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("% /run/lock\ntmpfs "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("% /sys/fs/cgroup\n/dev/sdb1 "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(".8G 18M "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(".4G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("% /mnt\n")])])]),a("p",[a("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("Choose the docker fragment")]),e._v(" for the amount of storage you aim to keep. Then "),a("RouterLink",{attrs:{to:"/Docker/#how-i-can-prune-my-nodes"}},[e._v("prune your node")]),e._v(".")],1),e._v(" "),a("h3",{attrs:{id:"cause-3-you-accidentally-disabled-pruning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-3-you-accidentally-disabled-pruning"}},[e._v("#")]),e._v(" Cause 3: You accidentally disabled pruning")]),e._v(" "),a("p",[e._v("If you have recently tried to modify your environment variables using the "),a("code",[e._v('export BTCPAYGEN_ADDITIONAL_FRAGMENTS="xyz"')]),e._v(" command to add an additional fragment, but forgot to include your current ones, you may have disabled pruning.")]),e._v(" "),a("p",[e._v("If you don't have enough memory to store the entire Bitcoin blockchain and you don't have an "),a("code",[e._v("opt-save-storage")]),e._v(" listed when you "),a("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-modify-or-deactivate-environment-variables"}},[e._v("print the complete list of options")]),e._v(" that you are running, it is very likely you have disabled pruning.")],1),e._v(" "),a("p",[e._v("You can verify by checking your Bitcoind logs:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--tail")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("100")]),e._v(" btcpayserver_bitcoind\n")])])]),a("p",[e._v("If you see:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("Block files have previously been pruned.\nYou need to rebuild the database using "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-reindex")]),e._v(" to go back to unpruned mode.\nThis will redownload the entire blockchain.\nPlease restart with "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-reindex")]),e._v(" or -reindex-chainstate to recover.\n")])])]),a("p",[e._v("You can simply "),a("a",{attrs:{href:"#how-to-enable-bitcoin-node-pruning"}},[e._v("re-enable pruning")]),e._v(" to solve the issue.")]),e._v(" "),a("h3",{attrs:{id:"cause-4-your-bitcoin-data-directory-is-corrupted"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-4-your-bitcoin-data-directory-is-corrupted"}},[e._v("#")]),e._v(" Cause 4: Your bitcoin data directory is corrupted")]),e._v(" "),a("p",[e._v("Check the logs of your node:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--tail")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("10")]),e._v(" btcpayserver_bitcoind\n")])])]),a("p",[e._v("If you see:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("Please restart with "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-reindex")]),e._v(" or -reindex-chainstate to recover.\n")])])]),a("p",[e._v("Then your bitcoin data directory has been corrupted. It may be physical damage or failure of the hard drive.\nTo reindex your node:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("btcpay-down.sh\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Delete 'blocks' and 'chainstate' folders")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("rm")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-rf")]),e._v(" /var/lib/docker/volumes/generated_bitcoin_datadir/_data/blocks\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("rm")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-rf")]),e._v(" /var/lib/docker/volumes/generated_bitcoin_datadir/_data/chainstate\nbtcpay-up.sh\n")])])]),a("h3",{attrs:{id:"cause-5-your-last-wallet-synchronisation-goes-beyond-pruned-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-5-your-last-wallet-synchronisation-goes-beyond-pruned-data"}},[e._v("#")]),e._v(" Cause 5: Your last wallet synchronisation goes beyond pruned data")]),e._v(" "),a("p",[e._v("This can happen if you use FastSync or import an already synched blockchain. It means that the bitcoin core wallet needs to be removed because it was created before the utxoset, likely because BTCPay Server started without the utxoset at the first boot. To verify this case, "),a("RouterLink",{attrs:{to:"/Troubleshooting/#21-btcpay-logs"}},[e._v("check the bitcoind log")]),e._v(" for this:")],1),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("Error: Prune: last wallet synchronisation goes beyond pruned data. You need to "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-reindex")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("download the whole blockchain again "),a("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("case")]),e._v(" of pruned "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("node")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),a("p",[e._v("If you see this error and agree to remove the wallet to finish syncing, use "),a("code",[e._v("docker volume rm generated_bitcoin_wallet_datadir")]),e._v(" after you run "),a("code",[e._v("btcpay-down.sh")]),e._v(" and before you run "),a("code",[e._v("btcpay-up.sh")]),e._v("\nWARNING: Do not delete this wallet if you have any funds on it.")]),e._v(" "),a("h2",{attrs:{id:"im-running-a-full-node-and-have-a-synched-blockchain-can-btcpay-use-it-so-that-it-doesnt-have-to-do-a-full-sync"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#im-running-a-full-node-and-have-a-synched-blockchain-can-btcpay-use-it-so-that-it-doesnt-have-to-do-a-full-sync"}},[e._v("#")]),e._v(" I'm running a full node and have a synched blockchain, can BTCPay use it so that it doesn't have to do a full sync?")]),e._v(" "),a("p",[e._v("Yes you can! However, before you do that, you'll want to stop bitcoind from updating docker's volume for it, as that job will be taken over by BTCPay Server.")]),e._v(" "),a("p",[e._v("If you want to run BTCPay Server inside a docker-compose, and that you have the data directory ("),a("code",[e._v(".bitcoin")]),e._v(") of a fully synched node on your docker host, then you can reuse it easily for BTCPay Server.")]),e._v(" "),a("p",[e._v("To do that, follow the following steps :")]),e._v(" "),a("ul",[a("li",[e._v("Do the normal setup according to "),a("RouterLink",{attrs:{to:"/Docker/"}},[e._v("this instruction")]),e._v(". Note the "),a("code",[e._v("opt-save-storage")]),e._v(" environment variable, which is used to enable various pruning levels. If you do not want to prune your exiting data directory, then omit the following line in your BTCPay docker deployment: "),a("code",[e._v('export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-s"')]),e._v(".")],1),e._v(" "),a("li",[e._v("Once "),a("code",[e._v("btcpay-setup.sh")]),e._v(" is over, turn down the docker compose with "),a("code",[e._v("btcpay-down.sh")]),e._v(".")]),e._v(" "),a("li",[e._v("Login as root with "),a("code",[e._v("sudo su -")]),e._v(".")]),e._v(" "),a("li",[e._v("Open the docker's volume for bitcoind : "),a("code",[e._v("cd /var/lib/docker/volumes/generated_bitcoin_datadir/")]),e._v(", and check its content with "),a("code",[e._v("ls -la")]),e._v(". You should see only one directory named "),a("code",[e._v("_data")]),e._v(".")]),e._v(" "),a("li",[e._v("Now remove the "),a("code",[e._v("_data")]),e._v("directory : "),a("code",[e._v("rm -r _data")]),e._v(". If for any reason you want to keep this directory and its content you can also rename it instead : "),a("code",[e._v("mv _data/ _data.old/")])]),e._v(" "),a("li",[e._v("Now create a "),a("a",{attrs:{href:"https://www.cyberciti.biz/faq/creating-soft-link-or-symbolic-link/",target:"_blank",rel:"noopener noreferrer"}},[e._v("symbolic link"),a("OutboundLink")],1),e._v(" between "),a("code",[e._v("/var/lib/docker/volumes/generated_bitcoin_datadir/_data")]),e._v(" and your data directory ("),a("code",[e._v(".bitcoin")]),e._v(") on your host: "),a("code",[e._v("ln -s path/to/.bitcoin /var/lib/docker/volumes/generated_bitcoin_datadir/_data")])]),e._v(" "),a("li",[e._v("Check that the link has been done with a "),a("code",[e._v("ls -la")])]),e._v(" "),a("li",[e._v("Start your docker-compose again with "),a("code",[e._v("btcpay-up.sh")])])]),e._v(" "),a("p",[e._v("Your BTCPay Server should now be fully synched.")]),e._v(" "),a("p",[e._v("If after this BTCPay Server keeps showing that your node is always starting, see the cause of "),a("a",{attrs:{href:"#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[e._v("BTCPay Server keeps showing that my node is always starting")]),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"how-to-enable-bitcoin-node-pruning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-enable-bitcoin-node-pruning"}},[e._v("#")]),e._v(" How to enable Bitcoin node pruning?")]),e._v(" "),a("p",[e._v("This will prune your Bitcoin full node to a maximum of 100GB (of blocks):")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("p",[e._v("Other pruning options are "),a("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("documented here")]),e._v(". See "),a("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-modify-or-deactivate-environment-variables"}},[e._v("this example")]),e._v(" for use with other additional fragments.")],1),e._v(" "),a("h2",{attrs:{id:"how-to-disable-bitcoin-node-pruning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-disable-bitcoin-node-pruning"}},[e._v("#")]),e._v(" How to disable Bitcoin node pruning?")]),e._v(" "),a("p",[e._v("To disable pruning of your Bitcoin node in BTCPay, first ensure you have enough memory to store the entire blockchain and BTCPayServer on your system. Then disable the "),a("code",[e._v("opt-save-storage")]),e._v(" environment variable. See "),a("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-modify-or-deactivate-environment-variables"}},[e._v("this example")]),e._v(" to view your fragment list and select only one for removal. The following example will remove "),a("strong",[e._v("all")]),e._v(" additional fragments:")],1),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("p",[e._v("Then run the following commands to recreate a non-pruned Bitcoin node:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("btcpay-down.sh\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Delete 'blocks' and 'chainstate' folders")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("rm")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-rf")]),e._v(" /var/lib/docker/volumes/generated_bitcoin_datadir/_data/blocks\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("rm")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-rf")]),e._v(" /var/lib/docker/volumes/generated_bitcoin_datadir/_data/chainstate\nbtcpay-up.sh\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[148],{895:function(e,a,t){"use strict";t.r(a);var s=t(17),n=Object(s.a)({},(function(){var e=this,a=e._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[a("h1",{attrs:{id:"synchronization-faq"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#synchronization-faq"}},[e._v("#")]),e._v(" Synchronization FAQ")]),e._v(" "),a("p",[e._v("This document covers the most common questions and issues that may occur during BTCPay sync.")]),e._v(" "),a("p"),a("div",{staticClass:"table-of-contents"},[a("ul",[a("li",[a("a",{attrs:{href:"#why-does-btcpay-sync"}},[e._v("Why does BTCPay sync?")])]),a("li",[a("a",{attrs:{href:"#can-i-skip-the-synchronization"}},[e._v("Can I skip the synchronization?")])]),a("li",[a("a",{attrs:{href:"#how-do-i-know-that-btcpay-synced-completely"}},[e._v("How do I know that BTCPay synced completely?")])]),a("li",[a("a",{attrs:{href:"#how-can-i-check-the-block-height-of-my-bitcoin-node"}},[e._v("How can I check the block height of my bitcoin node?")])]),a("li",[a("a",{attrs:{href:"#btcpay-server-takes-forever-to-synchronize"}},[e._v("BTCPay Server takes forever to synchronize")]),a("ul",[a("li",[a("a",{attrs:{href:"#cause-1-not-enough-cpu"}},[e._v("Cause 1: Not enough CPU")])]),a("li",[a("a",{attrs:{href:"#cause-2-using-swap-memory"}},[e._v("Cause 2: Using swap memory")])])])]),a("li",[a("a",{attrs:{href:"#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[e._v("BTCPay Server keeps showing that my node is always starting")]),a("ul",[a("li",[a("a",{attrs:{href:"#cause-1-you-do-not-have-enough-ram"}},[e._v("Cause 1: You do not have enough RAM")])]),a("li",[a("a",{attrs:{href:"#cause-2-you-do-not-have-enough-storage"}},[e._v("Cause 2: You do not have enough storage")])]),a("li",[a("a",{attrs:{href:"#cause-3-you-accidentally-disabled-pruning"}},[e._v("Cause 3: You accidentally disabled pruning")])]),a("li",[a("a",{attrs:{href:"#cause-4-your-bitcoin-data-directory-is-corrupted"}},[e._v("Cause 4: Your bitcoin data directory is corrupted")])]),a("li",[a("a",{attrs:{href:"#cause-5-your-last-wallet-synchronisation-goes-beyond-pruned-data"}},[e._v("Cause 5: Your last wallet synchronisation goes beyond pruned data")])])])]),a("li",[a("a",{attrs:{href:"#im-running-a-full-node-and-have-a-synched-blockchain-can-btcpay-use-it-so-that-it-doesnt-have-to-do-a-full-sync"}},[e._v("I'm running a full node and have a synched blockchain, can BTCPay use it so that it doesn't have to do a full sync?")])]),a("li",[a("a",{attrs:{href:"#how-to-enable-bitcoin-node-pruning"}},[e._v("How to enable Bitcoin node pruning?")])]),a("li",[a("a",{attrs:{href:"#how-to-disable-bitcoin-node-pruning"}},[e._v("How to disable Bitcoin node pruning?")])])])]),a("p"),e._v(" "),a("h2",{attrs:{id:"why-does-btcpay-sync"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#why-does-btcpay-sync"}},[e._v("#")]),e._v(" Why does BTCPay sync?")]),e._v(" "),a("p",[e._v("After deployment, your BTCPay Server needs to sync the entire blockchain and validate all the consensus rules. Depending on your machine specifications, bandwidth and number of altcoins you added, this process may take between 1-5 days.")]),e._v(" "),a("p",[e._v("It may seem tedious, but it's a critical step of running your own full node and not having to trust or rely on anyone. Your node will not only download ~300GB of data (less if you're using a pruned node) but also validate all the rules of the consensus. You can find more information about the importance of blockchain synchronization in "),a("a",{attrs:{href:"https://www.youtube.com/watch?v=OrYDehC-8TU",target:"_blank",rel:"noopener noreferrer"}},[e._v("this video"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("If you are only interested in learning about BTCPay Server i.e. simply "),a("RouterLink",{attrs:{to:"/TryItOut/"}},[e._v("trying it out")]),e._v(" without deploying your own instance, you can avoid sync by using a "),a("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("Third-Party host")]),e._v(".")],1),e._v(" "),a("h2",{attrs:{id:"can-i-skip-the-synchronization"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#can-i-skip-the-synchronization"}},[e._v("#")]),e._v(" Can I skip the synchronization?")]),e._v(" "),a("p",[e._v("You can't skip synchronization if you are deploying a BTCPay Server, but you can drastically decrease the time it takes. If you're comfortable with using the command line, you can use FastSync to synchronize your node faster. Be sure to "),a("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/tree/master/contrib/FastSync",target:"_blank",rel:"noopener noreferrer"}},[e._v("read this FastSync document"),a("OutboundLink")],1),e._v(" to understand the potential trust issues involved with this feature.")]),e._v(" "),a("p",[e._v("To use FastSync, make sure your deployment has a "),a("a",{attrs:{href:"#how-to-enable-bitcoin-node-pruning"}},[e._v("pruning option enabled")]),e._v(" by using an "),a("code",[e._v("opt-save-storage")]),e._v(" environment variable, otherwise bitcoind will not be able to sync. First step is to "),a("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-ssh-into-my-btcpay-running-on-vps"}},[e._v("ssh into")]),e._v(" your BTCPayServer instance and run the following commands:")],1),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token variable"}},[e._v("$BTCPAY_BASE_DIRECTORY")]),e._v("/btcpayserver-docker/\nbtcpay-down.sh\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" contrib/FastSync\n./load-utxo-set.sh\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Once FastSync has completed")]),e._v("\nbtcpay-up.sh\n")])])]),a("p",[e._v("After FastSync is complete and you have brought back up your instance, refresh your BTCPay domain and wait for remaining blockchain synchronization. You can also follow "),a("a",{attrs:{href:"https://youtube.com/watch?v=VNMnd-dX9Q8?t=1730",target:"_blank",rel:"noopener noreferrer"}},[e._v("this video"),a("OutboundLink")],1),e._v(".")]),e._v(" "),a("p",[e._v("If your FastSync returns "),a("code",[e._v("You need to delete your Bitcoin Core wallet")]),e._v(" after you load the uxto set, or you find this error: "),a("code",[e._v("Last wallet synchronisation goes beyond pruned data")]),e._v(", see the cause of "),a("a",{attrs:{href:"#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[e._v("BTCPay Server keeps showing that my node is always starting")]),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"how-do-i-know-that-btcpay-synced-completely"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-do-i-know-that-btcpay-synced-completely"}},[e._v("#")]),e._v(" How do I know that BTCPay synced completely?")]),e._v(" "),a("p",[e._v("When you do not see a pop-up message in the bottom right corner, which shows the sync progress, that means that your server is fully synced and you can "),a("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("begin using it")]),e._v(".")],1),e._v(" "),a("p",[e._v("If you want to check that your BTCPay Server Bitcoin node is synchronized with the most recent block in the Bitcoin blockchain, "),a("a",{attrs:{href:"#how-can-i-check-the-block-height-of-my-bitcoin-node"}},[e._v("check your node height")]),e._v(" matches the current block height using any blockchain explorer.")]),e._v(" "),a("h2",{attrs:{id:"how-can-i-check-the-block-height-of-my-bitcoin-node"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-can-i-check-the-block-height-of-my-bitcoin-node"}},[e._v("#")]),e._v(" How can I check the block height of my bitcoin node?")]),e._v(" "),a("p",[e._v("To verify the sync status of your Bitcoin node, you can use bitcoin-cli commands inside your server's Bitcoin container. SSH into your server and navigate to the directory where you "),a("RouterLink",{attrs:{to:"/Troubleshooting/#23-bitcoin-node-logs"}},[e._v("view Bitcoin logs")]),e._v(" run the command: "),a("code",[e._v("bitcoin-cli.sh getblockcount")]),e._v(" to view the current block of your server's Bitcoin node.")],1),e._v(" "),a("h2",{attrs:{id:"btcpay-server-takes-forever-to-synchronize"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-takes-forever-to-synchronize"}},[e._v("#")]),e._v(" BTCPay Server takes forever to synchronize")]),e._v(" "),a("p",[e._v("Synchronizing a Full Bitcoin node should take between 1 and 5 days. It should sync quickly at first and more slowly at the end.")]),e._v(" "),a("p",[e._v("If the node appears to not be syncing, verify:")]),e._v(" "),a("ul",[a("li",[e._v("Not enough CPU")]),e._v(" "),a("li",[e._v("Using swap memory")])]),e._v(" "),a("h3",{attrs:{id:"cause-1-not-enough-cpu"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-1-not-enough-cpu"}},[e._v("#")]),e._v(" Cause 1: Not enough CPU")]),e._v(" "),a("p",[e._v("We recommend 2 CPU while synchronizing; however some hosting providers throttle your CPU if you use too much.")]),e._v(" "),a("p",[e._v("Check with")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" stats\n")])])]),a("p",[e._v("If you see more than 100% CPU usage, while being very slow to sync:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("8e7ac41e6e2a btcpayserver_bitcoind 100% 560.5MiB / 3.853GiB 14.20% 4.17\n")])])]),a("p",[e._v("Then you need to scale up your machine specification.")]),e._v(" "),a("p",[e._v("If you see very low CPU usage (less than 10%) during synchronization:")]),e._v(" "),a("div",{staticClass:"language- extra-class"},[a("pre",{pre:!0,attrs:{class:"language-text"}},[a("code",[e._v("8e7ac41e6e2a btcpayserver_bitcoind 10% 560.5MiB / 3.853GiB 14.20% 4.17\n")])])]),a("p",[e._v("Your hosting provider might throttle your CPU. Please make sure your host supports the high use of CPU for an extended period.")]),e._v(" "),a("p",[e._v("If they don't allow it, shut down your server until they stop throttling you. Then you can limit the CPU via docker, and restart the server:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" update btcpayserver_bitcoind "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--cpus")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('".8"')]),e._v("\n")])])]),a("h3",{attrs:{id:"cause-2-using-swap-memory"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-2-using-swap-memory"}},[e._v("#")]),e._v(" Cause 2: Using swap memory")]),e._v(" "),a("p",[e._v("If you are synching and don't have enough memory, your server may use swap memory to continue operating:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("free")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-h")]),e._v("\n")])])]),a("p",[e._v("If you see swap memory usage:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v(" total used "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("free")]),e._v(" shared buff/cache available\nMem: "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G 0M 66M 0G 0M\nSwap: "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v(".0G 200M 800M\n")])])]),a("p",[e._v("Then it means you need to scale up your server by adding more memory.")]),e._v(" "),a("h2",{attrs:{id:"btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[e._v("#")]),e._v(" BTCPay Server keeps showing that my node is always starting")]),e._v(" "),a("p",[e._v("Possible cause:")]),e._v(" "),a("ul",[a("li",[e._v("You do not have enough RAM")]),e._v(" "),a("li",[e._v("You do not have enough storage")]),e._v(" "),a("li",[e._v("You accidentally disabled pruning")]),e._v(" "),a("li",[e._v("Your bitcoin data directory is corrupted")]),e._v(" "),a("li",[e._v("Your last wallet synchronisation goes beyond pruned data")])]),e._v(" "),a("h3",{attrs:{id:"cause-1-you-do-not-have-enough-ram"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-1-you-do-not-have-enough-ram"}},[e._v("#")]),e._v(" Cause 1: You do not have enough RAM")]),e._v(" "),a("p",[e._v("Check your RAM:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("free")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-h")]),e._v("\n")])])]),a("p",[e._v("If you see that you have no "),a("code",[e._v("free")]),e._v(" or very little "),a("code",[e._v("available")]),e._v(" memory:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v(" total used "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("free")]),e._v(" shared buff/cache available\nMem: "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G 0M 66M 0G 0M\nSwap: 0B 0B 0B\n")])])]),a("p",[e._v("Then you need more memory. If you have already synched your node, you can add some swap memory. If you haven't, your server specs are too limited.")]),e._v(" "),a("p",[e._v("If you have already synched, you can add 2G of swap memory with:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("fallocate "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-l")]),e._v(" 2G /mnt/swapfile\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("chmod")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("600")]),e._v(" /mnt/swapfile\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("mkswap")]),e._v(" /mnt/swapfile\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("swapon")]),e._v(" /mnt/swapfile\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("echo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"/mnt/swapfile none swap sw 0 0"')]),e._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">>")]),e._v(" /etc/fstab\n")])])]),a("h3",{attrs:{id:"cause-2-you-do-not-have-enough-storage"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-2-you-do-not-have-enough-storage"}},[e._v("#")]),e._v(" Cause 2: You do not have enough storage")]),e._v(" "),a("p",[e._v("Check the storage of your machine:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("df")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-h")]),e._v("\n")])])]),a("p",[e._v("If you see you don't have any storage left (/dev/sda1 in my case)")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("Filesystem Size Used Avail Use% Mounted on\nudev "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("% /dev\ntmpfs 395M 41M 354M "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("11")]),e._v("% /run\n/dev/sda1 125G 125G 0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("100")]),e._v("% /\ntmpfs "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("% /dev/shm\ntmpfs "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),e._v(".0M "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("5")]),e._v(".0M "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("% /run/lock\ntmpfs "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("2")]),e._v(".0G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v("% /sys/fs/cgroup\n/dev/sdb1 "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(".8G 18M "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("7")]),e._v(".4G "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),e._v("% /mnt\n")])])]),a("p",[a("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("Choose the docker fragment")]),e._v(" for the amount of storage you aim to keep. Then "),a("RouterLink",{attrs:{to:"/Docker/#how-i-can-prune-my-nodes"}},[e._v("prune your node")]),e._v(".")],1),e._v(" "),a("h3",{attrs:{id:"cause-3-you-accidentally-disabled-pruning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-3-you-accidentally-disabled-pruning"}},[e._v("#")]),e._v(" Cause 3: You accidentally disabled pruning")]),e._v(" "),a("p",[e._v("If you have recently tried to modify your environment variables using the "),a("code",[e._v('export BTCPAYGEN_ADDITIONAL_FRAGMENTS="xyz"')]),e._v(" command to add an additional fragment, but forgot to include your current ones, you may have disabled pruning.")]),e._v(" "),a("p",[e._v("If you don't have enough memory to store the entire Bitcoin blockchain and you don't have an "),a("code",[e._v("opt-save-storage")]),e._v(" listed when you "),a("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-modify-or-deactivate-environment-variables"}},[e._v("print the complete list of options")]),e._v(" that you are running, it is very likely you have disabled pruning.")],1),e._v(" "),a("p",[e._v("You can verify by checking your Bitcoind logs:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--tail")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("100")]),e._v(" btcpayserver_bitcoind\n")])])]),a("p",[e._v("If you see:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("Block files have previously been pruned.\nYou need to rebuild the database using "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-reindex")]),e._v(" to go back to unpruned mode.\nThis will redownload the entire blockchain.\nPlease restart with "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-reindex")]),e._v(" or -reindex-chainstate to recover.\n")])])]),a("p",[e._v("You can simply "),a("a",{attrs:{href:"#how-to-enable-bitcoin-node-pruning"}},[e._v("re-enable pruning")]),e._v(" to solve the issue.")]),e._v(" "),a("h3",{attrs:{id:"cause-4-your-bitcoin-data-directory-is-corrupted"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-4-your-bitcoin-data-directory-is-corrupted"}},[e._v("#")]),e._v(" Cause 4: Your bitcoin data directory is corrupted")]),e._v(" "),a("p",[e._v("Check the logs of your node:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker")]),e._v(" logs "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--tail")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token number"}},[e._v("10")]),e._v(" btcpayserver_bitcoind\n")])])]),a("p",[e._v("If you see:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("Please restart with "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-reindex")]),e._v(" or -reindex-chainstate to recover.\n")])])]),a("p",[e._v("Then your bitcoin data directory has been corrupted. It may be physical damage or failure of the hard drive.\nTo reindex your node:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("btcpay-down.sh\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Delete 'blocks' and 'chainstate' folders")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("rm")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-rf")]),e._v(" /var/lib/docker/volumes/generated_bitcoin_datadir/_data/blocks\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("rm")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-rf")]),e._v(" /var/lib/docker/volumes/generated_bitcoin_datadir/_data/chainstate\nbtcpay-up.sh\n")])])]),a("h3",{attrs:{id:"cause-5-your-last-wallet-synchronisation-goes-beyond-pruned-data"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#cause-5-your-last-wallet-synchronisation-goes-beyond-pruned-data"}},[e._v("#")]),e._v(" Cause 5: Your last wallet synchronisation goes beyond pruned data")]),e._v(" "),a("p",[e._v("This can happen if you use FastSync or import an already synched blockchain. It means that the bitcoin core wallet needs to be removed because it was created before the utxoset, likely because BTCPay Server started without the utxoset at the first boot. To verify this case, "),a("RouterLink",{attrs:{to:"/Troubleshooting/#21-btcpay-logs"}},[e._v("check the bitcoind log")]),e._v(" for this:")],1),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("Error: Prune: last wallet synchronisation goes beyond pruned data. You need to "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-reindex")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("(")]),e._v("download the whole blockchain again "),a("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("in")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token keyword"}},[e._v("case")]),e._v(" of pruned "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("node")]),a("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(")")]),e._v("\n")])])]),a("p",[e._v("If you see this error and agree to remove the wallet to finish syncing, use "),a("code",[e._v("docker volume rm generated_bitcoin_wallet_datadir")]),e._v(" after you run "),a("code",[e._v("btcpay-down.sh")]),e._v(" and before you run "),a("code",[e._v("btcpay-up.sh")]),e._v("\nWARNING: Do not delete this wallet if you have any funds on it.")]),e._v(" "),a("h2",{attrs:{id:"im-running-a-full-node-and-have-a-synched-blockchain-can-btcpay-use-it-so-that-it-doesnt-have-to-do-a-full-sync"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#im-running-a-full-node-and-have-a-synched-blockchain-can-btcpay-use-it-so-that-it-doesnt-have-to-do-a-full-sync"}},[e._v("#")]),e._v(" I'm running a full node and have a synched blockchain, can BTCPay use it so that it doesn't have to do a full sync?")]),e._v(" "),a("p",[e._v("Yes you can! However, before you do that, you'll want to stop bitcoind from updating docker's volume for it, as that job will be taken over by BTCPay Server.")]),e._v(" "),a("p",[e._v("If you want to run BTCPay Server inside a docker-compose, and that you have the data directory ("),a("code",[e._v(".bitcoin")]),e._v(") of a fully synched node on your docker host, then you can reuse it easily for BTCPay Server.")]),e._v(" "),a("p",[e._v("To do that, follow the following steps :")]),e._v(" "),a("ul",[a("li",[e._v("Do the normal setup according to "),a("RouterLink",{attrs:{to:"/Docker/"}},[e._v("this instruction")]),e._v(". Note the "),a("code",[e._v("opt-save-storage")]),e._v(" environment variable, which is used to enable various pruning levels. If you do not want to prune your exiting data directory, then omit the following line in your BTCPay docker deployment: "),a("code",[e._v('export BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-save-storage-s"')]),e._v(".")],1),e._v(" "),a("li",[e._v("Once "),a("code",[e._v("btcpay-setup.sh")]),e._v(" is over, turn down the docker compose with "),a("code",[e._v("btcpay-down.sh")]),e._v(".")]),e._v(" "),a("li",[e._v("Login as root with "),a("code",[e._v("sudo su -")]),e._v(".")]),e._v(" "),a("li",[e._v("Open the docker's volume for bitcoind : "),a("code",[e._v("cd /var/lib/docker/volumes/generated_bitcoin_datadir/")]),e._v(", and check its content with "),a("code",[e._v("ls -la")]),e._v(". You should see only one directory named "),a("code",[e._v("_data")]),e._v(".")]),e._v(" "),a("li",[e._v("Now remove the "),a("code",[e._v("_data")]),e._v("directory : "),a("code",[e._v("rm -r _data")]),e._v(". If for any reason you want to keep this directory and its content you can also rename it instead : "),a("code",[e._v("mv _data/ _data.old/")])]),e._v(" "),a("li",[e._v("Now create a "),a("a",{attrs:{href:"https://www.cyberciti.biz/faq/creating-soft-link-or-symbolic-link/",target:"_blank",rel:"noopener noreferrer"}},[e._v("symbolic link"),a("OutboundLink")],1),e._v(" between "),a("code",[e._v("/var/lib/docker/volumes/generated_bitcoin_datadir/_data")]),e._v(" and your data directory ("),a("code",[e._v(".bitcoin")]),e._v(") on your host: "),a("code",[e._v("ln -s path/to/.bitcoin /var/lib/docker/volumes/generated_bitcoin_datadir/_data")])]),e._v(" "),a("li",[e._v("Check that the link has been done with a "),a("code",[e._v("ls -la")])]),e._v(" "),a("li",[e._v("Start your docker-compose again with "),a("code",[e._v("btcpay-up.sh")])])]),e._v(" "),a("p",[e._v("Your BTCPay Server should now be fully synched.")]),e._v(" "),a("p",[e._v("If after this BTCPay Server keeps showing that your node is always starting, see the cause of "),a("a",{attrs:{href:"#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[e._v("BTCPay Server keeps showing that my node is always starting")]),e._v(".")]),e._v(" "),a("h2",{attrs:{id:"how-to-enable-bitcoin-node-pruning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-enable-bitcoin-node-pruning"}},[e._v("#")]),e._v(" How to enable Bitcoin node pruning?")]),e._v(" "),a("p",[e._v("This will prune your Bitcoin full node to a maximum of 100GB (of blocks):")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[e._v("sudo")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("su")]),e._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-save-storage"')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("p",[e._v("Other pruning options are "),a("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("documented here")]),e._v(". See "),a("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-modify-or-deactivate-environment-variables"}},[e._v("this example")]),e._v(" for use with other additional fragments.")],1),e._v(" "),a("h2",{attrs:{id:"how-to-disable-bitcoin-node-pruning"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-disable-bitcoin-node-pruning"}},[e._v("#")]),e._v(" How to disable Bitcoin node pruning?")]),e._v(" "),a("p",[e._v("To disable pruning of your Bitcoin node in BTCPay, first ensure you have enough memory to store the entire blockchain and BTCPayServer on your system. Then disable the "),a("code",[e._v("opt-save-storage")]),e._v(" environment variable. See "),a("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-modify-or-deactivate-environment-variables"}},[e._v("this example")]),e._v(" to view your fragment list and select only one for removal. The following example will remove "),a("strong",[e._v("all")]),e._v(" additional fragments:")],1),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[e._v('""')]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" ./btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),a("p",[e._v("Then run the following commands to recreate a non-pruned Bitcoin node:")]),e._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[e._v("btcpay-down.sh\n"),a("span",{pre:!0,attrs:{class:"token comment"}},[e._v("# Delete 'blocks' and 'chainstate' folders")]),e._v("\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("rm")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-rf")]),e._v(" /var/lib/docker/volumes/generated_bitcoin_datadir/_data/blocks\n"),a("span",{pre:!0,attrs:{class:"token function"}},[e._v("rm")]),e._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-rf")]),e._v(" /var/lib/docker/volumes/generated_bitcoin_datadir/_data/chainstate\nbtcpay-up.sh\n")])])])])}),[],!1,null,null,null);a.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/149.b7ccd3c9.js b/assets/js/149.b6c5b769.js similarity index 99% rename from assets/js/149.b7ccd3c9.js rename to assets/js/149.b6c5b769.js index 56609a9bf3..7c4b9f91db 100644 --- a/assets/js/149.b7ccd3c9.js +++ b/assets/js/149.b6c5b769.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[149],{898:function(e,t,r){"use strict";r.r(t);var a=r(17),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-accept-bitcoin-payments-in-grandnode"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-accept-bitcoin-payments-in-grandnode"}},[e._v("#")]),e._v(" BTCPay Server Accept Bitcoin payments in GrandNode")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/grandnode/main/GrandNodeAcceptBitcoin.png",alt:"BTCPay GrandNode Banner",title:"BTCPay GrandNode Banner"}})]),e._v(" "),t("h2",{attrs:{id:"plugin-overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-overview"}},[e._v("#")]),e._v(" Plugin Overview")]),e._v(" "),t("p",[e._v("This plugin allows you to easily start accepting Bitcoin payments in your GrandNode e-commerce store using BTCPay Server a free, self-hosted and open-source payment gateway.")]),e._v(" "),t("h2",{attrs:{id:"features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#features"}},[e._v("#")]),e._v(" Features")]),e._v(" "),t("ul",[t("li",[e._v("0% Fees: Enjoy a payment gateway with no fees. Yes, really!")]),e._v(" "),t("li",[e._v("No complicated KYC needed, you're your own self-hosted payment gateway")]),e._v(" "),t("li",[e._v("Automated invoice management and refunds")]),e._v(" "),t("li",[e._v("Simple and customizable checkout UX, available in 30+ languages")]),e._v(" "),t("li",[e._v("Direct payments to your wallet, no intermediary")]),e._v(" "),t("li",[e._v("Reporting and accounting CSV exports")]),e._v(" "),t("li",[e._v("Real-time exchange price tracking for correct payment amounts")]),e._v(" "),t("li",[e._v("Community-driven support")]),e._v(" "),t("li",[e._v("Extensive documentation and video tutorials")])]),e._v(" "),t("h2",{attrs:{id:"getting-started"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[e._v("#")]),e._v(" Getting Started")]),e._v(" "),t("h3",{attrs:{id:"download-and-installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-installation"}},[e._v("#")]),e._v(" Download and installation")]),e._v(" "),t("p",[e._v("The plugins can be downloaded through through "),t("a",{attrs:{href:"https://github.com/btcpayserver/nopcommerce/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://grandnode.com/btcpay-server-accept-bitcoin-payments",target:"_blank",rel:"noopener noreferrer"}},[e._v("GrandNode Extension Marketplace"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("For installing the plugin on GrandNode, you can either upload the plugin directly to the "),t("code",[e._v("/plugins")]),e._v(" folder in your GrandNode main directory and restart your application, or use the Admin Panel to upload the plugin.")]),e._v(" "),t("p",[e._v("In the "),t("strong",[e._v("Admin Panel")]),e._v(", navigate to "),t("strong",[e._v("Plugins -> Local Plugins")]),e._v(" and click the "),t("strong",[e._v('"Upload"')]),e._v(' button. Ensure the plugin file is in ZIP for successful upload. After uploading, find the plugin in the list, click "Install" next to it, and enable it if needed.')]),e._v(" "),t("h2",{attrs:{id:"plugin-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-configuration"}},[e._v("#")]),e._v(" Plugin configuration")]),e._v(" "),t("p",[e._v("You can configure the plugin either automatically or manually, depending on your preferences and requirements.")]),e._v(" "),t("h3",{attrs:{id:"automatic-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#automatic-configuration"}},[e._v("#")]),e._v(" Automatic Configuration")]),e._v(" "),t("ol",[t("li",[e._v('Enter Url to your BTCPay Server into "BTCPay Url" field. (e.g. https://mainnet.demo.btcpayserver.org)')]),e._v(" "),t("li",[e._v('Click on the "Configure automatically" button to be redirected to the API authorization page of your BTCPay Server')]),e._v(" "),t("li",[e._v("On the authorization page: Select the store you want to connect to your GrandNode (you might need to login first)")]),e._v(" "),t("li",[e._v('Click on "Authorize App" button and you will be redirected back to your GrandNode')]),e._v(" "),t("li",[e._v('The "API Key", "BTCPay Store ID" and "Webhook Secret" fields will be automatically filled and a webhook created')]),e._v(" "),t("li",[e._v('Click "Save" button at bottom to persist the configuration. Congrats, the configuration is now complete!')])]),e._v(" "),t("p",[t("em",[e._v("Note: given the architecture of GrandNode, it is possible that malfunctions in redirections may occur. Particularly if https is disabled or incorrectly configured. In this case, please opt for manual configuration.")])]),e._v(" "),t("h3",{attrs:{id:"manual-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#manual-configuration"}},[e._v("#")]),e._v(" Manual Configuration")]),e._v(" "),t("p",[e._v("Ensure that the following fields are filled out:")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Url")]),e._v(" "),t("li",[e._v("BTCPay Store ID")]),e._v(" "),t("li",[e._v("API Key")]),e._v(" "),t("li",[e._v("WebHook Secret")])]),e._v(" "),t("h4",{attrs:{id:"btcpay-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-url"}},[e._v("#")]),e._v(" BTCPay URL")]),e._v(" "),t("p",[e._v("In the BTCPay URL field of your GrandNode, simply input the link to your self-hosted server or the one hosted by a "),t("a",{attrs:{href:"https://directory.btcpayserver.org/filter/hosts",target:"_blank",rel:"noopener noreferrer"}},[e._v("third-party provider"),t("OutboundLink")],1),e._v(". For example; https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("h4",{attrs:{id:"btcpay-store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-store-id"}},[e._v("#")]),e._v(" BTCPay Store ID")]),e._v(" "),t("p",[e._v("BTCPay "),t("strong",[e._v("Store ID")]),e._v(" can be obtained from your BTCPay Server, in Store Settings > General > Store ID field. Copy it and paste it over in the "),t("code",[e._v("BTCPay Store ID")]),e._v(" field.")]),e._v(" "),t("h4",{attrs:{id:"generating-the-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-api-key"}},[e._v("#")]),e._v(" Generating the API key")]),e._v(" "),t("ol",[t("li",[e._v("To create the "),t("strong",[e._v("BTCPay API key")]),e._v(", click on the "),t("code",[e._v("Account")]),e._v(" located at the bottom of the sidebar.")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Manage Account > API Key")]),e._v(".")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Generate API key")]),e._v(" button")]),e._v(" "),t("li",[e._v("Click on the checkboxes and enable the following permissions:")])]),e._v(" "),t("ul",[t("li",[e._v("View invoices")]),e._v(" "),t("li",[e._v("Create an invoice")]),e._v(" "),t("li",[e._v("Modify invoices")]),e._v(" "),t("li",[e._v("Modify selected stores' webhooks")]),e._v(" "),t("li",[e._v("View your stores")]),e._v(" "),t("li",[e._v("Create non-approved pull payments in selected stores (optional)")])]),e._v(" "),t("p",[t("em",[e._v("Note: To use the "),t("RouterLink",{attrs:{to:"/Refund/#refunds"}},[e._v("refund feature")]),e._v(', you must also add the "Create non-approved pull payments" permission. After a refund, an order note is created where you can copy the pull payments link and send to your customer to claim it (this order note is also visible by the customer). The customer can request the refund on that page by filling out refund address.')],1)]),e._v(" "),t("h4",{attrs:{id:"generating-the-webhook"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-webhook"}},[e._v("#")]),e._v(" Generating the webhook")]),e._v(" "),t("ol",[t("li",[e._v('In your GrandNode, copy the "Webhook Url" shown on the bottom of the BTCPay plugin configuration screen.')]),e._v(" "),t("li",[e._v("Next, go to your BTCPay Server "),t("code",[e._v("Store Settings > Webhooks")])]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Create Webhook")]),e._v(" button")]),e._v(" "),t("li",[e._v("Paste the "),t("code",[e._v("Webhook Url")]),e._v(" you copied from GrandNode (step 1) into "),t("code",[e._v("Payload URL")]),e._v(" field")]),e._v(" "),t("li",[e._v('Click on the "Eye" icon next to the '),t("code",[e._v("Secret")]),e._v(" field to reveal the secret key and copy it.")]),e._v(" "),t("li",[e._v("Don't forget to click on the "),t("code",[e._v("Add webhook")]),e._v(" to apply all the changes.")]),e._v(" "),t("li",[e._v("Go back GrandNode and paste the Secret Key into the "),t("code",[e._v("WebHook Secret")]),e._v(" field")]),e._v(" "),t("li",[e._v("Click save to apply all the changes")])]),e._v(" "),t("p",[e._v("Now your BTCPay Server is connected to your GranNode sucessfully.")]),e._v(" "),t("h2",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")]),e._v(" "),t("p",[e._v("If experience a bug please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpay-grandnode-plugin/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("open a bug report"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"license"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#license"}},[e._v("#")]),e._v(" License")]),e._v(" "),t("p",[e._v("This plugin is released under the "),t("a",{attrs:{href:"https://github.com/btcpayserver/grandnode/blob/master/LICENSE",target:"_blank",rel:"noopener noreferrer"}},[e._v("MIT License"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("The non-profit "),t("a",{attrs:{href:"https://btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Foundation"),t("OutboundLink")],1),e._v(" is committed to keeping this powerful payment plugin free forever. Our mission is to enable anyone to accept bitcoin regardless of financial, technical, social or political barriers.")]),e._v(" "),t("hr")])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[149],{897:function(e,t,r){"use strict";r.r(t);var a=r(17),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-accept-bitcoin-payments-in-grandnode"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-accept-bitcoin-payments-in-grandnode"}},[e._v("#")]),e._v(" BTCPay Server Accept Bitcoin payments in GrandNode")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/grandnode/main/GrandNodeAcceptBitcoin.png",alt:"BTCPay GrandNode Banner",title:"BTCPay GrandNode Banner"}})]),e._v(" "),t("h2",{attrs:{id:"plugin-overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-overview"}},[e._v("#")]),e._v(" Plugin Overview")]),e._v(" "),t("p",[e._v("This plugin allows you to easily start accepting Bitcoin payments in your GrandNode e-commerce store using BTCPay Server a free, self-hosted and open-source payment gateway.")]),e._v(" "),t("h2",{attrs:{id:"features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#features"}},[e._v("#")]),e._v(" Features")]),e._v(" "),t("ul",[t("li",[e._v("0% Fees: Enjoy a payment gateway with no fees. Yes, really!")]),e._v(" "),t("li",[e._v("No complicated KYC needed, you're your own self-hosted payment gateway")]),e._v(" "),t("li",[e._v("Automated invoice management and refunds")]),e._v(" "),t("li",[e._v("Simple and customizable checkout UX, available in 30+ languages")]),e._v(" "),t("li",[e._v("Direct payments to your wallet, no intermediary")]),e._v(" "),t("li",[e._v("Reporting and accounting CSV exports")]),e._v(" "),t("li",[e._v("Real-time exchange price tracking for correct payment amounts")]),e._v(" "),t("li",[e._v("Community-driven support")]),e._v(" "),t("li",[e._v("Extensive documentation and video tutorials")])]),e._v(" "),t("h2",{attrs:{id:"getting-started"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[e._v("#")]),e._v(" Getting Started")]),e._v(" "),t("h3",{attrs:{id:"download-and-installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-installation"}},[e._v("#")]),e._v(" Download and installation")]),e._v(" "),t("p",[e._v("The plugins can be downloaded through through "),t("a",{attrs:{href:"https://github.com/btcpayserver/nopcommerce/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://grandnode.com/btcpay-server-accept-bitcoin-payments",target:"_blank",rel:"noopener noreferrer"}},[e._v("GrandNode Extension Marketplace"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("For installing the plugin on GrandNode, you can either upload the plugin directly to the "),t("code",[e._v("/plugins")]),e._v(" folder in your GrandNode main directory and restart your application, or use the Admin Panel to upload the plugin.")]),e._v(" "),t("p",[e._v("In the "),t("strong",[e._v("Admin Panel")]),e._v(", navigate to "),t("strong",[e._v("Plugins -> Local Plugins")]),e._v(" and click the "),t("strong",[e._v('"Upload"')]),e._v(' button. Ensure the plugin file is in ZIP for successful upload. After uploading, find the plugin in the list, click "Install" next to it, and enable it if needed.')]),e._v(" "),t("h2",{attrs:{id:"plugin-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-configuration"}},[e._v("#")]),e._v(" Plugin configuration")]),e._v(" "),t("p",[e._v("You can configure the plugin either automatically or manually, depending on your preferences and requirements.")]),e._v(" "),t("h3",{attrs:{id:"automatic-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#automatic-configuration"}},[e._v("#")]),e._v(" Automatic Configuration")]),e._v(" "),t("ol",[t("li",[e._v('Enter Url to your BTCPay Server into "BTCPay Url" field. (e.g. https://mainnet.demo.btcpayserver.org)')]),e._v(" "),t("li",[e._v('Click on the "Configure automatically" button to be redirected to the API authorization page of your BTCPay Server')]),e._v(" "),t("li",[e._v("On the authorization page: Select the store you want to connect to your GrandNode (you might need to login first)")]),e._v(" "),t("li",[e._v('Click on "Authorize App" button and you will be redirected back to your GrandNode')]),e._v(" "),t("li",[e._v('The "API Key", "BTCPay Store ID" and "Webhook Secret" fields will be automatically filled and a webhook created')]),e._v(" "),t("li",[e._v('Click "Save" button at bottom to persist the configuration. Congrats, the configuration is now complete!')])]),e._v(" "),t("p",[t("em",[e._v("Note: given the architecture of GrandNode, it is possible that malfunctions in redirections may occur. Particularly if https is disabled or incorrectly configured. In this case, please opt for manual configuration.")])]),e._v(" "),t("h3",{attrs:{id:"manual-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#manual-configuration"}},[e._v("#")]),e._v(" Manual Configuration")]),e._v(" "),t("p",[e._v("Ensure that the following fields are filled out:")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Url")]),e._v(" "),t("li",[e._v("BTCPay Store ID")]),e._v(" "),t("li",[e._v("API Key")]),e._v(" "),t("li",[e._v("WebHook Secret")])]),e._v(" "),t("h4",{attrs:{id:"btcpay-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-url"}},[e._v("#")]),e._v(" BTCPay URL")]),e._v(" "),t("p",[e._v("In the BTCPay URL field of your GrandNode, simply input the link to your self-hosted server or the one hosted by a "),t("a",{attrs:{href:"https://directory.btcpayserver.org/filter/hosts",target:"_blank",rel:"noopener noreferrer"}},[e._v("third-party provider"),t("OutboundLink")],1),e._v(". For example; https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("h4",{attrs:{id:"btcpay-store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-store-id"}},[e._v("#")]),e._v(" BTCPay Store ID")]),e._v(" "),t("p",[e._v("BTCPay "),t("strong",[e._v("Store ID")]),e._v(" can be obtained from your BTCPay Server, in Store Settings > General > Store ID field. Copy it and paste it over in the "),t("code",[e._v("BTCPay Store ID")]),e._v(" field.")]),e._v(" "),t("h4",{attrs:{id:"generating-the-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-api-key"}},[e._v("#")]),e._v(" Generating the API key")]),e._v(" "),t("ol",[t("li",[e._v("To create the "),t("strong",[e._v("BTCPay API key")]),e._v(", click on the "),t("code",[e._v("Account")]),e._v(" located at the bottom of the sidebar.")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Manage Account > API Key")]),e._v(".")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Generate API key")]),e._v(" button")]),e._v(" "),t("li",[e._v("Click on the checkboxes and enable the following permissions:")])]),e._v(" "),t("ul",[t("li",[e._v("View invoices")]),e._v(" "),t("li",[e._v("Create an invoice")]),e._v(" "),t("li",[e._v("Modify invoices")]),e._v(" "),t("li",[e._v("Modify selected stores' webhooks")]),e._v(" "),t("li",[e._v("View your stores")]),e._v(" "),t("li",[e._v("Create non-approved pull payments in selected stores (optional)")])]),e._v(" "),t("p",[t("em",[e._v("Note: To use the "),t("RouterLink",{attrs:{to:"/Refund/#refunds"}},[e._v("refund feature")]),e._v(', you must also add the "Create non-approved pull payments" permission. After a refund, an order note is created where you can copy the pull payments link and send to your customer to claim it (this order note is also visible by the customer). The customer can request the refund on that page by filling out refund address.')],1)]),e._v(" "),t("h4",{attrs:{id:"generating-the-webhook"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-webhook"}},[e._v("#")]),e._v(" Generating the webhook")]),e._v(" "),t("ol",[t("li",[e._v('In your GrandNode, copy the "Webhook Url" shown on the bottom of the BTCPay plugin configuration screen.')]),e._v(" "),t("li",[e._v("Next, go to your BTCPay Server "),t("code",[e._v("Store Settings > Webhooks")])]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Create Webhook")]),e._v(" button")]),e._v(" "),t("li",[e._v("Paste the "),t("code",[e._v("Webhook Url")]),e._v(" you copied from GrandNode (step 1) into "),t("code",[e._v("Payload URL")]),e._v(" field")]),e._v(" "),t("li",[e._v('Click on the "Eye" icon next to the '),t("code",[e._v("Secret")]),e._v(" field to reveal the secret key and copy it.")]),e._v(" "),t("li",[e._v("Don't forget to click on the "),t("code",[e._v("Add webhook")]),e._v(" to apply all the changes.")]),e._v(" "),t("li",[e._v("Go back GrandNode and paste the Secret Key into the "),t("code",[e._v("WebHook Secret")]),e._v(" field")]),e._v(" "),t("li",[e._v("Click save to apply all the changes")])]),e._v(" "),t("p",[e._v("Now your BTCPay Server is connected to your GranNode sucessfully.")]),e._v(" "),t("h2",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")]),e._v(" "),t("p",[e._v("If experience a bug please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpay-grandnode-plugin/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("open a bug report"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"license"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#license"}},[e._v("#")]),e._v(" License")]),e._v(" "),t("p",[e._v("This plugin is released under the "),t("a",{attrs:{href:"https://github.com/btcpayserver/grandnode/blob/master/LICENSE",target:"_blank",rel:"noopener noreferrer"}},[e._v("MIT License"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("The non-profit "),t("a",{attrs:{href:"https://btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Foundation"),t("OutboundLink")],1),e._v(" is committed to keeping this powerful payment plugin free forever. Our mission is to enable anyone to accept bitcoin regardless of financial, technical, social or political barriers.")]),e._v(" "),t("hr")])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/15.adf001d6.js b/assets/js/15.45bd3721.js similarity index 89% rename from assets/js/15.adf001d6.js rename to assets/js/15.45bd3721.js index afb50d131f..e7e2994a46 100644 --- a/assets/js/15.adf001d6.js +++ b/assets/js/15.45bd3721.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{332:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--19-troubleshoot-403-callback.51193927.png"},711:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--01-install-web.4d28e0bd.png"},712:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--02-install-upload.8972740d.png"},713:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--03-enable-plugin.1b4a6c9f.png"},714:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--04-add-new-payment-method.e5a94ee3.png"},715:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--05-payment-method-details.adf89c97.png"},716:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--06-payment-method-configuration-tab.45617db0.png"},717:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--07-account-manage.d477b8b4.png"},718:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--08-add-api-key.a58b2941.png"},719:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--09-permissions-and-select-store.9ccef388.png"},720:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--10-permissions-set.74d76936.png"},721:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--11-copy-api-key.94be9878.png"},722:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--12-copy-store-id.84c19f9f.png"},723:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--13-save-vm-payment-method-form.0a3e52bd.png"},724:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--14-create-webhook.1b6e4881.png"},725:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--15-webhook-payload-url.37a4f55f.png"},726:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-webhook-copy-secret.71b0dd07.png"},727:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-virtuemart-configuration-save.ee549862.png"},728:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--17-webhook-save.dfd4fca5.png"},729:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--18-troubleshoot-copy-callback-url.70d08e31.png"},948:function(e,t,a){"use strict";a.r(t);var o=a(17),r=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"joomla-virtuemart-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#joomla-virtuemart-integration"}},[e._v("#")]),e._v(" Joomla VirtueMart integration")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("integrate BTCPay Server into your Joomla VirtueMart store")]),e._v(".\nWatch the video below to go along the document |")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/k7XfybLAky0/hqdefault.jpg)"},attrs:{href:"https://youtu.be/k7XfybLAky0",title:"BTCPay Server - Joomla VirtueMart","data-id":"k7XfybLAky0"}},[t("iframe",{attrs:{title:"BTCPay Server - Joomla VirtueMart","data-src":"https://www.youtube-nocookie.com/embed/k7XfybLAky0?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("p",[e._v("Please ensure that you meet the following requirements before installing this plugin.")]),e._v(" "),t("ul",[t("li",[e._v("PHP version 7.4 or newer")]),e._v(" "),t("li",[e._v("The curl, gd, intl, json, and mbstring PHP extensions are available")]),e._v(" "),t("li",[e._v("A VirtueMart 3 / 4 store ("),t("a",{attrs:{href:"https://www.virtuemart.net/downloads",target:"_blank",rel:"noopener noreferrer"}},[e._v("Download and installation instructions"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("You have a BTCPay Server version 1.3.0 or later, either "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("hosted by a third-party")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("You've a registered account on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("You've a BTCPay store on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("You've a wallet connected to your store")])],1)]),e._v(" "),t("h2",{attrs:{id:"1-install-btcpay-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-install-btcpay-plugin"}},[e._v("#")]),e._v(" 1. Install BTCPay Plugin")]),e._v(" "),t("p",[e._v("There are three ways to "),t("strong",[e._v("download BTCPay for VirtueMart plugin")]),e._v(":")]),e._v(" "),t("ul",[t("li",[e._v("Via the Admin Dashboard (recommended, see below)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://extensions.joomla.org/extension/vm-payment-btcpay-for-virtuemart/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Joomla Extension Directory (JED)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/joomla-virtuemart/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub Repository"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"11-install-plugin-from-joomla-admin-dashboard-recommended"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#11-install-plugin-from-joomla-admin-dashboard-recommended"}},[e._v("#")]),e._v(" 1.1 Install plugin from Joomla Admin Dashboard (recommended)")]),e._v(" "),t("ol",[t("li",[e._v("Menu: Extensions > Manage > Install")]),e._v(" "),t("li",[e._v('On "Install from Web" tab search for "btcpay"')]),e._v(" "),t("li",[e._v("Click on BTCPay for VirtueMart and [Install] button")]),e._v(" "),t("li",[e._v("Continue with step 1.3")])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(711),alt:"BTCPay Virtuemart: Plugin installation web",title:"BTCPay Virtuemart: Plugin installation web"}})]),e._v(" "),t("h3",{attrs:{id:"12-download-and-install-plugin-from-jed-or-github"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#12-download-and-install-plugin-from-jed-or-github"}},[e._v("#")]),e._v(" 1.2 Download and install plugin from JED or GitHub")]),e._v(" "),t("ol",[t("li",[e._v("Download the latest BTCPay plugin from "),t("a",{attrs:{href:"https://github.com/btcpayserver/joomla-virtuemart/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://extensions.joomla.org/extension/vm-payment-btcpay-for-virtuemart/",target:"_blank",rel:"noopener noreferrer"}},[e._v("JED"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Menu: Extensions -> Manage -> Install")]),e._v(" "),t("li",[e._v('On tab "Upload Package File" upload the '),t("code",[e._v("btcpayvm.zip")])])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(712),alt:"BTCPay Virtuemart: Plugin installation upload",title:"BTCPay Virtuemart: Plugin installation upload"}})]),e._v(" "),t("h3",{attrs:{id:"13-enable-the-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#13-enable-the-plugin"}},[e._v("#")]),e._v(" 1.3 Enable the plugin")]),e._v(" "),t("ol",[t("li",[e._v("Menu: Extensions -> Plugins")]),e._v(" "),t("li",[e._v('Search for "btcpay"')]),e._v(" "),t("li",[e._v('On "Status" column click the red circle to enable the plugin')])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(713),alt:"BTCPay Virtuemart: Enable plugin",title:"BTCPay Virtuemart: Enable plugin"}})]),e._v(" "),t("h2",{attrs:{id:"2-connecting-virtuemart-and-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-connecting-virtuemart-and-btcpay-server"}},[e._v("#")]),e._v(" 2. Connecting VirtueMart and BTCPay Server")]),e._v(" "),t("p",[e._v("BTCPay for Virtuemart plugin is a "),t("strong",[e._v("bridge between your BTCPay Server (payment processor) and your e-commerce store")]),e._v(".\nNo matter if you're using a self-hosted or third-party solution, the connection process is identical.")]),e._v(" "),t("h3",{attrs:{id:"21-add-btcpay-payment-gateway-in-virtuemart"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#21-add-btcpay-payment-gateway-in-virtuemart"}},[e._v("#")]),e._v(" 2.1 Add BTCPay payment gateway in VirtueMart")]),e._v(" "),t("ol",[t("li",[e._v("Menu: VirtueMart -> Payment Methods")]),e._v(" "),t("li",[e._v("Click button "),t("strong",[e._v("[New]")]),e._v(" "),t("img",{attrs:{src:a(714),alt:"BTCPay Virtuemart: Add new payment method",title:"BTCPay Virtuemart: Add new payment method"}})]),e._v(" "),t("li",[e._v('Configure the payment method according to your needs. Make sure on "Payment Method" dropdown you have "BTCPay for VirtueMart" selected and the payment method is published '),t("img",{attrs:{src:a(715),alt:"BTCPay Virtuemart: Payment method details",title:"BTCPay Virtuemart: Payment method details"}})]),e._v(" "),t("li",[e._v("Hit the "),t("strong",[e._v("[Save]")]),e._v(" button (the plugin table will get created)")])]),e._v(" "),t("p",[e._v('Now you can switch to the "Configuration" tab where we can connect to our BTCPay Server instance. First we need to create an API key.')]),e._v(" "),t("figure",[t("img",{attrs:{src:a(716),alt:"BTCPay Virtuemart: Payment method configuration tab",title:"BTCPay Virtuemart: Payment method configuration tab"}})]),e._v(" "),t("h3",{attrs:{id:"22-create-an-api-key-and-configure-permissions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("#")]),e._v(" 2.2 Create an API key and configure permissions")]),e._v(" "),t("p",[e._v("On BTCPay Server instance:")]),e._v(" "),t("ol",[t("li",[e._v("Click on "),t("em",[e._v("[Account]")])]),e._v(" "),t("li",[e._v("Click on "),t("em",[e._v("[Manage Account]")]),e._v(" "),t("img",{attrs:{src:a(717),alt:"BTCPay Joomla VirtueMart: Manage Account",title:"BTCPay Joomla VirtueMart: Manage Account"}})]),e._v(" "),t("li",[e._v("Go to the tab "),t("em",[e._v('"API Keys"')])]),e._v(" "),t("li",[e._v("Click "),t("em",[e._v("[Generate Key]")]),e._v(" to select permissions.\n"),t("img",{attrs:{src:a(718),alt:"BTCPay Joomla VirtueMart: API Keys overview",title:"BTCPay Joomla VirtueMart: API Keys overview"}})]),e._v(" "),t("li",[e._v("Add a label. "),t("strong",[e._v("Important:")]),e._v(" click on the "),t("em",[e._v('"Select specific stores"')]),e._v(" link for the following permissions: "),t("code",[e._v("View invoices")]),e._v(", "),t("code",[e._v("Create invoice")]),e._v(", "),t("code",[e._v("Modify invoices")]),e._v(", "),t("code",[e._v("Modify stores webhooks")]),e._v(", "),t("code",[e._v("View your stores")]),e._v(" and select the specific store you created for your VirtueMart site. It should look like when everything is set:\n"),t("img",{attrs:{src:a(719),alt:"BTCPay Joomla VirtueMart: API Keys Permissions",title:"BTCPay Joomla VirtueMart: API Keys Permissions"}})]),e._v(" "),t("li",[e._v("Click on "),t("em",[e._v("[Generate API Key]")]),e._v(" "),t("img",{attrs:{src:a(720),alt:"BTCPay Joomla VirtueMart: API Keys Save",title:"BTCPay Joomla VirtueMart: API Keys Save"}})]),e._v(" "),t("li",[e._v("Copy the generated API Key to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form\n"),t("img",{attrs:{src:a(721),alt:"BTCPay Joomla VirtueMart: Copy API Key",title:"BTCPay Joomla VirtueMart: Copy API Key"}})]),e._v(" "),t("li",[e._v("Go to Settings and copy the store ID to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form\n"),t("img",{attrs:{src:a(722),alt:"BTCPay Joomla VirtueMart: Copy Store ID",title:"BTCPay Joomla VirtueMart: Copy Store ID"}})]),e._v(" "),t("li",[e._v("On the "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form make sure "),t("strong",[e._v("BTPCay Server URL")]),e._v(", "),t("strong",[e._v("API Key")]),e._v(" and "),t("strong",[e._v("Store ID")]),e._v(" are set and click "),t("strong",[e._v("[Save]")]),e._v(" "),t("img",{attrs:{src:a(723),alt:"BTCPay Joomla VirtueMart: Save VirtueMart Settings form",title:"BTCPay Joomla VirtueMart: Save VirtueMart Settings form"}})])]),e._v(" "),t("h3",{attrs:{id:"23-create-a-webhook-on-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#23-create-a-webhook-on-btcpay-server"}},[e._v("#")]),e._v(" 2.3 Create a webhook on BTCPay Server")]),e._v(" "),t("p",[e._v("Setting up a webhook is important that your gets updates on invoice status changes from BTCPay Server.")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("On BTCPay Server instance go to your store settings, tab "),t("strong",[e._v("[Webhooks]")]),e._v(", click "),t("strong",[e._v("[Create Webhook]")]),e._v(" "),t("img",{attrs:{src:a(724),alt:"BTCPay Joomla VirtueMart: Create webhook",title:"BTCPay Joomla VirtueMart: Create webhook"}})])]),e._v(" "),t("li",[t("p",[e._v("From "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" copy the "),t("strong",[e._v("Webhook callback URL")]),e._v(" to webhook settings "),t("strong",[e._v("Payload URL")]),e._v(".\n"),t("img",{attrs:{src:a(725),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})])]),e._v(" "),t("li",[t("p",[e._v("On webhook settings click on the eye to reveal webhook secret. Copy that secret to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form "),t("strong",[e._v("Webhook Secret")]),e._v(" input and "),t("strong",[e._v("[Save]")]),e._v(" the VirtueMart configuration again.\n"),t("img",{attrs:{src:a(726),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}}),e._v(" "),t("img",{attrs:{src:a(727),alt:"BTCPay Joomla VirtueMart: Webhook VM save configuration",title:"BTCPay Joomla VirtueMart: Webhook VM save configuration"}})])]),e._v(" "),t("li",[t("p",[e._v("Back on webhook settings, enable "),t("strong",[e._v("Automatic redelivery")]),e._v(" and click "),t("strong",[e._v("[Add webhook]")]),e._v(" to save the webhook.\n"),t("img",{attrs:{src:a(728),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})])])]),e._v(" "),t("h2",{attrs:{id:"3-test-the-checkout"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-test-the-checkout"}},[e._v("#")]),e._v(" 3. Test the checkout")]),e._v(" "),t("p",[e._v("Everything is ready to go now. Do a small test purchase and make sure the order status gets updated according to the BTCPay invoice status. On BTCPay Server invoice details you can see if the webhook events were fired successfully.")]),e._v(" "),t("h2",{attrs:{id:"customizing-virtuemart-btcpay-payment-method-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#customizing-virtuemart-btcpay-payment-method-settings"}},[e._v("#")]),e._v(" Customizing VirtueMart BTCPay payment method settings")]),e._v(" "),t("p",[e._v('Your VirtueMart BTCPay payment method settings can be found in menu: VirtueMart -> Payment Methods. Click on the payment method of type "btcpayvm" you created.')]),e._v(" "),t("h3",{attrs:{id:"section-btcpay-server-connection-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-btcpay-server-connection-settings"}},[e._v("#")]),e._v(" Section: BTCPay Server connection settings")]),e._v(" "),t("p",[e._v("This is the most important part of the configuration. The data entered here will connect your VirtueMart shop with your counterparty store configured on BTCPay Server.")]),e._v(" "),t("p",[t("strong",[e._v("BTCPay Server URL")])]),e._v(" "),t("p",[e._v("URL to your BTCPay Server instance, including protocol e.g. "),t("code",[e._v("https://btcpay.yourdomain.com")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("API Key")])]),e._v(" "),t("p",[e._v("Your BTCPay API Key as mentioned "),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("here")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Store ID")])]),e._v(" "),t("p",[e._v("The store ID of your BTCPay Server store. Can be found on the store settings page. See 8. "),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("here")])]),e._v(" "),t("p",[t("strong",[e._v("Webhook Secret")])]),e._v(" "),t("p",[e._v("The wehbook secret which was generated on webhook createion, see "),t("a",{attrs:{href:"#23-create-a-webhook-on-btcpay-server"}},[e._v("here")])]),e._v(" "),t("p",[t("strong",[e._v("Webhook callback URL")])]),e._v(" "),t("p",[e._v("This field is auto-generated by the plugin and helps you when creating the webhook on BTCPay Server. It contains the needed payment method id and parameters to allow processing of callbacks.")]),e._v(" "),t("h3",{attrs:{id:"section-order-states-mapping"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-order-states-mapping"}},[e._v("#")]),e._v(" Section: Order states mapping")]),e._v(" "),t("p",[e._v("You can adjust the mapping of BTCPay Server invoice status to VirtueMart order states. On the left are the invoice states and on the right the order states. The defaults here should be good to go - but if you need, you can overwrite them.")]),e._v(" "),t("p",[e._v("VirtueMart order statuses are explained "),t("a",{attrs:{href:"https://docs.virtuemart.net/manual/configuration-menu/order-statuses.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("BTCPay server invoice statuses are explained "),t("RouterLink",{attrs:{to:"/Invoices/#invoice-statuses"}},[e._v("here")])],1),e._v(" "),t("h3",{attrs:{id:"section-restrictions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-restrictions"}},[e._v("#")]),e._v(" Section: Restrictions")]),e._v(" "),t("p",[e._v("These are VirtueMart provided restrictions you know from other payment plugins. You can restrict the amount or countries when the payment method will be available.")]),e._v(" "),t("h3",{attrs:{id:"section-discounts-and-fees"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-discounts-and-fees"}},[e._v("#")]),e._v(" Section Discounts and fees")]),e._v(" "),t("p",[e._v("These are VirtueMart provided settings. You can set a fee, cashback and apply tax rules or set a custom logo for the payment method.")]),e._v(" "),t("h2",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting")]),e._v(" "),t("h3",{attrs:{id:"error-on-checkout-there-was-an-error-processing-the-payment-on-btcpay-server-please-try-again-and-contact-us-if-the-problem-persists-"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#error-on-checkout-there-was-an-error-processing-the-payment-on-btcpay-server-please-try-again-and-contact-us-if-the-problem-persists-"}},[e._v("#")]),e._v(' Error on checkout "There was an error processing the payment on BTCPay Server. Please try again and contact us if the problem persists."')]),e._v(" "),t("p",[e._v("This means something went wrong with creating the invoice on BTCPay Server. It could be either wrong api key, store id or another communication error. You can find the error logs of the plugin in the following directory: "),t("code",[e._v("administrator/logs")]),e._v(" there you will have one or more files called "),t("code",[e._v("btcpayvm.X.log.php")]),e._v(" where "),t("code",[e._v("X")]),e._v(" is a number e.g. "),t("code",[e._v("btcpayvm.0.log.php")]),e._v(" you will find timestamped errors there that should give you a hint what the problem is.")]),e._v(" "),t("p",[t("strong",[e._v("Example")]),e._v(":")]),e._v(" "),t("blockquote",[t("p",[e._v('2022-05-24 21:10:50 ERROR Error during POST to https://btcpay.example.com/api/v1/stores/4kD5bvAF5j8DokHqAzxb6MFDV4ikabcdefghijklm/invoices. Got response (401): {"code":"unauthenticated","message":"Authentication is required for accessing this endpoint"}')])]),e._v(" "),t("ul",[t("li",[t("p",[e._v("This means there is some authentication error. Likely your api key does not have permission create invoices for that store. Make sure you gave the api key the right permissions and you give it to the right store and also entered that in VirtueMart payment configuration form.")])]),e._v(" "),t("li",[t("p",[e._v('Another reason could be that you use a legacy api key. The legacy api keys are located in store settings -> Access Tokens. But you need to create an account api key which is located in Account -> Manage Account -> tab "API Keys". See section '),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("2.2 Create an API key and configure permissions")]),e._v(".")])])]),e._v(" "),t("h2",{attrs:{id:"the-order-states-do-not-update-although-the-invoice-has-been-paid"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#the-order-states-do-not-update-although-the-invoice-has-been-paid"}},[e._v("#")]),e._v(" The order states do not update although the invoice has been paid")]),e._v(" "),t("p",[e._v('Please check the details of your invoice if there were any errors on sending the webhook request. Some hosting providers, firewall setups or Joomla security plugins may block POST requests to your site which lead to a http status of "403 forbidden".')]),e._v(" "),t("p",[e._v("You can check and verify yourself if there is something blocking requests to your site in one of these two ways:")]),e._v(" "),t("p",[t("strong",[e._v("1. Copy webhook callback URL")]),e._v("\ngo to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(' and copy the "Webhook callback URL". e.g. '),t("code",[e._v("https://EXAMPLE.COM/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&pm=2")])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(729),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})]),e._v(" "),t("p",[t("strong",[e._v("2.1 Check using a command line (Linux or MacOS):")])]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v('curl -vX POST -H "Content-Type: application/json" \\\n -d \'{"data": "test"}\' WEBHOOK_CALLBACK_URL\n')])])]),t("p",[e._v("(replace "),t("code",[e._v("WEBHOOK_CALLBACK_URL")]),e._v(" with the one copied above)")]),e._v(" "),t("p",[e._v("Result:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(".... snip ....\n* upload completely sent off: 16 out of 16 bytes\n< HTTP/1.1 403 Forbidden\n< access-control-allow-origin: *\n< Content-Type: application/json; charset=UTF-8\n< X-Cloud-Trace-Context: 4f07d5b2e5c2f05949d04421a8e2dd6a\n< Date: Thu, 17 Feb 2022 10:06:50 GMT\n< Server: Google Frontend\n< Content-Length: 26\n")])])]),t("p",[e._v('If you see that line "HTTP/1.1 403 Forbidden" or "HTTP/2 403" then something is blocking data sent to your VirtueMart site. You should ask your hosting provider or make sure no firewall or plugin is blocking the requests.')]),e._v(" "),t("p",[t("strong",[e._v("2.2 Check using an online service (if you do not have a command line available:")])]),e._v(" "),t("ul",[t("li",[e._v("Go to "),t("a",{attrs:{href:"https://reqbin.com/post-online",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://reqbin.com/post-online"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("ol",[t("li",[e._v("Enter your callback url (copied from step 1 above): "),t("code",[e._v("https://EXAMPLE.COM/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&pm=2")]),e._v("\n(replace this URL with the webhook callback url from step 1)")])])]),e._v(" "),t("li",[e._v('Make sure "POST" is selected')]),e._v(" "),t("li",[t("ol",{attrs:{start:"2"}},[t("li",[e._v("Click [Send]")])])])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(332),alt:"BTCPay Joomla VirtueMart: Webhook payload URL forbidden",title:"BTCPay Joomla VirtueMart: Webhook payload URL forbidden"}})]),e._v(" "),t("p",[e._v('If you see "'),t("strong",[e._v("Status 403 (Forbidden)")]),e._v('" then POST requests to your site are blocked for some reason. You should ask your hosting provider or make sure no firewall or plugin is blocking the requests. If you see any other status code (200, 500, ...) a firewall problem seems to not apply, you probably need to further investigate.')]),e._v(" "),t("h2",{attrs:{id:"i-have-troubles-with-using-the-plugin-or-some-other-related-questions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-have-troubles-with-using-the-plugin-or-some-other-related-questions"}},[e._v("#")]),e._v(" I have troubles with using the plugin or some other related questions")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://chat.btcpayserver.org/"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{332:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--19-troubleshoot-403-callback.51193927.png"},695:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--01-install-web.4d28e0bd.png"},696:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--02-install-upload.8972740d.png"},697:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--03-enable-plugin.1b4a6c9f.png"},698:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--04-add-new-payment-method.e5a94ee3.png"},699:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--05-payment-method-details.adf89c97.png"},700:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--06-payment-method-configuration-tab.45617db0.png"},701:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--07-account-manage.d477b8b4.png"},702:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--08-add-api-key.a58b2941.png"},703:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--09-permissions-and-select-store.9ccef388.png"},704:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--10-permissions-set.74d76936.png"},705:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--11-copy-api-key.94be9878.png"},706:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--12-copy-store-id.84c19f9f.png"},707:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--13-save-vm-payment-method-form.0a3e52bd.png"},708:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--14-create-webhook.1b6e4881.png"},709:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--15-webhook-payload-url.37a4f55f.png"},710:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-webhook-copy-secret.71b0dd07.png"},711:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-virtuemart-configuration-save.ee549862.png"},712:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--17-webhook-save.dfd4fca5.png"},713:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--18-troubleshoot-copy-callback-url.70d08e31.png"},945:function(e,t,a){"use strict";a.r(t);var o=a(17),r=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"joomla-virtuemart-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#joomla-virtuemart-integration"}},[e._v("#")]),e._v(" Joomla VirtueMart integration")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("integrate BTCPay Server into your Joomla VirtueMart store")]),e._v(".\nWatch the video below to go along the document |")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/k7XfybLAky0/hqdefault.jpg)"},attrs:{href:"https://youtu.be/k7XfybLAky0",title:"BTCPay Server - Joomla VirtueMart","data-id":"k7XfybLAky0"}},[t("iframe",{attrs:{title:"BTCPay Server - Joomla VirtueMart","data-src":"https://www.youtube-nocookie.com/embed/k7XfybLAky0?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("p",[e._v("Please ensure that you meet the following requirements before installing this plugin.")]),e._v(" "),t("ul",[t("li",[e._v("PHP version 7.4 or newer")]),e._v(" "),t("li",[e._v("The curl, gd, intl, json, and mbstring PHP extensions are available")]),e._v(" "),t("li",[e._v("A VirtueMart 3 / 4 store ("),t("a",{attrs:{href:"https://www.virtuemart.net/downloads",target:"_blank",rel:"noopener noreferrer"}},[e._v("Download and installation instructions"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("li",[e._v("You have a BTCPay Server version 1.3.0 or later, either "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("hosted by a third-party")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/RegisterAccount/"}},[e._v("You've a registered account on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("You've a BTCPay store on the instance")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("You've a wallet connected to your store")])],1)]),e._v(" "),t("h2",{attrs:{id:"1-install-btcpay-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-install-btcpay-plugin"}},[e._v("#")]),e._v(" 1. Install BTCPay Plugin")]),e._v(" "),t("p",[e._v("There are three ways to "),t("strong",[e._v("download BTCPay for VirtueMart plugin")]),e._v(":")]),e._v(" "),t("ul",[t("li",[e._v("Via the Admin Dashboard (recommended, see below)")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://extensions.joomla.org/extension/vm-payment-btcpay-for-virtuemart/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Joomla Extension Directory (JED)"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/joomla-virtuemart/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub Repository"),t("OutboundLink")],1)])]),e._v(" "),t("h3",{attrs:{id:"11-install-plugin-from-joomla-admin-dashboard-recommended"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#11-install-plugin-from-joomla-admin-dashboard-recommended"}},[e._v("#")]),e._v(" 1.1 Install plugin from Joomla Admin Dashboard (recommended)")]),e._v(" "),t("ol",[t("li",[e._v("Menu: Extensions > Manage > Install")]),e._v(" "),t("li",[e._v('On "Install from Web" tab search for "btcpay"')]),e._v(" "),t("li",[e._v("Click on BTCPay for VirtueMart and [Install] button")]),e._v(" "),t("li",[e._v("Continue with step 1.3")])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(695),alt:"BTCPay Virtuemart: Plugin installation web",title:"BTCPay Virtuemart: Plugin installation web"}})]),e._v(" "),t("h3",{attrs:{id:"12-download-and-install-plugin-from-jed-or-github"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#12-download-and-install-plugin-from-jed-or-github"}},[e._v("#")]),e._v(" 1.2 Download and install plugin from JED or GitHub")]),e._v(" "),t("ol",[t("li",[e._v("Download the latest BTCPay plugin from "),t("a",{attrs:{href:"https://github.com/btcpayserver/joomla-virtuemart/releases",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://extensions.joomla.org/extension/vm-payment-btcpay-for-virtuemart/",target:"_blank",rel:"noopener noreferrer"}},[e._v("JED"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Menu: Extensions -> Manage -> Install")]),e._v(" "),t("li",[e._v('On tab "Upload Package File" upload the '),t("code",[e._v("btcpayvm.zip")])])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(696),alt:"BTCPay Virtuemart: Plugin installation upload",title:"BTCPay Virtuemart: Plugin installation upload"}})]),e._v(" "),t("h3",{attrs:{id:"13-enable-the-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#13-enable-the-plugin"}},[e._v("#")]),e._v(" 1.3 Enable the plugin")]),e._v(" "),t("ol",[t("li",[e._v("Menu: Extensions -> Plugins")]),e._v(" "),t("li",[e._v('Search for "btcpay"')]),e._v(" "),t("li",[e._v('On "Status" column click the red circle to enable the plugin')])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(697),alt:"BTCPay Virtuemart: Enable plugin",title:"BTCPay Virtuemart: Enable plugin"}})]),e._v(" "),t("h2",{attrs:{id:"2-connecting-virtuemart-and-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-connecting-virtuemart-and-btcpay-server"}},[e._v("#")]),e._v(" 2. Connecting VirtueMart and BTCPay Server")]),e._v(" "),t("p",[e._v("BTCPay for Virtuemart plugin is a "),t("strong",[e._v("bridge between your BTCPay Server (payment processor) and your e-commerce store")]),e._v(".\nNo matter if you're using a self-hosted or third-party solution, the connection process is identical.")]),e._v(" "),t("h3",{attrs:{id:"21-add-btcpay-payment-gateway-in-virtuemart"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#21-add-btcpay-payment-gateway-in-virtuemart"}},[e._v("#")]),e._v(" 2.1 Add BTCPay payment gateway in VirtueMart")]),e._v(" "),t("ol",[t("li",[e._v("Menu: VirtueMart -> Payment Methods")]),e._v(" "),t("li",[e._v("Click button "),t("strong",[e._v("[New]")]),e._v(" "),t("img",{attrs:{src:a(698),alt:"BTCPay Virtuemart: Add new payment method",title:"BTCPay Virtuemart: Add new payment method"}})]),e._v(" "),t("li",[e._v('Configure the payment method according to your needs. Make sure on "Payment Method" dropdown you have "BTCPay for VirtueMart" selected and the payment method is published '),t("img",{attrs:{src:a(699),alt:"BTCPay Virtuemart: Payment method details",title:"BTCPay Virtuemart: Payment method details"}})]),e._v(" "),t("li",[e._v("Hit the "),t("strong",[e._v("[Save]")]),e._v(" button (the plugin table will get created)")])]),e._v(" "),t("p",[e._v('Now you can switch to the "Configuration" tab where we can connect to our BTCPay Server instance. First we need to create an API key.')]),e._v(" "),t("figure",[t("img",{attrs:{src:a(700),alt:"BTCPay Virtuemart: Payment method configuration tab",title:"BTCPay Virtuemart: Payment method configuration tab"}})]),e._v(" "),t("h3",{attrs:{id:"22-create-an-api-key-and-configure-permissions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("#")]),e._v(" 2.2 Create an API key and configure permissions")]),e._v(" "),t("p",[e._v("On BTCPay Server instance:")]),e._v(" "),t("ol",[t("li",[e._v("Click on "),t("em",[e._v("[Account]")])]),e._v(" "),t("li",[e._v("Click on "),t("em",[e._v("[Manage Account]")]),e._v(" "),t("img",{attrs:{src:a(701),alt:"BTCPay Joomla VirtueMart: Manage Account",title:"BTCPay Joomla VirtueMart: Manage Account"}})]),e._v(" "),t("li",[e._v("Go to the tab "),t("em",[e._v('"API Keys"')])]),e._v(" "),t("li",[e._v("Click "),t("em",[e._v("[Generate Key]")]),e._v(" to select permissions.\n"),t("img",{attrs:{src:a(702),alt:"BTCPay Joomla VirtueMart: API Keys overview",title:"BTCPay Joomla VirtueMart: API Keys overview"}})]),e._v(" "),t("li",[e._v("Add a label. "),t("strong",[e._v("Important:")]),e._v(" click on the "),t("em",[e._v('"Select specific stores"')]),e._v(" link for the following permissions: "),t("code",[e._v("View invoices")]),e._v(", "),t("code",[e._v("Create invoice")]),e._v(", "),t("code",[e._v("Modify invoices")]),e._v(", "),t("code",[e._v("Modify stores webhooks")]),e._v(", "),t("code",[e._v("View your stores")]),e._v(" and select the specific store you created for your VirtueMart site. It should look like when everything is set:\n"),t("img",{attrs:{src:a(703),alt:"BTCPay Joomla VirtueMart: API Keys Permissions",title:"BTCPay Joomla VirtueMart: API Keys Permissions"}})]),e._v(" "),t("li",[e._v("Click on "),t("em",[e._v("[Generate API Key]")]),e._v(" "),t("img",{attrs:{src:a(704),alt:"BTCPay Joomla VirtueMart: API Keys Save",title:"BTCPay Joomla VirtueMart: API Keys Save"}})]),e._v(" "),t("li",[e._v("Copy the generated API Key to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form\n"),t("img",{attrs:{src:a(705),alt:"BTCPay Joomla VirtueMart: Copy API Key",title:"BTCPay Joomla VirtueMart: Copy API Key"}})]),e._v(" "),t("li",[e._v("Go to Settings and copy the store ID to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form\n"),t("img",{attrs:{src:a(706),alt:"BTCPay Joomla VirtueMart: Copy Store ID",title:"BTCPay Joomla VirtueMart: Copy Store ID"}})]),e._v(" "),t("li",[e._v("On the "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form make sure "),t("strong",[e._v("BTPCay Server URL")]),e._v(", "),t("strong",[e._v("API Key")]),e._v(" and "),t("strong",[e._v("Store ID")]),e._v(" are set and click "),t("strong",[e._v("[Save]")]),e._v(" "),t("img",{attrs:{src:a(707),alt:"BTCPay Joomla VirtueMart: Save VirtueMart Settings form",title:"BTCPay Joomla VirtueMart: Save VirtueMart Settings form"}})])]),e._v(" "),t("h3",{attrs:{id:"23-create-a-webhook-on-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#23-create-a-webhook-on-btcpay-server"}},[e._v("#")]),e._v(" 2.3 Create a webhook on BTCPay Server")]),e._v(" "),t("p",[e._v("Setting up a webhook is important that your gets updates on invoice status changes from BTCPay Server.")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("On BTCPay Server instance go to your store settings, tab "),t("strong",[e._v("[Webhooks]")]),e._v(", click "),t("strong",[e._v("[Create Webhook]")]),e._v(" "),t("img",{attrs:{src:a(708),alt:"BTCPay Joomla VirtueMart: Create webhook",title:"BTCPay Joomla VirtueMart: Create webhook"}})])]),e._v(" "),t("li",[t("p",[e._v("From "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" copy the "),t("strong",[e._v("Webhook callback URL")]),e._v(" to webhook settings "),t("strong",[e._v("Payload URL")]),e._v(".\n"),t("img",{attrs:{src:a(709),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})])]),e._v(" "),t("li",[t("p",[e._v("On webhook settings click on the eye to reveal webhook secret. Copy that secret to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(" form "),t("strong",[e._v("Webhook Secret")]),e._v(" input and "),t("strong",[e._v("[Save]")]),e._v(" the VirtueMart configuration again.\n"),t("img",{attrs:{src:a(710),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}}),e._v(" "),t("img",{attrs:{src:a(711),alt:"BTCPay Joomla VirtueMart: Webhook VM save configuration",title:"BTCPay Joomla VirtueMart: Webhook VM save configuration"}})])]),e._v(" "),t("li",[t("p",[e._v("Back on webhook settings, enable "),t("strong",[e._v("Automatic redelivery")]),e._v(" and click "),t("strong",[e._v("[Add webhook]")]),e._v(" to save the webhook.\n"),t("img",{attrs:{src:a(712),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})])])]),e._v(" "),t("h2",{attrs:{id:"3-test-the-checkout"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-test-the-checkout"}},[e._v("#")]),e._v(" 3. Test the checkout")]),e._v(" "),t("p",[e._v("Everything is ready to go now. Do a small test purchase and make sure the order status gets updated according to the BTCPay invoice status. On BTCPay Server invoice details you can see if the webhook events were fired successfully.")]),e._v(" "),t("h2",{attrs:{id:"customizing-virtuemart-btcpay-payment-method-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#customizing-virtuemart-btcpay-payment-method-settings"}},[e._v("#")]),e._v(" Customizing VirtueMart BTCPay payment method settings")]),e._v(" "),t("p",[e._v('Your VirtueMart BTCPay payment method settings can be found in menu: VirtueMart -> Payment Methods. Click on the payment method of type "btcpayvm" you created.')]),e._v(" "),t("h3",{attrs:{id:"section-btcpay-server-connection-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-btcpay-server-connection-settings"}},[e._v("#")]),e._v(" Section: BTCPay Server connection settings")]),e._v(" "),t("p",[e._v("This is the most important part of the configuration. The data entered here will connect your VirtueMart shop with your counterparty store configured on BTCPay Server.")]),e._v(" "),t("p",[t("strong",[e._v("BTCPay Server URL")])]),e._v(" "),t("p",[e._v("URL to your BTCPay Server instance, including protocol e.g. "),t("code",[e._v("https://btcpay.yourdomain.com")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("API Key")])]),e._v(" "),t("p",[e._v("Your BTCPay API Key as mentioned "),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("here")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Store ID")])]),e._v(" "),t("p",[e._v("The store ID of your BTCPay Server store. Can be found on the store settings page. See 8. "),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("here")])]),e._v(" "),t("p",[t("strong",[e._v("Webhook Secret")])]),e._v(" "),t("p",[e._v("The wehbook secret which was generated on webhook createion, see "),t("a",{attrs:{href:"#23-create-a-webhook-on-btcpay-server"}},[e._v("here")])]),e._v(" "),t("p",[t("strong",[e._v("Webhook callback URL")])]),e._v(" "),t("p",[e._v("This field is auto-generated by the plugin and helps you when creating the webhook on BTCPay Server. It contains the needed payment method id and parameters to allow processing of callbacks.")]),e._v(" "),t("h3",{attrs:{id:"section-order-states-mapping"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-order-states-mapping"}},[e._v("#")]),e._v(" Section: Order states mapping")]),e._v(" "),t("p",[e._v("You can adjust the mapping of BTCPay Server invoice status to VirtueMart order states. On the left are the invoice states and on the right the order states. The defaults here should be good to go - but if you need, you can overwrite them.")]),e._v(" "),t("p",[e._v("VirtueMart order statuses are explained "),t("a",{attrs:{href:"https://docs.virtuemart.net/manual/configuration-menu/order-statuses.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("BTCPay server invoice statuses are explained "),t("RouterLink",{attrs:{to:"/Invoices/#invoice-statuses"}},[e._v("here")])],1),e._v(" "),t("h3",{attrs:{id:"section-restrictions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-restrictions"}},[e._v("#")]),e._v(" Section: Restrictions")]),e._v(" "),t("p",[e._v("These are VirtueMart provided restrictions you know from other payment plugins. You can restrict the amount or countries when the payment method will be available.")]),e._v(" "),t("h3",{attrs:{id:"section-discounts-and-fees"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-discounts-and-fees"}},[e._v("#")]),e._v(" Section Discounts and fees")]),e._v(" "),t("p",[e._v("These are VirtueMart provided settings. You can set a fee, cashback and apply tax rules or set a custom logo for the payment method.")]),e._v(" "),t("h2",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting")]),e._v(" "),t("h3",{attrs:{id:"error-on-checkout-there-was-an-error-processing-the-payment-on-btcpay-server-please-try-again-and-contact-us-if-the-problem-persists-"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#error-on-checkout-there-was-an-error-processing-the-payment-on-btcpay-server-please-try-again-and-contact-us-if-the-problem-persists-"}},[e._v("#")]),e._v(' Error on checkout "There was an error processing the payment on BTCPay Server. Please try again and contact us if the problem persists."')]),e._v(" "),t("p",[e._v("This means something went wrong with creating the invoice on BTCPay Server. It could be either wrong api key, store id or another communication error. You can find the error logs of the plugin in the following directory: "),t("code",[e._v("administrator/logs")]),e._v(" there you will have one or more files called "),t("code",[e._v("btcpayvm.X.log.php")]),e._v(" where "),t("code",[e._v("X")]),e._v(" is a number e.g. "),t("code",[e._v("btcpayvm.0.log.php")]),e._v(" you will find timestamped errors there that should give you a hint what the problem is.")]),e._v(" "),t("p",[t("strong",[e._v("Example")]),e._v(":")]),e._v(" "),t("blockquote",[t("p",[e._v('2022-05-24 21:10:50 ERROR Error during POST to https://btcpay.example.com/api/v1/stores/4kD5bvAF5j8DokHqAzxb6MFDV4ikabcdefghijklm/invoices. Got response (401): {"code":"unauthenticated","message":"Authentication is required for accessing this endpoint"}')])]),e._v(" "),t("ul",[t("li",[t("p",[e._v("This means there is some authentication error. Likely your api key does not have permission create invoices for that store. Make sure you gave the api key the right permissions and you give it to the right store and also entered that in VirtueMart payment configuration form.")])]),e._v(" "),t("li",[t("p",[e._v('Another reason could be that you use a legacy api key. The legacy api keys are located in store settings -> Access Tokens. But you need to create an account api key which is located in Account -> Manage Account -> tab "API Keys". See section '),t("a",{attrs:{href:"#22-create-an-api-key-and-configure-permissions"}},[e._v("2.2 Create an API key and configure permissions")]),e._v(".")])])]),e._v(" "),t("h2",{attrs:{id:"the-order-states-do-not-update-although-the-invoice-has-been-paid"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#the-order-states-do-not-update-although-the-invoice-has-been-paid"}},[e._v("#")]),e._v(" The order states do not update although the invoice has been paid")]),e._v(" "),t("p",[e._v('Please check the details of your invoice if there were any errors on sending the webhook request. Some hosting providers, firewall setups or Joomla security plugins may block POST requests to your site which lead to a http status of "403 forbidden".')]),e._v(" "),t("p",[e._v("You can check and verify yourself if there is something blocking requests to your site in one of these two ways:")]),e._v(" "),t("p",[t("strong",[e._v("1. Copy webhook callback URL")]),e._v("\ngo to your "),t("em",[e._v("VirtueMart BTCPay Payment Method Settings")]),e._v(' and copy the "Webhook callback URL". e.g. '),t("code",[e._v("https://EXAMPLE.COM/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&pm=2")])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(713),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}})]),e._v(" "),t("p",[t("strong",[e._v("2.1 Check using a command line (Linux or MacOS):")])]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v('curl -vX POST -H "Content-Type: application/json" \\\n -d \'{"data": "test"}\' WEBHOOK_CALLBACK_URL\n')])])]),t("p",[e._v("(replace "),t("code",[e._v("WEBHOOK_CALLBACK_URL")]),e._v(" with the one copied above)")]),e._v(" "),t("p",[e._v("Result:")]),e._v(" "),t("div",{staticClass:"language- extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(".... snip ....\n* upload completely sent off: 16 out of 16 bytes\n< HTTP/1.1 403 Forbidden\n< access-control-allow-origin: *\n< Content-Type: application/json; charset=UTF-8\n< X-Cloud-Trace-Context: 4f07d5b2e5c2f05949d04421a8e2dd6a\n< Date: Thu, 17 Feb 2022 10:06:50 GMT\n< Server: Google Frontend\n< Content-Length: 26\n")])])]),t("p",[e._v('If you see that line "HTTP/1.1 403 Forbidden" or "HTTP/2 403" then something is blocking data sent to your VirtueMart site. You should ask your hosting provider or make sure no firewall or plugin is blocking the requests.')]),e._v(" "),t("p",[t("strong",[e._v("2.2 Check using an online service (if you do not have a command line available:")])]),e._v(" "),t("ul",[t("li",[e._v("Go to "),t("a",{attrs:{href:"https://reqbin.com/post-online",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://reqbin.com/post-online"),t("OutboundLink")],1)]),e._v(" "),t("li",[t("ol",[t("li",[e._v("Enter your callback url (copied from step 1 above): "),t("code",[e._v("https://EXAMPLE.COM/index.php?option=com_virtuemart&view=pluginresponse&task=pluginnotification&pm=2")]),e._v("\n(replace this URL with the webhook callback url from step 1)")])])]),e._v(" "),t("li",[e._v('Make sure "POST" is selected')]),e._v(" "),t("li",[t("ol",{attrs:{start:"2"}},[t("li",[e._v("Click [Send]")])])])]),e._v(" "),t("figure",[t("img",{attrs:{src:a(332),alt:"BTCPay Joomla VirtueMart: Webhook payload URL forbidden",title:"BTCPay Joomla VirtueMart: Webhook payload URL forbidden"}})]),e._v(" "),t("p",[e._v('If you see "'),t("strong",[e._v("Status 403 (Forbidden)")]),e._v('" then POST requests to your site are blocked for some reason. You should ask your hosting provider or make sure no firewall or plugin is blocking the requests. If you see any other status code (200, 500, ...) a firewall problem seems to not apply, you probably need to further investigate.')]),e._v(" "),t("h2",{attrs:{id:"i-have-troubles-with-using-the-plugin-or-some-other-related-questions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#i-have-troubles-with-using-the-plugin-or-some-other-related-questions"}},[e._v("#")]),e._v(" I have troubles with using the plugin or some other related questions")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://chat.btcpayserver.org/"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/150.375fe60b.js b/assets/js/150.942a29d4.js similarity index 98% rename from assets/js/150.375fe60b.js rename to assets/js/150.942a29d4.js index 00dd488193..c69e61f0bf 100644 --- a/assets/js/150.375fe60b.js +++ b/assets/js/150.942a29d4.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[150],{911:function(e,n,t){"use strict";t.r(n);var i=t(17),o=Object(i.a)({},(function(){var e=this,n=e._self._c;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"opening-and-operating-payment-channels"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#opening-and-operating-payment-channels"}},[e._v("#")]),e._v(" Opening and operating payment channels")]),e._v(" "),n("p",[e._v("Given that the Lightning Network is a relatively new technology under active development, getting your freshly deployed node ready to send and receive payments, still, requires a couple of steps.")]),e._v(" "),n("p",[e._v("Overview:")]),e._v(" "),n("ol",[n("li",[e._v("The lightning node is deployed, enabled and its on-chain wallet is funded")]),e._v(" "),n("li",[e._v("A peer is identified and the first payment channel is opened")]),e._v(" "),n("li",[e._v("Inbound and outbound liquidity is acquired. The node is now able to "),n("strong",[e._v("send")]),e._v(" and "),n("strong",[e._v("receive")])]),e._v(" "),n("li",[e._v("Liquidity management, an ongoing process to maintain the capacity to "),n("strong",[e._v("send")]),e._v(" and "),n("strong",[e._v("receive")])])]),e._v(" "),n("p",[e._v("Key considerations:")]),e._v(" "),n("ul",[n("li",[n("strong",[e._v("Choosing")]),e._v(" the channel partner. Consider opening the first channel to a well connected peer with robust uptime. This will increase the chances for your payments to be routed and settled.")]),e._v(" "),n("li",[n("strong",[e._v("Inbound")]),e._v(" vs "),n("strong",[e._v("outbound")]),e._v(" capacity. Outbound capacity allows nodes to "),n("strong",[e._v("send")]),e._v(" payments whereas inbound capacity allows nodes to "),n("strong",[e._v("receive")]),e._v(" payments. As a merchant using lightning, having inbound capacity is essential for customers to be able to pay you.")]),e._v(" "),n("li",[n("strong",[e._v("Inbound capacity")]),e._v(". A node adds inbound capacity by either spending sats from its local balance or having other nodes in the network open channels to it.")]),e._v(" "),n("li",[n("strong",[e._v("Liquidity management")]),e._v(": maintaining the ability to send and receive is a continous process where a balance between inbound vs outbound capacity has to be maintained across payment channels. This capacity distribution must be adjusted depending upon the use case of the node operator.")]),e._v(" "),n("li",[n("strong",[e._v("Lightning Service Providers")]),e._v(": LSPs offer paid third-party services that improve the ease of operating a lightning network node. Such services can be used to acquire inbound capacity or to automate the rebalancing process.")])]),e._v(" "),n("p",[e._v("Below a set of good resources for a deeper dive into topics such as:")]),e._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"https://docs.lightning.engineering/the-lightning-network/the-gossip-network/identify-good-peers",target:"_blank",rel:"noopener noreferrer"}},[e._v("Good peers on the LN"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/nodes/#lightning-nodes",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning node types"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/liquidity/",target:"_blank",rel:"noopener noreferrer"}},[e._v("What is Lightning liquidity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://lightningnetwork.plus/posts/234",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get inbound capacity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://docs.lightning.engineering/the-lightning-network/liquidity/manage-liquidity#rebalancing-channels",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to manage liquidity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/lightning-services/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning service providers (LSP)"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[150],{905:function(e,n,t){"use strict";t.r(n);var i=t(17),o=Object(i.a)({},(function(){var e=this,n=e._self._c;return n("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[n("h1",{attrs:{id:"opening-and-operating-payment-channels"}},[n("a",{staticClass:"header-anchor",attrs:{href:"#opening-and-operating-payment-channels"}},[e._v("#")]),e._v(" Opening and operating payment channels")]),e._v(" "),n("p",[e._v("Given that the Lightning Network is a relatively new technology under active development, getting your freshly deployed node ready to send and receive payments, still, requires a couple of steps.")]),e._v(" "),n("p",[e._v("Overview:")]),e._v(" "),n("ol",[n("li",[e._v("The lightning node is deployed, enabled and its on-chain wallet is funded")]),e._v(" "),n("li",[e._v("A peer is identified and the first payment channel is opened")]),e._v(" "),n("li",[e._v("Inbound and outbound liquidity is acquired. The node is now able to "),n("strong",[e._v("send")]),e._v(" and "),n("strong",[e._v("receive")])]),e._v(" "),n("li",[e._v("Liquidity management, an ongoing process to maintain the capacity to "),n("strong",[e._v("send")]),e._v(" and "),n("strong",[e._v("receive")])])]),e._v(" "),n("p",[e._v("Key considerations:")]),e._v(" "),n("ul",[n("li",[n("strong",[e._v("Choosing")]),e._v(" the channel partner. Consider opening the first channel to a well connected peer with robust uptime. This will increase the chances for your payments to be routed and settled.")]),e._v(" "),n("li",[n("strong",[e._v("Inbound")]),e._v(" vs "),n("strong",[e._v("outbound")]),e._v(" capacity. Outbound capacity allows nodes to "),n("strong",[e._v("send")]),e._v(" payments whereas inbound capacity allows nodes to "),n("strong",[e._v("receive")]),e._v(" payments. As a merchant using lightning, having inbound capacity is essential for customers to be able to pay you.")]),e._v(" "),n("li",[n("strong",[e._v("Inbound capacity")]),e._v(". A node adds inbound capacity by either spending sats from its local balance or having other nodes in the network open channels to it.")]),e._v(" "),n("li",[n("strong",[e._v("Liquidity management")]),e._v(": maintaining the ability to send and receive is a continous process where a balance between inbound vs outbound capacity has to be maintained across payment channels. This capacity distribution must be adjusted depending upon the use case of the node operator.")]),e._v(" "),n("li",[n("strong",[e._v("Lightning Service Providers")]),e._v(": LSPs offer paid third-party services that improve the ease of operating a lightning network node. Such services can be used to acquire inbound capacity or to automate the rebalancing process.")])]),e._v(" "),n("p",[e._v("Below a set of good resources for a deeper dive into topics such as:")]),e._v(" "),n("ul",[n("li",[n("a",{attrs:{href:"https://docs.lightning.engineering/the-lightning-network/the-gossip-network/identify-good-peers",target:"_blank",rel:"noopener noreferrer"}},[e._v("Good peers on the LN"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/nodes/#lightning-nodes",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning node types"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/liquidity/",target:"_blank",rel:"noopener noreferrer"}},[e._v("What is Lightning liquidity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://lightningnetwork.plus/posts/234",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get inbound capacity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://docs.lightning.engineering/the-lightning-network/liquidity/manage-liquidity#rebalancing-channels",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to manage liquidity?"),n("OutboundLink")],1)]),e._v(" "),n("li",[n("a",{attrs:{href:"https://bitcoin.design/guide/how-it-works/lightning-services/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Lightning service providers (LSP)"),n("OutboundLink")],1)])])])}),[],!1,null,null,null);n.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/151.ec97cdce.js b/assets/js/151.60106cd1.js similarity index 96% rename from assets/js/151.ec97cdce.js rename to assets/js/151.60106cd1.js index a16478ea7f..19df2ee419 100644 --- a/assets/js/151.ec97cdce.js +++ b/assets/js/151.60106cd1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[151],{905:function(e,t,r){"use strict";r.r(t);var a=r(17),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-magento-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-magento-integration"}},[e._v("#")]),e._v(" BTCPay Magento Integration")]),e._v(" "),t("p",[e._v("If you're using "),t("strong",[e._v("Magento")]),e._v(", an open-source e-commerce platform written in PHP, you can "),t("strong",[e._v("integrate BTCPay Server and use it as a payment processor")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"magento-1"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#magento-1"}},[e._v("#")]),e._v(" Magento 1")]),e._v(" "),t("ol",[t("li",[e._v("Download "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento-plugin",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Magento Plugin"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento-plugin/blob/master/GUIDE.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("quick-start guide here"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"magento-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#magento-2"}},[e._v("#")]),e._v(" Magento 2")]),e._v(" "),t("p",[e._v("We recommend using the "),t("strong",[e._v("Magento 2 module")]),e._v(" developed by "),t("a",{attrs:{href:"https://www.storefront.be",target:"_blank",rel:"noopener noreferrer"}},[e._v("Storefront.be"),t("OutboundLink")],1),e._v(", since it is the most feature-complete and robust. Storefront is also committed to maintaining the module as newer Magento versions are released.")]),e._v(" "),t("p",[e._v("The Magento 2 module is available for free at "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento2-plugin",target:"_blank",rel:"noopener noreferrer"}},[e._v("our Github repository"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[151],{908:function(e,t,r){"use strict";r.r(t);var a=r(17),n=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-magento-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-magento-integration"}},[e._v("#")]),e._v(" BTCPay Magento Integration")]),e._v(" "),t("p",[e._v("If you're using "),t("strong",[e._v("Magento")]),e._v(", an open-source e-commerce platform written in PHP, you can "),t("strong",[e._v("integrate BTCPay Server and use it as a payment processor")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"magento-1"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#magento-1"}},[e._v("#")]),e._v(" Magento 1")]),e._v(" "),t("ol",[t("li",[e._v("Download "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento-plugin",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Magento Plugin"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento-plugin/blob/master/GUIDE.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("quick-start guide here"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"magento-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#magento-2"}},[e._v("#")]),e._v(" Magento 2")]),e._v(" "),t("p",[e._v("We recommend using the "),t("strong",[e._v("Magento 2 module")]),e._v(" developed by "),t("a",{attrs:{href:"https://www.storefront.be",target:"_blank",rel:"noopener noreferrer"}},[e._v("Storefront.be"),t("OutboundLink")],1),e._v(", since it is the most feature-complete and robust. Storefront is also committed to maintaining the module as newer Magento versions are released.")]),e._v(" "),t("p",[e._v("The Magento 2 module is available for free at "),t("a",{attrs:{href:"https://github.com/btcpayserver/magento2-plugin",target:"_blank",rel:"noopener noreferrer"}},[e._v("our Github repository"),t("OutboundLink")],1)])])}),[],!1,null,null,null);t.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/154.1bc6de62.js b/assets/js/154.a7995f2c.js similarity index 99% rename from assets/js/154.1bc6de62.js rename to assets/js/154.a7995f2c.js index 78d45a642f..72a31c6961 100644 --- a/assets/js/154.1bc6de62.js +++ b/assets/js/154.a7995f2c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[154],{909:function(e,t,r){"use strict";r.r(t);var a=r(17),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"nbxplorer"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#nbxplorer"}},[e._v("#")]),e._v(" NBXplorer")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://www.nuget.org/packages/NBxplorer.Client",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://img.shields.io/nuget/v/NBxplorer.Client.svg",alt:"NuGet",title:"NuGet"}}),t("OutboundLink")],1),e._v(" "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/nbxplorer/",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg",alt:"Docker Automated buil",title:"Docker Automated buil"}}),t("OutboundLink")],1),e._v(" "),t("a",{attrs:{href:"https://circleci.com/gh/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://circleci.com/gh/dgarage/NBXplorer.svg?style=svg",alt:"CircleCI",title:"CircleCI"}}),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("A minimalist UTXO tracker for HD wallets.\nThe goal is to provide a flexible, .NET-based UTXO tracker for HD wallets.\nThe explorer supports P2SH, P2PKH, P2WPKH, P2WSH, Taproot and multi-signature derivations.")]),e._v(" "),t("p",[e._v("It works on a pruned node and indexes only what you track.")]),e._v(" "),t("p",[e._v("This explorer is not intended to be exposed to the internet; it should be used as an infrastructure tool for tracking the UTXOs of your own service.")]),e._v(" "),t("h2",{attrs:{id:"what-about-alternatives-to-nbxplorer"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-about-alternatives-to-nbxplorer"}},[e._v("#")]),e._v(" What about alternatives to NBXplorer?")]),e._v(" "),t("ol",[t("li",[t("code",[e._v("Electrum wallet")]),e._v(" requires an unpruned node with indexing, which is space-intensive and may be difficult to sync.")]),e._v(" "),t("li",[t("code",[e._v("Electrum wallet")]),e._v(" only supports a single cryptocurrency on a single server. If you are an exchange, you would end up running multiple versions of barely maintained Electrum instances.")]),e._v(" "),t("li",[t("code",[e._v("Personal Electrum Server")]),e._v(" supports only a single wallet.")]),e._v(" "),t("li",[t("code",[e._v("Electrum protocol")]),e._v(" is cumbersome for HD wallets.")]),e._v(" "),t("li",[t("code",[e._v("Bitcoin Core RPC")]),e._v(" is inflexible and difficult to use. It also scales poorly when a wallet has too many addresses or UTXOs.")]),e._v(" "),t("li",[t("code",[e._v("Bitcoin Core RPC")]),e._v(" supports multiple wallets but isn't designed to handle thousands of them. Having too many wallets will not scale.")]),e._v(" "),t("li",[e._v("While NBXplorer exposes an "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("API"),t("OutboundLink")],1),e._v(", it also allows you to query the data using the most expressive and flexible language designed for this purpose: "),t("RouterLink",{attrs:{to:"/NBXplorer/docs/Postgres-Schema/"}},[e._v("SQL")]),e._v(".")],1),e._v(" "),t("li",[e._v("Alternative SaaS infrastructure providers depend on third parties, forcing you to compromise your privacy by sharing financial information while relinquishing control over API changes and service level agreements (SLAs).")])]),e._v(" "),t("h2",{attrs:{id:"typical-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#typical-usage"}},[e._v("#")]),e._v(" Typical usage")]),e._v(" "),t("p",[e._v("You start by "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/GenerateWallet",target:"_blank",rel:"noopener noreferrer"}},[e._v("Creating a wallet (hot wallet)"),t("OutboundLink")],1),e._v(", or "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/Track",target:"_blank",rel:"noopener noreferrer"}},[e._v("Tracking a derivation scheme (cold wallet)"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("Second, "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/GetUnused",target:"_blank",rel:"noopener noreferrer"}},[e._v("Get the next unused address"),t("OutboundLink")],1),e._v(" to get paid.")]),e._v(" "),t("p",[e._v("Listen to events through "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Events/operation/GetLatest",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polling"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Events/operation/EventStream",target:"_blank",rel:"noopener noreferrer"}},[e._v("Long Polling"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Events/operation/WebSocket",target:"_blank",rel:"noopener noreferrer"}},[e._v("Web Sockets"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("You can then "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/ListTransactionDerivationScheme",target:"_blank",rel:"noopener noreferrer"}},[e._v("List transactions"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/ListUTXOsDerivationScheme",target:"_blank",rel:"noopener noreferrer"}},[e._v("List UTXOs"),t("OutboundLink")],1),e._v(", or "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/CreatePSBT",target:"_blank",rel:"noopener noreferrer"}},[e._v("Create a PSBT"),t("OutboundLink")],1),e._v(" for your app to sign.")]),e._v(" "),t("p",[e._v("When the transaction is signed, "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Transactions/operation/Broadcast",target:"_blank",rel:"noopener noreferrer"}},[e._v("Broadcast it"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("You can also track multiple derivation schemes or individual addresses by "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Groups/operation/Create",target:"_blank",rel:"noopener noreferrer"}},[e._v("Creating a group"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"general-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#general-features"}},[e._v("#")]),e._v(" General features")]),e._v(" "),t("ul",[t("li",[e._v("Can pass arguments via environment variable, command line or configuration file")]),e._v(" "),t("li",[e._v("Automatically reconnect to your node if the connection goes temporarily down")]),e._v(" "),t("li",[e._v("An easy to use "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("REST API"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Persistence via "),t("RouterLink",{attrs:{to:"/NBXplorer/docs/Postgres-Schema/"}},[e._v("Postgres")])],1),e._v(" "),t("li",[e._v("Connect via RPC to broadcast transaction instead of using the P2P protocol like this example")]),e._v(" "),t("li",[e._v("Connect via RPC to your trusted node to get the proper fee rate.")]),e._v(" "),t("li",[e._v("Altcoin support")]),e._v(" "),t("li",[e._v("Huge test suite")]),e._v(" "),t("li",[e._v("Pruning of transaction data (in practice, we don't need to save the whole transaction, only the spent outpoint and received coin for the wallet)")]),e._v(" "),t("li",[e._v("Multi-wallet")]),e._v(" "),t("li",[e._v("Flexible address generation schemes (multisig, segwit, legacy etc...)")]),e._v(" "),t("li",[e._v("Pruning for big wallets (Removal of tracked transaction which do not impact the resulting UTXO set)")])]),e._v(" "),t("p",[e._v("It currently supports the following altcoins:")]),e._v(" "),t("ul",[t("li",[e._v("Althash")]),e._v(" "),t("li",[e._v("Argoneum")]),e._v(" "),t("li",[e._v("BCash (also known as Bitcoin Cash)")]),e._v(" "),t("li",[e._v("BGold (also known as Bitcoin Gold)")]),e._v(" "),t("li",[e._v("BitCore")]),e._v(" "),t("li",[e._v("Chaincoin")]),e._v(" "),t("li",[e._v("ColossusXT")]),e._v(" "),t("li",[e._v("Dash")]),e._v(" "),t("li",[e._v("Dogecoin")]),e._v(" "),t("li",[e._v("Feathercoin")]),e._v(" "),t("li",[e._v("Gobyte")]),e._v(" "),t("li",[e._v("Groestlcoin")]),e._v(" "),t("li",[e._v("Litecoin")]),e._v(" "),t("li",[e._v("Monacoin")]),e._v(" "),t("li",[e._v("MonetaryUnit")]),e._v(" "),t("li",[e._v("Monoeci")]),e._v(" "),t("li",[e._v("Polis")]),e._v(" "),t("li",[e._v("Qtum")]),e._v(" "),t("li",[e._v("Terracoin")]),e._v(" "),t("li",[e._v("Ufo")]),e._v(" "),t("li",[e._v("Viacoin")])]),e._v(" "),t("p",[e._v("Read our "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("API Specification"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"prerequisite"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisite"}},[e._v("#")]),e._v(" Prerequisite")]),e._v(" "),t("ul",[t("li",[e._v("Install "),t("a",{attrs:{href:"https://www.microsoft.com/net/download",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET Core SDK v8.0 or above"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Bitcoin Core instance synched and running (at least 24.0).")]),e._v(" "),t("li",[e._v("PostgresSQL v13+")])]),e._v(" "),t("p",[e._v("Use "),t("code",[e._v("--postgres")]),e._v(" flag to setup the connection string. See "),t("RouterLink",{attrs:{to:"/NBXplorer/Postgres-Schema/"}},[e._v("schema documentation")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"api-specification"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-specification"}},[e._v("#")]),e._v(" API Specification")]),e._v(" "),t("p",[e._v("Read our "),t("RouterLink",{attrs:{to:"/NBXplorer/API/"}},[e._v("API Specification")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-to-build-and-run"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-build-and-run"}},[e._v("#")]),e._v(" How to build and run?")]),e._v(" "),t("p",[e._v("If you are using Bitcoin core default settings:")]),e._v(" "),t("p",[e._v("On Powershell:")]),e._v(" "),t("div",{staticClass:"language-pwsh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(".\\build.ps1\n")])])]),t("p",[e._v("On Linux:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("./build.sh\n")])])]),t("p",[e._v("Then to run:")]),e._v(" "),t("p",[e._v("On Powershell:")]),e._v(" "),t("div",{staticClass:"language-pwsh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(".\\run.ps1 --help\n")])])]),t("p",[e._v("On Linux:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("./run.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--help")]),e._v("\n")])])]),t("p",[e._v("Example, if you have ltc node and btc node on regtest (default configuration), and want to connect to them: (see documentation for other options in the "),t("a",{attrs:{href:"https://www.npgsql.org/doc/connection-string-parameters.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("postgres connection string"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("./run.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--chains")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("btc,ltc "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--network")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("regtest "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--postgres")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"User ID=postgres;Host=127.0.0.1;Port=5432;Database=nbxplorer"')]),e._v("\n")])])]),t("h2",{attrs:{id:"how-to-use-the-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use-the-api"}},[e._v("#")]),e._v(" How to use the API?")]),e._v(" "),t("p",[e._v("Check "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("the API documentation"),t("OutboundLink")],1),e._v(", you can then use any client library:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/junderw/NBXplorer.NodeJS",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBXplorer.NodeJS"),t("OutboundLink")],1),e._v(" for NodeJS clients.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.nuget.org/packages/NBxplorer.Client",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBXplorer.Client"),t("OutboundLink")],1),e._v(" for .NET clients.")])]),e._v(" "),t("p",[e._v("Here is "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/Examples/MultiSig/Program.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("a small C# example"),t("OutboundLink")],1),e._v(" showing a 2-2 multisig with Alice and Bob that you can run on regtest.")]),e._v(" "),t("h2",{attrs:{id:"with-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#with-docker"}},[e._v("#")]),e._v(" With Docker")]),e._v(" "),t("p",[e._v("Use "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/nbxplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("our image"),t("OutboundLink")],1),e._v(".\nYou can check "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/docker-compose.regtest.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("the sample"),t("OutboundLink")],1),e._v(" for configuring and composing it bitcoin core.")]),e._v(" "),t("h2",{attrs:{id:"how-to-develop-on-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-develop-on-it"}},[e._v("#")]),e._v(" How to develop on it?")]),e._v(" "),t("p",[e._v("If you are on Windows, I recommend Visual Studio 2022 (17.8.0).\nIf you are on other platform and want lightweight environment, use "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Visual Studio Code"),t("OutboundLink")],1),e._v(".\nIf you are hardcore, you can code on vim.")]),e._v(" "),t("p",[e._v("I like Visual Studio Code and Visual Studio 2022 as it allows me to debug in step by step.")]),e._v(" "),t("h2",{attrs:{id:"how-to-configure"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-configure"}},[e._v("#")]),e._v(" How to configure?")]),e._v(" "),t("p",[e._v("NBXplorer supports configuration through command line arguments, configuration file, or environment variables.")]),e._v(" "),t("h3",{attrs:{id:"configuration-file"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuration-file"}},[e._v("#")]),e._v(" Configuration file")]),e._v(" "),t("p",[e._v("If you are not using standard install for bitcoind, you will have to change the configuration file:\nIn Windows it is located in")]),e._v(" "),t("div",{staticClass:"language-pwsh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("C:\\Users\\\\AppData\\Roaming\\NBXplorer\\\\settings.config\n")])])]),t("p",[e._v("On linux or mac:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("~/.nbxplorer/"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("<")]),e._v("network"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v("/settings.config\n")])])]),t("p",[e._v("The default configuration assumes "),t("code",[e._v("mainnet")]),e._v(" with only "),t("code",[e._v("btc")]),e._v(" chain supported, and uses the default settings of bitcoind.")]),e._v(" "),t("p",[e._v("You can change the location of the configuration file with the "),t("code",[e._v("--conf=pathToConf")]),e._v(" command line argument.")]),e._v(" "),t("h3",{attrs:{id:"command-line-parameters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#command-line-parameters"}},[e._v("#")]),e._v(" Command line parameters")]),e._v(" "),t("p",[e._v("Please note that NBXplorer uses cookie authentication by default. If you run your Bitcoin/Litecoin/Dash nodes using their daemon (like "),t("code",[e._v("bitcoind")]),e._v(", "),t("code",[e._v("litecoind")]),e._v(" or "),t("code",[e._v("dashd")]),e._v("), they generate a new cookie every time you start them, and that should work without any extra configuration.\nIf you run the node(s) using the GUI versions, like Bitcoin\\Litecoin\\Dash Core Qt with the "),t("code",[e._v("-server")]),e._v(" parameter while you set the rpcusername and rpcpassword in their "),t("code",[e._v(".conf")]),e._v(" files, you must set those values for every crypto you are planning to support.\nSee samples below.")]),e._v(" "),t("h4",{attrs:{id:"run-from-source-requires-net-core-sdk"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#run-from-source-requires-net-core-sdk"}},[e._v("#")]),e._v(" Run from source (requires .NET Core SDK)")]),e._v(" "),t("p",[e._v("You should use "),t("code",[e._v("run.ps1")]),e._v(" (Windows) or "),t("code",[e._v("run.sh")]),e._v(" (Linux) to execute NBXplorer, but you can also execute it manually with the following command:\n"),t("code",[e._v("dotnet run --no-launch-profile -p .\\NBXplorer\\NBXplorer.csproj -- ")])]),e._v(" "),t("h4",{attrs:{id:"run-using-built-dll-requires-net-core-runtime-only"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#run-using-built-dll-requires-net-core-runtime-only"}},[e._v("#")]),e._v(" Run using built DLL (requires .NET Core Runtime only)")]),e._v(" "),t("p",[e._v("If you already have a compiled DLL, you can run the executable with the following command:\n"),t("code",[e._v("dotnet NBXplorer.dll ")])]),e._v(" "),t("h4",{attrs:{id:"sample-parameters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sample-parameters"}},[e._v("#")]),e._v(" Sample parameters")]),e._v(" "),t("p",[e._v("Running NBXplorer HTTP server on port 20300, connecting to the BTC mainnet node locally.\n"),t("code",[e._v("--port=20300 --network=mainnet --btcnodeendpoint=127.0.0.1:32939")])]),e._v(" "),t("p",[e._v("Running NBXplorer on testnet, supporting Bitcoin, Litecoin and Dash, using cookie authentication for BTC and LTC, and RPC username and password for Dash, connecting to all of them locally.\n"),t("code",[e._v("--chains=btc,ltc,dash --network=testnet --dashrpcuser=myuser --dashrpcpassword=mypassword")])]),e._v(" "),t("h3",{attrs:{id:"environment-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#environment-variables"}},[e._v("#")]),e._v(" Environment variables")]),e._v(" "),t("p",[e._v("The same settings as above, for example "),t("code",[e._v("export NBXPLORER_PORT=20300")]),e._v(". This is usefull for configuring docker.")]),e._v(" "),t("h2",{attrs:{id:"how-to-run"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run"}},[e._v("#")]),e._v(" How to Run")]),e._v(" "),t("h3",{attrs:{id:"command-line"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#command-line"}},[e._v("#")]),e._v(" Command Line")]),e._v(" "),t("p",[e._v("You can use the "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet",target:"_blank",rel:"noopener noreferrer"}},[e._v("dotnet"),t("OutboundLink")],1),e._v(" command which is part of .NET Core to run NBXplorer. To run from source you must have the .NET Core SDK installed e.g.\n"),t("code",[e._v("dotnet run NBXplorer.dll")]),e._v("\nAs described above you may add configuration parameters if desired.")]),e._v(" "),t("p",[e._v("If you have a compiled version of NBXplorer you should have a file in your build folder named NBXplorer.dll. This cannot itself be directly executed on the command line as it is not an executable file. Instead we can use the "),t("code",[e._v("dotnet")]),e._v(" runtime to execute the dll file.")]),e._v(" "),t("p",[e._v("e.g. "),t("code",[e._v("dotnet NBXplorer.dll")])]),e._v(" "),t("h2",{attrs:{id:"important-note"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#important-note"}},[e._v("#")]),e._v(" Important Note")]),e._v(" "),t("p",[e._v("This tool will only start scanning from the configured "),t("code",[e._v("startheight")]),e._v(". (By default, the height of the blockchain during your first run)\nThis means that you might not see old payments from your HD key.")]),e._v(" "),t("p",[e._v("If you need to see old payments, you need to configure "),t("code",[e._v("--[crypto]startheight")]),e._v(" to a specific height of your choice, then run it again with "),t("code",[e._v("--[crypto]rescan")]),e._v(", e.g.\n"),t("code",[e._v("./run.sh --chains=ltc --ltcrescan --ltcstartheight=101")])]),e._v(" "),t("h2",{attrs:{id:"how-to-query"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-query"}},[e._v("#")]),e._v(" How to query?")]),e._v(" "),t("h3",{attrs:{id:"using-postman"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-postman"}},[e._v("#")]),e._v(" Using Postman")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://www.getpostman.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("Postman"),t("OutboundLink")],1),e._v(" is a useful tool for testing and experimenting with REST API's.")]),e._v(" "),t("p",[e._v("You can test the "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBXplorer API"),t("OutboundLink")],1),e._v(" quickly and easily using Postman.")]),e._v(" "),t("p",[e._v("If you use cookie authentication (enabled by default) in your locally run NBXplorer, you need to set that up in Postman:")]),e._v(" "),t("ul",[t("li",[e._v("Run NBXplorer and locate you cookie file (NBXplorer will generate a new Cookie file each time it runs in "),t("RouterLink",{attrs:{to:"/NBXplorer/API/#authentication"}},[e._v("its default data folder")]),e._v(")")],1),e._v(" "),t("li",[e._v("In Postman create a new GET API test")]),e._v(" "),t("li",[e._v("In Authorization select "),t("em",[e._v("Basic Auth")]),e._v(", you should see 2 input boxes for username and password")]),e._v(" "),t("li",[e._v("Open your cookie file with a text editor e.g. Notepad on windows . You should see a cookie string e.g. "),t("code",[e._v("__cookie__:0ff9cd83a5ac7c19a6b56a3d1e7a5c96e113d42dba7720a1f72a3a5e8c4b6c66")])]),e._v(" "),t("li",[e._v("Back in Postman paste the "),t("code",[e._v("__cookie__")]),e._v(" part of your cookie file into username (whatever comes before the 😃")]),e._v(" "),t("li",[e._v("Paste the Hex string (after the : ) into the password box")]),e._v(" "),t("li",[e._v("Click the Update Request button in Postman - this will force Postman to generate the correct HTTP headers based on your cookie details")]),e._v(" "),t("li",[e._v("You should now see a new entry in the Headers section with a Key of "),t("em",[e._v("Authorization")]),e._v(" and Value of "),t("em",[e._v("Basic xxxxxxxxx")]),e._v(" where the string after "),t("code",[e._v("Basic")]),e._v(" will be your Base64 encoded username and password.")]),e._v(" "),t("li",[e._v("Enter the API URL you are going to test")])]),e._v(" "),t("p",[e._v("You can also disable authentication in NBXplorer for testing with the "),t("code",[e._v("--noauth")]),e._v(" parameter. This makes testing quicker:")]),e._v(" "),t("ul",[t("li",[e._v("Run NBXplorer with the "),t("code",[e._v("--noauth")]),e._v(" command line argument or the environment variable "),t("code",[e._v("NBXPLORER_NOAUTH=1")])]),e._v(" "),t("li",[e._v("In Postman create a new GET API test")]),e._v(" "),t("li",[e._v("In Authorization select "),t("em",[e._v("No Auth")])]),e._v(" "),t("li",[e._v("Enter the API URL you are going to test")])]),e._v(" "),t("p",[e._v("You are now ready to test the API - it is easiest to start with something simple such as the fees endpoint e.g.")]),e._v(" "),t("p",[t("code",[e._v("http://localhost:24444/v1/cryptos/btc/fees/3")])]),e._v(" "),t("p",[e._v("this should return a JSON payload e.g.")]),e._v(" "),t("p",[e._v('{\n"feeRate": 9,\n"blockCount": 3\n}')]),e._v(" "),t("h2",{attrs:{id:"message-brokers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#message-brokers"}},[e._v("#")]),e._v(" Message Brokers")]),e._v(" "),t("h3",{attrs:{id:"azure-service-bus"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#azure-service-bus"}},[e._v("#")]),e._v(" Azure Service Bus")]),e._v(" "),t("p",[e._v("Support has been added for Azure Service Bus as a message broker. Currently 2 Queues and 2 Topics are supported")]),e._v(" "),t("h3",{attrs:{id:"queues"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#queues"}},[e._v("#")]),e._v(" Queues")]),e._v(" "),t("ul",[t("li",[e._v("New Block")]),e._v(" "),t("li",[e._v("New Transaction")])]),e._v(" "),t("h3",{attrs:{id:"topics"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#topics"}},[e._v("#")]),e._v(" Topics")]),e._v(" "),t("ul",[t("li",[e._v("New Block")]),e._v(" "),t("li",[e._v("New Transaction")])]),e._v(" "),t("p",[e._v("Filters should be applied on the client, if required.")]),e._v(" "),t("p",[e._v("To activate Azure Service Bus Mesages you should add an Azure Service Bus Connection string to your config file or on the command line.")]),e._v(" "),t("ul",[t("li",[e._v("To use queues you should specify the queue names you wish to use")]),e._v(" "),t("li",[e._v("To use topics you should specify the topic names you wish to use")])]),e._v(" "),t("p",[e._v("You can use both queues and topics at the same time.")]),e._v(" "),t("h4",{attrs:{id:"config-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#config-settings"}},[e._v("#")]),e._v(" Config Settings")]),e._v(" "),t("p",[e._v("If you use the Configuration file to setup your NBXplorer options:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbcnstr")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Your Azure Service Bus Connection string")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbblockq")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of queue to send New Block message to")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbtranq")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of queue to send New Transaction message to")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbblockt")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of topic to send New Block message to")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbtrant")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of queue to send New Transaction message to")]),e._v("\n")])])]),t("h3",{attrs:{id:"rabbitmq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#rabbitmq"}},[e._v("#")]),e._v(" RabbitMq")]),e._v(" "),t("p",[e._v("Support has been added for RabbitMq as a message broker. Currently 2 exchanges supported;")]),e._v(" "),t("ul",[t("li",[e._v("New Block")]),e._v(" "),t("li",[e._v("New Transaction")])]),e._v(" "),t("p",[e._v("Filters can be applied on the client by defining routing keys;")]),e._v(" "),t("p",[e._v("For transactions;")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("transactions.#")]),e._v(" to get all transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.[BTC].#")]),e._v(" to get all [Bitcoin] transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.[BTC].confirmed")]),e._v(" to get only confirmed [Bitcoin] transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.[BTC].unconfirmed")]),e._v(" to get only unconfirmed [Bitcoin] transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.*.confirmed")]),e._v(" to get all confirmed transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.*.unconfirmed")]),e._v(" to get all unconfirmed transactions.")])]),e._v(" "),t("p",[e._v("For blocks;")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("blocks.#")]),e._v(" to get all blocks.")]),e._v(" "),t("li",[t("code",[e._v("blocks.[BTC]")]),e._v(" to get all [Bitcoin] blocks.")])]),e._v(" "),t("p",[e._v("To activate RabbitMq mesages you should add following settings to your config file or on the command line.")]),e._v(" "),t("ul",[t("li",[e._v("rmqhost, rmquser, rmqpass")])]),e._v(" "),t("h4",{attrs:{id:"config-settings-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#config-settings-2"}},[e._v("#")]),e._v(" Config Settings")]),e._v(" "),t("p",[e._v("If you use the Configuration file to setup your NBXplorer options:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqhost")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("RabbitMq host name")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqvirtual")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("RabbitMq virtual host")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmquser")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("RabbitMq username")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqpass")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("RabbitMq password")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqtranex")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of exchange to send transaction messages")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqblockex")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of exchange to send block messages")]),e._v("\n")])])]),t("p",[e._v("Payloads are JSON and map to "),t("code",[e._v("NewBlockEvent")]),e._v(", "),t("code",[e._v("NewTransactionEvent")]),e._v(" in the "),t("code",[e._v("NBXplorer.Models")]),e._v(" namespace. There is no support in NBXplorer client for message borkers at the current time. You will need to use the "),t("code",[e._v("Serializer")]),e._v(" in "),t("code",[e._v("NBXplorer.Client")]),e._v(" to de-serialize the objects or then implement your own JSON de-serializers for the custom types used in the payload.")]),e._v(" "),t("p",[e._v("For configuring serializers you can get crypto code info from "),t("code",[e._v("BasicProperties.Headers[CryptoCode]")]),e._v(" of RabbitMq messages or "),t("code",[e._v("UserProperties[CryptoCode]")]),e._v(" of Azure Service Bus messages.\nExamples can be found in unit tests.")]),e._v(" "),t("h4",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting")]),e._v(" "),t("p",[e._v("If you receive a 401 Unauthorized then your cookie data is not working. Check you are using the current cookie by opening the cookie file again - also check the date/time of the cookie file to ensure it is the latest cookie (generated when you launched NBXplorer).")]),e._v(" "),t("p",[e._v("If you receive a 404 or timeout then Postman cannot see the endpoint")]),e._v(" "),t("ul",[t("li",[e._v("are you using the correct Port ?")]),e._v(" "),t("li",[e._v("are you running postman on localhost ?")])]),e._v(" "),t("h2",{attrs:{id:"client-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#client-api"}},[e._v("#")]),e._v(" Client API")]),e._v(" "),t("p",[e._v("A better documentation is on the way, for now the only documentation is the client API in C# on "),t("a",{attrs:{href:"https://www.nuget.org/packages/NBxplorer.Client",target:"_blank",rel:"noopener noreferrer"}},[e._v("nuget"),t("OutboundLink")],1),e._v(".\nThe "),t("code",[e._v("ExplorerClient")]),e._v(" classes allows you to query unused addresses, and the UTXO of an HD PubKey.\nYou can take a look at "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/NBXplorer.Tests/UnitTest1.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("the tests"),t("OutboundLink")],1),e._v(" to see how it works.")]),e._v(" "),t("p",[e._v("There is a simple use case documented on "),t("a",{attrs:{href:"https://programmingblockchain.gitbooks.io/programmingblockchain/content/wallet/web-api.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Blockchain Programming in C#"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-to-run-the-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-tests"}},[e._v("#")]),e._v(" How to run the tests?")]),e._v(" "),t("p",[e._v("This is easy, from repo directory:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" NBXplorer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The tests can take long the first time, as it download Bitcoin Core binaries. (Between 5 and 10 minutes)")]),e._v(" "),t("h2",{attrs:{id:"how-to-add-support-to-my-altcoin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-support-to-my-altcoin"}},[e._v("#")]),e._v(" How to add support to my altcoin")]),e._v(" "),t("p",[e._v("First you need to add support for your altcoin to "),t("code",[e._v("NBitcoin.Altcoins")]),e._v(". (See "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("p",[e._v("Once this is done and "),t("code",[e._v("NBXplorer")]),e._v(" updated to use the last version of "),t("code",[e._v("NBitcoin.Altcoins")]),e._v(", follow "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/NBXplorer.Client/NBXplorerNetworkProvider.Litecoin.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Litecoin example"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If you want to test if everything is working, modify "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/NBXplorer.Tests/ServerTester.Environment.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("ServerTester.Environment.cs"),t("OutboundLink")],1),e._v(" to match your altcoin.")]),e._v(" "),t("p",[e._v("Then run the tests.")]),e._v(" "),t("h2",{attrs:{id:"licence"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#licence"}},[e._v("#")]),e._v(" Licence")]),e._v(" "),t("p",[e._v("This project is under MIT License.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[154],{910:function(e,t,r){"use strict";r.r(t);var a=r(17),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"nbxplorer"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#nbxplorer"}},[e._v("#")]),e._v(" NBXplorer")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://www.nuget.org/packages/NBxplorer.Client",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://img.shields.io/nuget/v/NBxplorer.Client.svg",alt:"NuGet",title:"NuGet"}}),t("OutboundLink")],1),e._v(" "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/nbxplorer/",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://img.shields.io/docker/automated/jrottenberg/ffmpeg.svg",alt:"Docker Automated buil",title:"Docker Automated buil"}}),t("OutboundLink")],1),e._v(" "),t("a",{attrs:{href:"https://circleci.com/gh/dgarage/NBXplorer",target:"_blank",rel:"noopener noreferrer"}},[t("img",{attrs:{src:"https://circleci.com/gh/dgarage/NBXplorer.svg?style=svg",alt:"CircleCI",title:"CircleCI"}}),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("A minimalist UTXO tracker for HD wallets.\nThe goal is to provide a flexible, .NET-based UTXO tracker for HD wallets.\nThe explorer supports P2SH, P2PKH, P2WPKH, P2WSH, Taproot and multi-signature derivations.")]),e._v(" "),t("p",[e._v("It works on a pruned node and indexes only what you track.")]),e._v(" "),t("p",[e._v("This explorer is not intended to be exposed to the internet; it should be used as an infrastructure tool for tracking the UTXOs of your own service.")]),e._v(" "),t("h2",{attrs:{id:"what-about-alternatives-to-nbxplorer"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-about-alternatives-to-nbxplorer"}},[e._v("#")]),e._v(" What about alternatives to NBXplorer?")]),e._v(" "),t("ol",[t("li",[t("code",[e._v("Electrum wallet")]),e._v(" requires an unpruned node with indexing, which is space-intensive and may be difficult to sync.")]),e._v(" "),t("li",[t("code",[e._v("Electrum wallet")]),e._v(" only supports a single cryptocurrency on a single server. If you are an exchange, you would end up running multiple versions of barely maintained Electrum instances.")]),e._v(" "),t("li",[t("code",[e._v("Personal Electrum Server")]),e._v(" supports only a single wallet.")]),e._v(" "),t("li",[t("code",[e._v("Electrum protocol")]),e._v(" is cumbersome for HD wallets.")]),e._v(" "),t("li",[t("code",[e._v("Bitcoin Core RPC")]),e._v(" is inflexible and difficult to use. It also scales poorly when a wallet has too many addresses or UTXOs.")]),e._v(" "),t("li",[t("code",[e._v("Bitcoin Core RPC")]),e._v(" supports multiple wallets but isn't designed to handle thousands of them. Having too many wallets will not scale.")]),e._v(" "),t("li",[e._v("While NBXplorer exposes an "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("API"),t("OutboundLink")],1),e._v(", it also allows you to query the data using the most expressive and flexible language designed for this purpose: "),t("RouterLink",{attrs:{to:"/NBXplorer/docs/Postgres-Schema/"}},[e._v("SQL")]),e._v(".")],1),e._v(" "),t("li",[e._v("Alternative SaaS infrastructure providers depend on third parties, forcing you to compromise your privacy by sharing financial information while relinquishing control over API changes and service level agreements (SLAs).")])]),e._v(" "),t("h2",{attrs:{id:"typical-usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#typical-usage"}},[e._v("#")]),e._v(" Typical usage")]),e._v(" "),t("p",[e._v("You start by "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/GenerateWallet",target:"_blank",rel:"noopener noreferrer"}},[e._v("Creating a wallet (hot wallet)"),t("OutboundLink")],1),e._v(", or "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/Track",target:"_blank",rel:"noopener noreferrer"}},[e._v("Tracking a derivation scheme (cold wallet)"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("Second, "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/GetUnused",target:"_blank",rel:"noopener noreferrer"}},[e._v("Get the next unused address"),t("OutboundLink")],1),e._v(" to get paid.")]),e._v(" "),t("p",[e._v("Listen to events through "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Events/operation/GetLatest",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polling"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Events/operation/EventStream",target:"_blank",rel:"noopener noreferrer"}},[e._v("Long Polling"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Events/operation/WebSocket",target:"_blank",rel:"noopener noreferrer"}},[e._v("Web Sockets"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("You can then "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/ListTransactionDerivationScheme",target:"_blank",rel:"noopener noreferrer"}},[e._v("List transactions"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/ListUTXOsDerivationScheme",target:"_blank",rel:"noopener noreferrer"}},[e._v("List UTXOs"),t("OutboundLink")],1),e._v(", or "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Derivations/operation/CreatePSBT",target:"_blank",rel:"noopener noreferrer"}},[e._v("Create a PSBT"),t("OutboundLink")],1),e._v(" for your app to sign.")]),e._v(" "),t("p",[e._v("When the transaction is signed, "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Transactions/operation/Broadcast",target:"_blank",rel:"noopener noreferrer"}},[e._v("Broadcast it"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("You can also track multiple derivation schemes or individual addresses by "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/#tag/Groups/operation/Create",target:"_blank",rel:"noopener noreferrer"}},[e._v("Creating a group"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"general-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#general-features"}},[e._v("#")]),e._v(" General features")]),e._v(" "),t("ul",[t("li",[e._v("Can pass arguments via environment variable, command line or configuration file")]),e._v(" "),t("li",[e._v("Automatically reconnect to your node if the connection goes temporarily down")]),e._v(" "),t("li",[e._v("An easy to use "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("REST API"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Persistence via "),t("RouterLink",{attrs:{to:"/NBXplorer/docs/Postgres-Schema/"}},[e._v("Postgres")])],1),e._v(" "),t("li",[e._v("Connect via RPC to broadcast transaction instead of using the P2P protocol like this example")]),e._v(" "),t("li",[e._v("Connect via RPC to your trusted node to get the proper fee rate.")]),e._v(" "),t("li",[e._v("Altcoin support")]),e._v(" "),t("li",[e._v("Huge test suite")]),e._v(" "),t("li",[e._v("Pruning of transaction data (in practice, we don't need to save the whole transaction, only the spent outpoint and received coin for the wallet)")]),e._v(" "),t("li",[e._v("Multi-wallet")]),e._v(" "),t("li",[e._v("Flexible address generation schemes (multisig, segwit, legacy etc...)")]),e._v(" "),t("li",[e._v("Pruning for big wallets (Removal of tracked transaction which do not impact the resulting UTXO set)")])]),e._v(" "),t("p",[e._v("It currently supports the following altcoins:")]),e._v(" "),t("ul",[t("li",[e._v("Althash")]),e._v(" "),t("li",[e._v("Argoneum")]),e._v(" "),t("li",[e._v("BCash (also known as Bitcoin Cash)")]),e._v(" "),t("li",[e._v("BGold (also known as Bitcoin Gold)")]),e._v(" "),t("li",[e._v("BitCore")]),e._v(" "),t("li",[e._v("Chaincoin")]),e._v(" "),t("li",[e._v("ColossusXT")]),e._v(" "),t("li",[e._v("Dash")]),e._v(" "),t("li",[e._v("Dogecoin")]),e._v(" "),t("li",[e._v("Feathercoin")]),e._v(" "),t("li",[e._v("Gobyte")]),e._v(" "),t("li",[e._v("Groestlcoin")]),e._v(" "),t("li",[e._v("Litecoin")]),e._v(" "),t("li",[e._v("Monacoin")]),e._v(" "),t("li",[e._v("MonetaryUnit")]),e._v(" "),t("li",[e._v("Monoeci")]),e._v(" "),t("li",[e._v("Polis")]),e._v(" "),t("li",[e._v("Qtum")]),e._v(" "),t("li",[e._v("Terracoin")]),e._v(" "),t("li",[e._v("Ufo")]),e._v(" "),t("li",[e._v("Viacoin")])]),e._v(" "),t("p",[e._v("Read our "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("API Specification"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"prerequisite"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisite"}},[e._v("#")]),e._v(" Prerequisite")]),e._v(" "),t("ul",[t("li",[e._v("Install "),t("a",{attrs:{href:"https://www.microsoft.com/net/download",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET Core SDK v8.0 or above"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Bitcoin Core instance synched and running (at least 24.0).")]),e._v(" "),t("li",[e._v("PostgresSQL v13+")])]),e._v(" "),t("p",[e._v("Use "),t("code",[e._v("--postgres")]),e._v(" flag to setup the connection string. See "),t("RouterLink",{attrs:{to:"/NBXplorer/Postgres-Schema/"}},[e._v("schema documentation")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"api-specification"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#api-specification"}},[e._v("#")]),e._v(" API Specification")]),e._v(" "),t("p",[e._v("Read our "),t("RouterLink",{attrs:{to:"/NBXplorer/API/"}},[e._v("API Specification")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"how-to-build-and-run"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-build-and-run"}},[e._v("#")]),e._v(" How to build and run?")]),e._v(" "),t("p",[e._v("If you are using Bitcoin core default settings:")]),e._v(" "),t("p",[e._v("On Powershell:")]),e._v(" "),t("div",{staticClass:"language-pwsh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(".\\build.ps1\n")])])]),t("p",[e._v("On Linux:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("./build.sh\n")])])]),t("p",[e._v("Then to run:")]),e._v(" "),t("p",[e._v("On Powershell:")]),e._v(" "),t("div",{staticClass:"language-pwsh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v(".\\run.ps1 --help\n")])])]),t("p",[e._v("On Linux:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("./run.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--help")]),e._v("\n")])])]),t("p",[e._v("Example, if you have ltc node and btc node on regtest (default configuration), and want to connect to them: (see documentation for other options in the "),t("a",{attrs:{href:"https://www.npgsql.org/doc/connection-string-parameters.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("postgres connection string"),t("OutboundLink")],1),e._v(")")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("./run.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--chains")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("btc,ltc "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--network")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("regtest "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--postgres")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"User ID=postgres;Host=127.0.0.1;Port=5432;Database=nbxplorer"')]),e._v("\n")])])]),t("h2",{attrs:{id:"how-to-use-the-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use-the-api"}},[e._v("#")]),e._v(" How to use the API?")]),e._v(" "),t("p",[e._v("Check "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("the API documentation"),t("OutboundLink")],1),e._v(", you can then use any client library:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/junderw/NBXplorer.NodeJS",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBXplorer.NodeJS"),t("OutboundLink")],1),e._v(" for NodeJS clients.")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://www.nuget.org/packages/NBxplorer.Client",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBXplorer.Client"),t("OutboundLink")],1),e._v(" for .NET clients.")])]),e._v(" "),t("p",[e._v("Here is "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/Examples/MultiSig/Program.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("a small C# example"),t("OutboundLink")],1),e._v(" showing a 2-2 multisig with Alice and Bob that you can run on regtest.")]),e._v(" "),t("h2",{attrs:{id:"with-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#with-docker"}},[e._v("#")]),e._v(" With Docker")]),e._v(" "),t("p",[e._v("Use "),t("a",{attrs:{href:"https://hub.docker.com/r/nicolasdorier/nbxplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("our image"),t("OutboundLink")],1),e._v(".\nYou can check "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/docker-compose.regtest.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("the sample"),t("OutboundLink")],1),e._v(" for configuring and composing it bitcoin core.")]),e._v(" "),t("h2",{attrs:{id:"how-to-develop-on-it"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-develop-on-it"}},[e._v("#")]),e._v(" How to develop on it?")]),e._v(" "),t("p",[e._v("If you are on Windows, I recommend Visual Studio 2022 (17.8.0).\nIf you are on other platform and want lightweight environment, use "),t("a",{attrs:{href:"https://code.visualstudio.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Visual Studio Code"),t("OutboundLink")],1),e._v(".\nIf you are hardcore, you can code on vim.")]),e._v(" "),t("p",[e._v("I like Visual Studio Code and Visual Studio 2022 as it allows me to debug in step by step.")]),e._v(" "),t("h2",{attrs:{id:"how-to-configure"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-configure"}},[e._v("#")]),e._v(" How to configure?")]),e._v(" "),t("p",[e._v("NBXplorer supports configuration through command line arguments, configuration file, or environment variables.")]),e._v(" "),t("h3",{attrs:{id:"configuration-file"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuration-file"}},[e._v("#")]),e._v(" Configuration file")]),e._v(" "),t("p",[e._v("If you are not using standard install for bitcoind, you will have to change the configuration file:\nIn Windows it is located in")]),e._v(" "),t("div",{staticClass:"language-pwsh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-text"}},[t("code",[e._v("C:\\Users\\\\AppData\\Roaming\\NBXplorer\\\\settings.config\n")])])]),t("p",[e._v("On linux or mac:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("~/.nbxplorer/"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("<")]),e._v("network"),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(">")]),e._v("/settings.config\n")])])]),t("p",[e._v("The default configuration assumes "),t("code",[e._v("mainnet")]),e._v(" with only "),t("code",[e._v("btc")]),e._v(" chain supported, and uses the default settings of bitcoind.")]),e._v(" "),t("p",[e._v("You can change the location of the configuration file with the "),t("code",[e._v("--conf=pathToConf")]),e._v(" command line argument.")]),e._v(" "),t("h3",{attrs:{id:"command-line-parameters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#command-line-parameters"}},[e._v("#")]),e._v(" Command line parameters")]),e._v(" "),t("p",[e._v("Please note that NBXplorer uses cookie authentication by default. If you run your Bitcoin/Litecoin/Dash nodes using their daemon (like "),t("code",[e._v("bitcoind")]),e._v(", "),t("code",[e._v("litecoind")]),e._v(" or "),t("code",[e._v("dashd")]),e._v("), they generate a new cookie every time you start them, and that should work without any extra configuration.\nIf you run the node(s) using the GUI versions, like Bitcoin\\Litecoin\\Dash Core Qt with the "),t("code",[e._v("-server")]),e._v(" parameter while you set the rpcusername and rpcpassword in their "),t("code",[e._v(".conf")]),e._v(" files, you must set those values for every crypto you are planning to support.\nSee samples below.")]),e._v(" "),t("h4",{attrs:{id:"run-from-source-requires-net-core-sdk"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#run-from-source-requires-net-core-sdk"}},[e._v("#")]),e._v(" Run from source (requires .NET Core SDK)")]),e._v(" "),t("p",[e._v("You should use "),t("code",[e._v("run.ps1")]),e._v(" (Windows) or "),t("code",[e._v("run.sh")]),e._v(" (Linux) to execute NBXplorer, but you can also execute it manually with the following command:\n"),t("code",[e._v("dotnet run --no-launch-profile -p .\\NBXplorer\\NBXplorer.csproj -- ")])]),e._v(" "),t("h4",{attrs:{id:"run-using-built-dll-requires-net-core-runtime-only"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#run-using-built-dll-requires-net-core-runtime-only"}},[e._v("#")]),e._v(" Run using built DLL (requires .NET Core Runtime only)")]),e._v(" "),t("p",[e._v("If you already have a compiled DLL, you can run the executable with the following command:\n"),t("code",[e._v("dotnet NBXplorer.dll ")])]),e._v(" "),t("h4",{attrs:{id:"sample-parameters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#sample-parameters"}},[e._v("#")]),e._v(" Sample parameters")]),e._v(" "),t("p",[e._v("Running NBXplorer HTTP server on port 20300, connecting to the BTC mainnet node locally.\n"),t("code",[e._v("--port=20300 --network=mainnet --btcnodeendpoint=127.0.0.1:32939")])]),e._v(" "),t("p",[e._v("Running NBXplorer on testnet, supporting Bitcoin, Litecoin and Dash, using cookie authentication for BTC and LTC, and RPC username and password for Dash, connecting to all of them locally.\n"),t("code",[e._v("--chains=btc,ltc,dash --network=testnet --dashrpcuser=myuser --dashrpcpassword=mypassword")])]),e._v(" "),t("h3",{attrs:{id:"environment-variables"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#environment-variables"}},[e._v("#")]),e._v(" Environment variables")]),e._v(" "),t("p",[e._v("The same settings as above, for example "),t("code",[e._v("export NBXPLORER_PORT=20300")]),e._v(". This is usefull for configuring docker.")]),e._v(" "),t("h2",{attrs:{id:"how-to-run"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run"}},[e._v("#")]),e._v(" How to Run")]),e._v(" "),t("h3",{attrs:{id:"command-line"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#command-line"}},[e._v("#")]),e._v(" Command Line")]),e._v(" "),t("p",[e._v("You can use the "),t("a",{attrs:{href:"https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet",target:"_blank",rel:"noopener noreferrer"}},[e._v("dotnet"),t("OutboundLink")],1),e._v(" command which is part of .NET Core to run NBXplorer. To run from source you must have the .NET Core SDK installed e.g.\n"),t("code",[e._v("dotnet run NBXplorer.dll")]),e._v("\nAs described above you may add configuration parameters if desired.")]),e._v(" "),t("p",[e._v("If you have a compiled version of NBXplorer you should have a file in your build folder named NBXplorer.dll. This cannot itself be directly executed on the command line as it is not an executable file. Instead we can use the "),t("code",[e._v("dotnet")]),e._v(" runtime to execute the dll file.")]),e._v(" "),t("p",[e._v("e.g. "),t("code",[e._v("dotnet NBXplorer.dll")])]),e._v(" "),t("h2",{attrs:{id:"important-note"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#important-note"}},[e._v("#")]),e._v(" Important Note")]),e._v(" "),t("p",[e._v("This tool will only start scanning from the configured "),t("code",[e._v("startheight")]),e._v(". (By default, the height of the blockchain during your first run)\nThis means that you might not see old payments from your HD key.")]),e._v(" "),t("p",[e._v("If you need to see old payments, you need to configure "),t("code",[e._v("--[crypto]startheight")]),e._v(" to a specific height of your choice, then run it again with "),t("code",[e._v("--[crypto]rescan")]),e._v(", e.g.\n"),t("code",[e._v("./run.sh --chains=ltc --ltcrescan --ltcstartheight=101")])]),e._v(" "),t("h2",{attrs:{id:"how-to-query"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-query"}},[e._v("#")]),e._v(" How to query?")]),e._v(" "),t("h3",{attrs:{id:"using-postman"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-postman"}},[e._v("#")]),e._v(" Using Postman")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://www.getpostman.com",target:"_blank",rel:"noopener noreferrer"}},[e._v("Postman"),t("OutboundLink")],1),e._v(" is a useful tool for testing and experimenting with REST API's.")]),e._v(" "),t("p",[e._v("You can test the "),t("a",{attrs:{href:"https://dgarage.github.io/NBXplorer/",target:"_blank",rel:"noopener noreferrer"}},[e._v("NBXplorer API"),t("OutboundLink")],1),e._v(" quickly and easily using Postman.")]),e._v(" "),t("p",[e._v("If you use cookie authentication (enabled by default) in your locally run NBXplorer, you need to set that up in Postman:")]),e._v(" "),t("ul",[t("li",[e._v("Run NBXplorer and locate you cookie file (NBXplorer will generate a new Cookie file each time it runs in "),t("RouterLink",{attrs:{to:"/NBXplorer/API/#authentication"}},[e._v("its default data folder")]),e._v(")")],1),e._v(" "),t("li",[e._v("In Postman create a new GET API test")]),e._v(" "),t("li",[e._v("In Authorization select "),t("em",[e._v("Basic Auth")]),e._v(", you should see 2 input boxes for username and password")]),e._v(" "),t("li",[e._v("Open your cookie file with a text editor e.g. Notepad on windows . You should see a cookie string e.g. "),t("code",[e._v("__cookie__:0ff9cd83a5ac7c19a6b56a3d1e7a5c96e113d42dba7720a1f72a3a5e8c4b6c66")])]),e._v(" "),t("li",[e._v("Back in Postman paste the "),t("code",[e._v("__cookie__")]),e._v(" part of your cookie file into username (whatever comes before the 😃")]),e._v(" "),t("li",[e._v("Paste the Hex string (after the : ) into the password box")]),e._v(" "),t("li",[e._v("Click the Update Request button in Postman - this will force Postman to generate the correct HTTP headers based on your cookie details")]),e._v(" "),t("li",[e._v("You should now see a new entry in the Headers section with a Key of "),t("em",[e._v("Authorization")]),e._v(" and Value of "),t("em",[e._v("Basic xxxxxxxxx")]),e._v(" where the string after "),t("code",[e._v("Basic")]),e._v(" will be your Base64 encoded username and password.")]),e._v(" "),t("li",[e._v("Enter the API URL you are going to test")])]),e._v(" "),t("p",[e._v("You can also disable authentication in NBXplorer for testing with the "),t("code",[e._v("--noauth")]),e._v(" parameter. This makes testing quicker:")]),e._v(" "),t("ul",[t("li",[e._v("Run NBXplorer with the "),t("code",[e._v("--noauth")]),e._v(" command line argument or the environment variable "),t("code",[e._v("NBXPLORER_NOAUTH=1")])]),e._v(" "),t("li",[e._v("In Postman create a new GET API test")]),e._v(" "),t("li",[e._v("In Authorization select "),t("em",[e._v("No Auth")])]),e._v(" "),t("li",[e._v("Enter the API URL you are going to test")])]),e._v(" "),t("p",[e._v("You are now ready to test the API - it is easiest to start with something simple such as the fees endpoint e.g.")]),e._v(" "),t("p",[t("code",[e._v("http://localhost:24444/v1/cryptos/btc/fees/3")])]),e._v(" "),t("p",[e._v("this should return a JSON payload e.g.")]),e._v(" "),t("p",[e._v('{\n"feeRate": 9,\n"blockCount": 3\n}')]),e._v(" "),t("h2",{attrs:{id:"message-brokers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#message-brokers"}},[e._v("#")]),e._v(" Message Brokers")]),e._v(" "),t("h3",{attrs:{id:"azure-service-bus"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#azure-service-bus"}},[e._v("#")]),e._v(" Azure Service Bus")]),e._v(" "),t("p",[e._v("Support has been added for Azure Service Bus as a message broker. Currently 2 Queues and 2 Topics are supported")]),e._v(" "),t("h3",{attrs:{id:"queues"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#queues"}},[e._v("#")]),e._v(" Queues")]),e._v(" "),t("ul",[t("li",[e._v("New Block")]),e._v(" "),t("li",[e._v("New Transaction")])]),e._v(" "),t("h3",{attrs:{id:"topics"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#topics"}},[e._v("#")]),e._v(" Topics")]),e._v(" "),t("ul",[t("li",[e._v("New Block")]),e._v(" "),t("li",[e._v("New Transaction")])]),e._v(" "),t("p",[e._v("Filters should be applied on the client, if required.")]),e._v(" "),t("p",[e._v("To activate Azure Service Bus Mesages you should add an Azure Service Bus Connection string to your config file or on the command line.")]),e._v(" "),t("ul",[t("li",[e._v("To use queues you should specify the queue names you wish to use")]),e._v(" "),t("li",[e._v("To use topics you should specify the topic names you wish to use")])]),e._v(" "),t("p",[e._v("You can use both queues and topics at the same time.")]),e._v(" "),t("h4",{attrs:{id:"config-settings"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#config-settings"}},[e._v("#")]),e._v(" Config Settings")]),e._v(" "),t("p",[e._v("If you use the Configuration file to setup your NBXplorer options:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbcnstr")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Your Azure Service Bus Connection string")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbblockq")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of queue to send New Block message to")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbtranq")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of queue to send New Transaction message to")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbblockt")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of topic to send New Block message to")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("asbtrant")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of queue to send New Transaction message to")]),e._v("\n")])])]),t("h3",{attrs:{id:"rabbitmq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#rabbitmq"}},[e._v("#")]),e._v(" RabbitMq")]),e._v(" "),t("p",[e._v("Support has been added for RabbitMq as a message broker. Currently 2 exchanges supported;")]),e._v(" "),t("ul",[t("li",[e._v("New Block")]),e._v(" "),t("li",[e._v("New Transaction")])]),e._v(" "),t("p",[e._v("Filters can be applied on the client by defining routing keys;")]),e._v(" "),t("p",[e._v("For transactions;")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("transactions.#")]),e._v(" to get all transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.[BTC].#")]),e._v(" to get all [Bitcoin] transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.[BTC].confirmed")]),e._v(" to get only confirmed [Bitcoin] transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.[BTC].unconfirmed")]),e._v(" to get only unconfirmed [Bitcoin] transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.*.confirmed")]),e._v(" to get all confirmed transactions.")]),e._v(" "),t("li",[t("code",[e._v("transactions.*.unconfirmed")]),e._v(" to get all unconfirmed transactions.")])]),e._v(" "),t("p",[e._v("For blocks;")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("blocks.#")]),e._v(" to get all blocks.")]),e._v(" "),t("li",[t("code",[e._v("blocks.[BTC]")]),e._v(" to get all [Bitcoin] blocks.")])]),e._v(" "),t("p",[e._v("To activate RabbitMq mesages you should add following settings to your config file or on the command line.")]),e._v(" "),t("ul",[t("li",[e._v("rmqhost, rmquser, rmqpass")])]),e._v(" "),t("h4",{attrs:{id:"config-settings-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#config-settings-2"}},[e._v("#")]),e._v(" Config Settings")]),e._v(" "),t("p",[e._v("If you use the Configuration file to setup your NBXplorer options:")]),e._v(" "),t("div",{staticClass:"language-ini extra-class"},[t("pre",{pre:!0,attrs:{class:"language-ini"}},[t("code",[t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqhost")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("RabbitMq host name")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqvirtual")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("RabbitMq virtual host")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmquser")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("RabbitMq username")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqpass")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("RabbitMq password")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqtranex")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of exchange to send transaction messages")]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token key attr-name"}},[e._v("rmqblockex")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("=")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token value attr-value"}},[e._v("Name of exchange to send block messages")]),e._v("\n")])])]),t("p",[e._v("Payloads are JSON and map to "),t("code",[e._v("NewBlockEvent")]),e._v(", "),t("code",[e._v("NewTransactionEvent")]),e._v(" in the "),t("code",[e._v("NBXplorer.Models")]),e._v(" namespace. There is no support in NBXplorer client for message borkers at the current time. You will need to use the "),t("code",[e._v("Serializer")]),e._v(" in "),t("code",[e._v("NBXplorer.Client")]),e._v(" to de-serialize the objects or then implement your own JSON de-serializers for the custom types used in the payload.")]),e._v(" "),t("p",[e._v("For configuring serializers you can get crypto code info from "),t("code",[e._v("BasicProperties.Headers[CryptoCode]")]),e._v(" of RabbitMq messages or "),t("code",[e._v("UserProperties[CryptoCode]")]),e._v(" of Azure Service Bus messages.\nExamples can be found in unit tests.")]),e._v(" "),t("h4",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting")]),e._v(" "),t("p",[e._v("If you receive a 401 Unauthorized then your cookie data is not working. Check you are using the current cookie by opening the cookie file again - also check the date/time of the cookie file to ensure it is the latest cookie (generated when you launched NBXplorer).")]),e._v(" "),t("p",[e._v("If you receive a 404 or timeout then Postman cannot see the endpoint")]),e._v(" "),t("ul",[t("li",[e._v("are you using the correct Port ?")]),e._v(" "),t("li",[e._v("are you running postman on localhost ?")])]),e._v(" "),t("h2",{attrs:{id:"client-api"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#client-api"}},[e._v("#")]),e._v(" Client API")]),e._v(" "),t("p",[e._v("A better documentation is on the way, for now the only documentation is the client API in C# on "),t("a",{attrs:{href:"https://www.nuget.org/packages/NBxplorer.Client",target:"_blank",rel:"noopener noreferrer"}},[e._v("nuget"),t("OutboundLink")],1),e._v(".\nThe "),t("code",[e._v("ExplorerClient")]),e._v(" classes allows you to query unused addresses, and the UTXO of an HD PubKey.\nYou can take a look at "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/NBXplorer.Tests/UnitTest1.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("the tests"),t("OutboundLink")],1),e._v(" to see how it works.")]),e._v(" "),t("p",[e._v("There is a simple use case documented on "),t("a",{attrs:{href:"https://programmingblockchain.gitbooks.io/programmingblockchain/content/wallet/web-api.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("Blockchain Programming in C#"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-to-run-the-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-tests"}},[e._v("#")]),e._v(" How to run the tests?")]),e._v(" "),t("p",[e._v("This is easy, from repo directory:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" NBXplorer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The tests can take long the first time, as it download Bitcoin Core binaries. (Between 5 and 10 minutes)")]),e._v(" "),t("h2",{attrs:{id:"how-to-add-support-to-my-altcoin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-add-support-to-my-altcoin"}},[e._v("#")]),e._v(" How to add support to my altcoin")]),e._v(" "),t("p",[e._v("First you need to add support for your altcoin to "),t("code",[e._v("NBitcoin.Altcoins")]),e._v(". (See "),t("a",{attrs:{href:"https://github.com/MetacoSA/NBitcoin/tree/master/NBitcoin.Altcoins",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("p",[e._v("Once this is done and "),t("code",[e._v("NBXplorer")]),e._v(" updated to use the last version of "),t("code",[e._v("NBitcoin.Altcoins")]),e._v(", follow "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/NBXplorer.Client/NBXplorerNetworkProvider.Litecoin.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("Litecoin example"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If you want to test if everything is working, modify "),t("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/NBXplorer.Tests/ServerTester.Environment.cs",target:"_blank",rel:"noopener noreferrer"}},[e._v("ServerTester.Environment.cs"),t("OutboundLink")],1),e._v(" to match your altcoin.")]),e._v(" "),t("p",[e._v("Then run the tests.")]),e._v(" "),t("h2",{attrs:{id:"licence"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#licence"}},[e._v("#")]),e._v(" Licence")]),e._v(" "),t("p",[e._v("This project is under MIT License.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/155.d589c522.js b/assets/js/155.7c0e7c4e.js similarity index 99% rename from assets/js/155.d589c522.js rename to assets/js/155.7c0e7c4e.js index 9835ab0553..29bd1c1df9 100644 --- a/assets/js/155.d589c522.js +++ b/assets/js/155.7c0e7c4e.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[155],{910:function(e,t,o){"use strict";o.r(t);var r=o(17),a=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-accept-bitcoin-payments-in-nopcommerce"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-accept-bitcoin-payments-in-nopcommerce"}},[e._v("#")]),e._v(" BTCPay Server Accept Bitcoin payments in nopCommerce")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/nopcommerce/main/nopCommerceAcceptBitcoin.png",alt:"BTCPay nopCommerce Banner",title:"BTCPay nopCommerce Banner"}})]),e._v(" "),t("h2",{attrs:{id:"plugin-overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-overview"}},[e._v("#")]),e._v(" Plugin Overview")]),e._v(" "),t("p",[e._v("This plugin allows you to easily start accepting Bitcoin payments in your nopCommerce e-commerce store using BTCPay Server a free, self-hosted and open-source Bitcoin payment gateway.")]),e._v(" "),t("h2",{attrs:{id:"features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#features"}},[e._v("#")]),e._v(" Features")]),e._v(" "),t("ul",[t("li",[e._v("0% Fees: Enjoy a payment gateway with no fees. Yes, really!")]),e._v(" "),t("li",[e._v("No complicated KYC needed, you're your own self-hosted payment gateway")]),e._v(" "),t("li",[e._v("Automated invoice management and refunds")]),e._v(" "),t("li",[e._v("Simple and customizable checkout UX, available in 30+ languages")]),e._v(" "),t("li",[e._v("Direct payments to your wallet, no intermediary")]),e._v(" "),t("li",[e._v("Reporting and accounting CSV exports")]),e._v(" "),t("li",[e._v("Real-time exchange price tracking for correct payment amounts")]),e._v(" "),t("li",[e._v("Community-driven support")]),e._v(" "),t("li",[e._v("Extensive documentation and video tutorials")])]),e._v(" "),t("h2",{attrs:{id:"getting-started"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[e._v("#")]),e._v(" Getting Started")]),e._v(" "),t("h3",{attrs:{id:"download-and-installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-installation"}},[e._v("#")]),e._v(" Download and installation")]),e._v(" "),t("p",[e._v("The plugins can be downloaded through "),t("a",{attrs:{href:"https://www.nopcommerce.com/marketplace/",target:"_blank",rel:"noopener noreferrer"}},[e._v("nopCommerce Marketplace"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://github.com/btcpayserver/nopcommerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("For installing the plugin through nopCommerce, upload the plugin directly from nopCommerce "),t("code",[e._v("Configuration > Local plugins > Upload plugin or a theme")]),e._v('. Ensure the plugin file is in ZIP format for successful upload. After uploading, find the plugin in the list, click "Install" next to it, and enable it if needed.')]),e._v(" "),t("p",[e._v("Alternatively you can manually upload the plugin to the "),t("code",[e._v("/plugins")]),e._v(" folder in your nopCommerce directory and restart the application.")]),e._v(" "),t("p",[e._v("Once the plugin is uploaded, make sure to click "),t("code",[e._v("Install")]),e._v(" button and "),t("code",[e._v("Restart application")]),e._v(" to apply the changes.")]),e._v(" "),t("h2",{attrs:{id:"plugin-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-configuration"}},[e._v("#")]),e._v(" Plugin configuration")]),e._v(" "),t("p",[e._v("You can configure the plugin either automatically or manually. Automatic setup is much faster and recommended. To begin configuring the plugin, click on the "),t("code",[e._v("Configure")]),e._v(" button in the")]),e._v(" "),t("h3",{attrs:{id:"automatic-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#automatic-configuration"}},[e._v("#")]),e._v(" Automatic Configuration")]),e._v(" "),t("ol",[t("li",[e._v("Enter the URL to your BTCPay Server into the "),t("strong",[e._v("BTCPay URL")]),e._v(" field. (e.g. https://mainnet.demo.btcpayserver.org)")]),e._v(" "),t("li",[e._v("Click on the "),t("strong",[e._v("Configure automatically")]),e._v(" button to be redirected to the API authorization page of your BTCPay Server")]),e._v(" "),t("li",[e._v("On the authorization page: Select the store you want to connect to your nopCommerce (you might need to login first)")]),e._v(" "),t("li",[e._v('Click on "Authorize App" button and you will be redirected back to your nopCommerce')]),e._v(" "),t("li",[e._v('The "API Key", "BTCPay Store ID" and "Webhook Secret" fields will be automatically filled and a webhook created')]),e._v(" "),t("li",[e._v("Click "),t("strong",[e._v("Save")]),e._v(" button at the bottom to persist the configuration.")]),e._v(" "),t("li",[e._v("Click "),t("strong",[e._v("Activate")]),e._v(" to enable the plugin. Congrats, the configuration is now complete!")])]),e._v(" "),t("p",[t("em",[e._v("Note: given the architecture of nopCommerce, it is possible that malfunctions in redirections may occur. Particularly if https is disabled or incorrectly configured. In this case, please opt for manual configuration.")])]),e._v(" "),t("h3",{attrs:{id:"manual-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#manual-configuration"}},[e._v("#")]),e._v(" Manual Configuration")]),e._v(" "),t("p",[e._v("Ensure that the following fields are filled out:")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Url")]),e._v(" "),t("li",[e._v("BTCPay Store ID")]),e._v(" "),t("li",[e._v("API Key")]),e._v(" "),t("li",[e._v("WebHook Secret")])]),e._v(" "),t("h4",{attrs:{id:"btcpay-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-url"}},[e._v("#")]),e._v(" BTCPay URL")]),e._v(" "),t("p",[e._v("In the BTCPay URL field of your nopCommerce, simply input the link to your self-hosted server or the one hosted by a "),t("a",{attrs:{href:"https://directory.btcpayserver.org/filter/hosts",target:"_blank",rel:"noopener noreferrer"}},[e._v("third-party provider"),t("OutboundLink")],1),e._v(". For example; https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("h4",{attrs:{id:"btcpay-store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-store-id"}},[e._v("#")]),e._v(" BTCPay Store ID")]),e._v(" "),t("p",[e._v("BTCPay "),t("strong",[e._v("Store ID")]),e._v(" can be obtained from your BTCPay Server, in Store Settings > General > Store ID field. Copy it and paste it over in the "),t("code",[e._v("BTCPay Store ID")]),e._v(" field.")]),e._v(" "),t("h4",{attrs:{id:"generating-the-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-api-key"}},[e._v("#")]),e._v(" Generating the API key")]),e._v(" "),t("ol",[t("li",[e._v("To create the "),t("strong",[e._v("BTCPay API key")]),e._v(", click on the "),t("code",[e._v("Account")]),e._v(" located at the bottom of the sidebar of your BTCPay Server.")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Manage Account > API Key")]),e._v(".")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Generate API key")]),e._v(" button")]),e._v(" "),t("li",[e._v("Click on the checkboxes and enable the following permissions:")])]),e._v(" "),t("ul",[t("li",[e._v("View invoices")]),e._v(" "),t("li",[e._v("Create an invoice")]),e._v(" "),t("li",[e._v("Modify invoices")]),e._v(" "),t("li",[e._v("Modify selected stores' webhooks")]),e._v(" "),t("li",[e._v("View your stores")]),e._v(" "),t("li",[e._v("Create non-approved pull payments in selected stores (optional)")])]),e._v(" "),t("p",[t("em",[e._v("Note: To use the "),t("RouterLink",{attrs:{to:"/Refund/#refunds"}},[e._v("refund feature")]),e._v(', you must also add the "Create non-approved pull payments" permission. After a refund, an order note is created where you can copy the pull payments link and send to your customer to claim it (this order note is also visible by the customer). The customer can request the refund on that page by filling out refund address.')],1)]),e._v(" "),t("h4",{attrs:{id:"generating-the-webhook"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-webhook"}},[e._v("#")]),e._v(" Generating the webhook")]),e._v(" "),t("ol",[t("li",[e._v('In your nopCommerce, copy the "Webhook Url" shown on the bottom of the BTCPay plugin configuration screen.')]),e._v(" "),t("li",[e._v("Next, go to your BTCPay Server "),t("code",[e._v("Store Settings > Webhooks")])]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Create Webhook")]),e._v(" button")]),e._v(" "),t("li",[e._v("Paste the "),t("code",[e._v("Webhook Url")]),e._v(" you copied from nopCommerce (step 1) into the"),t("code",[e._v("Payload URL")]),e._v(" field")]),e._v(" "),t("li",[e._v('Click on the "Eye" icon next to the '),t("code",[e._v("Secret")]),e._v(" field to reveal the secret key and "),t("code",[e._v("Copy")]),e._v(" it.")]),e._v(" "),t("li",[e._v("Don't forget to click on the "),t("code",[e._v("Add webhook")]),e._v(" to apply all the changes.")]),e._v(" "),t("li",[e._v("Go back nopCommerce and paste the Secret Key into the "),t("code",[e._v("WebHook Secret")]),e._v(" field")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Save")]),e._v(" to apply all the changes")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Activate")]),e._v(" to enable the plugin. Congrats, the configuration is now complete!")])]),e._v(" "),t("p",[e._v("Now your BTCPay Server is connected to your nopCommerce successfully.")]),e._v(" "),t("h2",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")]),e._v(" "),t("p",[e._v("If you experience a bug please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpay-nopCommerce-plugin/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("open a bug report"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"license"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#license"}},[e._v("#")]),e._v(" License")]),e._v(" "),t("p",[e._v("This plugin is released under the "),t("a",{attrs:{href:"https://github.com/btcpayserver/nopcommerce/blob/master/LICENSE",target:"_blank",rel:"noopener noreferrer"}},[e._v("MIT License"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("The non-profit "),t("a",{attrs:{href:"https://btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Foundation"),t("OutboundLink")],1),e._v(" is committed to keeping this powerful payment plugin free forever. Our mission is to enable anyone to accept bitcoin regardless of financial, technical, social or political barriers.")]),e._v(" "),t("hr")])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[155],{911:function(e,t,o){"use strict";o.r(t);var r=o(17),a=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"btcpay-server-accept-bitcoin-payments-in-nopcommerce"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-accept-bitcoin-payments-in-nopcommerce"}},[e._v("#")]),e._v(" BTCPay Server Accept Bitcoin payments in nopCommerce")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/nopcommerce/main/nopCommerceAcceptBitcoin.png",alt:"BTCPay nopCommerce Banner",title:"BTCPay nopCommerce Banner"}})]),e._v(" "),t("h2",{attrs:{id:"plugin-overview"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-overview"}},[e._v("#")]),e._v(" Plugin Overview")]),e._v(" "),t("p",[e._v("This plugin allows you to easily start accepting Bitcoin payments in your nopCommerce e-commerce store using BTCPay Server a free, self-hosted and open-source Bitcoin payment gateway.")]),e._v(" "),t("h2",{attrs:{id:"features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#features"}},[e._v("#")]),e._v(" Features")]),e._v(" "),t("ul",[t("li",[e._v("0% Fees: Enjoy a payment gateway with no fees. Yes, really!")]),e._v(" "),t("li",[e._v("No complicated KYC needed, you're your own self-hosted payment gateway")]),e._v(" "),t("li",[e._v("Automated invoice management and refunds")]),e._v(" "),t("li",[e._v("Simple and customizable checkout UX, available in 30+ languages")]),e._v(" "),t("li",[e._v("Direct payments to your wallet, no intermediary")]),e._v(" "),t("li",[e._v("Reporting and accounting CSV exports")]),e._v(" "),t("li",[e._v("Real-time exchange price tracking for correct payment amounts")]),e._v(" "),t("li",[e._v("Community-driven support")]),e._v(" "),t("li",[e._v("Extensive documentation and video tutorials")])]),e._v(" "),t("h2",{attrs:{id:"getting-started"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#getting-started"}},[e._v("#")]),e._v(" Getting Started")]),e._v(" "),t("h3",{attrs:{id:"download-and-installation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-installation"}},[e._v("#")]),e._v(" Download and installation")]),e._v(" "),t("p",[e._v("The plugins can be downloaded through "),t("a",{attrs:{href:"https://www.nopcommerce.com/marketplace/",target:"_blank",rel:"noopener noreferrer"}},[e._v("nopCommerce Marketplace"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://github.com/btcpayserver/nopcommerce",target:"_blank",rel:"noopener noreferrer"}},[e._v("GitHub"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("For installing the plugin through nopCommerce, upload the plugin directly from nopCommerce "),t("code",[e._v("Configuration > Local plugins > Upload plugin or a theme")]),e._v('. Ensure the plugin file is in ZIP format for successful upload. After uploading, find the plugin in the list, click "Install" next to it, and enable it if needed.')]),e._v(" "),t("p",[e._v("Alternatively you can manually upload the plugin to the "),t("code",[e._v("/plugins")]),e._v(" folder in your nopCommerce directory and restart the application.")]),e._v(" "),t("p",[e._v("Once the plugin is uploaded, make sure to click "),t("code",[e._v("Install")]),e._v(" button and "),t("code",[e._v("Restart application")]),e._v(" to apply the changes.")]),e._v(" "),t("h2",{attrs:{id:"plugin-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#plugin-configuration"}},[e._v("#")]),e._v(" Plugin configuration")]),e._v(" "),t("p",[e._v("You can configure the plugin either automatically or manually. Automatic setup is much faster and recommended. To begin configuring the plugin, click on the "),t("code",[e._v("Configure")]),e._v(" button in the")]),e._v(" "),t("h3",{attrs:{id:"automatic-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#automatic-configuration"}},[e._v("#")]),e._v(" Automatic Configuration")]),e._v(" "),t("ol",[t("li",[e._v("Enter the URL to your BTCPay Server into the "),t("strong",[e._v("BTCPay URL")]),e._v(" field. (e.g. https://mainnet.demo.btcpayserver.org)")]),e._v(" "),t("li",[e._v("Click on the "),t("strong",[e._v("Configure automatically")]),e._v(" button to be redirected to the API authorization page of your BTCPay Server")]),e._v(" "),t("li",[e._v("On the authorization page: Select the store you want to connect to your nopCommerce (you might need to login first)")]),e._v(" "),t("li",[e._v('Click on "Authorize App" button and you will be redirected back to your nopCommerce')]),e._v(" "),t("li",[e._v('The "API Key", "BTCPay Store ID" and "Webhook Secret" fields will be automatically filled and a webhook created')]),e._v(" "),t("li",[e._v("Click "),t("strong",[e._v("Save")]),e._v(" button at the bottom to persist the configuration.")]),e._v(" "),t("li",[e._v("Click "),t("strong",[e._v("Activate")]),e._v(" to enable the plugin. Congrats, the configuration is now complete!")])]),e._v(" "),t("p",[t("em",[e._v("Note: given the architecture of nopCommerce, it is possible that malfunctions in redirections may occur. Particularly if https is disabled or incorrectly configured. In this case, please opt for manual configuration.")])]),e._v(" "),t("h3",{attrs:{id:"manual-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#manual-configuration"}},[e._v("#")]),e._v(" Manual Configuration")]),e._v(" "),t("p",[e._v("Ensure that the following fields are filled out:")]),e._v(" "),t("ul",[t("li",[e._v("BTCPay Url")]),e._v(" "),t("li",[e._v("BTCPay Store ID")]),e._v(" "),t("li",[e._v("API Key")]),e._v(" "),t("li",[e._v("WebHook Secret")])]),e._v(" "),t("h4",{attrs:{id:"btcpay-url"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-url"}},[e._v("#")]),e._v(" BTCPay URL")]),e._v(" "),t("p",[e._v("In the BTCPay URL field of your nopCommerce, simply input the link to your self-hosted server or the one hosted by a "),t("a",{attrs:{href:"https://directory.btcpayserver.org/filter/hosts",target:"_blank",rel:"noopener noreferrer"}},[e._v("third-party provider"),t("OutboundLink")],1),e._v(". For example; https://mainnet.demo.btcpayserver.org")]),e._v(" "),t("h4",{attrs:{id:"btcpay-store-id"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-store-id"}},[e._v("#")]),e._v(" BTCPay Store ID")]),e._v(" "),t("p",[e._v("BTCPay "),t("strong",[e._v("Store ID")]),e._v(" can be obtained from your BTCPay Server, in Store Settings > General > Store ID field. Copy it and paste it over in the "),t("code",[e._v("BTCPay Store ID")]),e._v(" field.")]),e._v(" "),t("h4",{attrs:{id:"generating-the-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-api-key"}},[e._v("#")]),e._v(" Generating the API key")]),e._v(" "),t("ol",[t("li",[e._v("To create the "),t("strong",[e._v("BTCPay API key")]),e._v(", click on the "),t("code",[e._v("Account")]),e._v(" located at the bottom of the sidebar of your BTCPay Server.")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Manage Account > API Key")]),e._v(".")]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Generate API key")]),e._v(" button")]),e._v(" "),t("li",[e._v("Click on the checkboxes and enable the following permissions:")])]),e._v(" "),t("ul",[t("li",[e._v("View invoices")]),e._v(" "),t("li",[e._v("Create an invoice")]),e._v(" "),t("li",[e._v("Modify invoices")]),e._v(" "),t("li",[e._v("Modify selected stores' webhooks")]),e._v(" "),t("li",[e._v("View your stores")]),e._v(" "),t("li",[e._v("Create non-approved pull payments in selected stores (optional)")])]),e._v(" "),t("p",[t("em",[e._v("Note: To use the "),t("RouterLink",{attrs:{to:"/Refund/#refunds"}},[e._v("refund feature")]),e._v(', you must also add the "Create non-approved pull payments" permission. After a refund, an order note is created where you can copy the pull payments link and send to your customer to claim it (this order note is also visible by the customer). The customer can request the refund on that page by filling out refund address.')],1)]),e._v(" "),t("h4",{attrs:{id:"generating-the-webhook"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#generating-the-webhook"}},[e._v("#")]),e._v(" Generating the webhook")]),e._v(" "),t("ol",[t("li",[e._v('In your nopCommerce, copy the "Webhook Url" shown on the bottom of the BTCPay plugin configuration screen.')]),e._v(" "),t("li",[e._v("Next, go to your BTCPay Server "),t("code",[e._v("Store Settings > Webhooks")])]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Create Webhook")]),e._v(" button")]),e._v(" "),t("li",[e._v("Paste the "),t("code",[e._v("Webhook Url")]),e._v(" you copied from nopCommerce (step 1) into the"),t("code",[e._v("Payload URL")]),e._v(" field")]),e._v(" "),t("li",[e._v('Click on the "Eye" icon next to the '),t("code",[e._v("Secret")]),e._v(" field to reveal the secret key and "),t("code",[e._v("Copy")]),e._v(" it.")]),e._v(" "),t("li",[e._v("Don't forget to click on the "),t("code",[e._v("Add webhook")]),e._v(" to apply all the changes.")]),e._v(" "),t("li",[e._v("Go back nopCommerce and paste the Secret Key into the "),t("code",[e._v("WebHook Secret")]),e._v(" field")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Save")]),e._v(" to apply all the changes")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Activate")]),e._v(" to enable the plugin. Congrats, the configuration is now complete!")])]),e._v(" "),t("p",[e._v("Now your BTCPay Server is connected to your nopCommerce successfully.")]),e._v(" "),t("h2",{attrs:{id:"support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#support"}},[e._v("#")]),e._v(" Support")]),e._v(" "),t("p",[e._v("Feel free to join our support channel over at "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" if you need help or have any further questions.")]),e._v(" "),t("p",[e._v("If you experience a bug please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpay-nopCommerce-plugin/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("open a bug report"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"license"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#license"}},[e._v("#")]),e._v(" License")]),e._v(" "),t("p",[e._v("This plugin is released under the "),t("a",{attrs:{href:"https://github.com/btcpayserver/nopcommerce/blob/master/LICENSE",target:"_blank",rel:"noopener noreferrer"}},[e._v("MIT License"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("The non-profit "),t("a",{attrs:{href:"https://btcpayserver.org",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Foundation"),t("OutboundLink")],1),e._v(" is committed to keeping this powerful payment plugin free forever. Our mission is to enable anyone to accept bitcoin regardless of financial, technical, social or political barriers.")]),e._v(" "),t("hr")])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/156.6661f5f0.js b/assets/js/156.35b44a0c.js similarity index 97% rename from assets/js/156.6661f5f0.js rename to assets/js/156.35b44a0c.js index dbb48d8cc9..c63f04786e 100644 --- a/assets/js/156.6661f5f0.js +++ b/assets/js/156.35b44a0c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[156],{912:function(t,e,r){"use strict";r.r(e);var o=r(17),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"btcpay-server-nip05-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-nip05-support"}},[t._v("#")]),t._v(" BTCPay Server NIP05 Support")]),t._v(" "),e("p",[t._v("This plugin allows your BTCPay Server to support")]),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"https://github.com/nostr-protocol/nostr",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nostr"),e("OutboundLink")],1),e("a",{attrs:{href:"https://github.com/nostr-protocol/nips/blob/master/05.md",target:"_blank",rel:"noopener noreferrer"}},[t._v(" NIP05 protocol"),e("OutboundLink")],1),t._v(" to verify accounts.")]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/nostr-protocol/nostr",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nostr"),e("OutboundLink")],1),e("a",{attrs:{href:"https://github.com/nostr-protocol/nips/blob/master/57.md",target:"_blank",rel:"noopener noreferrer"}},[t._v(" NIP57 protocol"),e("OutboundLink")],1),t._v(" to support Zaps.")]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/nostr-protocol/nostr",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nostr"),e("OutboundLink")],1),e("a",{attrs:{href:"https://github.com/nostr-protocol/nips/blob/master/47.md",target:"_blank",rel:"noopener noreferrer"}},[t._v(" NIP47 protocol"),e("OutboundLink")],1),t._v(" to accept payments to your NWC enabled lightning wallet.")])]),t._v(" "),e("h2",{attrs:{id:"usage"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Install the plugin")])]),t._v(" "),e("li",[e("p",[t._v('On a store you have owner access to, click on the new "Nostr" side navigation menu item')])]),t._v(" "),e("li",[e("p",[t._v("Specify a name and public key.\nNOTE: You will not be able to select the same name across different stores. The public key is in hex format and not "),e("code",[t._v("npub...")]),t._v(" ("),e("a",{attrs:{href:"https://nostrcheck.me/converter/",target:"_blank",rel:"noopener noreferrer"}},[t._v("convert here"),e("OutboundLink")],1),t._v(")")])]),t._v(" "),e("li",[e("p",[t._v("Optionally include a set of relays that you primarily use so that client can discover your events more easily.")])]),t._v(" "),e("li",[e("p",[t._v("Alternatively, you can import this data by using one of the Nostr browser extensions such as Alby or Nos2x")])])]),t._v(" "),e("p",[t._v("Your NIP5 handle will be "),e("code",[t._v("name@yourbtcpayserver.domain")]),t._v(". If you have multiple domains mapped to the same btcpayserver, they will all be valid.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[156],{915:function(t,e,r){"use strict";r.r(e);var o=r(17),n=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"btcpay-server-nip05-support"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-nip05-support"}},[t._v("#")]),t._v(" BTCPay Server NIP05 Support")]),t._v(" "),e("p",[t._v("This plugin allows your BTCPay Server to support")]),t._v(" "),e("ul",[e("li",[e("a",{attrs:{href:"https://github.com/nostr-protocol/nostr",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nostr"),e("OutboundLink")],1),e("a",{attrs:{href:"https://github.com/nostr-protocol/nips/blob/master/05.md",target:"_blank",rel:"noopener noreferrer"}},[t._v(" NIP05 protocol"),e("OutboundLink")],1),t._v(" to verify accounts.")]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/nostr-protocol/nostr",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nostr"),e("OutboundLink")],1),e("a",{attrs:{href:"https://github.com/nostr-protocol/nips/blob/master/57.md",target:"_blank",rel:"noopener noreferrer"}},[t._v(" NIP57 protocol"),e("OutboundLink")],1),t._v(" to support Zaps.")]),t._v(" "),e("li",[e("a",{attrs:{href:"https://github.com/nostr-protocol/nostr",target:"_blank",rel:"noopener noreferrer"}},[t._v("Nostr"),e("OutboundLink")],1),e("a",{attrs:{href:"https://github.com/nostr-protocol/nips/blob/master/47.md",target:"_blank",rel:"noopener noreferrer"}},[t._v(" NIP47 protocol"),e("OutboundLink")],1),t._v(" to accept payments to your NWC enabled lightning wallet.")])]),t._v(" "),e("h2",{attrs:{id:"usage"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Install the plugin")])]),t._v(" "),e("li",[e("p",[t._v('On a store you have owner access to, click on the new "Nostr" side navigation menu item')])]),t._v(" "),e("li",[e("p",[t._v("Specify a name and public key.\nNOTE: You will not be able to select the same name across different stores. The public key is in hex format and not "),e("code",[t._v("npub...")]),t._v(" ("),e("a",{attrs:{href:"https://nostrcheck.me/converter/",target:"_blank",rel:"noopener noreferrer"}},[t._v("convert here"),e("OutboundLink")],1),t._v(")")])]),t._v(" "),e("li",[e("p",[t._v("Optionally include a set of relays that you primarily use so that client can discover your events more easily.")])]),t._v(" "),e("li",[e("p",[t._v("Alternatively, you can import this data by using one of the Nostr browser extensions such as Alby or Nos2x")])])]),t._v(" "),e("p",[t._v("Your NIP5 handle will be "),e("code",[t._v("name@yourbtcpayserver.domain")]),t._v(". If you have multiple domains mapped to the same btcpayserver, they will all be valid.")])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/157.ada1660d.js b/assets/js/157.e986753a.js similarity index 99% rename from assets/js/157.ada1660d.js rename to assets/js/157.e986753a.js index b3dc3ba94b..b04007fea9 100644 --- a/assets/js/157.ada1660d.js +++ b/assets/js/157.e986753a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[157],{914:function(t,e,o){"use strict";o.r(e);var a=o(17),r=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"btcpay-server-payment-gateway-for-odoo-17"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-payment-gateway-for-odoo-17"}},[t._v("#")]),t._v(" BTCPay Server payment gateway for Odoo 17")]),t._v(" "),e("h2",{attrs:{id:"this-is-the-module-to-connect-odoo-17-and-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#this-is-the-module-to-connect-odoo-17-and-btcpay-server"}},[t._v("#")]),t._v(" This is the module to connect Odoo 17 and BTCPay Server")]),t._v(" "),e("p",[t._v("This module allows you to accept bitcoin (and other cryptocurrency) payments in your Odoo e-commerce store."),e("br"),t._v(" "),e("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPay-Odoo-17-featured.png",alt:"BTCPay Server Banner",title:"BTCPay Server Banner"}})]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("If you use Odoo 16 you can find the documentation "),e("a",{attrs:{href:"https://github.com/btcpayserver/odoo/blob/16.0/payment_btcpayserver/README.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("h2",{attrs:{id:"install-the-module"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#install-the-module"}},[t._v("#")]),t._v(" Install the module")]),t._v(" "),e("ul",[e("li",[t._v("Clone our "),e("a",{attrs:{href:"https://github.com/btcpayserver/odoo",target:"_blank",rel:"noopener noreferrer"}},[t._v("repository"),e("OutboundLink")],1),t._v(" or download the .zip from the "),e("a",{attrs:{href:"https://github.com/btcpayserver/odoo/releases",target:"_blank",rel:"noopener noreferrer"}},[t._v("releases page"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Make sure you are on branch "),e("code",[t._v("17.0")]),t._v(" or downloaded a release tagged with version v17.x")]),t._v(" "),e("li",[t._v("Place the "),e("code",[t._v("payment_btcpayserver")]),t._v(" directory in your Odoo addons directory")]),t._v(" "),e("li",[t._v("Install dependencies by running "),e("code",[t._v("pip install -r requirements.txt")]),t._v(" (from inside the "),e("code",[t._v("payment_btcpayserver")]),t._v(" directory)")]),t._v(" "),e("li",[t._v("Restart Odoo")]),t._v(" "),e("li",[t._v("Go to Apps -> Update Apps List")]),t._v(" "),e("li",[t._v('Remove the "Apps" filter and search for "btcpay"')]),t._v(" "),e("li",[t._v("Click "),e("strong",[t._v("Activate")]),t._v(" button")])]),t._v(" "),e("h2",{attrs:{id:"configure-btcpay-as-payment-provider"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#configure-btcpay-as-payment-provider"}},[t._v("#")]),t._v(" Configure BTCPay as payment provider")]),t._v(" "),e("ul",[e("li",[t._v("Go to "),e("strong",[t._v("Website")]),t._v(" -> "),e("strong",[t._v("Configuration")]),t._v(" -> "),e("strong",[t._v("Payment Providers")])]),t._v(" "),e("li",[t._v("Search for BTCPay and click on button "),e("strong",[t._v("Activate")])])]),t._v(" "),e("p",[t._v('In the BTCPay settings form, tab "Credentials":')]),t._v(" "),e("ul",[e("li",[t._v('Set field "State" to enabled')]),t._v(" "),e("li",[t._v('Set field "BTCPay Server URL" as test or live URL including https://. Example URL: https://testnet.demo.btcpayserver.org')]),t._v(" "),e("li",[t._v("Get a pairing code from your BTCPay Server store: Settings -> Access Tokens\n"),e("ul",[e("li",[t._v('Click on "Create Token" button')]),t._v(" "),e("li",[t._v('Label: enter e.g. "My odoo store"')]),t._v(" "),e("li",[t._v("Public Key: leave empty")]),t._v(" "),e("li",[t._v('Click on "Request Pairing" button, on next page click "Approve" button')]),t._v(" "),e("li",[t._v('At the top copy the code next to "Server initiated pairing code", e.g. "hg7z8wN"')])])]),t._v(" "),e("li",[t._v('Back in Odoo, paste the code into "Pairing Code" field')]),t._v(" "),e("li",[t._v("Hit Tab key on your keyboard (or click on another field) and the pairing process will start automatically")]),t._v(" "),e("li",[t._v('When the pairing is successful the "Token" and "Private Key" field will be filled automatically')]),t._v(" "),e("li",[t._v("Field Facade, keep default 'merchant'.")])]),t._v(" "),e("p",[t._v('On the tab "Configuration":')]),t._v(" "),e("ul",[e("li",[t._v('Make sure field "Payment Journal" is set to "Bank", otherwise you can click the dropdown and click on the suggestion "Bank"')]),t._v(" "),e("li",[t._v("Now you can "),e("strong",[t._v("save")]),t._v(" the settings")])]),t._v(" "),e("p",[t._v("Check the payment method is enabled:")]),t._v(" "),e("ul",[e("li",[t._v("Go to "),e("strong",[t._v("Website")]),t._v(" -> "),e("strong",[t._v("Configuration")]),t._v(" -> "),e("strong",[t._v("Payment Methods")])]),t._v(" "),e("li",[t._v('Make sure "Pay with Bitcoin / Lightning Network" is active')])]),t._v(" "),e("p",[t._v("Congrats, all done. Do some testing to be sure all works.")]),t._v(" "),e("figure",[e("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPayPaymentSettings.png",alt:"Payment Provider Settings",title:"Payment Provider Settings"}})]),t._v(" "),e("h2",{attrs:{id:"how-does-the-payment-page-look"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-does-the-payment-page-look"}},[t._v("#")]),t._v(" How does the payment page look?")]),t._v(" "),e("p",[t._v('During the checkout the customers will have the option to select the payment method "Pay with Bitcoin / Lightning Network". After selecting they will be redirected to the BTCPay checkout page as shown below.')]),t._v(" "),e("figure",[e("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPayLooksLike.png",alt:"Checkout page example",title:"Checkout page example"}})]),t._v(" "),e("h2",{attrs:{id:"transaction-btcpay-details"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#transaction-btcpay-details"}},[t._v("#")]),t._v(" Transaction BTCPay Details")]),t._v(" "),e("p",[t._v("In transaction object, you will find more technical information about this method of payment:")]),t._v(" "),e("ul",[e("li",[t._v("Transaction Id: cryptocurrency transaction hash for the executed payout")]),t._v(" "),e("li",[t._v("Invoice Id: the id of the invoice for which you want to fetch an event token")]),t._v(" "),e("li",[t._v("Transaction Status: That indicates state of transaction")])]),t._v(" "),e("figure",[e("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BtcpayTxDetails.png",alt:"Transaction details of BTCPay",title:"Transaction details of BTCPay"}})]),t._v(" "),e("h2",{attrs:{id:"troubleshooting"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[t._v("#")]),t._v(" Troubleshooting")]),t._v(" "),e("h3",{attrs:{id:"the-order-and-transaction-status-does-not-get-updated-to-paid-"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#the-order-and-transaction-status-does-not-get-updated-to-paid-"}},[t._v("#")]),t._v(' The order and transaction status does not get updated to "paid"')]),t._v(" "),e("p",[t._v("If the BTCPay connection generally works, like redirect to BTCPay checkout page (QR-code) then check your odoo logs and make sure PDF generation generally works. If there are errors mentioning wkhtmltopdf then you need to install "),e("code",[t._v("wkhtmltopdf")]),t._v(" on your server.")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[157],{912:function(t,e,o){"use strict";o.r(e);var a=o(17),r=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"btcpay-server-payment-gateway-for-odoo-17"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-payment-gateway-for-odoo-17"}},[t._v("#")]),t._v(" BTCPay Server payment gateway for Odoo 17")]),t._v(" "),e("h2",{attrs:{id:"this-is-the-module-to-connect-odoo-17-and-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#this-is-the-module-to-connect-odoo-17-and-btcpay-server"}},[t._v("#")]),t._v(" This is the module to connect Odoo 17 and BTCPay Server")]),t._v(" "),e("p",[t._v("This module allows you to accept bitcoin (and other cryptocurrency) payments in your Odoo e-commerce store."),e("br"),t._v(" "),e("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPay-Odoo-17-featured.png",alt:"BTCPay Server Banner",title:"BTCPay Server Banner"}})]),t._v(" "),e("div",{staticClass:"custom-block tip"},[e("p",{staticClass:"custom-block-title"},[t._v("TIP")]),t._v(" "),e("p",[t._v("If you use Odoo 16 you can find the documentation "),e("a",{attrs:{href:"https://github.com/btcpayserver/odoo/blob/16.0/payment_btcpayserver/README.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),e("OutboundLink")],1),t._v(".")])]),t._v(" "),e("h2",{attrs:{id:"install-the-module"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#install-the-module"}},[t._v("#")]),t._v(" Install the module")]),t._v(" "),e("ul",[e("li",[t._v("Clone our "),e("a",{attrs:{href:"https://github.com/btcpayserver/odoo",target:"_blank",rel:"noopener noreferrer"}},[t._v("repository"),e("OutboundLink")],1),t._v(" or download the .zip from the "),e("a",{attrs:{href:"https://github.com/btcpayserver/odoo/releases",target:"_blank",rel:"noopener noreferrer"}},[t._v("releases page"),e("OutboundLink")],1)]),t._v(" "),e("li",[t._v("Make sure you are on branch "),e("code",[t._v("17.0")]),t._v(" or downloaded a release tagged with version v17.x")]),t._v(" "),e("li",[t._v("Place the "),e("code",[t._v("payment_btcpayserver")]),t._v(" directory in your Odoo addons directory")]),t._v(" "),e("li",[t._v("Install dependencies by running "),e("code",[t._v("pip install -r requirements.txt")]),t._v(" (from inside the "),e("code",[t._v("payment_btcpayserver")]),t._v(" directory)")]),t._v(" "),e("li",[t._v("Restart Odoo")]),t._v(" "),e("li",[t._v("Go to Apps -> Update Apps List")]),t._v(" "),e("li",[t._v('Remove the "Apps" filter and search for "btcpay"')]),t._v(" "),e("li",[t._v("Click "),e("strong",[t._v("Activate")]),t._v(" button")])]),t._v(" "),e("h2",{attrs:{id:"configure-btcpay-as-payment-provider"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#configure-btcpay-as-payment-provider"}},[t._v("#")]),t._v(" Configure BTCPay as payment provider")]),t._v(" "),e("ul",[e("li",[t._v("Go to "),e("strong",[t._v("Website")]),t._v(" -> "),e("strong",[t._v("Configuration")]),t._v(" -> "),e("strong",[t._v("Payment Providers")])]),t._v(" "),e("li",[t._v("Search for BTCPay and click on button "),e("strong",[t._v("Activate")])])]),t._v(" "),e("p",[t._v('In the BTCPay settings form, tab "Credentials":')]),t._v(" "),e("ul",[e("li",[t._v('Set field "State" to enabled')]),t._v(" "),e("li",[t._v('Set field "BTCPay Server URL" as test or live URL including https://. Example URL: https://testnet.demo.btcpayserver.org')]),t._v(" "),e("li",[t._v("Get a pairing code from your BTCPay Server store: Settings -> Access Tokens\n"),e("ul",[e("li",[t._v('Click on "Create Token" button')]),t._v(" "),e("li",[t._v('Label: enter e.g. "My odoo store"')]),t._v(" "),e("li",[t._v("Public Key: leave empty")]),t._v(" "),e("li",[t._v('Click on "Request Pairing" button, on next page click "Approve" button')]),t._v(" "),e("li",[t._v('At the top copy the code next to "Server initiated pairing code", e.g. "hg7z8wN"')])])]),t._v(" "),e("li",[t._v('Back in Odoo, paste the code into "Pairing Code" field')]),t._v(" "),e("li",[t._v("Hit Tab key on your keyboard (or click on another field) and the pairing process will start automatically")]),t._v(" "),e("li",[t._v('When the pairing is successful the "Token" and "Private Key" field will be filled automatically')]),t._v(" "),e("li",[t._v("Field Facade, keep default 'merchant'.")])]),t._v(" "),e("p",[t._v('On the tab "Configuration":')]),t._v(" "),e("ul",[e("li",[t._v('Make sure field "Payment Journal" is set to "Bank", otherwise you can click the dropdown and click on the suggestion "Bank"')]),t._v(" "),e("li",[t._v("Now you can "),e("strong",[t._v("save")]),t._v(" the settings")])]),t._v(" "),e("p",[t._v("Check the payment method is enabled:")]),t._v(" "),e("ul",[e("li",[t._v("Go to "),e("strong",[t._v("Website")]),t._v(" -> "),e("strong",[t._v("Configuration")]),t._v(" -> "),e("strong",[t._v("Payment Methods")])]),t._v(" "),e("li",[t._v('Make sure "Pay with Bitcoin / Lightning Network" is active')])]),t._v(" "),e("p",[t._v("Congrats, all done. Do some testing to be sure all works.")]),t._v(" "),e("figure",[e("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPayPaymentSettings.png",alt:"Payment Provider Settings",title:"Payment Provider Settings"}})]),t._v(" "),e("h2",{attrs:{id:"how-does-the-payment-page-look"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-does-the-payment-page-look"}},[t._v("#")]),t._v(" How does the payment page look?")]),t._v(" "),e("p",[t._v('During the checkout the customers will have the option to select the payment method "Pay with Bitcoin / Lightning Network". After selecting they will be redirected to the BTCPay checkout page as shown below.')]),t._v(" "),e("figure",[e("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BTCPayLooksLike.png",alt:"Checkout page example",title:"Checkout page example"}})]),t._v(" "),e("h2",{attrs:{id:"transaction-btcpay-details"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#transaction-btcpay-details"}},[t._v("#")]),t._v(" Transaction BTCPay Details")]),t._v(" "),e("p",[t._v("In transaction object, you will find more technical information about this method of payment:")]),t._v(" "),e("ul",[e("li",[t._v("Transaction Id: cryptocurrency transaction hash for the executed payout")]),t._v(" "),e("li",[t._v("Invoice Id: the id of the invoice for which you want to fetch an event token")]),t._v(" "),e("li",[t._v("Transaction Status: That indicates state of transaction")])]),t._v(" "),e("figure",[e("img",{attrs:{src:"https://raw.githubusercontent.com/btcpayserver/odoo/17.0/payment_btcpayserver/static/description/BtcpayTxDetails.png",alt:"Transaction details of BTCPay",title:"Transaction details of BTCPay"}})]),t._v(" "),e("h2",{attrs:{id:"troubleshooting"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[t._v("#")]),t._v(" Troubleshooting")]),t._v(" "),e("h3",{attrs:{id:"the-order-and-transaction-status-does-not-get-updated-to-paid-"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#the-order-and-transaction-status-does-not-get-updated-to-paid-"}},[t._v("#")]),t._v(' The order and transaction status does not get updated to "paid"')]),t._v(" "),e("p",[t._v("If the BTCPay connection generally works, like redirect to BTCPay checkout page (QR-code) then check your odoo logs and make sure PDF generation generally works. If there are errors mentioning wkhtmltopdf then you need to install "),e("code",[t._v("wkhtmltopdf")]),t._v(" on your server.")])])}),[],!1,null,null,null);e.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/16.9f76bcc7.js b/assets/js/16.9f76bcc7.js new file mode 100644 index 0000000000..c45c326365 --- /dev/null +++ b/assets/js/16.9f76bcc7.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{586:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify1.ec985913.png"},587:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify2.fef21751.png"},588:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify3.14ff79a8.png"},589:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify4.4f0a10ba.png"},590:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify5.9c789888.png"},591:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify6.b3df5c96.png"},592:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify7.74cbdef7.png"},593:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify8.03fc6a31.png"},594:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify9.c5dd42ec.png"},595:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify10.d1cd1d3e.png"},596:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify11.e0bbe9e5.png"},597:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify12.1818b41d.png"},598:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify13.d0551bae.png"},599:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify14.eb96845f.png"},600:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify14-2.a9094415.png"},601:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify15.dac5277c.png"},602:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify16.dca8f695.png"},603:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify17.fa8dddec.png"},604:function(e,t,r){e.exports=r.p+"assets/img/btcpayshopify18.102dac6f.png"},928:function(e,t,r){"use strict";r.r(t);var s=r(17),o=Object(s.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"accept-bitcoin-in-shopify-with-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#accept-bitcoin-in-shopify-with-btcpay-server"}},[e._v("#")]),e._v(" Accept Bitcoin in Shopify with BTCPay Server")]),e._v(" "),t("p",[e._v("Introducing BTCPay Server for Shopify – open-source payment gateway that enables you accept bitcoin payments directly on your website or stores from customers with no fee.")]),e._v(" "),t("p",[e._v("Our integration with Shopify allows you connect your self-hosted BTCPay Server with your "),t("a",{attrs:{href:"https://www.shopify.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Shopify store"),t("OutboundLink")],1),e._v(", enabling you accept Bitcoin payments swiftly and securely.")]),e._v(" "),t("div",{staticClass:"custom-block warning"},[t("p",{staticClass:"custom-block-title"},[e._v("WARNING")]),e._v(" "),t("p",[e._v("⚠️ Shopify V1 Integration Deprecated")]),e._v(" "),t("p",[e._v("New users can no longer use the Shopify V1 integration with BTCPay Server. Please refer to the "),t("RouterLink",{attrs:{to:"/ShopifyV2/"}},[e._v("Shopify V2 integration guide")]),e._v(" for instructions on setting up BTCPay Server with Shopify.\nExisting users experiencing issues with the V1 integration are encouraged to open an issue on our "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github repository"),t("OutboundLink")],1),e._v(" or report them via "),t("a",{attrs:{href:"http://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(", and plan a migration to V2.")],1)]),e._v(" "),t("h2",{attrs:{id:"what-btcpay-offers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#what-btcpay-offers"}},[e._v("#")]),e._v(" What BTCPay offers:")]),e._v(" "),t("ul",[t("li",[t("strong",[e._v("Zero fees")]),e._v(": Enjoy a payment gateway with no fees. Yes, You saw that right. Zero fees!")]),e._v(" "),t("li",[t("strong",[e._v("Direct payment, No middlemen or KYC")]),e._v(": Say goodbye to intermediaries and tedious paperwork, and get your money directly in your wallet")]),e._v(" "),t("li",[t("strong",[e._v("Fully automated system")]),e._v(": BTCPay takes care of payments, invoice management and refunds automatically.")]),e._v(" "),t("li",[t("strong",[e._v("Display Bitcoin QR code at checkout")]),e._v(": Enhance customer experience with an easy and secure payment option.")]),e._v(" "),t("li",[t("strong",[e._v("Self-hosted infrastructure")]),e._v(": Maintain full control over your payment gateway.")]),e._v(" "),t("li",[t("strong",[e._v("Lightning Network integrated")]),e._v(": Instant, fast and low cost payments and payouts")]),e._v(" "),t("li",[t("strong",[e._v("Easy CSV exports")])]),e._v(" "),t("li",[t("strong",[e._v("Versatile plugin system")]),e._v(": Extend functionality according to your needs")]),e._v(" "),t("li",[t("strong",[e._v("Point-of-sale integration")]),e._v(" – Accept payments in your physical shops")]),e._v(" "),t("li",[t("strong",[e._v("Multilingual ready")]),e._v(": Serve a global audience right out of the box.")]),e._v(" "),t("li",[t("strong",[e._v("Community-driven support")]),e._v(": Get responsive assistance from our dedicated community ("),t("a",{attrs:{href:"http://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost"),t("OutboundLink")],1),e._v(" or "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(").")])]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites:")]),e._v(" "),t("p",[e._v("Before diving into the setup process, ensure you have the following:")]),e._v(" "),t("ul",[t("li",[e._v("Shopify account")]),e._v(" "),t("li",[e._v("BTCPay Server - "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("self-hosted")]),e._v(" or run by a "),t("RouterLink",{attrs:{to:"/Deployment/ThirdPartyHosting/"}},[e._v("third-party host")]),e._v(" v1.4.8 or later.")],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/CreateStore/"}},[e._v("Created BTCPay Server store")]),e._v(" with "),t("RouterLink",{attrs:{to:"/WalletSetup/"}},[e._v("wallet set up")])],1)]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/jJjAyvgWVfk/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=jJjAyvgWVfk",title:"BTCPay Server - Shopify Video","data-id":"jJjAyvgWVfk"}},[t("iframe",{attrs:{title:"BTCPay Server - Shopify Video","data-src":"https://www.youtube-nocookie.com/embed/jJjAyvgWVfk?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("h2",{attrs:{id:"setting-up-btcpay-server-with-shopify"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-btcpay-server-with-shopify"}},[e._v("#")]),e._v(" Setting up BTCPay Server with Shopify")]),e._v(" "),t("ol",[t("li",[e._v("In Shopify, click on "),t("code",[e._v("Apps >")]),e._v(" in the left sidebar")]),e._v(" "),t("li",[e._v("On the modal popped up, click on "),t("code",[e._v("App and sales channel settings")])]),e._v(" "),t("li",[e._v("From the page displayed, click on "),t("code",[e._v("Develop apps")]),e._v(" button")]),e._v(" "),t("li",[e._v("If prompted, click on "),t("code",[e._v("Allow custom app development")])]),e._v(" "),t("li",[t("code",[e._v("Create an app")]),e._v(" and name it, e.g. BTCPay Server")]),e._v(" "),t("li",[e._v("On the app page, in "),t("code",[e._v("Overview")]),e._v(" tab, click on the "),t("code",[e._v("Configure Admin API scopes")])]),e._v(" "),t("li",[e._v("In the filter admin access scopes type in "),t("code",[e._v("Orders")])]),e._v(" "),t("li",[e._v("In "),t("code",[e._v("Orders")]),e._v(" enable "),t("code",[e._v("read_orders")]),e._v(" and "),t("code",[e._v("write_orders")]),e._v(" and then click "),t("code",[e._v("Save")])]),e._v(" "),t("li",[e._v("Click on the "),t("code",[e._v("Install App")]),e._v(" in the top right corner and when pop-up window appears click "),t("code",[e._v("Install")])]),e._v(" "),t("li",[e._v("Reveal "),t("code",[e._v("Admin API access token")]),e._v(" and "),t("code",[e._v("copy")]),e._v(" it")]),e._v(" "),t("li",[e._v("In your BTCPay Server, go to your store and on the left sidebar click on "),t("code",[e._v("Shopify")])]),e._v(" "),t("li",[e._v("In the first field, "),t("code",[e._v("Shop name")]),e._v(" enter the subdomain of your Shopify store e.g. SOME_ID.myshopify.com then enter SOME_ID")]),e._v(" "),t("li",[e._v("In third field, "),t("code",[e._v("Admin API access token")]),e._v(" paste the "),t("code",[e._v("Admin API access token")]),e._v(" you just copied from Shopify")]),e._v(" "),t("li",[e._v("In the second field, "),t("code",[e._v("API key")]),e._v(" paste the "),t("code",[e._v("API key")]),e._v(" from Shopify - which you can find at the bottom of the same page where you copied the Admin API access token")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Save")]),e._v(" on BTCPay Shopify settings page")]),e._v(" "),t("li",[e._v("Back on Shopify: On left menu select "),t("code",[e._v("Checkout")]),e._v(' scroll down to "Order status page" and paste the HTML '),t("code",[e._v(" + diff --git a/sitemap.xml b/sitemap.xml index 4ace8ea3fd..74682653cf 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://docs.btcpayserver.org/AdvancedForms/dailyhttps://docs.btcpayserver.org/Apps/dailyhttps://docs.btcpayserver.org/BTCPayServer/LocalDevSetup/dailyhttps://docs.btcpayserver.org/BTCPayServer/Security/dailyhttps://docs.btcpayserver.org/BTCPayServer/greenfield-authorization/dailyhttps://docs.btcpayserver.org/BTCPayServer/db-migration/dailyhttps://docs.btcpayserver.org/BTCPayServer/greenfield-development/dailyhttps://docs.btcpayserver.org/BTCPayVsOthers/dailyhttps://docs.btcpayserver.org/BigCommerce/dailyhttps://docs.btcpayserver.org/Breez/dailyhttps://docs.btcpayserver.org/Bringin/dailyhttps://docs.btcpayserver.org/ColdCardWallet/dailyhttps://docs.btcpayserver.org/Conference-PoS-guide/dailyhttps://docs.btcpayserver.org/Configurator/dailyhttps://docs.btcpayserver.org/Community/dailyhttps://docs.btcpayserver.org/ConnectWallet/dailyhttps://docs.btcpayserver.org/Contribute/Dev/dailyhttps://docs.btcpayserver.org/Contribute/Design/dailyhttps://docs.btcpayserver.org/Contribute/DevCode/dailyhttps://docs.btcpayserver.org/Contribute/DevTest/dailyhttps://docs.btcpayserver.org/Contribute/Misc/dailyhttps://docs.btcpayserver.org/Contribute/dailyhttps://docs.btcpayserver.org/Contribute/Translate/dailyhttps://docs.btcpayserver.org/Contribute/Write/dailyhttps://docs.btcpayserver.org/Contribute/WriteDocs/dailyhttps://docs.btcpayserver.org/Contribute/WriteBlog/dailyhttps://docs.btcpayserver.org/Contribute/WriteSoftware/dailyhttps://docs.btcpayserver.org/CreateStore/dailyhttps://docs.btcpayserver.org/CreateWallet/dailyhttps://docs.btcpayserver.org/Deployment/Azure/dailyhttps://docs.btcpayserver.org/Dashboard/dailyhttps://docs.btcpayserver.org/Deployment/AzurePennyPinching/dailyhttps://docs.btcpayserver.org/Deployment/Clovyr/dailyhttps://docs.btcpayserver.org/Deployment/DynamicDNS/dailyhttps://docs.btcpayserver.org/CustomIntegration/dailyhttps://docs.btcpayserver.org/Deployment/GoogleCloud/dailyhttps://docs.btcpayserver.org/Deployment/Hack0/dailyhttps://docs.btcpayserver.org/Deployment/Hardware/dailyhttps://docs.btcpayserver.org/Deployment/HardwareAsAService/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeployment/dailyhttps://docs.btcpayserver.org/Deployment/LunaNode/dailyhttps://docs.btcpayserver.org/Deployment/LightningInABox/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeploymentExtended/dailyhttps://docs.btcpayserver.org/Deployment/dailyhttps://docs.btcpayserver.org/Deployment/RaspberryPi4/dailyhttps://docs.btcpayserver.org/Deployment/ReverseProxyToTor/dailyhttps://docs.btcpayserver.org/Deployment/ReverseSSHtunnel/dailyhttps://docs.btcpayserver.org/Deployment/ThirdPartyHosting/dailyhttps://docs.btcpayserver.org/Deployment/voltagecloud/dailyhttps://docs.btcpayserver.org/Deployment/webdeployment/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample-NodeJS/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample/dailyhttps://docs.btcpayserver.org/Development/GreenfieldExample-PHP/dailyhttps://docs.btcpayserver.org/Development/LocalDevelopment/dailyhttps://docs.btcpayserver.org/Development/LocalDev/dailyhttps://docs.btcpayserver.org/Development/InvoiceMetadata/dailyhttps://docs.btcpayserver.org/Development/Plugins/dailyhttps://docs.btcpayserver.org/Development/dailyhttps://docs.btcpayserver.org/Development/Altcoins/dailyhttps://docs.btcpayserver.org/Development/TestnetDemo/dailyhttps://docs.btcpayserver.org/Docker/dailyhttps://docs.btcpayserver.org/Development/Theme/dailyhttps://docs.btcpayserver.org/Docker/backup-restore/dailyhttps://docs.btcpayserver.org/Docker/chatwoot/dailyhttps://docs.btcpayserver.org/Docker/fastsync/dailyhttps://docs.btcpayserver.org/Docker/cloudflare-tunnel/dailyhttps://docs.btcpayserver.org/Docker/lightning-terminal/dailyhttps://docs.btcpayserver.org/Docker/joinmarket/dailyhttps://docs.btcpayserver.org/Docker/ndlc/dailyhttps://docs.btcpayserver.org/Docker/pihole/dailyhttps://docs.btcpayserver.org/Development/ecommerce-integration-guide/dailyhttps://docs.btcpayserver.org/Docker/fireflyiii/dailyhttps://docs.btcpayserver.org/Docker/tallycoin-connect/dailyhttps://docs.btcpayserver.org/DynamicReports/dailyhttps://docs.btcpayserver.org/ElectrumPersonalServer/dailyhttps://docs.btcpayserver.org/ElectrumWallet/dailyhttps://docs.btcpayserver.org/FAQ/Altcoin/dailyhttps://docs.btcpayserver.org/FAQ/Apps/dailyhttps://docs.btcpayserver.org/ElectrumX/dailyhttps://docs.btcpayserver.org/Drupal/dailyhttps://docs.btcpayserver.org/FAQ/Deployment/dailyhttps://docs.btcpayserver.org/FAQ/General/dailyhttps://docs.btcpayserver.org/FAQ/Integrations/dailyhttps://docs.btcpayserver.org/FAQ/dailyhttps://docs.btcpayserver.org/FAQ/ServerSettings/dailyhttps://docs.btcpayserver.org/FAQ/LightningNetwork/dailyhttps://docs.btcpayserver.org/FAQ/Stores/dailyhttps://docs.btcpayserver.org/FAQ/Synchronization/dailyhttps://docs.btcpayserver.org/FAQ/Wallet/dailyhttps://docs.btcpayserver.org/Forms/dailyhttps://docs.btcpayserver.org/Guide/dailyhttps://docs.btcpayserver.org/Grandnode/dailyhttps://docs.btcpayserver.org/HardwareWalletIntegration/dailyhttps://docs.btcpayserver.org/InvoiceNinja/dailyhttps://docs.btcpayserver.org/LNDhubAPI/dailyhttps://docs.btcpayserver.org/Invoices/dailyhttps://docs.btcpayserver.org/LedgerWallet/dailyhttps://docs.btcpayserver.org/LightningNetwork/dailyhttps://docs.btcpayserver.org/Magento/dailyhttps://docs.btcpayserver.org/NBXplorer/API/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Migration/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Schema/dailyhttps://docs.btcpayserver.org/NBXplorer/dailyhttps://docs.btcpayserver.org/Nopcommerce/dailyhttps://docs.btcpayserver.org/LightningNetwork_PaymentChannels/dailyhttps://docs.btcpayserver.org/Nostr/dailyhttps://docs.btcpayserver.org/Notifications/dailyhttps://docs.btcpayserver.org/Odoo/dailyhttps://docs.btcpayserver.org/OpenCart/dailyhttps://docs.btcpayserver.org/Payjoin/dailyhttps://docs.btcpayserver.org/Payouts/dailyhttps://docs.btcpayserver.org/PaymentRequests/dailyhttps://docs.btcpayserver.org/Payroll/dailyhttps://docs.btcpayserver.org/PhocaCart/dailyhttps://docs.btcpayserver.org/PrestaShop/dailyhttps://docs.btcpayserver.org/PodServer/dailyhttps://docs.btcpayserver.org/PullPayments/dailyhttps://docs.btcpayserver.org/dailyhttps://docs.btcpayserver.org/Refund/dailyhttps://docs.btcpayserver.org/Reporting/dailyhttps://docs.btcpayserver.org/RegisterAccount/dailyhttps://docs.btcpayserver.org/Shopify/dailyhttps://docs.btcpayserver.org/ShopifyV2/dailyhttps://docs.btcpayserver.org/SideShift/dailyhttps://docs.btcpayserver.org/Shopware/dailyhttps://docs.btcpayserver.org/Sign-PSBT-with-sparrow-wallet/dailyhttps://docs.btcpayserver.org/Smartstore/dailyhttps://docs.btcpayserver.org/Support/dailyhttps://docs.btcpayserver.org/TicketTailor/dailyhttps://docs.btcpayserver.org/Translations/dailyhttps://docs.btcpayserver.org/Transmuter/DCA/dailyhttps://docs.btcpayserver.org/Transmuter/dailyhttps://docs.btcpayserver.org/Transmuter/EmailReceiptsPreset/dailyhttps://docs.btcpayserver.org/Trocador/dailyhttps://docs.btcpayserver.org/Troubleshooting/dailyhttps://docs.btcpayserver.org/TryItOut/dailyhttps://docs.btcpayserver.org/Vault/HowToVerify/dailyhttps://docs.btcpayserver.org/Vault/dailyhttps://docs.btcpayserver.org/UseCase/dailyhttps://docs.btcpayserver.org/Wabisabi/dailyhttps://docs.btcpayserver.org/Walkthrough/dailyhttps://docs.btcpayserver.org/VirtueMart/dailyhttps://docs.btcpayserver.org/WalletSetup/dailyhttps://docs.btcpayserver.org/Wallet/dailyhttps://docs.btcpayserver.org/WasabiWallet/dailyhttps://docs.btcpayserver.org/WhatsNext/dailyhttps://docs.btcpayserver.org/Wix/dailyhttps://docs.btcpayserver.org/WooCommerce/dailyhttps://docs.btcpayserver.org/Xenforo/dailyhttps://docs.btcpayserver.org/Zapier/daily \ No newline at end of file +https://docs.btcpayserver.org/AdvancedForms/dailyhttps://docs.btcpayserver.org/Apps/dailyhttps://docs.btcpayserver.org/BTCPayServer/LocalDevSetup/dailyhttps://docs.btcpayserver.org/BTCPayServer/Security/dailyhttps://docs.btcpayserver.org/BTCPayServer/db-migration/dailyhttps://docs.btcpayserver.org/BTCPayServer/greenfield-authorization/dailyhttps://docs.btcpayserver.org/BTCPayServer/greenfield-development/dailyhttps://docs.btcpayserver.org/BTCPayVsOthers/dailyhttps://docs.btcpayserver.org/BigCommerce/dailyhttps://docs.btcpayserver.org/Breez/dailyhttps://docs.btcpayserver.org/Bringin/dailyhttps://docs.btcpayserver.org/ColdCardWallet/dailyhttps://docs.btcpayserver.org/Community/dailyhttps://docs.btcpayserver.org/Conference-PoS-guide/dailyhttps://docs.btcpayserver.org/Configurator/dailyhttps://docs.btcpayserver.org/ConnectWallet/dailyhttps://docs.btcpayserver.org/Contribute/Design/dailyhttps://docs.btcpayserver.org/Contribute/Dev/dailyhttps://docs.btcpayserver.org/Contribute/DevCode/dailyhttps://docs.btcpayserver.org/Contribute/DevTest/dailyhttps://docs.btcpayserver.org/Contribute/Misc/dailyhttps://docs.btcpayserver.org/Contribute/dailyhttps://docs.btcpayserver.org/Contribute/Translate/dailyhttps://docs.btcpayserver.org/Contribute/Write/dailyhttps://docs.btcpayserver.org/Contribute/WriteBlog/dailyhttps://docs.btcpayserver.org/Contribute/WriteDocs/dailyhttps://docs.btcpayserver.org/Contribute/WriteSoftware/dailyhttps://docs.btcpayserver.org/CreateStore/dailyhttps://docs.btcpayserver.org/CreateWallet/dailyhttps://docs.btcpayserver.org/CustomIntegration/dailyhttps://docs.btcpayserver.org/Deployment/Azure/dailyhttps://docs.btcpayserver.org/Deployment/AzurePennyPinching/dailyhttps://docs.btcpayserver.org/Dashboard/dailyhttps://docs.btcpayserver.org/Deployment/Clovyr/dailyhttps://docs.btcpayserver.org/Deployment/DynamicDNS/dailyhttps://docs.btcpayserver.org/Deployment/GoogleCloud/dailyhttps://docs.btcpayserver.org/Deployment/Hack0/dailyhttps://docs.btcpayserver.org/Deployment/Hardware/dailyhttps://docs.btcpayserver.org/Deployment/LightningInABox/dailyhttps://docs.btcpayserver.org/Deployment/HardwareAsAService/dailyhttps://docs.btcpayserver.org/Deployment/LunaNode/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeployment/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeploymentExtended/dailyhttps://docs.btcpayserver.org/Deployment/RaspberryPi4/dailyhttps://docs.btcpayserver.org/Deployment/ReverseProxyToTor/dailyhttps://docs.btcpayserver.org/Deployment/ReverseSSHtunnel/dailyhttps://docs.btcpayserver.org/Deployment/ThirdPartyHosting/dailyhttps://docs.btcpayserver.org/Deployment/voltagecloud/dailyhttps://docs.btcpayserver.org/Deployment/dailyhttps://docs.btcpayserver.org/Deployment/webdeployment/dailyhttps://docs.btcpayserver.org/Development/Altcoins/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample-NodeJS/dailyhttps://docs.btcpayserver.org/Development/GreenfieldExample-PHP/dailyhttps://docs.btcpayserver.org/Development/InvoiceMetadata/dailyhttps://docs.btcpayserver.org/Development/LocalDev/dailyhttps://docs.btcpayserver.org/Development/LocalDevelopment/dailyhttps://docs.btcpayserver.org/Development/Plugins/dailyhttps://docs.btcpayserver.org/Development/Theme/dailyhttps://docs.btcpayserver.org/Development/TestnetDemo/dailyhttps://docs.btcpayserver.org/Development/ecommerce-integration-guide/dailyhttps://docs.btcpayserver.org/Docker/dailyhttps://docs.btcpayserver.org/Development/dailyhttps://docs.btcpayserver.org/Docker/backup-restore/dailyhttps://docs.btcpayserver.org/Docker/chatwoot/dailyhttps://docs.btcpayserver.org/Docker/cloudflare-tunnel/dailyhttps://docs.btcpayserver.org/Docker/fireflyiii/dailyhttps://docs.btcpayserver.org/Docker/fastsync/dailyhttps://docs.btcpayserver.org/Docker/joinmarket/dailyhttps://docs.btcpayserver.org/Docker/lightning-terminal/dailyhttps://docs.btcpayserver.org/Docker/ndlc/dailyhttps://docs.btcpayserver.org/Docker/pihole/dailyhttps://docs.btcpayserver.org/Docker/tallycoin-connect/dailyhttps://docs.btcpayserver.org/DynamicReports/dailyhttps://docs.btcpayserver.org/ElectrumPersonalServer/dailyhttps://docs.btcpayserver.org/ElectrumWallet/dailyhttps://docs.btcpayserver.org/ElectrumX/dailyhttps://docs.btcpayserver.org/FAQ/Altcoin/dailyhttps://docs.btcpayserver.org/FAQ/Apps/dailyhttps://docs.btcpayserver.org/FAQ/Deployment/dailyhttps://docs.btcpayserver.org/FAQ/General/dailyhttps://docs.btcpayserver.org/FAQ/Integrations/dailyhttps://docs.btcpayserver.org/Drupal/dailyhttps://docs.btcpayserver.org/FAQ/dailyhttps://docs.btcpayserver.org/FAQ/ServerSettings/dailyhttps://docs.btcpayserver.org/FAQ/LightningNetwork/dailyhttps://docs.btcpayserver.org/FAQ/Stores/dailyhttps://docs.btcpayserver.org/FAQ/Wallet/dailyhttps://docs.btcpayserver.org/FAQ/Synchronization/dailyhttps://docs.btcpayserver.org/Forms/dailyhttps://docs.btcpayserver.org/Grandnode/dailyhttps://docs.btcpayserver.org/InvoiceNinja/dailyhttps://docs.btcpayserver.org/HardwareWalletIntegration/dailyhttps://docs.btcpayserver.org/Invoices/dailyhttps://docs.btcpayserver.org/LNDhubAPI/dailyhttps://docs.btcpayserver.org/Guide/dailyhttps://docs.btcpayserver.org/LedgerWallet/dailyhttps://docs.btcpayserver.org/LightningNetwork/dailyhttps://docs.btcpayserver.org/LightningNetwork_PaymentChannels/dailyhttps://docs.btcpayserver.org/NBXplorer/API/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Migration/dailyhttps://docs.btcpayserver.org/Magento/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Schema/dailyhttps://docs.btcpayserver.org/NBXplorer/dailyhttps://docs.btcpayserver.org/Nopcommerce/dailyhttps://docs.btcpayserver.org/Odoo/dailyhttps://docs.btcpayserver.org/Notifications/dailyhttps://docs.btcpayserver.org/OpenCart/dailyhttps://docs.btcpayserver.org/Nostr/dailyhttps://docs.btcpayserver.org/Payjoin/dailyhttps://docs.btcpayserver.org/Payouts/dailyhttps://docs.btcpayserver.org/PaymentRequests/dailyhttps://docs.btcpayserver.org/Payroll/dailyhttps://docs.btcpayserver.org/PhocaCart/dailyhttps://docs.btcpayserver.org/PodServer/dailyhttps://docs.btcpayserver.org/PrestaShop/dailyhttps://docs.btcpayserver.org/Refund/dailyhttps://docs.btcpayserver.org/dailyhttps://docs.btcpayserver.org/RegisterAccount/dailyhttps://docs.btcpayserver.org/Reporting/dailyhttps://docs.btcpayserver.org/PullPayments/dailyhttps://docs.btcpayserver.org/Shopify/dailyhttps://docs.btcpayserver.org/ShopifyV2/dailyhttps://docs.btcpayserver.org/Shopware/dailyhttps://docs.btcpayserver.org/SideShift/dailyhttps://docs.btcpayserver.org/Sign-PSBT-with-sparrow-wallet/dailyhttps://docs.btcpayserver.org/Smartstore/dailyhttps://docs.btcpayserver.org/Support/dailyhttps://docs.btcpayserver.org/TicketTailor/dailyhttps://docs.btcpayserver.org/Translations/dailyhttps://docs.btcpayserver.org/Transmuter/EmailReceiptsPreset/dailyhttps://docs.btcpayserver.org/Transmuter/DCA/dailyhttps://docs.btcpayserver.org/Transmuter/dailyhttps://docs.btcpayserver.org/Trocador/dailyhttps://docs.btcpayserver.org/Troubleshooting/dailyhttps://docs.btcpayserver.org/UseCase/dailyhttps://docs.btcpayserver.org/Vault/HowToVerify/dailyhttps://docs.btcpayserver.org/Vault/dailyhttps://docs.btcpayserver.org/VirtueMart/dailyhttps://docs.btcpayserver.org/Wabisabi/dailyhttps://docs.btcpayserver.org/TryItOut/dailyhttps://docs.btcpayserver.org/Walkthrough/dailyhttps://docs.btcpayserver.org/Wallet/dailyhttps://docs.btcpayserver.org/WalletSetup/dailyhttps://docs.btcpayserver.org/WasabiWallet/dailyhttps://docs.btcpayserver.org/Wix/dailyhttps://docs.btcpayserver.org/WhatsNext/dailyhttps://docs.btcpayserver.org/WooCommerce/dailyhttps://docs.btcpayserver.org/Xenforo/dailyhttps://docs.btcpayserver.org/Zapier/daily \ No newline at end of file