From e455ff0a6e8fafbde0520159a8d86dd3b63f1084 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 25 Nov 2024 10:06:31 +0000 Subject: [PATCH] deploy: 8856dead38d2a609a86fd38a91078a594e1a368c --- 404.html | 4 ++-- 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 | 6 +++--- 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 | 12 ++++++------ NBXplorer/Postgres-Migration/index.html | 4 ++-- NBXplorer/Postgres-Schema/index.html | 4 ++-- NBXplorer/index.html | 12 ++++++------ 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 | 4 ++-- 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/{102.4fff8792.js => 102.95f1048f.js} | 2 +- assets/js/{103.0a6dbe25.js => 103.b2d2d3e3.js} | 2 +- assets/js/{106.e405ade5.js => 106.db6d4255.js} | 2 +- assets/js/{108.b994c048.js => 108.3a8fea9e.js} | 2 +- assets/js/{109.b1005545.js => 109.2c3571c9.js} | 2 +- assets/js/{112.177150e7.js => 112.e119e1c0.js} | 2 +- assets/js/{114.68079866.js => 114.548f7a8a.js} | 2 +- assets/js/{115.304aa8f6.js => 115.0fd7a0ff.js} | 2 +- assets/js/117.84033fd8.js | 1 - assets/js/117.fad63b31.js | 1 + assets/js/{118.c8e719dc.js => 118.1dd64d48.js} | 2 +- assets/js/{119.acf7657e.js => 119.367fe5cf.js} | 2 +- assets/js/{12.b25f20a6.js => 12.7a1196a8.js} | 2 +- assets/js/{120.693bbf3d.js => 120.a744840a.js} | 2 +- assets/js/{121.0b3c9f6d.js => 121.fc35be78.js} | 2 +- assets/js/{122.989f333d.js => 122.6f3a1eda.js} | 2 +- assets/js/{123.db840fc2.js => 123.1267bc5a.js} | 2 +- assets/js/{124.e54fba01.js => 124.f13046f8.js} | 2 +- assets/js/{125.c1532fa3.js => 125.3d68b511.js} | 2 +- assets/js/{126.857d9e03.js => 126.e5520b14.js} | 2 +- assets/js/{127.0938d0f6.js => 127.7107aeb8.js} | 2 +- assets/js/{128.03961572.js => 128.a1f579e1.js} | 2 +- assets/js/{129.656d8ded.js => 129.3e6b9d90.js} | 2 +- assets/js/{130.0b1fefa1.js => 130.9b8d0bda.js} | 2 +- assets/js/{132.6ea08cc4.js => 132.1bc55e97.js} | 2 +- assets/js/{133.2f039671.js => 133.15c24758.js} | 2 +- assets/js/{135.6e9dd4bf.js => 135.8d4d856a.js} | 2 +- assets/js/{136.7596e91f.js => 136.179f2907.js} | 2 +- assets/js/{137.98929bae.js => 137.ed690439.js} | 2 +- assets/js/{138.422099a8.js => 138.c8991843.js} | 2 +- assets/js/{139.c3739c64.js => 139.117fd5ad.js} | 2 +- assets/js/{14.4fa83066.js => 14.71884343.js} | 2 +- assets/js/{141.c875732b.js => 141.b8553449.js} | 2 +- assets/js/{142.192bf544.js => 142.4db575f5.js} | 2 +- assets/js/{143.ae977f45.js => 143.1e642c42.js} | 2 +- assets/js/{145.d1ef63cc.js => 145.17bddbf5.js} | 2 +- assets/js/{146.6d120ca3.js => 146.411299f9.js} | 2 +- assets/js/{147.a48e3aa8.js => 147.80b09c45.js} | 2 +- assets/js/{148.bdbd287c.js => 148.2d7f89ee.js} | 2 +- assets/js/{149.3a4743f7.js => 149.bfe29348.js} | 2 +- assets/js/{15.87e48d14.js => 15.0ae99419.js} | 2 +- assets/js/{150.56eac916.js => 150.b700d849.js} | 2 +- assets/js/151.26962f05.js | 1 - assets/js/151.95095468.js | 1 + assets/js/{152.e0b71af1.js => 152.a29cef95.js} | 2 +- assets/js/153.4a9ee18e.js | 1 - assets/js/153.95900b83.js | 1 + assets/js/{154.856c6a00.js => 154.8153ff79.js} | 2 +- assets/js/{155.76bdfde2.js => 155.735eff33.js} | 2 +- assets/js/{156.ad408541.js => 156.5360e1f0.js} | 2 +- assets/js/{157.42702b1c.js => 157.7541fe65.js} | 2 +- assets/js/{158.ea97ac3a.js => 158.3ad66c94.js} | 2 +- assets/js/{159.ea0b19b6.js => 159.12ab33bf.js} | 2 +- assets/js/{16.2383c512.js => 16.70e8de82.js} | 2 +- assets/js/{160.7a8cce6a.js => 160.a1f40d9b.js} | 2 +- assets/js/{161.80bb24cc.js => 161.8db2dc4b.js} | 2 +- assets/js/{162.87d1962e.js => 162.9fd66cd2.js} | 2 +- assets/js/{163.ab1c202c.js => 163.fd44193d.js} | 2 +- assets/js/{164.29b7de06.js => 164.4ec87684.js} | 2 +- assets/js/{165.522921b7.js => 165.83409391.js} | 2 +- assets/js/{167.7ab65170.js => 167.052c80e3.js} | 2 +- assets/js/{168.b2c8a3e7.js => 168.fe7b823f.js} | 2 +- assets/js/{169.d5cccde7.js => 169.b46bec4c.js} | 2 +- assets/js/{17.6ae93578.js => 17.f9265b89.js} | 2 +- assets/js/{170.65ffa5d6.js => 170.69b8e5c9.js} | 2 +- assets/js/{171.dc5be31a.js => 171.6d64eeb7.js} | 2 +- assets/js/{172.2490ce8c.js => 172.5b22d576.js} | 2 +- assets/js/{173.c5fa937c.js => 173.f3f07e42.js} | 2 +- assets/js/{18.7f27d8a0.js => 18.5149f223.js} | 2 +- assets/js/{19.5b265f70.js => 19.56bc2821.js} | 2 +- assets/js/{20.84f9500b.js => 20.dc4d9383.js} | 2 +- assets/js/{22.d7e7f5bf.js => 22.70cbe2c9.js} | 2 +- assets/js/{23.92f585d4.js => 23.2323aa57.js} | 2 +- assets/js/{24.48f95fae.js => 24.187f34be.js} | 2 +- assets/js/{27.17396b3f.js => 27.7a573265.js} | 2 +- assets/js/{28.c3956264.js => 28.de7ea1fd.js} | 2 +- assets/js/{30.b21780b3.js => 30.d7ae5f1a.js} | 2 +- assets/js/{31.a38aa78a.js => 31.8165de0f.js} | 2 +- assets/js/{32.3355b5eb.js => 32.5c1bc3c9.js} | 2 +- assets/js/{34.c4363bed.js => 34.b73b1776.js} | 2 +- assets/js/{35.c5dbf865.js => 35.6fa1db70.js} | 2 +- assets/js/{37.68b38745.js => 37.433ff2dc.js} | 2 +- assets/js/{39.9cf11db6.js => 39.962b4085.js} | 2 +- assets/js/{40.2ed40aab.js => 40.5f55dac3.js} | 2 +- assets/js/{41.94dde301.js => 41.21b81e81.js} | 2 +- assets/js/{42.7693bf26.js => 42.fc7da7c4.js} | 2 +- assets/js/{44.36fda2e1.js => 44.bc7ce749.js} | 2 +- assets/js/{49.51faf183.js => 49.b4d574ce.js} | 2 +- assets/js/{50.8bdbef59.js => 50.96e8683a.js} | 2 +- assets/js/{51.35cc097c.js => 51.e52cebd0.js} | 2 +- assets/js/{52.d0cc0084.js => 52.4615899c.js} | 2 +- assets/js/{53.3fc1202c.js => 53.8461b1ce.js} | 2 +- assets/js/{57.18a5a52d.js => 57.4958abd7.js} | 2 +- assets/js/{58.e3cbd226.js => 58.9e016415.js} | 2 +- assets/js/{59.fc65b58e.js => 59.98d9d4cc.js} | 2 +- assets/js/{61.07563c18.js => 61.83afe78a.js} | 2 +- assets/js/{62.0c055ae3.js => 62.60907b1a.js} | 2 +- assets/js/{63.58827274.js => 63.14636a89.js} | 2 +- assets/js/{66.d0bb4524.js => 66.7c69963b.js} | 2 +- assets/js/{68.4058063c.js => 68.747dbff3.js} | 2 +- assets/js/{69.82dc139e.js => 69.c57daaf1.js} | 2 +- assets/js/{70.d6ab05ec.js => 70.cbc81b59.js} | 2 +- assets/js/{71.e199fa5e.js => 71.bf08e2f8.js} | 2 +- assets/js/{72.9630133d.js => 72.119678b2.js} | 2 +- assets/js/{73.3a6e4593.js => 73.87d99793.js} | 2 +- assets/js/{78.1e7e0551.js => 78.9df980a0.js} | 2 +- assets/js/{79.d1b8b2da.js => 79.ad9bc617.js} | 2 +- assets/js/{82.786427a4.js => 82.c14dd1dd.js} | 2 +- assets/js/{85.e9a2621f.js => 85.1be43db3.js} | 2 +- assets/js/{86.491040bc.js => 86.f6c839c6.js} | 2 +- assets/js/{87.64d90326.js => 87.b75e9822.js} | 2 +- assets/js/{88.02edf5b8.js => 88.7bdcb920.js} | 2 +- assets/js/{89.bcd72d50.js => 89.4afaf335.js} | 2 +- assets/js/{90.d2cd0e85.js => 90.82460931.js} | 2 +- assets/js/{91.b8cc05dc.js => 91.62310f4b.js} | 2 +- assets/js/{92.8739d68d.js => 92.996882bd.js} | 2 +- assets/js/{93.30f9c0ad.js => 93.8fe174ff.js} | 2 +- assets/js/{94.8dbaf6bf.js => 94.2c2cf916.js} | 2 +- assets/js/{95.dae5c1f4.js => 95.61d03449.js} | 2 +- assets/js/{96.17d2b93e.js => 96.9898986c.js} | 2 +- assets/js/{97.bf6cd041.js => 97.321d0c25.js} | 2 +- assets/js/{98.312593ae.js => 98.9c9ec5a3.js} | 2 +- assets/js/{99.ba23bb04.js => 99.53e919c5.js} | 2 +- assets/js/{app.9006c6cb.js => app.80038112.js} | 4 ++-- index.html | 4 ++-- sitemap.xml | 2 +- 273 files changed, 428 insertions(+), 428 deletions(-) rename assets/js/{102.4fff8792.js => 102.95f1048f.js} (98%) rename assets/js/{103.0a6dbe25.js => 103.b2d2d3e3.js} (97%) rename assets/js/{106.e405ade5.js => 106.db6d4255.js} (96%) rename assets/js/{108.b994c048.js => 108.3a8fea9e.js} (98%) rename assets/js/{109.b1005545.js => 109.2c3571c9.js} (96%) rename assets/js/{112.177150e7.js => 112.e119e1c0.js} (99%) rename assets/js/{114.68079866.js => 114.548f7a8a.js} (96%) rename assets/js/{115.304aa8f6.js => 115.0fd7a0ff.js} (98%) delete mode 100644 assets/js/117.84033fd8.js create mode 100644 assets/js/117.fad63b31.js rename assets/js/{118.c8e719dc.js => 118.1dd64d48.js} (99%) rename assets/js/{119.acf7657e.js => 119.367fe5cf.js} (99%) rename assets/js/{12.b25f20a6.js => 12.7a1196a8.js} (83%) rename assets/js/{120.693bbf3d.js => 120.a744840a.js} (99%) rename assets/js/{121.0b3c9f6d.js => 121.fc35be78.js} (99%) rename assets/js/{122.989f333d.js => 122.6f3a1eda.js} (99%) rename assets/js/{123.db840fc2.js => 123.1267bc5a.js} (98%) rename assets/js/{124.e54fba01.js => 124.f13046f8.js} (98%) rename assets/js/{125.c1532fa3.js => 125.3d68b511.js} (99%) rename assets/js/{126.857d9e03.js => 126.e5520b14.js} (99%) rename assets/js/{127.0938d0f6.js => 127.7107aeb8.js} (99%) rename assets/js/{128.03961572.js => 128.a1f579e1.js} (99%) rename assets/js/{129.656d8ded.js => 129.3e6b9d90.js} (99%) rename assets/js/{130.0b1fefa1.js => 130.9b8d0bda.js} (99%) rename assets/js/{132.6ea08cc4.js => 132.1bc55e97.js} (99%) rename assets/js/{133.2f039671.js => 133.15c24758.js} (99%) rename assets/js/{135.6e9dd4bf.js => 135.8d4d856a.js} (97%) rename assets/js/{136.7596e91f.js => 136.179f2907.js} (99%) rename assets/js/{137.98929bae.js => 137.ed690439.js} (97%) rename assets/js/{138.422099a8.js => 138.c8991843.js} (98%) rename assets/js/{139.c3739c64.js => 139.117fd5ad.js} (98%) rename assets/js/{14.4fa83066.js => 14.71884343.js} (89%) rename assets/js/{141.c875732b.js => 141.b8553449.js} (99%) rename assets/js/{142.192bf544.js => 142.4db575f5.js} (96%) rename assets/js/{143.ae977f45.js => 143.1e642c42.js} (99%) rename assets/js/{145.d1ef63cc.js => 145.17bddbf5.js} (99%) rename assets/js/{146.6d120ca3.js => 146.411299f9.js} (99%) rename assets/js/{147.a48e3aa8.js => 147.80b09c45.js} (99%) rename assets/js/{148.bdbd287c.js => 148.2d7f89ee.js} (99%) rename assets/js/{149.3a4743f7.js => 149.bfe29348.js} (98%) rename assets/js/{15.87e48d14.js => 15.0ae99419.js} (80%) rename assets/js/{150.56eac916.js => 150.b700d849.js} (96%) delete mode 100644 assets/js/151.26962f05.js create mode 100644 assets/js/151.95095468.js rename assets/js/{152.e0b71af1.js => 152.a29cef95.js} (98%) delete mode 100644 assets/js/153.4a9ee18e.js create mode 100644 assets/js/153.95900b83.js rename assets/js/{154.856c6a00.js => 154.8153ff79.js} (99%) rename assets/js/{155.76bdfde2.js => 155.735eff33.js} (97%) rename assets/js/{156.ad408541.js => 156.5360e1f0.js} (99%) rename assets/js/{157.42702b1c.js => 157.7541fe65.js} (98%) rename assets/js/{158.ea97ac3a.js => 158.3ad66c94.js} (96%) rename assets/js/{159.ea0b19b6.js => 159.12ab33bf.js} (99%) rename assets/js/{16.2383c512.js => 16.70e8de82.js} (93%) rename assets/js/{160.7a8cce6a.js => 160.a1f40d9b.js} (94%) rename assets/js/{161.80bb24cc.js => 161.8db2dc4b.js} (95%) rename assets/js/{162.87d1962e.js => 162.9fd66cd2.js} (98%) rename assets/js/{163.ab1c202c.js => 163.fd44193d.js} (98%) rename assets/js/{164.29b7de06.js => 164.4ec87684.js} (97%) rename assets/js/{165.522921b7.js => 165.83409391.js} (98%) rename assets/js/{167.7ab65170.js => 167.052c80e3.js} (97%) rename assets/js/{168.b2c8a3e7.js => 168.fe7b823f.js} (99%) rename assets/js/{169.d5cccde7.js => 169.b46bec4c.js} (98%) rename assets/js/{17.6ae93578.js => 17.f9265b89.js} (82%) rename assets/js/{170.65ffa5d6.js => 170.69b8e5c9.js} (99%) rename assets/js/{171.dc5be31a.js => 171.6d64eeb7.js} (95%) rename assets/js/{172.2490ce8c.js => 172.5b22d576.js} (99%) rename assets/js/{173.c5fa937c.js => 173.f3f07e42.js} (99%) rename assets/js/{18.7f27d8a0.js => 18.5149f223.js} (90%) rename assets/js/{19.5b265f70.js => 19.56bc2821.js} (95%) rename assets/js/{20.84f9500b.js => 20.dc4d9383.js} (99%) rename assets/js/{22.d7e7f5bf.js => 22.70cbe2c9.js} (82%) rename assets/js/{23.92f585d4.js => 23.2323aa57.js} (86%) rename assets/js/{24.48f95fae.js => 24.187f34be.js} (88%) rename assets/js/{27.17396b3f.js => 27.7a573265.js} (99%) rename assets/js/{28.c3956264.js => 28.de7ea1fd.js} (76%) rename assets/js/{30.b21780b3.js => 30.d7ae5f1a.js} (99%) rename assets/js/{31.a38aa78a.js => 31.8165de0f.js} (93%) rename assets/js/{32.3355b5eb.js => 32.5c1bc3c9.js} (98%) rename assets/js/{34.c4363bed.js => 34.b73b1776.js} (90%) rename assets/js/{35.c5dbf865.js => 35.6fa1db70.js} (89%) rename assets/js/{37.68b38745.js => 37.433ff2dc.js} (97%) rename assets/js/{39.9cf11db6.js => 39.962b4085.js} (99%) rename assets/js/{40.2ed40aab.js => 40.5f55dac3.js} (99%) rename assets/js/{41.94dde301.js => 41.21b81e81.js} (86%) rename assets/js/{42.7693bf26.js => 42.fc7da7c4.js} (83%) rename assets/js/{44.36fda2e1.js => 44.bc7ce749.js} (98%) rename assets/js/{49.51faf183.js => 49.b4d574ce.js} (99%) rename assets/js/{50.8bdbef59.js => 50.96e8683a.js} (99%) rename assets/js/{51.35cc097c.js => 51.e52cebd0.js} (97%) rename assets/js/{52.d0cc0084.js => 52.4615899c.js} (99%) rename assets/js/{53.3fc1202c.js => 53.8461b1ce.js} (87%) rename assets/js/{57.18a5a52d.js => 57.4958abd7.js} (87%) rename assets/js/{58.e3cbd226.js => 58.9e016415.js} (94%) rename assets/js/{59.fc65b58e.js => 59.98d9d4cc.js} (97%) rename assets/js/{61.07563c18.js => 61.83afe78a.js} (99%) rename assets/js/{62.0c055ae3.js => 62.60907b1a.js} (98%) rename assets/js/{63.58827274.js => 63.14636a89.js} (94%) rename assets/js/{66.d0bb4524.js => 66.7c69963b.js} (99%) rename assets/js/{68.4058063c.js => 68.747dbff3.js} (99%) rename assets/js/{69.82dc139e.js => 69.c57daaf1.js} (99%) rename assets/js/{70.d6ab05ec.js => 70.cbc81b59.js} (99%) rename assets/js/{71.e199fa5e.js => 71.bf08e2f8.js} (99%) rename assets/js/{72.9630133d.js => 72.119678b2.js} (99%) rename assets/js/{73.3a6e4593.js => 73.87d99793.js} (97%) rename assets/js/{78.1e7e0551.js => 78.9df980a0.js} (97%) rename assets/js/{79.d1b8b2da.js => 79.ad9bc617.js} (99%) rename assets/js/{82.786427a4.js => 82.c14dd1dd.js} (95%) rename assets/js/{85.e9a2621f.js => 85.1be43db3.js} (98%) rename assets/js/{86.491040bc.js => 86.f6c839c6.js} (99%) rename assets/js/{87.64d90326.js => 87.b75e9822.js} (99%) rename assets/js/{88.02edf5b8.js => 88.7bdcb920.js} (98%) rename assets/js/{89.bcd72d50.js => 89.4afaf335.js} (99%) rename assets/js/{90.d2cd0e85.js => 90.82460931.js} (99%) rename assets/js/{91.b8cc05dc.js => 91.62310f4b.js} (99%) rename assets/js/{92.8739d68d.js => 92.996882bd.js} (96%) rename assets/js/{93.30f9c0ad.js => 93.8fe174ff.js} (92%) rename assets/js/{94.8dbaf6bf.js => 94.2c2cf916.js} (98%) rename assets/js/{95.dae5c1f4.js => 95.61d03449.js} (98%) rename assets/js/{96.17d2b93e.js => 96.9898986c.js} (99%) rename assets/js/{97.bf6cd041.js => 97.321d0c25.js} (98%) rename assets/js/{98.312593ae.js => 98.9c9ec5a3.js} (98%) rename assets/js/{99.ba23bb04.js => 99.53e919c5.js} (99%) rename assets/js/{app.9006c6cb.js => app.80038112.js} (55%) diff --git a/404.html b/404.html index 4b2e71cbee..82de285b3b 100644 --- a/404.html +++ b/404.html @@ -9,13 +9,13 @@ - +

404

How did we get here?
Take me home.
- + diff --git a/AdvancedForms/index.html b/AdvancedForms/index.html index 1a50413140..9cd57ad8ee 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 16ece3ef26..6918a7a82f 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 65509fece7..38b4597567 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 de11900a12..e0c1483757 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 2f70b1d061..16ee763020 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 6bb4411a08..61ab4f9b85 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 f717a76438..38611f8632 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 741df50931..bab9bd8144 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 bba792c925..e34a5bd371 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 0dbf3f9f1f..7c0d938cd5 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 7bc76113c8..a24cbddbc9 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 a5716fb4a0..3adca31fbf 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 ad968d2355..17fe3b1ae1 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 579515528f..b50d2af347 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 9df5ce11b4..a110af550d 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 5da235aa3a..db68391790 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 e19198d66b..3fd205a19e 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 8471c2afc7..83fde4b9b0 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 4ccb5f34bf..4651653a22 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 96ee63ea32..73ac9e9902 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 9a52efd91e..d9541ca854 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 e2b7d4b1c4..f643d8056b 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 f1a5b0d230..a5821ba288 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 ff040e52e7..4ef4bc9803 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 dd2753d5b2..4ba9ecb2ef 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 c7e3cc7df8..2741d76ada 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 7d5776e27c..ddd168ce75 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 b66ba9f3fb..ff51483c3c 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 f541cd344c..8bdc4add17 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 0e5e041da8..f08e12c6ce 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 37f701a54d..922086c352 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 dc484f5652..d58ed44b81 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 405bc92ab8..85cb8696e9 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 791fbde6a5..3fbea8222b 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 ac63942594..ad8f360a86 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 7866bfa7c6..7a9d5e2c6b 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 2c20ca6e3d..086828eb0b 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 3ea2e2d116..07509bd56d 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 fcc6c12854..203da8f278 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 c17dfb0390..a323e60199 100644 --- a/Deployment/LunaNode/index.html +++ b/Deployment/LunaNode/index.html @@ -9,7 +9,7 @@ - + @@ -57,7 +57,7 @@ FAQ GitHub - (opens new window)

# Deploying BTCPay - LunaNode Web-Wizard

This article explains the deployment of BTCPay Server through LunaNode Web-Wizard. LunaNode (opens new window) is Canadian based hosting provider that accept Bitcoin payments and requires no personal identification except for a phone number verification.

Their web-wizard is one of the easiest ways to deploy BTCPay Servers from a very user-friendly interface. This method is highly recommended if you don't have a lot of technical knowledge. LunaNode will provide you with a generic domain for your server to get you started. If you want to set up a custom domain you will need to have some comfort with the command line interface.

For the price of around US$8.80 per month, you can have a self-hosted BTCpay, which includes a Bitcoin full node and Lightning Network node.

The video below explains all the step and customization of BTCPay.

The installation is also covered in this article (opens new window)

The third video covers setting BTCPay up on LunaNode, but also goes in-depth on setting up wallets, store and apps.

# 1. Create the account and add credits

Register to LunaNode and add credits to your account. + (opens new window)

# Deploying BTCPay - LunaNode Web-Wizard

This article explains the deployment of BTCPay Server through LunaNode Web-Wizard. LunaNode (opens new window) is Canadian based hosting provider that accept Bitcoin payments and requires no personal identification except for a phone number verification.

Their web-wizard is one of the easiest ways to deploy BTCPay Servers from a very user-friendly interface. This method is highly recommended if you don't have a lot of technical knowledge. LunaNode will provide you with a generic domain for your server to get you started. If you want to set up a custom domain you will need to have some comfort with the command line interface.

For the price of around US$15.80 per month, you can have a self-hosted BTCPay Server, which includes a Bitcoin full node and Lightning Network node.

The video from BTC Sessions below explains all the steps on deploying and setting up BTCPay Server as well how to setup the Lightning Network in different ways.

Alternatively, a short summary of just the deployment steps is also covered in this article (opens new window)

# 1. Create the account and add credits

Register to LunaNode and add credits to your account. Note that you need to wait for the invoice confirmation.

# 2. Create the API Key

Once your account has been verified, and credits added, go to the API section and create a new API. Do not close that page and proceed to step 3.

# 3. Web-Wizard Deployment

  1. Go to launchbtcpay.lunanode.com (opens new window)
  2. Paste the API Key and API ID created in step 2. and continue.
  3. Use your own domain or automatically-generated one by LunaNode.
  4. Customize the web-wizard settings according to your needs.
  5. Click Launch VM. Wait 6-7 minutes for Virtual Machine deployment.

If you've used a custom domain,

  1. SSH into the VM using either the password generated by LunaNode or your private-public key pair.
  2. Run the following commands.
$ sudo su -
 $ export BTCPAY_HOST=your.cool.domain
 $ export BTCPAY_PROTOCOL=https
@@ -75,6 +75,6 @@
       
       →
     

- + diff --git a/Deployment/ManualDeployment/index.html b/Deployment/ManualDeployment/index.html index 42cae3822a..a17b943b97 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 7a7f98e7a9..77b5ee837c 100644 --- a/Deployment/ManualDeploymentExtended/index.html +++ b/Deployment/ManualDeploymentExtended/index.html @@ -9,7 +9,7 @@ - + @@ -732,6 +732,6 @@

- + diff --git a/Deployment/RaspberryPi4/index.html b/Deployment/RaspberryPi4/index.html index 940282417d..b394727fc5 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 45114e495b..049c91cf31 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 6e43a2af1d..ae1f13f3ea 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 139ec230c4..d1309d6dbf 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 bc71d91aa6..4c8ef20777 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 9d677f769d..3d41f88249 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 8f02f26344..116d314a24 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 5a1f882b04..f4e6434d34 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 0898a95b0b..687e10a9ad 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 877b66b73d..4a01ed4989 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 f49e31eec4..94a53f9d92 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 9cead0b8d6..da77e29831 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 00a424c968..4ee57ed9e0 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 f9edf72043..b0cbee4fba 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 7bce7ddd05..2c7ae351f8 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 2529bed723..c36ebb49e3 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 e01564dab5..ded0b18179 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 6aa22947cb..339ba70b57 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 c239d3760d..7ab8c2f639 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 99089e14dc..a76bb49649 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 6c02387cb2..7309e73415 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 98f17cfe79..babe7dfbf9 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 4414fd10c2..51dc6ed690 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 96a454b825..bb1c99247e 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 5b1486fbaa..231edbc75d 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 c81d6a108a..886c62e285 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 97749c53d5..fa87b27fc4 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 abf0335867..9f8b6277cf 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 ca6030fa68..fc93436852 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 3bef19ba24..1ea879d719 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 0b0fd520cf..0f06b0d699 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 18bdf387a8..7e7e4ebe1f 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 fff4376123..6c3efb6cf4 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 6aade6b9dd..67c56d828e 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 8286a803b3..4f4009279c 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 cc49f594de..397d31b0fd 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 ba8779ea4d..6f8d23a368 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 269a0f1774..ac45267b44 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 bdef19ff0e..6c29d1accf 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 7a35f7beb1..737005989a 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 28d83f647e..d41e32c928 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 3f171df916..840dc04849 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 bea227da6a..96be178c21 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 2f7a6cea18..d133d91f8b 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 80edca1022..a2c10d1276 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 880bcbbe20..0837769b14 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 40c1f55f2a..0f43bd7fbc 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 7aa4ace4b9..f08fa7377d 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 2f4bdb0dea..69de406eb5 100644 --- a/Guide/index.html +++ b/Guide/index.html @@ -9,7 +9,7 @@ - + @@ -85,6 +85,6 @@ →

- + diff --git a/HardwareWalletIntegration/index.html b/HardwareWalletIntegration/index.html index 9896c7fe01..e29000a64d 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 d8f5733166..49ff02a3e6 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 48e4f7cb55..45a16cfe6b 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 981159ec5d..91bcb5d7b7 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 83073a2d53..208b124da0 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 2ee12a64bf..7c469d434f 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 f3a7cf0598..260594287f 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 991d77d429..bcf5bb610e 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 7df77c5d58..46f1bf5d3f 100644 --- a/NBXplorer/API/index.html +++ b/NBXplorer/API/index.html @@ -9,7 +9,7 @@ - + @@ -57,14 +57,14 @@ FAQ GitHub - (opens new window)

# API Specification

NBXplorer is a multi crypto currency lightweight block explorer.

NBXplorer does not index the whole blockchain, rather, it listens transactions and blocks from a trusted full node and index only addresses and transactions which belongs to a DerivationScheme that you decide to track.

This document describes the concepts, while the API endpoints are documented here (opens new window).

# Table of content

# Configuration

You can check the available settings with --help.

NBXplorer can be configured in three way:

  • Through command line arguments (eg. --chains btc)
  • Through environment variables (eg. NBXPLORER_CHAINS=btc)
  • Through configuration file (eg. chains=btc)

If you use configuration file, you can find it on windows in:

C:\Users\<user>\AppData\Roaming\NBXplorer\<network>\settings.config
+     (opens new window)    

# API Specification

NBXplorer is a multi crypto currency lightweight block explorer.

NBXplorer does not index the whole blockchain, rather, it listens transactions and blocks from a trusted full node and index only addresses and transactions which belongs to a DerivationScheme that you decide to track.

This document describes the concepts, while the API endpoints are documented here (opens new window).

# Table of content

# Configuration

You can check the available settings with --help.

NBXplorer can be configured in three way:

  • Through command line arguments (eg. --chains btc)
  • Through environment variables (eg. NBXPLORER_CHAINS=btc)
  • Through configuration file (eg. chains=btc)

If you use configuration file, you can find it on windows in:

C:\Users\<user>\AppData\Roaming\NBXplorer\<network>\settings.config
 

On linux or mac:

~/.nbxplorer/<network>/settings.config
 

Be careful, if you run NBXplorer with dotnet run, you should do it this way, with settings after the --:

dotnet run --no-launch-profile --no-build -c Release -p .\NBXplorer\NBXplorer.csproj -- --chains btc
 

Else, launch profiles, which are settings meant to be used only for debugging time, might be taken into account.

# Tracked Sources

A tracked source is a generic way to track a set of scripts (addresses) and its UTXOs, transactions, and balances.

# Derivation scheme

A derivation scheme, also called derivationStrategy in the code, is a flexible way to define how to generate deterministic addresses for a wallet. -NBXplorer will track any addresses on the 0/x, 1/x and x path.

Here a documentation of the different derivation scheme supported:

Address type Format
P2WPKH xpub1
P2SH-P2WPKH xpub1-[p2sh]
P2PKH xpub-[legacy]
Multi-sig P2WSH 2-of-xpub1-xpub2
Multi-sig P2SH-P2WSH 2-of-xpub1-xpub2-[p2sh]
Multi-sig P2SH 2-of-xpub1-xpub2-[legacy]
P2TR xpub1-[taproot]

For multisig, the public keys are ordered before generating the address by default for privacy reason, use -[keeporder] to disable it.

You can use more than one options at same time, example: 2-of-xpub1-xpub2-[legacy]-[keeporder]

Most of routes asks for a cryptoCode. This identify the crypto currency to request data from. (eg. BTC, LTC...)

Note: Taproot is incompatible with all other options.

You can create one by calling Tracking derivation scheme or address.

# Groups

A group is a tracked source which serves as a logical method for grouping several tracked sources into a single entity. You can add or remove tracked sources to and from a group.

Additionally, specific addresses can be tracked through the group.

Every address attached by a child tracked source will be added to the group, including all related UTXOs and transactions.

A group can have any number of children, and a group can also be a child of another group. -Please note that all the children are returned by Get a group. As such, it is advised not to add too many children to avoid slowing down this call.

A group tracked source's format is GROUP:groupid.

You can create a new group by calling Create a group.

# Addresses

This refers to a tracked source that monitors a single address. It functions similarly to a group, but with only one specific address to it.

The address tracked source's format is ADDRESS:bc1....

You can create one by calling Tracking derivation scheme or address.

# Authentication

By default a cookie file is generated when NBXplorer is starting, for windows in:

C:\Users\<user>\AppData\Roaming\NBXplorer\<network>\.cookie
+NBXplorer will track any addresses on the 0/x, 1/x and x path.

Here a documentation of the different derivation scheme supported:

Address type Format
P2WPKH xpub1
P2SH-P2WPKH xpub1-[p2sh]
P2PKH xpub-[legacy]
Multi-sig P2WSH 2-of-xpub1-xpub2
Multi-sig P2SH-P2WSH 2-of-xpub1-xpub2-[p2sh]
Multi-sig P2SH 2-of-xpub1-xpub2-[legacy]
P2TR xpub1-[taproot]

For multisig, the public keys are ordered before generating the address by default for privacy reason, use -[keeporder] to disable it.

You can use more than one options at same time, example: 2-of-xpub1-xpub2-[legacy]-[keeporder]

Most of routes asks for a cryptoCode. This identify the crypto currency to request data from. (eg. BTC, LTC...)

Note: Taproot is incompatible with all other options.

A derivation scheme tracked source's format is DERIVATIONSCHEME:derivationScheme (eg. DERIVATIONSCHEME:xpub1).

You can create one by calling Tracking derivation scheme (opens new window).

# Groups

A group is a tracked source which serves as a logical method for grouping several tracked sources into a single entity. You can add or remove tracked sources to and from a group.

Additionally, specific addresses can be tracked through the group.

Every address attached by a child tracked source will be added to the group, including all related UTXOs and transactions.

A group can have any number of children, and a group can also be a child of another group. +Please note that all the children are returned by Get a group (opens new window). As such, it is advised not to add too many children to avoid slowing down this call.

A group tracked source's format is GROUP:groupid.

You can create a new group by calling Create a group (opens new window).

# Addresses

This refers to a tracked source that monitors a single address. It functions similarly to a group, but with only one specific address to it.

The address tracked source's format is ADDRESS:bc1....

You can create one by calling Tracking an address (opens new window).

# Authentication

By default a cookie file is generated when NBXplorer is starting, for windows in:

C:\Users\<user>\AppData\Roaming\NBXplorer\<network>\.cookie
 

On linux or mac:

~/.nbxplorer/<network>/.cookie
-

The content of this cookie must be used is used as HTTP BASIC authentication to use the API.

This can be disabled with --noauth.

Also, NBXPlorer listen by default on 127.0.0.1, if you want to access it from another machine, run --bind "0.0.0.0".

The content of this cookie must be used is used as HTTP BASIC authentication to use the API.

This can be disabled with --noauth or NBXPLORER_NOAUTH=1.

Also, NBXPlorer listen by default on 127.0.0.1, if you want to access it from another machine, run --bind "0.0.0.0".

- + diff --git a/NBXplorer/Postgres-Migration/index.html b/NBXplorer/Postgres-Migration/index.html index 312c4c07c9..47d4ee4fe0 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 6f8bfd1bcb..23936f4036 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 39b1ec7ae4..c30dccf57b 100644 --- a/NBXplorer/index.html +++ b/NBXplorer/index.html @@ -9,7 +9,7 @@ - + @@ -59,12 +59,12 @@ GitHub (opens new window)

# NBXplorer

NuGet (opens new window) Docker Automated buil (opens new window) CircleCI (opens new window)

A minimalist UTXO tracker for HD Wallets. The goal is to have a flexible, .NET based UTXO tracker for HD wallets. -The explorer supports P2SH,P2PKH,P2WPKH,P2WSH and Multi-sig derivation.

This explorer is not meant to be exposed on internet, but should be used as an internal tool for tracking the UTXOs of your own service.

It has a bunch of features:

  • Can pass arguments via environment variable, command line or configuration file
  • Automatically reconnect to your node if the connection goes temporarily down
  • An easy to use REST API
  • Persistence (via in-file no-SQL datbase called DBreeze or Postgres)
  • Connect via RPC to broadcast transaction instead of using the P2P protocol like this example
  • Connect via RPC to your trusted node to get the proper fee rate.
  • Altcoin support
  • Huge test suite
  • 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)
  • Multi-wallet
  • Flexible address generation schemes (multisig, segwit, legacy etc...)
  • Pruning for big wallets (Removal of tracked transaction which do not impact the resulting UTXO set)

It currently supports the following altcoins:

  • Althash
  • Argoneum
  • BCash (also known as Bitcoin Cash)
  • BGold (also known as Bitcoin Gold)
  • BitCore
  • Chaincoin
  • ColossusXT
  • Dash
  • Dogecoin
  • Feathercoin
  • Gobyte
  • Groestlcoin
  • Litecoin
  • Monacoin
  • MonetaryUnit
  • Monoeci
  • Polis
  • Qtum
  • Terracoin
  • Ufo
  • Viacoin

Read our API Specification.

# Prerequisite

Use --postgres flag to setup the connection string. See schema documentation.

# API Specification

Read our API Specification.

# How to build and run?

If you are using Bitcoin core default settings:

On Powershell:

.\build.ps1
+The explorer supports P2SH,P2PKH,P2WPKH,P2WSH and Multi-sig derivation.

This explorer is not meant to be exposed on internet, but should be used as an internal tool for tracking the UTXOs of your own service.

It has a bunch of features:

  • Can pass arguments via environment variable, command line or configuration file
  • Automatically reconnect to your node if the connection goes temporarily down
  • An easy to use REST API (opens new window)
  • Persistence via Postgres
  • Connect via RPC to broadcast transaction instead of using the P2P protocol like this example
  • Connect via RPC to your trusted node to get the proper fee rate.
  • Altcoin support
  • Huge test suite
  • 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)
  • Multi-wallet
  • Flexible address generation schemes (multisig, segwit, legacy etc...)
  • Pruning for big wallets (Removal of tracked transaction which do not impact the resulting UTXO set)

It currently supports the following altcoins:

  • Althash
  • Argoneum
  • BCash (also known as Bitcoin Cash)
  • BGold (also known as Bitcoin Gold)
  • BitCore
  • Chaincoin
  • ColossusXT
  • Dash
  • Dogecoin
  • Feathercoin
  • Gobyte
  • Groestlcoin
  • Litecoin
  • Monacoin
  • MonetaryUnit
  • Monoeci
  • Polis
  • Qtum
  • Terracoin
  • Ufo
  • Viacoin

Read our API Specification (opens new window).

# Prerequisite

Use --postgres flag to setup the connection string. See schema documentation.

# API Specification

Read our API Specification.

# How to build and run?

If you are using Bitcoin core default settings:

On Powershell:

.\build.ps1
 

On Linux:

./build.sh
 

Then to run:

On Powershell:

.\run.ps1 --help
 

On Linux:

./run.sh --help
 

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 postgres connection string (opens new window))

./run.sh --chains=btc,ltc --network=regtest --postgres "User ID=postgres;Host=127.0.0.1;Port=39382;Database=nbxplorer"
-

# How to use the API?

Check the API documentation, you can then use any client library:

Here is a small C# example (opens new window) showing a 2-2 multisig with Alice and Bob that you can run on regtest.

# With Docker

Use our image (opens new window). +

# How to use the API?

Check the API documentation (opens new window), you can then use any client library:

Here is a small C# example (opens new window) showing a 2-2 multisig with Alice and Bob that you can run on regtest.

# With Docker

Use our image (opens new window). You can check the sample (opens new window) for configuring and composing it bitcoin core.

# How to develop on it?

If you are on Windows, I recommend Visual Studio 2022 (17.8.0). If you are on other platform and want lightweight environment, use Visual Studio Code (opens new window). If you are hardcore, you can code on vim.

I like Visual Studio Code and Visual Studio 2022 as it allows me to debug in step by step.

# How to configure?

NBXplorer supports configuration through command line arguments, configuration file, or environment variables.

# Configuration file

If you are not using standard install for bitcoind, you will have to change the configuration file: @@ -80,7 +80,7 @@ dotnet run NBXplorer.dll As described above you may add configuration parameters if desired.

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 dotnet runtime to execute the dll file.

e.g. dotnet NBXplorer.dll

# Important Note

This tool will only start scanning from the configured startheight. (By default, the height of the blockchain during your first run) This means that you might not see old payments from your HD key.

If you need to see old payments, you need to configure --[crypto]startheight to a specific height of your choice, then run it again with --[crypto]rescan, e.g. -./run.sh --chains=ltc --ltcrescan --ltcstartheight=101

# How to query?

# Using Postman

Postman (opens new window) is a useful tool for testing and experimenting with REST API's.

You can test the NBXplorer API quickly and easily using Postman.

If you use cookie authentication (enabled by default) in your locally run NBXplorer, you need to set that up in Postman:

  • Run NBXplorer and locate you cookie file (NBXplorer will generate a new Cookie file each time it runs in its default data folder)
  • In Postman create a new GET API test
  • In Authorization select Basic Auth, you should see 2 input boxes for username and password
  • Open your cookie file with a text editor e.g. Notepad on windows . You should see a cookie string e.g. __cookie__:0ff9cd83a5ac7c19a6b56a3d1e7a5c96e113d42dba7720a1f72a3a5e8c4b6c66
  • Back in Postman paste the __cookie__ part of your cookie file into username (whatever comes before the 😃
  • Paste the Hex string (after the : ) into the password box
  • Click the Update Request button in Postman - this will force Postman to generate the correct HTTP headers based on your cookie details
  • You should now see a new entry in the Headers section with a Key of Authorization and Value of Basic xxxxxxxxx where the string after Basic will be your Base64 encoded username and password.
  • Enter the API URL you are going to test

You can also disable authentication in NBXplorer for testing with the --noauth parameter. This makes testing quicker:

  • Run NBXplorer with the --noauth parameter
  • In Postman create a new GET API test
  • In Authorization select No Auth
  • Enter the API URL you are going to test

You are now ready to test the API - it is easiest to start with something simple such as the fees endpoint e.g.

http://localhost:24444/v1/cryptos/btc/fees/3

this should return a JSON payload e.g.

{ +./run.sh --chains=ltc --ltcrescan --ltcstartheight=101

# How to query?

# Using Postman

Postman (opens new window) is a useful tool for testing and experimenting with REST API's.

You can test the NBXplorer API (opens new window) quickly and easily using Postman.

If you use cookie authentication (enabled by default) in your locally run NBXplorer, you need to set that up in Postman:

  • Run NBXplorer and locate you cookie file (NBXplorer will generate a new Cookie file each time it runs in its default data folder)
  • In Postman create a new GET API test
  • In Authorization select Basic Auth, you should see 2 input boxes for username and password
  • Open your cookie file with a text editor e.g. Notepad on windows . You should see a cookie string e.g. __cookie__:0ff9cd83a5ac7c19a6b56a3d1e7a5c96e113d42dba7720a1f72a3a5e8c4b6c66
  • Back in Postman paste the __cookie__ part of your cookie file into username (whatever comes before the 😃
  • Paste the Hex string (after the : ) into the password box
  • Click the Update Request button in Postman - this will force Postman to generate the correct HTTP headers based on your cookie details
  • You should now see a new entry in the Headers section with a Key of Authorization and Value of Basic xxxxxxxxx where the string after Basic will be your Base64 encoded username and password.
  • Enter the API URL you are going to test

You can also disable authentication in NBXplorer for testing with the --noauth parameter. This makes testing quicker:

  • Run NBXplorer with the --noauth command line argument or the environment variable NBXPLORER_NOAUTH=1
  • In Postman create a new GET API test
  • In Authorization select No Auth
  • Enter the API URL you are going to test

You are now ready to test the API - it is easiest to start with something simple such as the fees endpoint e.g.

http://localhost:24444/v1/cryptos/btc/fees/3

this should return a JSON payload e.g.

{ "feeRate": 9, "blockCount": 3 }

# Message Brokers

# Azure Service Bus

Support has been added for Azure Service Bus as a message broker. Currently 2 Queues and 2 Topics are supported

# Queues

  • New Block
  • New Transaction

# Topics

  • New Block
  • New Transaction

Filters should be applied on the client, if required.

To activate Azure Service Bus Mesages you should add an Azure Service Bus Connection string to your config file or on the command line.

  • To use queues you should specify the queue names you wish to use
  • To use topics you should specify the topic names you wish to use

You can use both queues and topics at the same time.

# Config Settings

If you use the Configuration file to setup your NBXplorer options:

asbcnstr=Your Azure Service Bus Connection string
@@ -99,7 +99,7 @@
 The ExplorerClient classes allows you to query unused addresses, and the UTXO of an HD PubKey.
 You can take a look at the tests (opens new window) to see how it works.

There is a simple use case documented on Blockchain Programming in C# (opens new window).

# How to run the tests?

This is easy, from repo directory:

cd NBXplorer.Tests
 dotnet test
-

The tests can take long the first time, as it download Bitcoin Core binaries. (Between 5 and 10 minutes)

# How to add support to my altcoin

First you need to add support for your altcoin to NBitcoin.Altcoins. (See here (opens new window)).

Once this is done and NBXplorer updated to use the last version of NBitcoin.Altcoins, follow Litecoin example (opens new window).

If you want to test if everything is working, modify ServerTester.Environment.cs (opens new window) to match your altcoin.

Then run the tests.

# Licence

This project is under MIT License.

# Special thanks

Special thanks to Digital Garage for allowing me to open source the project, which is based on an internal work I have done on Elements.

Thanks to the DG Lab Blockchain Team who had to fight with lots of bugs. (in particular kallewoof :p)

Thanks to Metaco SA, whose constant challenging projects refine my taste on what a perfect Bitcoin API should be.

The tests can take long the first time, as it download Bitcoin Core binaries. (Between 5 and 10 minutes)

# How to add support to my altcoin

First you need to add support for your altcoin to NBitcoin.Altcoins. (See here (opens new window)).

Once this is done and NBXplorer updated to use the last version of NBitcoin.Altcoins, follow Litecoin example (opens new window).

If you want to test if everything is working, modify ServerTester.Environment.cs (opens new window) to match your altcoin.

Then run the tests.

# Licence

This project is under MIT License.

- + diff --git a/Nopcommerce/index.html b/Nopcommerce/index.html index fd52e9d06a..59cd9890d8 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 5f1bd9ee4d..c73c91f76d 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 574d4254a6..4e813c43aa 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 5e4236d87e..d9f1b2448d 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 e3af886fad..27aee9b116 100644 --- a/OpenCart/index.html +++ b/OpenCart/index.html @@ -9,7 +9,7 @@ - + @@ -88,6 +88,6 @@ →

- + diff --git a/Payjoin/index.html b/Payjoin/index.html index 4af02efa91..c586e6ee1b 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 069760b32f..67c205f9ba 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 f173dee225..d336ea9622 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 e90bfaa1f7..2c4f44acfb 100644 --- a/Payroll/index.html +++ b/Payroll/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/PhocaCart/index.html b/PhocaCart/index.html index f159e69361..9277f1d3e9 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 68c2c9ba37..f92468e556 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 db01835854..1794b715eb 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 028e2ad5c8..86727a9368 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 4abea3728d..645d45802d 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 eb7a4250cf..d3e54157a6 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 1b4829019a..ea921782a2 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 cf352c6c6a..cb206116eb 100644 --- a/Shopify/index.html +++ b/Shopify/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Shopware/index.html b/Shopware/index.html index b0a4fe03ca..fc85e98e3d 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 aa4a90ed24..631faf1cdb 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 4eff7dfe58..3513c6446f 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 cd2519f054..5ce347aef0 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 620e14cfdb..2828a2a0cf 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 6c177d4659..9fb1312d13 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 3f3d721b9d..4d7c9cf253 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 b5a2cd459b..49daae9d6d 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 1bd354f3ab..f9a4f1c58a 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 56bfbd031d..2d9c6649c3 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 fee10ad281..5992de2bdd 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 c6450932b8..3beb6385de 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 a843698956..c00d085939 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 fd3e0941d2..f08bc58a9d 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 f6c1357a4c..8301cdc8bf 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 8224185f29..d2589137c5 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 1072e4b382..e0511f2407 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 bea0903874..71ed8d9cd5 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 0d601423e5..f870c53e7d 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 53c03b58c5..f7338b9ee7 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 3cae3c6a37..be6cf82e16 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 88c2d1375d..a8e66a68b5 100644 --- a/WhatsNext/index.html +++ b/WhatsNext/index.html @@ -9,7 +9,7 @@ - + @@ -66,6 +66,6 @@ →

    - + diff --git a/Wix/index.html b/Wix/index.html index d01e198164..0dda89e3c8 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 8a7c7f6624..8ae64476f3 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 6622d600a2..0c6b1a03d2 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 a3eff38a5d..32d9bea27d 100644 --- a/Zapier/index.html +++ b/Zapier/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

    - + diff --git a/assets/js/102.4fff8792.js b/assets/js/102.95f1048f.js similarity index 98% rename from assets/js/102.4fff8792.js rename to assets/js/102.95f1048f.js index 3cad5b40ef..5504e3722a 100644 --- a/assets/js/102.4fff8792.js +++ b/assets/js/102.95f1048f.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[102],{770:function(e,t,n){"use strict";n.r(t);var i=n(17),a=Object(i.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"breez-lightning-support-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#breez-lightning-support-plugin"}},[e._v("#")]),e._v(" Breez lightning support plugin")]),e._v(" "),t("h2",{attrs:{id:"beta-release"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#beta-release"}},[e._v("#")]),e._v(" BETA RELEASE")]),e._v(" "),t("p",[e._v("Allows you to enable lightning on your stores using "),t("a",{attrs:{href:"https://breez.technology/sdk/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Breez SDK"),t("OutboundLink")],1),e._v(", powered by "),t("a",{attrs:{href:"https://blockstream.com/lightning/greenlight/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Blockstream Greenlight"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("Breez SDK and Greenlight enables you to have a non-custodial lightning experience, without hosting any of the infrastructure yourself.")]),e._v(" "),t("p",[e._v("Additionally, Breez SDK comes with built-in liquidity and channel automation, reducing the complexity of managing your lightning node.")]),e._v(" "),t("p",[e._v("If you have used any other wallet that uses Breez SDK, you can import it directly into BTCPay Server and continue using it in parallel.")]),e._v(" "),t("h2",{attrs:{id:"usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[e._v("#")]),e._v(" Usage")]),e._v(" "),t("ol",[t("li",[e._v("Install the plugin from the BTCPay Server > Settings > Plugin > Available Plugins, and restart")]),e._v(" "),t("li",[e._v("In your store > Wallets > Lightning, Configure Breez")]),e._v(" "),t("li",[e._v("You will be on a page asking for:\n"),t("ul",[t("li",[e._v("Mnemonic: This is your 12 word seed phrase. YOU SHOULD GENERATE THIS FROM A SEGWIT OR LEGACY SEGWIT WALLET AND KEEP IT SAFE. If you have used Breez before, you can use the same seed phrase you used in Breez. You can also use the seed phrase from your BTCPay hot wallet. This SEED PHRASE will be stored on BTCPAY SERVER. IF YOU USE A SHARED BTCPAY SERVER, YOU ARE EXPOSING YOUR SEED PHRASE TO THE SERVER ADMINISTRATOR. Type it in 'word word word...\" format.")]),e._v(" "),t("li",[e._v("Greenlight credentials: In the case of a new seed, you'll need to acquire certificates for issuing new nodes from Blockstream. You can get these for free at https://greenlight.blockstream.com. Select the entire "),t("code",[e._v("gl-certs.zip")]),e._v(" file provided by Greenlight.")]),e._v(" "),t("li",[e._v("Invite Code: Alternatively, you may have an invite code which can be used instead of the Greenlight credentials.")])])]),e._v(" "),t("li",[e._v("Click Save")]),e._v(" "),t("li",[e._v("Your new lightning node will be created.")]),e._v(" "),t("li",[e._v("Your first lightning invoice will have a relatively high minimum amount limit. This is because Breez SDK requires a minimum amount to be able to open a channel. A note on Inbound Liquidity - Breez appears to provide a low inbound liquidity at first and as you use it, it grants more inbound liquidity gradaully which puts you at risk of receiving partial paid invoices. But if you want instant channel inbound liquidity, use the Swap In feature to bring in Bitcoin, then create a lightning invoice from an outside lightning wallet such as Breez or Phoenix wallet, and pay it via the Payments tab in Breez. This lubricates the channels and your inbound liquidity will increase by the amount of your paid outbound invoice. You pay the channel open fee, instead of your customers. The amount you set your inbound liquidity is up to you so make it high enough that you don't have to regularly increase channel size which costs you sats down the road. For example, if you receive ten payments of 50,000 sats a month (500,000 sats), to start with 1.5 to 2 million sats channel at the beginning.")]),e._v(" "),t("li",[e._v("You can now use your lightning node to receive payments.")])]),e._v(" "),t("p",[e._v("NOTE: In the future, Blockstream Greenlight will offer a way to generate read-only access keys for your already issued node, so that you can use these instead of exposing your mnemonic phrase to BTCPay Server, allowing a lightweight, non-custodial lightning experience, even on shared BTCPay Server instances.")]),e._v(" "),t("h2",{attrs:{id:"additional-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#additional-features"}},[e._v("#")]),e._v(" Additional features")]),e._v(" "),t("ul",[t("li",[e._v("Swap-in: Send and convert onchain funds to your Breez lightning nodes.")]),e._v(" "),t("li",[e._v("Swap-out: Send and convert lightning funds to your onchain wallet.")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[102],{769:function(e,t,n){"use strict";n.r(t);var i=n(17),a=Object(i.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"breez-lightning-support-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#breez-lightning-support-plugin"}},[e._v("#")]),e._v(" Breez lightning support plugin")]),e._v(" "),t("h2",{attrs:{id:"beta-release"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#beta-release"}},[e._v("#")]),e._v(" BETA RELEASE")]),e._v(" "),t("p",[e._v("Allows you to enable lightning on your stores using "),t("a",{attrs:{href:"https://breez.technology/sdk/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Breez SDK"),t("OutboundLink")],1),e._v(", powered by "),t("a",{attrs:{href:"https://blockstream.com/lightning/greenlight/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Blockstream Greenlight"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("Breez SDK and Greenlight enables you to have a non-custodial lightning experience, without hosting any of the infrastructure yourself.")]),e._v(" "),t("p",[e._v("Additionally, Breez SDK comes with built-in liquidity and channel automation, reducing the complexity of managing your lightning node.")]),e._v(" "),t("p",[e._v("If you have used any other wallet that uses Breez SDK, you can import it directly into BTCPay Server and continue using it in parallel.")]),e._v(" "),t("h2",{attrs:{id:"usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[e._v("#")]),e._v(" Usage")]),e._v(" "),t("ol",[t("li",[e._v("Install the plugin from the BTCPay Server > Settings > Plugin > Available Plugins, and restart")]),e._v(" "),t("li",[e._v("In your store > Wallets > Lightning, Configure Breez")]),e._v(" "),t("li",[e._v("You will be on a page asking for:\n"),t("ul",[t("li",[e._v("Mnemonic: This is your 12 word seed phrase. YOU SHOULD GENERATE THIS FROM A SEGWIT OR LEGACY SEGWIT WALLET AND KEEP IT SAFE. If you have used Breez before, you can use the same seed phrase you used in Breez. You can also use the seed phrase from your BTCPay hot wallet. This SEED PHRASE will be stored on BTCPAY SERVER. IF YOU USE A SHARED BTCPAY SERVER, YOU ARE EXPOSING YOUR SEED PHRASE TO THE SERVER ADMINISTRATOR. Type it in 'word word word...\" format.")]),e._v(" "),t("li",[e._v("Greenlight credentials: In the case of a new seed, you'll need to acquire certificates for issuing new nodes from Blockstream. You can get these for free at https://greenlight.blockstream.com. Select the entire "),t("code",[e._v("gl-certs.zip")]),e._v(" file provided by Greenlight.")]),e._v(" "),t("li",[e._v("Invite Code: Alternatively, you may have an invite code which can be used instead of the Greenlight credentials.")])])]),e._v(" "),t("li",[e._v("Click Save")]),e._v(" "),t("li",[e._v("Your new lightning node will be created.")]),e._v(" "),t("li",[e._v("Your first lightning invoice will have a relatively high minimum amount limit. This is because Breez SDK requires a minimum amount to be able to open a channel. A note on Inbound Liquidity - Breez appears to provide a low inbound liquidity at first and as you use it, it grants more inbound liquidity gradaully which puts you at risk of receiving partial paid invoices. But if you want instant channel inbound liquidity, use the Swap In feature to bring in Bitcoin, then create a lightning invoice from an outside lightning wallet such as Breez or Phoenix wallet, and pay it via the Payments tab in Breez. This lubricates the channels and your inbound liquidity will increase by the amount of your paid outbound invoice. You pay the channel open fee, instead of your customers. The amount you set your inbound liquidity is up to you so make it high enough that you don't have to regularly increase channel size which costs you sats down the road. For example, if you receive ten payments of 50,000 sats a month (500,000 sats), to start with 1.5 to 2 million sats channel at the beginning.")]),e._v(" "),t("li",[e._v("You can now use your lightning node to receive payments.")])]),e._v(" "),t("p",[e._v("NOTE: In the future, Blockstream Greenlight will offer a way to generate read-only access keys for your already issued node, so that you can use these instead of exposing your mnemonic phrase to BTCPay Server, allowing a lightweight, non-custodial lightning experience, even on shared BTCPay Server instances.")]),e._v(" "),t("h2",{attrs:{id:"additional-features"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#additional-features"}},[e._v("#")]),e._v(" Additional features")]),e._v(" "),t("ul",[t("li",[e._v("Swap-in: Send and convert onchain funds to your Breez lightning nodes.")]),e._v(" "),t("li",[e._v("Swap-out: Send and convert lightning funds to your onchain wallet.")])])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/103.0a6dbe25.js b/assets/js/103.b2d2d3e3.js similarity index 97% rename from assets/js/103.0a6dbe25.js rename to assets/js/103.b2d2d3e3.js index 60b0ff1586..1de6a16c80 100644 --- a/assets/js/103.0a6dbe25.js +++ b/assets/js/103.b2d2d3e3.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[103],{769:function(e,t,n){"use strict";n.r(t);var a=n(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:"bringin-euro-offramp-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#bringin-euro-offramp-plugin"}},[e._v("#")]),e._v(" Bringin Euro offramp plugin")]),e._v(" "),t("p",[e._v("Allows you to automatically forward received funds to Bringin, a Euro offramp provider.")]),e._v(" "),t("h2",{attrs:{id:"usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[e._v("#")]),e._v(" Usage")]),e._v(" "),t("ol",[t("li",[e._v("Install the plugin from the BTCPay Server > Settings > Plugin > Available Plugins, and restart")]),e._v(" "),t("li",[e._v('In the dashboard, or the side navigation, click on "Bringin" tostart configuring the plugin')]),e._v(" "),t("li",[e._v("You will need an API key, click on the onboarding link to start getting your account set up.")]),e._v(" "),t("li",[e._v("Once your account is set up, click on Integrations on the Bringin dashboard and get the API Key under BTCPay Server")]),e._v(" "),t("li",[e._v("Paste the API Key in the BTCPay Server plugin configuration, and new options should appear to configure the plugin")]),e._v(" "),t("li",[e._v("You can configure the available payment method options supported by Bringin, such as Lightning and On-chain.")]),e._v(" "),t("li",[e._v("Click Save")]),e._v(" "),t("li",[e._v("Make sure to configure payout processors so that payments to Bringin are automatically created.")])]),e._v(" "),t("h2",{attrs:{id:"flow"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#flow"}},[e._v("#")]),e._v(" Flow")]),e._v(" "),t("p",[e._v('When an invoice on your store is paid and settled, every payment is counted per payment type (lightning, on-chain coming soon), relative to the "percentage" configured (set to 0 to not enable this payment).\nOnce the threshold is reached, an order is created on Bringin, and a payout paying this order is created. A payout processor then picks this payout and sends it to Bringin. Once the payment settles, the funds are automatically converted to Euro and the balance is reflected in your Bringin account and the BTCPay Server Bringin widget.')])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[103],{770:function(e,t,n){"use strict";n.r(t);var a=n(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:"bringin-euro-offramp-plugin"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#bringin-euro-offramp-plugin"}},[e._v("#")]),e._v(" Bringin Euro offramp plugin")]),e._v(" "),t("p",[e._v("Allows you to automatically forward received funds to Bringin, a Euro offramp provider.")]),e._v(" "),t("h2",{attrs:{id:"usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[e._v("#")]),e._v(" Usage")]),e._v(" "),t("ol",[t("li",[e._v("Install the plugin from the BTCPay Server > Settings > Plugin > Available Plugins, and restart")]),e._v(" "),t("li",[e._v('In the dashboard, or the side navigation, click on "Bringin" tostart configuring the plugin')]),e._v(" "),t("li",[e._v("You will need an API key, click on the onboarding link to start getting your account set up.")]),e._v(" "),t("li",[e._v("Once your account is set up, click on Integrations on the Bringin dashboard and get the API Key under BTCPay Server")]),e._v(" "),t("li",[e._v("Paste the API Key in the BTCPay Server plugin configuration, and new options should appear to configure the plugin")]),e._v(" "),t("li",[e._v("You can configure the available payment method options supported by Bringin, such as Lightning and On-chain.")]),e._v(" "),t("li",[e._v("Click Save")]),e._v(" "),t("li",[e._v("Make sure to configure payout processors so that payments to Bringin are automatically created.")])]),e._v(" "),t("h2",{attrs:{id:"flow"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#flow"}},[e._v("#")]),e._v(" Flow")]),e._v(" "),t("p",[e._v('When an invoice on your store is paid and settled, every payment is counted per payment type (lightning, on-chain coming soon), relative to the "percentage" configured (set to 0 to not enable this payment).\nOnce the threshold is reached, an order is created on Bringin, and a payout paying this order is created. A payout processor then picks this payout and sends it to Bringin. Once the payment settles, the funds are automatically converted to Euro and the balance is reflected in your Bringin account and the BTCPay Server Bringin widget.')])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/106.e405ade5.js b/assets/js/106.db6d4255.js similarity index 96% rename from assets/js/106.e405ade5.js rename to assets/js/106.db6d4255.js index 2de9e88c50..9f9688c8c2 100644 --- a/assets/js/106.e405ade5.js +++ b/assets/js/106.db6d4255.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[106],{775: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([[106],{777: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.b994c048.js b/assets/js/108.3a8fea9e.js similarity index 98% rename from assets/js/108.b994c048.js rename to assets/js/108.3a8fea9e.js index e3578432c2..f788ec33e3 100644 --- a/assets/js/108.b994c048.js +++ b/assets/js/108.3a8fea9e.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[108],{779: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:"contributing-to-btcpay-server-in-other-ways"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#contributing-to-btcpay-server-in-other-ways"}},[e._v("#")]),e._v(" Contributing to BTCPay Server in other ways")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#create-videos-graphics"}},[e._v("Create Videos & Graphics")])]),t("li",[t("a",{attrs:{href:"#hosting-providers"}},[e._v("Hosting Providers")])]),t("li",[t("a",{attrs:{href:"#contribute-to-the-directory"}},[e._v("Contribute to the Directory")])]),t("li",[t("a",{attrs:{href:"#project-discussions"}},[e._v("Project Discussions")])]),t("li",[t("a",{attrs:{href:"#community"}},[e._v("Community")])]),t("li",[t("a",{attrs:{href:"#spreading-the-word"}},[e._v("Spreading the word")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"create-videos-graphics"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-videos-graphics"}},[e._v("#")]),e._v(" Create Videos & Graphics")]),e._v(" "),t("p",[e._v("Making videos that promote some features or that show how BTCPay Server works is a great way to help.\nVideo tutorials also help new users navigate around what BTCPay Server can offer them.")]),e._v(" "),t("p",[e._v("You can see examples of videos that are already on the Official BTCPay Server "),t("a",{attrs:{href:"https://www.youtube.com/channel/UCpG9WL6TJuoNfFVkaDMp9ug/",target:"_blank",rel:"noopener noreferrer"}},[e._v("YouTube channel"),t("OutboundLink")],1),e._v(" for inspiration.")]),e._v(" "),t("h2",{attrs:{id:"hosting-providers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hosting-providers"}},[e._v("#")]),e._v(" Hosting Providers")]),e._v(" "),t("p",[e._v("The BTCPay Server community is looking for more VPS hosting providers to implement "),t("RouterLink",{attrs:{to:"/Deployment/LunaNode/"}},[e._v("1-Click BTCPay Server deployment")]),e._v(" and make the deployment of software more accessible, decentralized and widely-available.")],1),e._v(" "),t("h2",{attrs:{id:"contribute-to-the-directory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#contribute-to-the-directory"}},[e._v("#")]),e._v(" Contribute to the Directory")]),e._v(" "),t("p",[e._v("The Directory has been created to showcase the possibilities of BTCPay Server for merchant checkouts, donations, fundraisers, or any other use-case users come up with.")]),e._v(" "),t("p",[e._v("It contains a non-exhaustive list of websites that use the software.")]),e._v(" "),t("p",[e._v("Anyone can "),t("a",{attrs:{href:"https://directory.btcpayserver.org/newentry",target:"_blank",rel:"noopener noreferrer"}},[e._v("add a person or an organisation"),t("OutboundLink")],1),e._v(" to the "),t("a",{attrs:{href:"https://directory.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Directory"),t("OutboundLink")],1),e._v(".\nIf you know how to use Github, you can directly create a Pull Request and add an entry by editing the "),t("code",[e._v(".vuepress/list.js")]),e._v(" file.")]),e._v(" "),t("p",[e._v("Please note that only websites that use BTCPay Server are accepted in the Directory and entries are expected to be in English language.")]),e._v(" "),t("h2",{attrs:{id:"project-discussions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#project-discussions"}},[e._v("#")]),e._v(" Project Discussions")]),e._v(" "),t("p",[e._v("Check out the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/discussions",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Discussions Page"),t("OutboundLink")],1),e._v(" and provide feedback on new feature ideas and other project topics. Features that may be good ideas for the project but aren't ready for development yet, can be found here.")]),e._v(" "),t("h2",{attrs:{id:"community"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#community"}},[e._v("#")]),e._v(" Community")]),e._v(" "),t("p",[e._v("You can help BTCPay Server even if you're not a developer.")]),e._v(" "),t("p",[e._v("The easiest way is to use the software as a business or individual, provide feedback and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("report any bugs or issues"),t("OutboundLink")],1),e._v(" you or your customers encounter. Another great way is to join the "),t("RouterLink",{attrs:{to:"/Community/"}},[e._v("community")]),e._v(" and help others troubleshoot by sharing information you may have from your experience using BTCPay Server.")],1),e._v(" "),t("p",[e._v("Consider helping newcomers like the community helped you.")]),e._v(" "),t("h2",{attrs:{id:"spreading-the-word"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#spreading-the-word"}},[e._v("#")]),e._v(" Spreading the word")]),e._v(" "),t("p",[e._v("You like BTCPay Server, what it stands for and what it offers? Spread the word! It's the easiest way to contribute and help the community.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[108],{780: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:"contributing-to-btcpay-server-in-other-ways"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#contributing-to-btcpay-server-in-other-ways"}},[e._v("#")]),e._v(" Contributing to BTCPay Server in other ways")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#create-videos-graphics"}},[e._v("Create Videos & Graphics")])]),t("li",[t("a",{attrs:{href:"#hosting-providers"}},[e._v("Hosting Providers")])]),t("li",[t("a",{attrs:{href:"#contribute-to-the-directory"}},[e._v("Contribute to the Directory")])]),t("li",[t("a",{attrs:{href:"#project-discussions"}},[e._v("Project Discussions")])]),t("li",[t("a",{attrs:{href:"#community"}},[e._v("Community")])]),t("li",[t("a",{attrs:{href:"#spreading-the-word"}},[e._v("Spreading the word")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"create-videos-graphics"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-videos-graphics"}},[e._v("#")]),e._v(" Create Videos & Graphics")]),e._v(" "),t("p",[e._v("Making videos that promote some features or that show how BTCPay Server works is a great way to help.\nVideo tutorials also help new users navigate around what BTCPay Server can offer them.")]),e._v(" "),t("p",[e._v("You can see examples of videos that are already on the Official BTCPay Server "),t("a",{attrs:{href:"https://www.youtube.com/channel/UCpG9WL6TJuoNfFVkaDMp9ug/",target:"_blank",rel:"noopener noreferrer"}},[e._v("YouTube channel"),t("OutboundLink")],1),e._v(" for inspiration.")]),e._v(" "),t("h2",{attrs:{id:"hosting-providers"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hosting-providers"}},[e._v("#")]),e._v(" Hosting Providers")]),e._v(" "),t("p",[e._v("The BTCPay Server community is looking for more VPS hosting providers to implement "),t("RouterLink",{attrs:{to:"/Deployment/LunaNode/"}},[e._v("1-Click BTCPay Server deployment")]),e._v(" and make the deployment of software more accessible, decentralized and widely-available.")],1),e._v(" "),t("h2",{attrs:{id:"contribute-to-the-directory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#contribute-to-the-directory"}},[e._v("#")]),e._v(" Contribute to the Directory")]),e._v(" "),t("p",[e._v("The Directory has been created to showcase the possibilities of BTCPay Server for merchant checkouts, donations, fundraisers, or any other use-case users come up with.")]),e._v(" "),t("p",[e._v("It contains a non-exhaustive list of websites that use the software.")]),e._v(" "),t("p",[e._v("Anyone can "),t("a",{attrs:{href:"https://directory.btcpayserver.org/newentry",target:"_blank",rel:"noopener noreferrer"}},[e._v("add a person or an organisation"),t("OutboundLink")],1),e._v(" to the "),t("a",{attrs:{href:"https://directory.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Directory"),t("OutboundLink")],1),e._v(".\nIf you know how to use Github, you can directly create a Pull Request and add an entry by editing the "),t("code",[e._v(".vuepress/list.js")]),e._v(" file.")]),e._v(" "),t("p",[e._v("Please note that only websites that use BTCPay Server are accepted in the Directory and entries are expected to be in English language.")]),e._v(" "),t("h2",{attrs:{id:"project-discussions"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#project-discussions"}},[e._v("#")]),e._v(" Project Discussions")]),e._v(" "),t("p",[e._v("Check out the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/discussions",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Discussions Page"),t("OutboundLink")],1),e._v(" and provide feedback on new feature ideas and other project topics. Features that may be good ideas for the project but aren't ready for development yet, can be found here.")]),e._v(" "),t("h2",{attrs:{id:"community"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#community"}},[e._v("#")]),e._v(" Community")]),e._v(" "),t("p",[e._v("You can help BTCPay Server even if you're not a developer.")]),e._v(" "),t("p",[e._v("The easiest way is to use the software as a business or individual, provide feedback and "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("report any bugs or issues"),t("OutboundLink")],1),e._v(" you or your customers encounter. Another great way is to join the "),t("RouterLink",{attrs:{to:"/Community/"}},[e._v("community")]),e._v(" and help others troubleshoot by sharing information you may have from your experience using BTCPay Server.")],1),e._v(" "),t("p",[e._v("Consider helping newcomers like the community helped you.")]),e._v(" "),t("h2",{attrs:{id:"spreading-the-word"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#spreading-the-word"}},[e._v("#")]),e._v(" Spreading the word")]),e._v(" "),t("p",[e._v("You like BTCPay Server, what it stands for and what it offers? Spread the word! It's the easiest way to contribute and help the community.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/109.b1005545.js b/assets/js/109.2c3571c9.js similarity index 96% rename from assets/js/109.b1005545.js rename to assets/js/109.2c3571c9.js index aecd84e5a4..8368b470da 100644 --- a/assets/js/109.b1005545.js +++ b/assets/js/109.2c3571c9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[109],{782:function(t,e,o){"use strict";o.r(e);var r=o(17),n=Object(r.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"how-to-contribute-to-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-contribute-to-btcpay-server"}},[t._v("#")]),t._v(" How to contribute to BTCPay Server?")]),t._v(" "),e("p",[t._v("BTCPay Server is built and maintained entirely by volunteer contributors around the internet.")]),t._v(" "),e("p",[t._v("We welcome, appreciate and encourage new contributions.")]),t._v(" "),e("p",[t._v("Depending on your skills and interest, you can help in a number of ways:")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/Contribute/Dev/"}},[t._v("Software")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/Contribute/DevCode/"}},[t._v("Development")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/DevTest/"}},[t._v("Testing")])],1)])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/Write/"}},[t._v("Writing")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/Contribute/WriteSoftware/"}},[t._v("Tools")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/WriteDocs/"}},[t._v("Documentation")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/WriteBlog/"}},[t._v("Blog")])],1)])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/Design/"}},[t._v("Designing")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/Translate/"}},[t._v("Translating")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/Misc/"}},[t._v("Miscellaneous")])],1)]),t._v(" "),e("p",[t._v("Every contribution is important and if you have any questions, feel free to consult our growing "),e("RouterLink",{attrs:{to:"/Community/"}},[t._v("community")]),t._v(".")],1)])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[109],{781:function(t,e,o){"use strict";o.r(e);var r=o(17),n=Object(r.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"how-to-contribute-to-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#how-to-contribute-to-btcpay-server"}},[t._v("#")]),t._v(" How to contribute to BTCPay Server?")]),t._v(" "),e("p",[t._v("BTCPay Server is built and maintained entirely by volunteer contributors around the internet.")]),t._v(" "),e("p",[t._v("We welcome, appreciate and encourage new contributions.")]),t._v(" "),e("p",[t._v("Depending on your skills and interest, you can help in a number of ways:")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/Contribute/Dev/"}},[t._v("Software")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/Contribute/DevCode/"}},[t._v("Development")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/DevTest/"}},[t._v("Testing")])],1)])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/Write/"}},[t._v("Writing")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/Contribute/WriteSoftware/"}},[t._v("Tools")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/WriteDocs/"}},[t._v("Documentation")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/WriteBlog/"}},[t._v("Blog")])],1)])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/Design/"}},[t._v("Designing")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/Translate/"}},[t._v("Translating")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Contribute/Misc/"}},[t._v("Miscellaneous")])],1)]),t._v(" "),e("p",[t._v("Every contribution is important and if you have any questions, feel free to consult our growing "),e("RouterLink",{attrs:{to:"/Community/"}},[t._v("community")]),t._v(".")],1)])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/112.177150e7.js b/assets/js/112.e119e1c0.js similarity index 99% rename from assets/js/112.177150e7.js rename to assets/js/112.e119e1c0.js index 0ecff5d0b3..bb00effb06 100644 --- a/assets/js/112.177150e7.js +++ b/assets/js/112.e119e1c0.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[112],{790: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([[112],{788: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.68079866.js b/assets/js/114.548f7a8a.js similarity index 96% rename from assets/js/114.68079866.js rename to assets/js/114.548f7a8a.js index 1fac08d4a0..63124a8640 100644 --- a/assets/js/114.68079866.js +++ b/assets/js/114.548f7a8a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[114],{798: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:"hardware-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hardware-deployment"}},[e._v("#")]),e._v(" Hardware Deployment")]),e._v(" "),t("p",[e._v("Hardware deployment is advised when you want to be in total control of your own infrastructure.")]),e._v(" "),t("p",[e._v("Those are very useful for personal use or for people who wants absolute control over their infrastructure.")]),e._v(" "),t("p",[e._v("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.")]),e._v(" "),t("p",[e._v("If you are still not sure whether you need hardware deployment, please "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("see our diagram")]),e._v(".")],1),e._v(" "),t("p",[e._v("While all hardware deployments are similar to one another, we document step by step the process on three different hardware settings.")]),e._v(" "),t("ul",[t("li",[t("RouterLink",{attrs:{to:"/Deployment/RaspberryPi4/"}},[e._v("Raspberry Pi 4")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/Deployment/Hack0/"}},[e._v("Hack0")]),e._v(" (based on Armbian and RockPro64)")],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/Deployment/LightningInABox/"}},[e._v("LightningInABox")]),e._v(" (based on Ubuntu and Gigabyte Brix GB-BXBT-1900)")],1)]),e._v(" "),t("p",[e._v("You can easily adapt those documentation on the custom hardware you prefer, we support arm32, arm64 and amd64.")]),e._v(" "),t("p",[e._v("Note that those solutions are all based on our docker deployment system.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[114],{797: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:"hardware-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hardware-deployment"}},[e._v("#")]),e._v(" Hardware Deployment")]),e._v(" "),t("p",[e._v("Hardware deployment is advised when you want to be in total control of your own infrastructure.")]),e._v(" "),t("p",[e._v("Those are very useful for personal use or for people who wants absolute control over their infrastructure.")]),e._v(" "),t("p",[e._v("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.")]),e._v(" "),t("p",[e._v("If you are still not sure whether you need hardware deployment, please "),t("RouterLink",{attrs:{to:"/Deployment/"}},[e._v("see our diagram")]),e._v(".")],1),e._v(" "),t("p",[e._v("While all hardware deployments are similar to one another, we document step by step the process on three different hardware settings.")]),e._v(" "),t("ul",[t("li",[t("RouterLink",{attrs:{to:"/Deployment/RaspberryPi4/"}},[e._v("Raspberry Pi 4")])],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/Deployment/Hack0/"}},[e._v("Hack0")]),e._v(" (based on Armbian and RockPro64)")],1),e._v(" "),t("li",[t("RouterLink",{attrs:{to:"/Deployment/LightningInABox/"}},[e._v("LightningInABox")]),e._v(" (based on Ubuntu and Gigabyte Brix GB-BXBT-1900)")],1)]),e._v(" "),t("p",[e._v("You can easily adapt those documentation on the custom hardware you prefer, we support arm32, arm64 and amd64.")]),e._v(" "),t("p",[e._v("Note that those solutions are all based on our docker deployment system.")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/115.304aa8f6.js b/assets/js/115.0fd7a0ff.js similarity index 98% rename from assets/js/115.304aa8f6.js rename to assets/js/115.0fd7a0ff.js index 5fe179f15d..389344cbf1 100644 --- a/assets/js/115.304aa8f6.js +++ b/assets/js/115.0fd7a0ff.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[115],{797: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([[115],{798: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.84033fd8.js b/assets/js/117.84033fd8.js deleted file mode 100644 index 992193661a..0000000000 --- a/assets/js/117.84033fd8.js +++ /dev/null @@ -1 +0,0 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[117],{800:function(e,t,a){"use strict";a.r(t);var n=a(17),o=Object(n.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"deploying-btcpay-lunanode-web-wizard"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#deploying-btcpay-lunanode-web-wizard"}},[e._v("#")]),e._v(" Deploying BTCPay - LunaNode Web-Wizard")]),e._v(" "),t("p",[e._v("This article explains the "),t("strong",[e._v("deployment of BTCPay Server through LunaNode Web-Wizard")]),e._v(". "),t("a",{attrs:{href:"https://www.lunanode.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("LunaNode"),t("OutboundLink")],1),e._v(" is Canadian based hosting provider that accept Bitcoin payments and requires no personal identification except for a phone number verification.")]),e._v(" "),t("p",[e._v("Their web-wizard is one of the easiest ways to "),t("strong",[e._v("deploy BTCPay Servers from a very user-friendly interface")]),e._v(". This method is highly recommended if you don't have a lot of technical knowledge. LunaNode will provide you with a generic domain for your server to get you started. If you want to set up a custom domain you will need to have some comfort with the command line interface.")]),e._v(" "),t("p",[e._v("For the price of around US$8.80 per month, you can have a "),t("strong",[e._v("self-hosted BTCpay")]),e._v(", which includes a Bitcoin full node and Lightning Network node.")]),e._v(" "),t("p",[e._v("The video below explains all the step and customization of BTCPay.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/NjslXYvp8bk/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=NjslXYvp8bk",title:"BTCPay Server - LunaNode Web-Deployment","data-id":"NjslXYvp8bk"}},[t("iframe",{attrs:{title:"BTCPay Server - LunaNode Web-Deployment","data-src":"https://www.youtube-nocookie.com/embed/NjslXYvp8bk?&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("The installation is also covered in "),t("a",{attrs:{href:"https://medium.com/@BtcpayServer/launch-btcpay-server-via-web-interface-and-deploy-full-bitcoin-node-lnd-in-less-than-a-minute-dc8bc6f06a3",target:"_blank",rel:"noopener noreferrer"}},[e._v("this article"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("The third video covers setting "),t("strong",[e._v("BTCPay up on LunaNode")]),e._v(", but also goes in-depth on setting up wallets, store and apps.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/00YCc87RwnU/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=00YCc87RwnU",title:"BTCPay Server - LunaNode Web-Deployment Video","data-id":"00YCc87RwnU"}},[t("iframe",{attrs:{title:"BTCPay Server - LunaNode Web-Deployment Video","data-src":"https://www.youtube-nocookie.com/embed/00YCc87RwnU?&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:"1-create-the-account-and-add-credits"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-the-account-and-add-credits"}},[e._v("#")]),e._v(" 1. Create the account and add credits")]),e._v(" "),t("p",[e._v("Register to LunaNode and add credits to your account.\nNote that you need to wait for the invoice confirmation.")]),e._v(" "),t("h2",{attrs:{id:"2-create-the-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-create-the-api-key"}},[e._v("#")]),e._v(" 2. Create the API Key")]),e._v(" "),t("p",[e._v("Once your account has been verified, and credits added, go to the API section and create a new API. Do not close that page and proceed to step 3.")]),e._v(" "),t("h2",{attrs:{id:"3-web-wizard-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-web-wizard-deployment"}},[e._v("#")]),e._v(" 3. Web-Wizard Deployment")]),e._v(" "),t("ol",[t("li",[e._v("Go to "),t("a",{attrs:{href:"https://launchbtcpay.lunanode.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchbtcpay.lunanode.com"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Paste the API Key and API ID created in step 2. and continue.")]),e._v(" "),t("li",[e._v("Use your own domain or automatically-generated one by LunaNode.")]),e._v(" "),t("li",[e._v("Customize the web-wizard settings according to your needs.")]),e._v(" "),t("li",[e._v("Click Launch VM. Wait 6-7 minutes for Virtual Machine deployment.")])]),e._v(" "),t("p",[e._v("If you've used a custom domain,")]),e._v(" "),t("ol",{attrs:{start:"6"}},[t("li",[e._v("SSH into the VM using either the password generated by LunaNode or your private-public key pair.")]),e._v(" "),t("li",[e._v("Run the following commands.")])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("$ "),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$ "),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("=")]),e._v("your.cool.domain\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_PROTOCOL")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("https\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("REVERSEPROXY_DEFAULT_HOST")]),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("$BTCPAY_HOST")]),e._v('"')]),e._v("\n$ "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\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 builtin class-name"}},[e._v(".")]),e._v(" btcpay-restart.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("ol",{attrs:{start:"8"}},[t("li",[e._v("Visit the domain, create an account and log in.")])]),e._v(" "),t("p",[e._v("Now you need to wait for blockchain to sync fully. Depending on the plan you used and the number of coins you added, that can take 1-7 days. If you enable CPU utilization, with Bitcoin and LND, it will take 1-2 days. There is a US$ 3 one-time charge for faster sync if you enable the CPU utilization. The sync pop-up window will disappear when your node fully syncs.")]),e._v(" "),t("h2",{attrs:{id:"4-additional-customization-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-additional-customization-optional"}},[e._v("#")]),e._v(" 4. Additional customization (optional)")]),e._v(" "),t("p",[e._v("Once your BTCPay Server instance is setup, as with any deployment method, you can add environment variables such as activating keysend and autopilot for LND as well as get access to your own transmuter.\nFor more information, visit the available "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("environment variable list")]),e._v(". This requires knowledge of how to "),t("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-ssh-into-my-btcpay-running-on-vps"}},[e._v("SSH into your server")]),e._v(".")],1)])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/117.fad63b31.js b/assets/js/117.fad63b31.js new file mode 100644 index 0000000000..8b935bfaec --- /dev/null +++ b/assets/js/117.fad63b31.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[117],{800:function(e,t,a){"use strict";a.r(t);var n=a(17),o=Object(n.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"deploying-btcpay-lunanode-web-wizard"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#deploying-btcpay-lunanode-web-wizard"}},[e._v("#")]),e._v(" Deploying BTCPay - LunaNode Web-Wizard")]),e._v(" "),t("p",[e._v("This article explains the "),t("strong",[e._v("deployment of BTCPay Server through LunaNode Web-Wizard")]),e._v(". "),t("a",{attrs:{href:"https://www.lunanode.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("LunaNode"),t("OutboundLink")],1),e._v(" is Canadian based hosting provider that accept Bitcoin payments and requires no personal identification except for a phone number verification.")]),e._v(" "),t("p",[e._v("Their web-wizard is one of the easiest ways to "),t("strong",[e._v("deploy BTCPay Servers from a very user-friendly interface")]),e._v(". This method is highly recommended if you don't have a lot of technical knowledge. LunaNode will provide you with a generic domain for your server to get you started. If you want to set up a custom domain you will need to have some comfort with the command line interface.")]),e._v(" "),t("p",[e._v("For the price of around US$15.80 per month, you can have a "),t("strong",[e._v("self-hosted BTCPay Server")]),e._v(", which includes a Bitcoin full node and Lightning Network node.")]),e._v(" "),t("p",[e._v("The video from BTC Sessions below explains all the steps on deploying and setting up BTCPay Server as well how to setup the Lightning Network in different ways.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/-GJr4XjRCPo/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=-GJr4XjRCPo",title:"How To Accept Bitcoin Payments by deploying BTCpay Server via Web-Deployment","data-id":"-GJr4XjRCPo"}},[t("iframe",{attrs:{title:"How To Accept Bitcoin Payments by deploying BTCpay Server via Web-Deployment","data-src":"https://www.youtube-nocookie.com/embed/-GJr4XjRCPo?&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("Alternatively, a short summary of just the deployment steps is also covered in "),t("a",{attrs:{href:"https://medium.com/@BtcpayServer/launch-btcpay-server-via-web-interface-and-deploy-full-bitcoin-node-lnd-in-less-than-a-minute-dc8bc6f06a3",target:"_blank",rel:"noopener noreferrer"}},[e._v("this article"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"1-create-the-account-and-add-credits"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-the-account-and-add-credits"}},[e._v("#")]),e._v(" 1. Create the account and add credits")]),e._v(" "),t("p",[e._v("Register to LunaNode and add credits to your account.\nNote that you need to wait for the invoice confirmation.")]),e._v(" "),t("h2",{attrs:{id:"2-create-the-api-key"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-create-the-api-key"}},[e._v("#")]),e._v(" 2. Create the API Key")]),e._v(" "),t("p",[e._v("Once your account has been verified, and credits added, go to the API section and create a new API. Do not close that page and proceed to step 3.")]),e._v(" "),t("h2",{attrs:{id:"3-web-wizard-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-web-wizard-deployment"}},[e._v("#")]),e._v(" 3. Web-Wizard Deployment")]),e._v(" "),t("ol",[t("li",[e._v("Go to "),t("a",{attrs:{href:"https://launchbtcpay.lunanode.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchbtcpay.lunanode.com"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Paste the API Key and API ID created in step 2. and continue.")]),e._v(" "),t("li",[e._v("Use your own domain or automatically-generated one by LunaNode.")]),e._v(" "),t("li",[e._v("Customize the web-wizard settings according to your needs.")]),e._v(" "),t("li",[e._v("Click Launch VM. Wait 6-7 minutes for Virtual Machine deployment.")])]),e._v(" "),t("p",[e._v("If you've used a custom domain,")]),e._v(" "),t("ol",{attrs:{start:"6"}},[t("li",[e._v("SSH into the VM using either the password generated by LunaNode or your private-public key pair.")]),e._v(" "),t("li",[e._v("Run the following commands.")])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("$ "),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$ "),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("=")]),e._v("your.cool.domain\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_PROTOCOL")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),e._v("https\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("REVERSEPROXY_DEFAULT_HOST")]),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("$BTCPAY_HOST")]),e._v('"')]),e._v("\n$ "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver-docker\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 builtin class-name"}},[e._v(".")]),e._v(" btcpay-restart.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),t("ol",{attrs:{start:"8"}},[t("li",[e._v("Visit the domain, create an account and log in.")])]),e._v(" "),t("p",[e._v("Now you need to wait for blockchain to sync fully. Depending on the plan you used and the number of coins you added, that can take 1-7 days. If you enable CPU utilization, with Bitcoin and LND, it will take 1-2 days. There is a US$ 3 one-time charge for faster sync if you enable the CPU utilization. The sync pop-up window will disappear when your node fully syncs.")]),e._v(" "),t("h2",{attrs:{id:"4-additional-customization-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-additional-customization-optional"}},[e._v("#")]),e._v(" 4. Additional customization (optional)")]),e._v(" "),t("p",[e._v("Once your BTCPay Server instance is setup, as with any deployment method, you can add environment variables such as activating keysend and autopilot for LND as well as get access to your own transmuter.\nFor more information, visit the available "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("environment variable list")]),e._v(". This requires knowledge of how to "),t("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-ssh-into-my-btcpay-running-on-vps"}},[e._v("SSH into your server")]),e._v(".")],1)])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/118.c8e719dc.js b/assets/js/118.1dd64d48.js similarity index 99% rename from assets/js/118.c8e719dc.js rename to assets/js/118.1dd64d48.js index a336204a53..8f7671f9a7 100644 --- a/assets/js/118.c8e719dc.js +++ b/assets/js/118.1dd64d48.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[118],{802: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([[118],{801: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/119.acf7657e.js b/assets/js/119.367fe5cf.js similarity index 99% rename from assets/js/119.acf7657e.js rename to assets/js/119.367fe5cf.js index b21e0538d7..7765a67cee 100644 --- a/assets/js/119.acf7657e.js +++ b/assets/js/119.367fe5cf.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{801: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:"extended-manual-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#extended-manual-setup"}},[t._v("#")]),t._v(" Extended Manual Setup")]),t._v(" "),s("p",[t._v("This document lists steps for "),s("strong",[t._v("manually deploying BTCPay Server")]),t._v(" and additional related components. Following these steps is likely to take a long time. A shorter and more pragmatic approach is to use a "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[t._v("docker based deployment"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("The instructions also build all the application components from source which can be an advantage for certain audit and/or security scenarios.")]),t._v(" "),s("div",{staticClass:"custom-block danger"},[s("p",{staticClass:"custom-block-title"},[t._v("DANGER")]),t._v(" "),s("h4",{attrs:{id:"not-recommended-for-production-use"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#not-recommended-for-production-use"}},[t._v("#")]),t._v(" Not recommended for production use")]),t._v(" "),s("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 "),s("RouterLink",{attrs:{to:"/Deployment/"}},[t._v("deployment options")]),t._v(".")],1),t._v(" "),s("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"}},[s("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(" "),s("h2",{attrs:{id:"installation-steps-overview"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#installation-steps-overview"}},[t._v("#")]),t._v(" Installation Steps Overview")]),t._v(" "),s("p",[t._v("The instructions in this article have been tested on Ubuntu 20.04. They should be applicable to other Linux based distributions. They are also based on all components being on the same host or virtual machine. It is possible to split the components across different hosts but these instructions don't describe that.")]),t._v(" "),s("p",[t._v("An example hostname of "),s("code",[t._v("mainnet.demo.btcpayserver.org")]),t._v(" has been used, it needs to be replaced with the hostname you are using for your BTCPay Server.")]),t._v(" "),s("h3",{attrs:{id:"security"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#security"}},[t._v("#")]),t._v(" Security")]),t._v(" "),s("p",[t._v("If you do use these instructions to install a BTCPay Server connected to the Bitcoin mainnet then at a minimum you should understand how the wallet mechanisms work. It's highly recommended to read the two articles below and ask questions if anything is not clear.")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/FAQ/Wallet/"}},[t._v("BTCPay Wallet FAQ")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/LightningNetwork/"}},[t._v("Lightning Network and BTCPay (first section)")])],1)]),t._v(" "),s("p",[t._v("As an additional aid below is a list of iptables rules and instructions which should include all the ports that need to be open. "),s("strong",[t._v("NO WARRANTY")]),t._v(". Use at your own risk, "),s("strong",[t._v("including risk of locking yourself out")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" iptables.txt\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("# Generated by iptables-save v1.6.1 on Mon May 27 18:48:11 2019\n*filter\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT # SSH\n-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT # BTCPay HTTP\n-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT # BTCPay HTTPS\n-A INPUT -p tcp -m tcp --dport 8333 -j ACCEPT # Bitcoind P2P\n-A INPUT -p tcp -m tcp --dport 9735 -j ACCEPT # Lightning P2P\n-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\nCOMMIT\n# Completed on Mon May 27 18:48:11 2019\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" iptables-restore "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" iptables.txt\n")])])]),s("p",[t._v("At this point if you are still connected to you ssh session it's a good sign. If not the rules are temporary and you can use whatever mechanism you have to remotely reboot your server and try again.")]),t._v(" "),s("p",[t._v("The rules have now been temporarily applied. To apply the rules automatically each time your server starts use the "),s("code",[t._v("iptables-persistent")]),t._v(" package.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" iptables-persistent\n")])])]),s("p",[t._v("If you subsequently change the iptables rules and want to save them across reboots use the command below.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" netfilter-persistent save\n")])])]),s("h2",{attrs:{id:"unprivileged-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#unprivileged-user"}},[t._v("#")]),t._v(" Unprivileged user")]),t._v(" "),s("p",[t._v("These instructions configure everything to run under an "),s("strong",[t._v("unprivileged user")]),t._v(" called "),s("code",[t._v("admin")]),t._v(". Create this user before proceeding:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("useradd")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-M")]),t._v(" admin "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("usermod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-L")]),t._v(" admin\n")])])]),s("h3",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("ul",[s("li",[t._v("Postgresql")]),t._v(" "),s("li",[t._v("Tor")]),t._v(" "),s("li",[t._v("NGINX and Let's Encrypt")])]),t._v(" "),s("h3",{attrs:{id:"application-components"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#application-components"}},[t._v("#")]),t._v(" Application Components")]),t._v(" "),s("ul",[s("li",[t._v("Bitcoin Core"),s("sup",[t._v("1,2")])]),t._v(" "),s("li",[t._v("NBXplorer"),s("sup",[t._v("1,2")])]),t._v(" "),s("li",[t._v("BTCPay Server"),s("sup",[t._v("1,2")])]),t._v(" "),s("li",[t._v("Lightning Network Daemon (LND)"),s("sup",[t._v("2")])]),t._v(" "),s("li",[t._v("Ride The Lightning (RTL)"),s("sup",[t._v("2")])])]),t._v(" "),s("p",[s("sup",[t._v("1")]),t._v(" The bare minimum install of a BTCPay Server only requires these items. Using a bare minimum configuration reduces the functionality: no Lightning payments, no auto-renewal of TLS certificates, less reliable data store, less capable of handling NAT and more.")]),t._v(" "),s("p",[s("sup",[t._v("2")]),t._v(" Built from source code.")]),t._v(" "),s("h2",{attrs:{id:"postgresql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#postgresql"}},[t._v("#")]),t._v(" Postgresql")]),t._v(" "),s("p",[s("strong",[t._v("Postgresql")]),t._v(" can be used by BTCPay Server in place of the default SQLite file based storage. It's also possible to use MySQL.")]),t._v(" "),s("h5",{attrs:{id:"install"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" postgresql postgresql-contrib\n")])])]),s("h5",{attrs:{id:"configuration"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#configuration"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),s("p",[t._v("Covered in BTCPay Server Configuration.")]),t._v(" "),s("h5",{attrs:{id:"check"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ psql "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\npsql "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("PostgreSQL"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.2")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Ubuntu "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.2")]),t._v("-4"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl status postgresql\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" postgres psql\npsql "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.2")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Ubuntu "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.2")]),t._v("-4"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("))")]),t._v("\nType "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"help"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" help.\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("postgres")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# \\q")]),t._v("\n")])])]),s("h2",{attrs:{id:"tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tor"}},[t._v("#")]),t._v(" Tor")]),t._v(" "),s("p",[s("strong",[t._v("Tor")]),t._v(" can be used by the following components to provide enhanced privacy and/or help with NAT traversal:")]),t._v(" "),s("ul",[s("li",[t._v("Bitcoin Core Daemon")]),t._v(" "),s("li",[t._v("Lightning Network Daemon (LND).")])]),t._v(" "),s("p",[t._v("Additional information running Bitcoin Core with Tor support can be found "),s("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h5",{attrs:{id:"install-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-2"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" tor\n")])])]),s("h5",{attrs:{id:"configuration-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#configuration-2"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" /etc/tor/torrc "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (and uncomment two lines below)")]),t._v("\nControlPort "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("9051")]),t._v("\nCookieAuthentication "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart tor\n")])])]),s("p",[t._v("Covered further in Bitcoin and Lightning Network Daemon sections.")]),t._v(" "),s("h5",{attrs:{id:"check-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-2"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ tor "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\nTor version "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.4")]),t._v(".2.7\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tlnp")]),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(" tor "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (lines below correspond to the tor control port and SOCKS proxy)")]),t._v("\ntcp "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.0")]),t._v(".0.1:9050 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1376")]),t._v("/tor\ntcp "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.0")]),t._v(".0.1:9051 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1376")]),t._v("/tor\n")])])]),s("h2",{attrs:{id:"nginx-and-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-and-lets-encrypt"}},[t._v("#")]),t._v(" NGINX and Let's Encrypt")]),t._v(" "),s("p",[s("strong",[t._v("NGINX")]),t._v(" is used as a web server to manage HTTP requests to BTCPay Server and Ride The Lightning. Paired with "),s("strong",[t._v("Let's Encrypt")]),t._v(" it allows seamless procurement and renewal of a TLS certificate for your BTCPay Server instance.")]),t._v(" "),s("p",[t._v("Let's Encrypt is a free service for procuring and renewing TLS certificates. The service comes with scripts that can be installed to automatically manage the whole process.")]),t._v(" "),s("h5",{attrs:{id:"install-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-3"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("h5",{attrs:{id:"1-install-nginx"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-nginx"}},[t._v("#")]),t._v(" 1. Install NGINX.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" nginx\n")])])]),s("h5",{attrs:{id:"2-install-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-install-lets-encrypt"}},[t._v("#")]),t._v(" 2. Install Let's Encrypt")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" certbot python3-certbot-nginx\n")])])]),s("h5",{attrs:{id:"configuration-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#configuration-3"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),s("h5",{attrs:{id:"1-lets-encrypt-tls-certificate"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-lets-encrypt-tls-certificate"}},[t._v("#")]),t._v(" 1. Let's Encrypt TLS certificate")]),t._v(" "),s("p",[t._v("You must create an A or AAAA record for "),s("strong",[t._v("")]),t._v(" that points to the IP address of your server instance.\nIf your server is behind NAT then you need to forward port 80 to your instance.")]),t._v(" "),s("p",[t._v("The "),s("strong",[t._v("certbot")]),t._v(" script works by checking for a specific file on the web server hosting the requested domain. If it can't get the file the TLS certificate won't be issued. If the initial attempt fails it will be periodically re-attempted or you can simply re-run the command.")]),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(" certbot "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--nginx")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("your domain name"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (e.g: sudo certbot --nginx -d mainnet.demo.btcpayserver.org)")]),t._v("\n")])])]),s("h5",{attrs:{id:"2-add-nginx-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-add-nginx-configuration-file"}},[t._v("#")]),t._v(" 2. Add NGINX configuration file")]),t._v(" "),s("p",[t._v("The configuration file below has been copied from the BTCPay Server docker install.")]),t._v(" "),s("p",[t._v('Search for "mainnet.demo.btcpayserver.org" and replace it with your own domain name.')]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" /etc/nginx/conf.d/default.conf\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the\n# scheme used to connect to this server\nmap $http_x_forwarded_proto $proxy_x_forwarded_proto {\n default $http_x_forwarded_proto;\n '' $scheme;\n}\n# If we receive X-Forwarded-Port, pass it through; otherwise, pass along the\n# server port the client connected to\nmap $http_x_forwarded_port $proxy_x_forwarded_port {\n default $http_x_forwarded_port;\n '' $server_port;\n}\n# If we receive Upgrade, set Connection to \"upgrade\"; otherwise, delete any\n# Connection header that may have been passed to this server\nmap $http_upgrade $proxy_connection {\n default upgrade;\n '' close;\n}\n# Apply fix for very long server names\nserver_names_hash_bucket_size 128;\n# Prevent Nginx Information Disclosure\nserver_tokens off;\n# Default dhparam\n# Set appropriate X-Forwarded-Ssl header\nmap $scheme $proxy_x_forwarded_ssl {\n default off;\n https on;\n}\n\ngzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;\nlog_format vhost '$host $remote_addr - $remote_user [$time_local] '\n '\"$request\" $status $body_bytes_sent '\n '\"$http_referer\" \"$http_user_agent\"';\naccess_log off;\n# HTTP 1.1 support\nproxy_http_version 1.1;\nproxy_buffering off;\nproxy_set_header Host $http_host;\nproxy_set_header Upgrade $http_upgrade;\nproxy_set_header Connection $proxy_connection;\nproxy_set_header X-Real-IP $remote_addr;\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\nproxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;\nproxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;\nproxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;\nproxy_buffer_size 128k;\nproxy_buffers 4 256k;\nproxy_busy_buffers_size 256k;\nclient_header_buffer_size 500k;\nlarge_client_header_buffers 4 500k;\n# Mitigate httpoxy attack (see README for details)\nproxy_set_header Proxy \"\";\n\nserver {\n server_name mainnet.demo.btcpayserver.org;\n listen 80;\n access_log /var/log/nginx/access.log vhost;\n return 301 https://$host$request_uri;\n}\nserver {\n client_max_body_size 100M;\n server_name mainnet.demo.btcpayserver.org;\n listen 443 ssl http2 ;\n access_log /var/log/nginx/access.log vhost;\n ssl_protocols TLSv1.2;\n ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';\n ssl_prefer_server_ciphers on;\n ssl_session_timeout 5m;\n ssl_session_cache shared:SSL:50m;\n ssl_session_tickets off;\n ssl_certificate /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/cert.pem;\n ssl_certificate_key /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/privkey.pem;\n ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;\n ssl_stapling on;\n ssl_stapling_verify on;\n ssl_trusted_certificate /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/fullchain.pem;\n add_header Strict-Transport-Security \"max-age=31536000\" always;\n #include /etc/nginx/vhost.d/default;\n\n # Here is the main BTCPay Server application\n location / {\n proxy_pass http://127.0.0.1:23000;\n }\n\n # Include the next two stanzas if and only if you want to expose your lightning gRPC & RPC interfaces to the internet\n location /lnrpc.Lightning {\n grpc_pass grpcs://127.0.0.1:10009;\n }\n\n location /lnd-rest/btc/ {\n rewrite ^/lnd-rest/btc/(.*) /$1 break;\n proxy_pass https://127.0.0.1:8080/;\n }\n\n # Include this stanza if you are planning to set up Ride The Lightning (RTL)\n location /rtl/ {\n proxy_pass http://127.0.0.1:3000/rtl/;\n }\n}\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart nginx\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl status nginx\n")])])]),s("p",[t._v("If there is an error message restarting "),s("code",[t._v("nginx")]),t._v(" try:")]),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" nginx\n")])])]),s("h5",{attrs:{id:"check-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-3"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("h5",{attrs:{id:"1-check-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-check-lets-encrypt"}},[t._v("#")]),t._v(" 1. Check Let's Encrypt")]),t._v(" "),s("p",[t._v("It can be a little bit tricky to get everything set up correctly for the Let's Encrypt script to work correctly. Some additional commands are listed below to help with any troubleshooting.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" certbot certificates\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nFound the following certs:\n Certificate Name: mainnet.demo.btcpayserver.org\n Domains: mainnet.demo.btcpayserver.org\n Expiry Date: "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("-08-10 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("18")]),t._v(":00:31+00:00 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("VALID: "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("79")]),t._v(" days"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Certificate Path: /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/fullchain.pem\n Private Key Path: /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/privkey.pem\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" /etc/cron.d/certbot "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (check the cron job exists)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" */12 * * * root "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("test")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-x")]),t._v(" /usr/bin/certbot "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-a")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" /run/systemd/system "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" perl "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sleep int(rand(43200))'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" certbot "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-q")]),t._v(" renew\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tail")]),t._v(" /var/log/letsencrypt/letsencrypt.log "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (check for problems)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("-05-22 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":36:36,062:DEBUG:certbot.main:certbot version: "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.31")]),t._v(".0\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" certbot renew --dry-run "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (test renewal)")]),t._v("\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n** DRY RUN: simulating "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'certbot renew'")]),t._v(" close to cert expiry\n** "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("The "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("test")]),t._v(" certificates below have not been saved."),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nCongratulations, all renewals succeeded. The following certs have been renewed:\n /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/fullchain.pem "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("success"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n** DRY RUN: simulating "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'certbot renew'")]),t._v(" close to cert expiry\n** "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("The "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("test")]),t._v(" certificates above have not been saved."),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n")])])]),s("h5",{attrs:{id:"2-check-nginx"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-check-nginx"}},[t._v("#")]),t._v(" 2. Check NGINX.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" nginx "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-v")]),t._v("\nnginx version: nginx/1.18.0 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Ubuntu"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tlnp")]),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(" nginx\ntcp "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:443 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("266275")]),t._v("/nginx: maste\ntcp "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:80 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("266275")]),t._v("/nginx: maste\ntcp6 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" :::443 :::* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("266275")]),t._v("/nginx: maste\ntcp6 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" :::80 :::* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("266275")]),t._v("/nginx: maste\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" nginx "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\n--\n-- A start job "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" unit nginx.service has finished successfully.\n--\n-- The job identifier is "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19471")]),t._v(".\n")])])]),s("p",[t._v("Attempt to open your web site in a browser. At this point it is expected that a "),s("code",[t._v("502 Bad Gateway")]),t._v("error will occur. The "),s("code",[t._v("nginx")]),t._v(" logs can be checked to verify that the connection attempt was received.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tail")]),t._v(" /var/log/nginx/access.log\nmainnet.demo.btcpayserver.org "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.0")]),t._v(".0.1 - - "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v("/Jul/2020:12:19:57 +0100"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GET / HTTP/2.0"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("502")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("552")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36"')]),t._v("\n")])])]),s("p",[t._v("If there is a problem then the "),s("code",[t._v("nginx")]),t._v(" error log can also be checked.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tail")]),t._v(" /var/log/nginx/error.log\n")])])]),s("h2",{attrs:{id:"bitcoin-core"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bitcoin-core"}},[t._v("#")]),t._v(" Bitcoin Core")]),t._v(" "),s("p",[t._v("The gateway to the Bitcoin network for BTCPay Server components.")]),t._v(" "),s("h5",{attrs:{id:"install-4"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-4"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("p",[t._v("The full instructions to "),s("strong",[t._v("build Bitcoin Core from source")]),t._v(" are "),s("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("The alternative to building from source is to download a signed binary distribution from "),s("a",{attrs:{href:"https://bitcoincore.org/en/download/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://bitcoincore.org/en/download/"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://bitcoincore.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-x86_64-linux-gnu.tar.gz\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://bitcoincore.org/bin/bitcoin-core-0.20.0/SHA256SUMS.asc\n")])])]),s("h5",{attrs:{id:"1-install-pre-requisites-and-dependencies"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-pre-requisites-and-dependencies"}},[t._v("#")]),t._v(" 1. Install Pre-requisites and dependencies")]),t._v(" "),s("p",[t._v("These instructions do not build the Bitcoin Core GUI components as they are not needed for "),s("code",[t._v("BTCPay Server")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" build-essential libtool autotools-dev automake pkg-config bsdmainutils python3\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" libevent-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev libzmq3-dev\n")])])]),s("h5",{attrs:{id:"2-download-and-build-source"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-download-and-build-source"}},[t._v("#")]),t._v(" 2. Download and Build Source")]),t._v(" "),s("p",[t._v("Before cloning the "),s("code",[t._v("Bitcoin Core")]),t._v(' repository identify the most recent stable version. One convenient way to do this is on the GitHub repository page look at the latest version under the "Releases" heading. At the time of writing the stable version is '),s("code",[t._v("0.20.0")]),t._v(". Adjust the tag in the "),s("code",[t._v("git clone")]),t._v(" command below for the stable version you want to build.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" src\n~/src$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--depth")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--branch")]),t._v(" v0.20.0 https://github.com/bitcoin/bitcoin.git\n~/src$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" bitcoin\n")])])]),s("p",[t._v("A specific version of the Berkeley DB dependency needs to be installed.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~/src/bitcoin$ ./contrib/install_db4.sh "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("pwd")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")])]),t._v("\n")])])]),s("p",[t._v("Use the "),s("code",[t._v("autoconf")]),t._v(" scripts to generate the make files and then build.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~/src/bitcoin$ ./autogen.sh\n~/src/bitcoin$ "),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("BDB_PREFIX")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/home/admin/src/bitcoin/db4'")]),t._v("\n~/src/bitcoin$ ./configure "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BDB_LIBS")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-L'),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("${BDB_PREFIX}")]),t._v('/lib -ldb_cxx-4.8"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BDB_CFLAGS")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-I'),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("${BDB_PREFIX}")]),t._v('/include"')]),t._v("\n~/src/bitcoin$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v("\n~/src/bitcoin$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v("\n~/src/bitcoin$ bitcoind "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version")]),t._v("\nBitcoin Core version v0.20.0\n")])])]),s("h5",{attrs:{id:"3-create-the-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-the-configuration-file"}},[t._v("#")]),t._v(" 3. Create the configuration file")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("configuration file")]),t._v(" is available on the Bitcoin Core repository at https://github.com/bitcoin/bitcoin/blob/master/share/examples/bitcoin.conf.")]),t._v(" "),s("p",[t._v("Create a "),s("strong",[t._v("bitcoin.conf file")]),t._v(" to suit your needs. An example file that is suitable for BTCPay Server is shown below. This configuration does not prune blocks which means as of May 2019 you will require 235 GB for the Bitcoin blockchain.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" bitcoin.conf\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("server=1 # need RPC for btcpay.\nrpcbind=127.0.0.1 # loopback is default for 0.18.0 but no harm making sure.\nwhitelist=127.0.0.1 # for nbxplorer.\nrpcallowip=127.0.0.1/32 # loopback is default but again no harm.\nzmqpubrawblock=tcp://127.0.0.1:28332 # needed for lightning.\nzmqpubrawtx=tcp://127.0.0.1:28333 # needed for lightning.\n#prune=5000 # Recommended if not enough disk space for full 600+GB blockchain.\n")])])]),s("p",[t._v("Copy the file to the directory specified in the systemd service file and assign read permissions to all users.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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/bitcoin\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" bitcoin.conf /etc/bitcoin\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /etc/bitcoin/bitcoin.conf\n")])])]),s("h5",{attrs:{id:"5-create-a-systemd-service"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#5-create-a-systemd-service"}},[t._v("#")]),t._v(" 5. Create a systemd service")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("systemd service")]),t._v(" file is available in the Bitcoin Core repository at https://raw.githubusercontent.com/bitcoin/bitcoin/master/contrib/init/bitcoind.service.")]),t._v(" "),s("p",[t._v("Edit the service file depending on your needs.")]),t._v(" "),s("p",[t._v("In the example below the "),s("strong",[t._v("User")]),t._v(" and "),s("strong",[t._v("Group")]),t._v(" have been changed to use the "),s("code",[t._v("admin")]),t._v(" user instead of requiring a new "),s("code",[t._v("bitcoin")]),t._v(" user. If the "),s("code",[t._v("admin")]),t._v(" user on your system is intended for running "),s("code",[t._v("BTCPayServer")]),t._v(" this is a reasonable choice. Otherwise consider creating a dedicated "),s("code",[t._v("bitcoin")]),t._v(" user.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" bitcoind.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("[Unit]\nDescription=Bitcoin daemon\nAfter=network.target\n\n[Service]\nExecStart=/usr/bin/bitcoind -daemon \\\n -pid=/run/bitcoind/bitcoind.pid \\\n -conf=/etc/bitcoin/bitcoin.conf \\\n -datadir=/var/lib/bitcoind\n\n# Make sure the config directory is readable by the service user\nPermissionsStartOnly=true\nExecStartPre=/bin/chgrp admin /etc/bitcoin\n\n# Process management\n####################\n\nType=forking\nPIDFile=/run/bitcoind/bitcoind.pid\nRestart=on-failure\nTimeoutStopSec=600\n\n# Run as admin:admin\nUser=admin\nGroup=admin\n\n# /run/bitcoind\nRuntimeDirectory=bitcoind\nRuntimeDirectoryMode=0710\n\n# /etc/bitcoin\nConfigurationDirectory=bitcoin\nConfigurationDirectoryMode=0710\n\n# /var/lib/bitcoind\nStateDirectory=bitcoind\nStateDirectoryMode=0710\n\n# Hardening measures\n####################\n# Provide a private /tmp and /var/tmp.\nPrivateTmp=true\n\n# Deny access to /home, /root and /run/user\nProtectHome=true\n\n# Mount /usr, /boot/ and /etc read-only for the process.\nProtectSystem=full\n\n# Disallow the process and all of its children to gain\n# new privileges through execve().\nNoNewPrivileges=true\n\n# Use a new /dev namespace only populated with API pseudo devices\n# such as /dev/null, /dev/zero and /dev/random.\nPrivateDevices=true\n\n# Deny the creation of writable and executable memory mappings.\nMemoryDenyWriteExecute=true\n\n[Install]\nWantedBy=multi-user.target\n")])])]),s("p",[t._v("Once the service file is ready complete the commands below.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" bitcoind.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" bitcoind\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl status bitcoind\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("26")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("21")]),t._v(":51:52 ubuntu systemd"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[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(": Started Bitcoin daemon.\n")])])]),s("p",[t._v("If the start attempt shows an error message check the log using:")]),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" bitcoind\n")])])]),s("h5",{attrs:{id:"6-create-a-symbolic-link-to-the-bitcoind-cookie-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#6-create-a-symbolic-link-to-the-bitcoind-cookie-file"}},[t._v("#")]),t._v(" 6. Create a symbolic link to the bitcoind cookie file")]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("bitcoin-cli")]),t._v(" client needs to authenticate to "),s("code",[t._v("bitcoind")]),t._v(" for RPC calls. The easiest way to allow this is to create a symbolic link to the cookie file.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),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(" /var/lib/bitcoind/.cookie .bitcoin/.cookie\n")])])]),s("p",[t._v("It's not vital to perform this step but if not done then every "),s("code",[t._v("bitcoin-cli")]),t._v(" command needs to specify the path to the cookie file as below.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ bitcoin-cli "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-rpccookiefile")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/var/lib/bitcoind/.cookie getblockchaininfo\n")])])]),s("h5",{attrs:{id:"check-4"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-4"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("p",[t._v("It will take Bitcoin anywhere from a few hours to a few days to synchronise the blockchain. Use any or all of the commands below to check its status.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl status bitcoind\nActive: active "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("running"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" since Sun "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-26 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("21")]),t._v(":51:52 IST"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" 2min 47s ago\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tail")]),t._v(" /var/lib/bitcoind/debug.log "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-f")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-26T20:55:09Z UpdateTip: new "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("best")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("0000000000000361c37dfb6fa905ef967b95411fa96f7dcb4eca5dd4434d9e59 "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("height")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("126732")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("version")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("0x00000001 "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("log2_work")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("62.952182")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("tx")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("560114")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("date")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2011-05-25T21:26:08Z'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("progress")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.001018")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("cache")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("43")]),t._v(".6MiB"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("291168txo"),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("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ bitcoin-cli getblockchaininfo\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"chain"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"main"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blocks"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("133015")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"headers"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("640929")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bestblockhash"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0000000000000e81b67de8d61eab726f40585bed954b1dd59f86ab10e4e55398"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"difficulty"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("876954.4935135372")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mediantime"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1308897947")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"verificationprogress"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.001530462018729556")]),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("When the "),s("code",[t._v("verificationprogress")]),t._v(" gets to either "),s("code",[t._v("0.99..")]),t._v(" or "),s("code",[t._v("1.0")]),t._v(" your node has synchronised. To double check you can also use a public block explorer such as "),s("a",{attrs:{href:"https://blockstream.info/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://blockstream.info/"),s("OutboundLink")],1),t._v(" to view the latest "),s("code",[t._v("Bitcoin")]),t._v(" block and compare it to the "),s("code",[t._v("blocks")]),t._v(" value from the "),s("code",[t._v("bitcoin-cli getblockchaininfo")]),t._v(" result.")]),t._v(" "),s("h5",{attrs:{id:"check-tor-and-bitcoin"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-tor-and-bitcoin"}},[t._v("#")]),t._v(" Check Tor and Bitcoin")]),t._v(" "),s("p",[t._v("If Tor was installed prior to the Bitcoin Daemon then it should have automatically registered and begun listening on a torv2 onion address (note support for torv3 onion addresses is in the "),s("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/issues/18884",target:"_blank",rel:"noopener noreferrer"}},[t._v("pipeline"),s("OutboundLink")],1),t._v(").")]),t._v(" "),s("p",[t._v("The easiest way to get your Bitcoin Daemon torv2 address is using "),s("code",[t._v("bitcoin-cli")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("bitcoin-cli getnetworkinfo\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("200100")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subversion"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/Satoshi:0.20.1/"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"protocolversion"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("70015")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"localservices"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0000000000000409"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"localaddresses"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[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 string"}},[t._v('"address"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"192.168.11.4"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"port"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8333")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"score"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[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 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 string"}},[t._v('"address"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"v5j6hfz4xafmeckf.onion"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"port"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8333")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"score"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("156")]),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 string"}},[t._v('"warnings"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("An alternative approach is to search the Bitcoin daemon log file:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" /var/lib/bitcoind/debug.log "),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(" onion\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("-05-23T18:24:22Z tor: Got "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("service")]),t._v(" ID 4d4al7v4hj5p7bb6, advertising "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("service")]),t._v(" 4d4al7v4hj5p7bb6.onion:8333\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("-05-23T18:24:22Z AddLocal"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("4d4al7v4hj5p7bb6.onion:8333,4"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("If there is a problem and no onion address can be found in the log file then check for Tor related error messages:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" /var/lib/bitcoind/debug.log "),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(" tor\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27T08:03:28Z torcontrol thread start\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27T08:03:28Z tor: Authentication cookie /run/tor/control.authcookie could not be opened "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("check permissions"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("The above error message can occur if the user accounts running the Bitcoin service does not have read access to the Tor authentication cookie file, "),s("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md#3-automatically-listen-on-tor",target:"_blank",rel:"noopener noreferrer"}},[t._v("more info"),s("OutboundLink")],1),t._v(". To fix this particular error add the required user account to the "),s("code",[t._v("debian-tor")]),t._v(" group.")]),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("usermod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-a")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-G")]),t._v(" debian-tor admin\n")])])]),s("p",[t._v("To change your onion address:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("rm")]),t._v(" /var/lib/bitcoind/onion_private_key\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart bitcoind\n~$ bitcoin-cli getnetworkinfo "),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(" onion\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"onion"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"address"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"qud5iwbntqxlfwjv.onion"')]),t._v(",\n")])])]),s("p",[t._v("To check your onion address from a remote host with tor installed:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ torsocks "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--shell")]),t._v("\n~$ telnet 4d4al7v4hj5p7bb6.onion "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8333")]),t._v("\n Trying "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.42")]),t._v(".42.0"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\n Connected to "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.42")]),t._v(".42.0.\n Escape character is "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'^]'")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("exit")]),t._v("\n")])])]),s("p",[t._v("To connect another "),s("code",[t._v("bitcoind")]),t._v(" instance to your new node:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ bitcoin-cli addnode "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"4d4al7v4hj5p7bb6.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"add"')]),t._v("\n~$ bitcoin-cli getaddednodeinfo\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"addednode"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"4d4al7v4hj5p7bb6.onion"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"connected"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" true,\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"addresses"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[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 string"}},[t._v('"address"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"4d4al7v4hj5p7bb6.onion:8333"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"connected"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"outbound"')]),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("h2",{attrs:{id:"nbxplorer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nbxplorer"}},[t._v("#")]),t._v(" NBXplorer")]),t._v(" "),s("p",[s("strong",[t._v("NBXplorer")]),t._v(" is a dotnet core application that monitors the Bitcoin blockchain for transactions of interest to your BTCPay Server.")]),t._v(" "),s("h5",{attrs:{id:"install-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-5"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("h5",{attrs:{id:"1-install-net-80-sdk"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-net-80-sdk"}},[t._v("#")]),t._v(" 1. Install .NET 8.0 SDK")]),t._v(" "),s("p",[s("a",{attrs:{href:"https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004-",target:"_blank",rel:"noopener noreferrer"}},[t._v("Follow the install instuctions"),s("OutboundLink")],1),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("# Add Microsoft package repository")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-O")]),t._v(" packages-microsoft-prod.deb\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" dpkg "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v(" packages-microsoft-prod.deb\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("rm")]),t._v(" packages-microsoft-prod.deb\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Install the SDK")]),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("apt-get")]),t._v(" update\n"),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" apt-transport-https\n"),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(" update\n"),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" dotnet-sdk-8.0\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("## Check")]),t._v("\ndotnet "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\n")])])]),s("h5",{attrs:{id:"2-build-nbxplorer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-build-nbxplorer"}},[t._v("#")]),t._v(" 2. Build NBXplorer")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),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(" src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" src\n~/src$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/dgarage/NBXplorer\n~/src$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" NBXplorer\n~/src/NBXplorer$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" tag "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--sort")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version:refname")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("awk")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'match($0, /^v[0-9]+\\./)'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("head")]),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("1")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v("\n~/src/NBXplorer$ ./build.sh\n")])])]),s("h5",{attrs:{id:"3-create-postgresql-database"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-postgresql-database"}},[t._v("#")]),t._v(" 3. Create Postgresql Database")]),t._v(" "),s("p",[t._v("While NBXplorer support storing data in a local database via "),s("code",[t._v("--dbtrie")]),t._v(", this is deprecated. Here how to create the appropriate database and user for NBXlporer in "),s("strong",[t._v("Postgresql")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" postgres psql\n")])])]),s("p",[t._v("Then execute")]),t._v(" "),s("div",{staticClass:"language-SQL extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("CREATE")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DATABASE")]),t._v(" nbxplorer TEMPLATE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'template0'")]),t._v(" LC_CTYPE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'C'")]),t._v(" LC_COLLATE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'C'")]),t._v(" ENCODING "),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("CREATE")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("USER")]),t._v(" nbxplorer "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WITH")]),t._v(" ENCRYPTED PASSWORD "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'urpassword'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("GRANT")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ALL")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PRIVILEGES")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ON")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DATABASE")]),t._v(" nbxplorer "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("TO")]),t._v(" nbxplorer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("Exit")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("postgres=#\\q\n")])])]),s("h5",{attrs:{id:"4-create-a-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#4-create-a-configuration-file"}},[t._v("#")]),t._v(" 4. Create a configuration file")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" nbxplorer.config\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("### Database ###\npostgres=User ID=nbxplorer;Password=urpassword;Application Name=nbxplorer;MaxPoolSize=20;Host=localhost;Port=5432;Database=nbxplorer;\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" /etc/nbxplorer\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" nbxplorer.config /etc/nbxplorer\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /etc/nbxplorer/nbxplorer.config\n")])])]),s("p",[t._v("Note: If you previously used a "),s("code",[t._v("dbtrie")]),t._v(" backend for NBXplorer, but want to switch to postgres, "),s("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/docs/Postgres-Migration.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("read this documentation"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h5",{attrs:{id:"5-create-a-systemd-service-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#5-create-a-systemd-service-2"}},[t._v("#")]),t._v(" 5. Create a systemd service")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("systemd service")]),t._v(" file is shown below. Adjust the paths, User and Group accordingly.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" nbxplorer.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("[Unit]\nDescription=NBXplorer daemon\nRequires=bitcoind.service\nAfter=bitcoind.service\n\n[Service]\nWorkingDirectory=/home/admin/src/NBXplorer\nExecStart=/home/admin/src/NBXplorer/run.sh --conf=/etc/nbxplorer/nbxplorer.config\nUser=admin\nGroup=admin\nType=simple\nPIDFile=/run/nbxplorer/nbxplorer.pid\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" nbxplorer.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" nbxplorer\n")])])]),s("h5",{attrs:{id:"check-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-5"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" nbxplorer "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":13:35 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8065")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Data Directory: /home/admin/.nbxplorer/Main\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":13:35 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8065")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Configuration File: /home/admin/.nbxplorer/Main/settings.config\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":13:35 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8065")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Network: Mainnet\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":20:04 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8065")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Events: BTC: New block 0000000000000000000c405ba5df5f5533359a4393247a0c52d26c458d4dd989 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("577449")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("If it doesn't start correctly stop the service and run the application directly to get any error messages.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop nbxplorer\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ./src/NBXplorer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" ./run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),t._v("\n")])])]),s("h5",{attrs:{id:"update"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#update"}},[t._v("#")]),t._v(" Update")]),t._v(" "),s("p",[t._v("Updating could break things. Be careful on a live 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("# Stop the service")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop nbxplorer\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Checkout and build latest tag")]),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 punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/NBXplorer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" fetch "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--tags")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" tag "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--sort")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version:refname")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("awk")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'match($0, /^v[0-9]+\\./)'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("head")]),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("1")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" ./build.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Restart the service")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start nbxplorer\n")])])]),s("h5",{attrs:{id:"migration"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#migration"}},[t._v("#")]),t._v(" Migration")]),t._v(" "),s("p",[t._v("With BTCPay Server v1.5 we "),s("a",{attrs:{href:"https://blog.btcpayserver.org/nbxplorer-postgres/",target:"_blank",rel:"noopener noreferrer"}},[t._v("improved NBXplorer by switching to Postgres"),s("OutboundLink")],1),t._v(".\nIf you are still using the DBTrie based version, please consider "),s("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/docs/Postgres-Migration.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("migrating NBXplorer"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Afterwards you need to set "),s("code",[t._v("BTCPAY_EXPLORERPOSTGRES")]),t._v(" to the same connection string as NBXplorer.")]),t._v(" "),s("h2",{attrs:{id:"btcpay-server"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server"}},[t._v("#")]),t._v(" BTCPay Server")]),t._v(" "),s("p",[t._v("Like NBXplorer the BTCPay Server application is also .NET Core. The install steps assume .NET Core was previosuly installed.")]),t._v(" "),s("h5",{attrs:{id:"install-6"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-6"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("h5",{attrs:{id:"1-build-btcpay-server"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-build-btcpay-server"}},[t._v("#")]),t._v(" 1. Build BTCPay Server")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),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(" src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" src\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Clone the repository")]),t._v("\n~/src$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/btcpayserver/btcpayserver.git\n~/src$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Checkout latest tag")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" tag "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--sort")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version:refname")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("awk")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'match($0, /^v[0-9]+\\.[0-9]+\\.[0-9]+$/)'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("head")]),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("1")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Build the app")]),t._v("\n~/src/btcpayserver$ ./build.sh\n")])])]),s("h5",{attrs:{id:"2-create-postgresql-database"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-create-postgresql-database"}},[t._v("#")]),t._v(" 2. Create Postgresql Database")]),t._v(" "),s("p",[t._v("By default BTCPay Server will store data in a single SQLite file. A more robust option is to use "),s("strong",[t._v("Postgresql")]),t._v(" which requires the appropriate database and user to exist.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" postgres psql\n")])])]),s("p",[t._v("Then execute")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("CREATE")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DATABASE")]),t._v(" btcpay TEMPLATE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'template0'")]),t._v(" LC_CTYPE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'C'")]),t._v(" LC_COLLATE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'C'")]),t._v(" ENCODING "),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("CREATE")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("USER")]),t._v(" btcpay "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WITH")]),t._v(" ENCRYPTED PASSWORD "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'urpassword'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("GRANT")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ALL")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PRIVILEGES")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ON")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DATABASE")]),t._v(" btcpay "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("TO")]),t._v(" btcpay"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("Exit")]),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 assign-left variable"}},[t._v("postgres")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("#\\q")]),t._v("\n")])])]),s("h5",{attrs:{id:"3-create-a-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-a-configuration-file"}},[t._v("#")]),t._v(" 3. Create a configuration file")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" btcpay.config\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("### Database ###\npostgres=User ID=btcpay;Password=urpassword;Application Name=btcpayserver;Host=localhost;Port=5432;Database=btcpay;\nexplorer.postgres=User ID=nbxplorer;Password=urpassword;Application Name=nbxplorer;MaxPoolSize=20;Host=localhost;Port=5432;Database=nbxplorer;\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" /etc/btcpay\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" btcpay.config /etc/btcpay\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /etc/btcpay/btcpay.config\n")])])]),s("h5",{attrs:{id:"4-create-a-systemd-service"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#4-create-a-systemd-service"}},[t._v("#")]),t._v(" 4. Create a systemd service")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("systemd service")]),t._v(" file is shown below. Adjust the paths, User and Group accordingly.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" btcpay.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('[Unit]\nDescription=BTCPay Server\nRequires=nbxplorer.service\nAfter=nbxplorer.service\n\n[Service]\nWorkingDirectory=/home/admin/src/btcpayserver\nEnvironment=BTCPAY_BTCEXTERNALRTL="server=https://mainnet.demo.btcpayserver.org/rtl;cookiefile=/var/lib/rtl/.cookie"\nExecStart=/home/admin/src/btcpayserver/run.sh --conf=/etc/btcpay/btcpay.config\nUser=admin\nGroup=admin\nType=simple\nPIDFile=/run/btcpayserver/btcpayserver.pid\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n')])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" btcpay.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" btcpay\n")])])]),s("h5",{attrs:{id:"check-6"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-6"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" btcpay "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\n-- The start-up result is RESULT.\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(":01:25 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10263")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Data Directory: /home/admin/.btcpayserver/Main\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(":01:25 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10263")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Configuration File: /etc/btcpay/btcpay.config\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(":01:25 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10263")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Network: Mainnet\n")])])]),s("p",[t._v("If it doesn't start correctly stop the service and run the application directly to get any error messages.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop btcpay\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/btcpayserver"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" ./run.sh "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--conf")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/etc/btcpay/btcpay.config"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("An example of checking information in the database.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" postgres psql\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("postgres")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# \\connect btcpay;")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("btcpay")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# \\dt")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("btcpay")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v('# select * from "Invoices";')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("btcpay")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# \\q")]),t._v("\n")])])]),s("p",[t._v('Attempting to open your BTCPay Server domain in a browser now should show the "Welcome to your BTCPay Server" page.\nIf you are not using a Lightning Node this is the end of the install.')]),t._v(" "),s("h5",{attrs:{id:"update-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#update-2"}},[t._v("#")]),t._v(" Update")]),t._v(" "),s("p",[t._v("Updating could break things. Be careful on a live 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("# Stop the service")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop btcpay\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Checkout and build latest tag")]),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 punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/btcpayserver"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" fetch "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--tags")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" tag "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--sort")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version:refname")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("awk")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'match($0, /^v[0-9]+\\.[0-9]+\\.[0-9]+$/)'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("head")]),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("1")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" ./build.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Restart the service")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start btcpay\n")])])]),s("h2",{attrs:{id:"lightning-network-daemon-lnd"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-daemon-lnd"}},[t._v("#")]),t._v(" Lightning Network Daemon (LND)")]),t._v(" "),s("h5",{attrs:{id:"install-7"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-7"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("p",[t._v("Full "),s("a",{attrs:{href:"https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("instructions"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h5",{attrs:{id:"1-install-go"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-go"}},[t._v("#")]),t._v(" 1. Install Go")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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 function"}},[t._v("make")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://dl.google.com/go/go1.13.linux-amd64.tar.gz\n~$ sha256sum go1.13.linux-amd64.tar.gz\n68a2297eb099d1a76097905a2ce334e3155004ec08cdea85f24527be3c48e856 go1.13.linux-amd64.tar.gz\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tar")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-C")]),t._v(" /usr/local "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-xzf")]),t._v(" go1.13.linux-amd64.tar.gz\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"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("PATH")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("$PATH")]),t._v(":/usr/local/go/bin\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("GOPATH")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=~")]),t._v("/gocode\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"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("PATH")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("$PATH")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin\n~$ go version\ngo version go1.13 linux/amd64\n")])])]),s("h5",{attrs:{id:"2-build-and-install-lnd"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-build-and-install-lnd"}},[t._v("#")]),t._v(" 2. Build and install LND")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),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(" src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" src\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/lightningnetwork/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# installs to a directory in $GOPATH/bin")]),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("cp")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin/lnd "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin/lncli /usr/bin\n~$ lnd "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\nlnd version "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.10")]),t._v(".99-beta "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("commit")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("clock/v1.0.0-229-ge64e71d86dc1ac716c30a80f85a22e8fb544697f\n")])])]),s("h5",{attrs:{id:"3-create-a-symbolic-link-to-the-bitcoin-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-a-symbolic-link-to-the-bitcoin-configuration-file"}},[t._v("#")]),t._v(" 3. Create a symbolic link to the Bitcoin configuration file")]),t._v(" "),s("p",[t._v("lnd looks for bitcoin.conf in a specific location to get necessary RPC and zeromq details.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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(" ~/.bitcoin/bitcoin.conf /etc/bitcoin/bitcoin.conf\n")])])]),s("h5",{attrs:{id:"4-create-a-configuration-file-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#4-create-a-configuration-file-2"}},[t._v("#")]),t._v(" 4. Create a configuration file")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" lnd.conf\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("[Application Options]\ndatadir=/var/lib/lnd/data\ntlscertpath=/var/lib/lnd/tls.cert\ntlskeypath=/var/lib/lnd/tls.key\nlogdir=/var/lib/lnd/logs\nmaxlogfiles=3\nmaxlogfilesize=10\n#externalip=1.1.1.1 # change to your public IP address if required.\nalias=i_luv_btcpay\nlisten=0.0.0.0:9735\n\n[Bitcoin]\nbitcoin.active=1\nbitcoin.node=bitcoind\nbitcoin.mainnet=true\n\n[tor]\ntor.active=true\ntor.v3=true\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chown")]),t._v(" admin:admin "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-R")]),t._v(" /var/lib/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" lnd.conf /etc/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /etc/lnd/lnd.conf\n")])])]),s("h5",{attrs:{id:"5-create-a-systemd-service-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#5-create-a-systemd-service-3"}},[t._v("#")]),t._v(" 5. Create a systemd service")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("systemd service")]),t._v(" file is shown below. Adjust the paths, User and Group accordingly.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" lnd.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("[Unit]\nDescription=LND Lightning Network Daemon\nRequires=bitcoind.service\nAfter=bitcoind.service\n\n[Service]\nExecStart=/usr/bin/lnd --configfile=/etc/lnd/lnd.conf\nExecStop=/usr/bin/lncli --lnddir /var/lib/lnd stop\nPIDFile= /run/lnd/lnd.pid\n\nUser=admin\nGroup=admin\n\nType=simple\nKillMode=process\nTimeoutStartSec=60\nTimeoutStopSec=60\nRestart=always\nRestartSec=60\n\n[Install]\nWantedBy=multi-user.target\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" lnd.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" lnd\n")])])]),s("h5",{attrs:{id:"configuration-4"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#configuration-4"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),s("div",{staticClass:"custom-block danger"},[s("p",{staticClass:"custom-block-title"},[t._v("DANGER")]),t._v(" "),s("p",[s("strong",[t._v("Running a Bitcoin Lightning daemon requires a hot wallet on your BTCPay Server.")])])]),t._v(" "),s("p",[t._v("With Bitcoin the protocol has evolved and deterministic key derivation means the keys for your wallet can be kept in a different location to the BTCPay Server. Lightning daemons do not have this facility. Any Bitcoins committed or received in your lightning channels are controlled by private keys that are on your BTCPay Server.")]),t._v(" "),s("h5",{attrs:{id:"1-create-a-symbolic-link-to-the-lnd-data-directory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-create-a-symbolic-link-to-the-lnd-data-directory"}},[t._v("#")]),t._v(" 1. Create a symbolic link to the lnd data directory")]),t._v(" "),s("p",[t._v("The install steps above use "),s("code",[t._v("/var/lib/lnd")]),t._v(" as the data directory rather than the default "),s("code",[t._v("/home/user/.lnd")]),t._v(". In order to save typing when using the "),s("code",[t._v("lncli")]),t._v(" client it's useful to add a symbolic directory link.")]),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(" /var/lib/lnd .lnd\n")])])]),s("h5",{attrs:{id:"2-create-lightning-wallet"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-create-lightning-wallet"}},[t._v("#")]),t._v(" 2. Create Lightning wallet")]),t._v(" "),s("p",[t._v("The first time the lnd is started a new wallet must be created and the backup seed safely recorded (if someone else gets your seed they can steal your funds so keep it safe).")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli create\nInput wallet password:\nConfirm password:\n\nDo you have an existing cipher seed mnemonic you want to use? "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Enter y/n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(": n\n\nYour cipher seed can optionally be encrypted.\nInput your passphrase "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" you wish to encrypt it "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("or press enter to proceed without a cipher seed passphrase"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(":\n\nGenerating fresh cipher seed"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\n\n"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("\n---------------BEGIN LND CIPHER SEED---------------\n "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(". above "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(". catch "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),t._v(". start "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v(". tape\n "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),t._v(". sound "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),t._v(". friend "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v(". water "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),t._v(". royal\n "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("9")]),t._v(". solid "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v(". poet "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("11")]),t._v(". wisdom "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),t._v(". match\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("13")]),t._v(". virtual "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("14")]),t._v(". zero "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(". slender "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16")]),t._v(". thrive\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("17")]),t._v(". idle "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("18")]),t._v(". catch "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(". robot "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(". clay\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("21")]),t._v(". resemble "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("22")]),t._v(". angry "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(". work "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("24")]),t._v(". "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("until")]),t._v("\n---------------END LND CIPHER SEED-----------------\n\n"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("\n\nlnd successfully initialized"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("\n")])])]),s("p",[t._v("Note that if the symbolic directory link from the previous step "),s("strong",[t._v("was not")]),t._v(" created the command is:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("lncli "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--lnddir")]),t._v(" /var/lib/lnd create\n")])])]),s("h5",{attrs:{id:"3-unlock-the-wallet"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-unlock-the-wallet"}},[t._v("#")]),t._v(" 3. Unlock the wallet")]),t._v(" "),s("p",[t._v("Every time lnd is restarted the wallet "),s("strong",[t._v("needs to be unlocked")]),t._v(". This is not ideal for a BTCPay Server that can is designed to run unattended but Lighting is still in its infancy.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli unlock\n")])])]),s("h5",{attrs:{id:"check-7"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-7"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli getinfo\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0.10.99-beta commit=clock/v1.0.0-229-ge64e71d86dc1ac716c30a80f85a22e8fb544697f"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"commit_hash"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e64e71d86dc1ac716c30a80f85a22e8fb544697f"')]),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("Check the service:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" lnd "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":46:29 ubuntu lnd"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("654474")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":46:29.909 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("INF"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" DISC: Attempting to bootstrap with: BOLT-0010 DNS Seed: "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("nodes.lightning.directory soa.nodes.lightning.directory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("lseed.bitcoinstats.com "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":49:41 ubuntu lnd"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("654474")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":49:41.939 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("INF"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" DISC: Attempting to bootstrap with: Authenticated Channel Graph\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":49:41 ubuntu lnd"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("654474")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":49:41.940 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("ERR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" SRVR: Unable to retrieve initial bootstrap peers: no addresses found\n")])])]),s("p",[t._v("The "),s("strong",[t._v("Lightning Node Connection String")]),t._v(" to use with "),s("code",[t._v("BTCPay Server")]),t._v(" is:")]),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 assign-left variable"}},[t._v("type")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("lnd-rest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("server")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("https://127.0.0.1:8080/"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("macaroonfilepath")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/home/admin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("allowinsecure")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("true\n")])])]),s("h5",{attrs:{id:"add-lnd-as-internal-node"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#add-lnd-as-internal-node"}},[t._v("#")]),t._v(" Add LND as internal node")]),t._v(" "),s("p",[t._v("To add LND as internal node you have to edit the "),s("a",{attrs:{href:"#3-create-a-configuration-file"}},[t._v("btcpay.config file")]),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 builtin class-name"}},[t._v("cd")]),t._v(" /etc/btcpay\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" btcpay.config\n")])])]),s("p",[t._v("Right below the database part, add the "),s("code",[t._v("BTC.lightning")]),t._v(" setting:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("### Lightning ###\nBTC.lightning=type=lnd-rest;server=https://127.0.0.1:8080/;macaroonfilepath=/home/admin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon;allowinsecure=true\n")])])]),s("p",[t._v('See the "Use custom node" view on the Lightning node connection setting screen in BTCPay Server for details on the connection string.')]),t._v(" "),s("p",[t._v("You need to restart BTCPay Server for the settings update to take effect:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart btcpay\n")])])]),s("h5",{attrs:{id:"check-tor-and-lnd"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-tor-and-lnd"}},[t._v("#")]),t._v(" Check Tor and LND")]),t._v(" "),s("p",[t._v("As with the Bitcoin daemon if Tor is installed and the configuration file enables it (the one above does) then "),s("code",[t._v("lnd")]),t._v(" will automatically register an onion address. In lnd's case torv3 addresses are supported.")]),t._v(" "),s("p",[t._v("The torv3 onion address below is a lot longer than the torv2 one from the Bitcoin daemon section (16 characters compared to 56 characters).")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli getinfo "),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(" onion\n"),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"029b0e3c05595074afcffdca0fb22fb68a95a9c4698dd20962f647de4891eceabd@liyuvwbbycrvvuzcrsd5rq7svwckabejlsymcxiwzkj3smvlwcsqpjyd.onion:9735"')]),t._v("\n")])])]),s("p",[t._v("The Tor address created by lnd can be used to connect to other Lighting peers on the Tor network. The Tor address can work in parallel with an IPv4 or IPv6 address. To register one of those make sure the "),s("code",[t._v("externalip")]),t._v(" is set in the lnd configuration file.")]),t._v(" "),s("h5",{attrs:{id:"update-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#update-3"}},[t._v("#")]),t._v(" Update")]),t._v(" "),s("p",[t._v("Updating could break things. Be careful on a live system.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop lnd\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"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("PATH")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("$PATH")]),t._v(":/usr/local/go/bin\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("GOPATH")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=~")]),t._v("/gocode\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"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("PATH")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("$PATH")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/src/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" pull\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# installs to a directory in $GOPATH/bin")]),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("cp")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin/lnd "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin/lncli /usr/bin\n~$ lnd "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\nlnd version "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.10")]),t._v(".99-beta "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("commit")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("clock/v1.0.0-229-ge64e71d86dc1ac716c30a80f85a22e8fb544697f\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start lnd\n")])])]),s("p",[t._v("After the daemon has been restarted the wallet needs to be unlocked:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli unlock\n")])])]),s("p",[t._v("If "),s("code",[t._v("Ride The Lightning (RTL)")]),t._v(" is installed, see next section, it may have stopped when lnd disappeared so it will also need to be restarted.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start rtl\n")])])]),s("h2",{attrs:{id:"ride-the-lightning-rtl"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ride-the-lightning-rtl"}},[t._v("#")]),t._v(" Ride The Lightning (RTL)")]),t._v(" "),s("p",[s("strong",[t._v("Ride the Lightning")]),t._v(" is a Node.js application to manage your Lightning peers, channels, wallet etc.")]),t._v(" "),s("p",[t._v("The advantage of the work that has gone into BTCPay Server is that the RTL web page can be controlled and accessed in the same manner as the BTCPay site.")]),t._v(" "),s("h5",{attrs:{id:"install-8"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-8"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("h5",{attrs:{id:"1-install-dependencies"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-dependencies"}},[t._v("#")]),t._v(" 1. Install dependencies")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" nodejs build-essential "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v("\n")])])]),s("h5",{attrs:{id:"2-build-rtl"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-build-rtl"}},[t._v("#")]),t._v(" 2. Build RTL")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/src\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/Ride-The-Lightning/RTL.git\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" RTL\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),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("--only")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("prod\n")])])]),s("h5",{attrs:{id:"3-create-a-configuration-file-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-a-configuration-file-2"}},[t._v("#")]),t._v(" 3. Create a configuration file")]),t._v(" "),s("p",[t._v("Copy the sample config file from "),s("code",[t._v("sample-RTL-Config.json")]),t._v(" and adjust accordingly. An example that works with the rest of the instructions in this document is shown below.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" src/RTL/sample-RTL-Config.json RTL-Config.json\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" RTL-Config.json\n")])])]),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('"port"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3000"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"defaultNodeIndex"')]),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('"SSO"')]),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('"rtlSSO"')]),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('"rtlCookiePath"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/var/lib/rtl/.cookie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" # Needs to match the value in BTCPay systemd settings.\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"logoutRedirectLink"')]),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/login"')]),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('"nodes"')]),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('"index"')]),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('"lnNode"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Node 1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lnImplementation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LND"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Authentication"')]),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('"macaroonPath"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/var/lib/lnd/data/chain/bitcoin/mainnet"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"configPath"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/etc/lnd/lnd.conf"')]),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('"Settings"')]),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('"userPersona"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MERCHANT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"themeMode"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DAY"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"themeColor"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PURPLE"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"channelBackupPath"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/home/admin/rtl/backup/node-1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enableLogging"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lnServerUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:8080/v1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"swapServerUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:8081/v1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"fiatConversion"')]),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 "),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("Note that RTL has different behaviour and requirements compared to the other services documented in theses instructions, specifically:")]),t._v(" "),s("ol",[s("li",[t._v("The configuration file needs to exist in RTL's data directory,")]),t._v(" "),s("li",[t._v("The RTL process may write update to the configuration file.")])]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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/rtl\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" ~/RTL-Config.json /var/lib/rtl\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chown")]),t._v(" admin:admin "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-R")]),t._v(" /var/lib/rtl\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /var/lib/rtl/RTL-Config.json\n")])])]),s("h5",{attrs:{id:"4-create-a-systemd-service-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#4-create-a-systemd-service-2"}},[t._v("#")]),t._v(" 4. Create a systemd service")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" rtl.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('[Unit]\nDescription=Ride The Lightning\nRequires=lnd.service\nAfter=lnd.service\n\n[Service]\nEnvironment="RTL_CONFIG_PATH=/var/lib/rtl"\nWorkingDirectory=/var/lib/rtl\nExecStart=/usr/bin/node /home/admin/src/RTL/rtl\nUser=admin\nGroup=admin\nType=simple\nPIDFile=/run/rtl/rtl.pid\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n')])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" rtl.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" rtl\n")])])]),s("h5",{attrs:{id:"check-8"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-8"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("p",[t._v("Check the service:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" rtl "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("18")]),t._v(":27:52 ubuntu node"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("988638")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": Server is up and running, please "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),t._v(" the UI at http://localhost:3000\n")])])]),s("p",[t._v("If it doesn't start correctly stop the service and run the application directly to get any error messages.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop rtl\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("RTL_CONFIG_PATH")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/var/lib/rtl"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/RTL"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("node")]),t._v(" rtl"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nServer is up and running, please "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),t._v(" the UI at http://localhost:3000\n")])])]),s("p",[t._v("From the "),s("code",[t._v("BTCPay Server")]),t._v(" web page the "),s("code",[t._v("RTL")]),t._v(" interface should be accessible from "),s("code",[t._v("Server Settings->Services")]),t._v(' under the "Crypto services exposed by your server" heading.')]),t._v(" "),s("h5",{attrs:{id:"update-4"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#update-4"}},[t._v("#")]),t._v(" Update")]),t._v(" "),s("p",[t._v("Updating could break things. Be careful on a live system.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop rtl\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/RTL"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" pull"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start rtl\n")])])]),s("h2",{attrs:{id:"the-end"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#the-end"}},[t._v("#")]),t._v(" The End")]),t._v(" "),s("h3",{attrs:{id:"questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#questions"}},[t._v("#")]),t._v(" Questions")]),t._v(" "),s("p",[t._v("Join the "),s("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("community chat"),s("OutboundLink")],1),t._v(" on Mattermost by downloading "),s("a",{attrs:{href:"https://mattermost.com/download/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Mattermost app"),s("OutboundLink")],1),t._v(", or on "),s("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[t._v("Telegram"),s("OutboundLink")],1),t._v(" in case you need further help or help or want to hang around with like-minded people.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{802: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:"extended-manual-setup"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#extended-manual-setup"}},[t._v("#")]),t._v(" Extended Manual Setup")]),t._v(" "),s("p",[t._v("This document lists steps for "),s("strong",[t._v("manually deploying BTCPay Server")]),t._v(" and additional related components. Following these steps is likely to take a long time. A shorter and more pragmatic approach is to use a "),s("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[t._v("docker based deployment"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("The instructions also build all the application components from source which can be an advantage for certain audit and/or security scenarios.")]),t._v(" "),s("div",{staticClass:"custom-block danger"},[s("p",{staticClass:"custom-block-title"},[t._v("DANGER")]),t._v(" "),s("h4",{attrs:{id:"not-recommended-for-production-use"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#not-recommended-for-production-use"}},[t._v("#")]),t._v(" Not recommended for production use")]),t._v(" "),s("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 "),s("RouterLink",{attrs:{to:"/Deployment/"}},[t._v("deployment options")]),t._v(".")],1),t._v(" "),s("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"}},[s("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(" "),s("h2",{attrs:{id:"installation-steps-overview"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#installation-steps-overview"}},[t._v("#")]),t._v(" Installation Steps Overview")]),t._v(" "),s("p",[t._v("The instructions in this article have been tested on Ubuntu 20.04. They should be applicable to other Linux based distributions. They are also based on all components being on the same host or virtual machine. It is possible to split the components across different hosts but these instructions don't describe that.")]),t._v(" "),s("p",[t._v("An example hostname of "),s("code",[t._v("mainnet.demo.btcpayserver.org")]),t._v(" has been used, it needs to be replaced with the hostname you are using for your BTCPay Server.")]),t._v(" "),s("h3",{attrs:{id:"security"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#security"}},[t._v("#")]),t._v(" Security")]),t._v(" "),s("p",[t._v("If you do use these instructions to install a BTCPay Server connected to the Bitcoin mainnet then at a minimum you should understand how the wallet mechanisms work. It's highly recommended to read the two articles below and ask questions if anything is not clear.")]),t._v(" "),s("ul",[s("li",[s("RouterLink",{attrs:{to:"/FAQ/Wallet/"}},[t._v("BTCPay Wallet FAQ")])],1),t._v(" "),s("li",[s("RouterLink",{attrs:{to:"/LightningNetwork/"}},[t._v("Lightning Network and BTCPay (first section)")])],1)]),t._v(" "),s("p",[t._v("As an additional aid below is a list of iptables rules and instructions which should include all the ports that need to be open. "),s("strong",[t._v("NO WARRANTY")]),t._v(". Use at your own risk, "),s("strong",[t._v("including risk of locking yourself out")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" iptables.txt\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("# Generated by iptables-save v1.6.1 on Mon May 27 18:48:11 2019\n*filter\n:INPUT ACCEPT [0:0]\n:FORWARD ACCEPT [0:0]\n:OUTPUT ACCEPT [0:0]\n-A INPUT -i lo -j ACCEPT\n-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT # SSH\n-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT # BTCPay HTTP\n-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT # BTCPay HTTPS\n-A INPUT -p tcp -m tcp --dport 8333 -j ACCEPT # Bitcoind P2P\n-A INPUT -p tcp -m tcp --dport 9735 -j ACCEPT # Lightning P2P\n-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT\nCOMMIT\n# Completed on Mon May 27 18:48:11 2019\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" iptables-restore "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v(" iptables.txt\n")])])]),s("p",[t._v("At this point if you are still connected to you ssh session it's a good sign. If not the rules are temporary and you can use whatever mechanism you have to remotely reboot your server and try again.")]),t._v(" "),s("p",[t._v("The rules have now been temporarily applied. To apply the rules automatically each time your server starts use the "),s("code",[t._v("iptables-persistent")]),t._v(" package.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" iptables-persistent\n")])])]),s("p",[t._v("If you subsequently change the iptables rules and want to save them across reboots use the command below.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" netfilter-persistent save\n")])])]),s("h2",{attrs:{id:"unprivileged-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#unprivileged-user"}},[t._v("#")]),t._v(" Unprivileged user")]),t._v(" "),s("p",[t._v("These instructions configure everything to run under an "),s("strong",[t._v("unprivileged user")]),t._v(" called "),s("code",[t._v("admin")]),t._v(". Create this user before proceeding:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("useradd")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-M")]),t._v(" admin "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("usermod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-L")]),t._v(" admin\n")])])]),s("h3",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[t._v("#")]),t._v(" Prerequisites")]),t._v(" "),s("ul",[s("li",[t._v("Postgresql")]),t._v(" "),s("li",[t._v("Tor")]),t._v(" "),s("li",[t._v("NGINX and Let's Encrypt")])]),t._v(" "),s("h3",{attrs:{id:"application-components"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#application-components"}},[t._v("#")]),t._v(" Application Components")]),t._v(" "),s("ul",[s("li",[t._v("Bitcoin Core"),s("sup",[t._v("1,2")])]),t._v(" "),s("li",[t._v("NBXplorer"),s("sup",[t._v("1,2")])]),t._v(" "),s("li",[t._v("BTCPay Server"),s("sup",[t._v("1,2")])]),t._v(" "),s("li",[t._v("Lightning Network Daemon (LND)"),s("sup",[t._v("2")])]),t._v(" "),s("li",[t._v("Ride The Lightning (RTL)"),s("sup",[t._v("2")])])]),t._v(" "),s("p",[s("sup",[t._v("1")]),t._v(" The bare minimum install of a BTCPay Server only requires these items. Using a bare minimum configuration reduces the functionality: no Lightning payments, no auto-renewal of TLS certificates, less reliable data store, less capable of handling NAT and more.")]),t._v(" "),s("p",[s("sup",[t._v("2")]),t._v(" Built from source code.")]),t._v(" "),s("h2",{attrs:{id:"postgresql"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#postgresql"}},[t._v("#")]),t._v(" Postgresql")]),t._v(" "),s("p",[s("strong",[t._v("Postgresql")]),t._v(" can be used by BTCPay Server in place of the default SQLite file based storage. It's also possible to use MySQL.")]),t._v(" "),s("h5",{attrs:{id:"install"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" postgresql postgresql-contrib\n")])])]),s("h5",{attrs:{id:"configuration"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#configuration"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),s("p",[t._v("Covered in BTCPay Server Configuration.")]),t._v(" "),s("h5",{attrs:{id:"check"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ psql "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\npsql "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("PostgreSQL"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.2")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Ubuntu "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.2")]),t._v("-4"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl status postgresql\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" postgres psql\npsql "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.2")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Ubuntu "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12.2")]),t._v("-4"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("))")]),t._v("\nType "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"help"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" help.\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("postgres")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# \\q")]),t._v("\n")])])]),s("h2",{attrs:{id:"tor"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#tor"}},[t._v("#")]),t._v(" Tor")]),t._v(" "),s("p",[s("strong",[t._v("Tor")]),t._v(" can be used by the following components to provide enhanced privacy and/or help with NAT traversal:")]),t._v(" "),s("ul",[s("li",[t._v("Bitcoin Core Daemon")]),t._v(" "),s("li",[t._v("Lightning Network Daemon (LND).")])]),t._v(" "),s("p",[t._v("Additional information running Bitcoin Core with Tor support can be found "),s("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h5",{attrs:{id:"install-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-2"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" tor\n")])])]),s("h5",{attrs:{id:"configuration-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#configuration-2"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" /etc/tor/torrc "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (and uncomment two lines below)")]),t._v("\nControlPort "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("9051")]),t._v("\nCookieAuthentication "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart tor\n")])])]),s("p",[t._v("Covered further in Bitcoin and Lightning Network Daemon sections.")]),t._v(" "),s("h5",{attrs:{id:"check-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-2"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ tor "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\nTor version "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.4")]),t._v(".2.7\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tlnp")]),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(" tor "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (lines below correspond to the tor control port and SOCKS proxy)")]),t._v("\ntcp "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.0")]),t._v(".0.1:9050 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1376")]),t._v("/tor\ntcp "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.0")]),t._v(".0.1:9051 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1376")]),t._v("/tor\n")])])]),s("h2",{attrs:{id:"nginx-and-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nginx-and-lets-encrypt"}},[t._v("#")]),t._v(" NGINX and Let's Encrypt")]),t._v(" "),s("p",[s("strong",[t._v("NGINX")]),t._v(" is used as a web server to manage HTTP requests to BTCPay Server and Ride The Lightning. Paired with "),s("strong",[t._v("Let's Encrypt")]),t._v(" it allows seamless procurement and renewal of a TLS certificate for your BTCPay Server instance.")]),t._v(" "),s("p",[t._v("Let's Encrypt is a free service for procuring and renewing TLS certificates. The service comes with scripts that can be installed to automatically manage the whole process.")]),t._v(" "),s("h5",{attrs:{id:"install-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-3"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("h5",{attrs:{id:"1-install-nginx"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-nginx"}},[t._v("#")]),t._v(" 1. Install NGINX.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" nginx\n")])])]),s("h5",{attrs:{id:"2-install-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-install-lets-encrypt"}},[t._v("#")]),t._v(" 2. Install Let's Encrypt")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" certbot python3-certbot-nginx\n")])])]),s("h5",{attrs:{id:"configuration-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#configuration-3"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),s("h5",{attrs:{id:"1-lets-encrypt-tls-certificate"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-lets-encrypt-tls-certificate"}},[t._v("#")]),t._v(" 1. Let's Encrypt TLS certificate")]),t._v(" "),s("p",[t._v("You must create an A or AAAA record for "),s("strong",[t._v("")]),t._v(" that points to the IP address of your server instance.\nIf your server is behind NAT then you need to forward port 80 to your instance.")]),t._v(" "),s("p",[t._v("The "),s("strong",[t._v("certbot")]),t._v(" script works by checking for a specific file on the web server hosting the requested domain. If it can't get the file the TLS certificate won't be issued. If the initial attempt fails it will be periodically re-attempted or you can simply re-run the command.")]),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(" certbot "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--nginx")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<")]),t._v("your domain name"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (e.g: sudo certbot --nginx -d mainnet.demo.btcpayserver.org)")]),t._v("\n")])])]),s("h5",{attrs:{id:"2-add-nginx-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-add-nginx-configuration-file"}},[t._v("#")]),t._v(" 2. Add NGINX configuration file")]),t._v(" "),s("p",[t._v("The configuration file below has been copied from the BTCPay Server docker install.")]),t._v(" "),s("p",[t._v('Search for "mainnet.demo.btcpayserver.org" and replace it with your own domain name.')]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" /etc/nginx/conf.d/default.conf\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("# If we receive X-Forwarded-Proto, pass it through; otherwise, pass along the\n# scheme used to connect to this server\nmap $http_x_forwarded_proto $proxy_x_forwarded_proto {\n default $http_x_forwarded_proto;\n '' $scheme;\n}\n# If we receive X-Forwarded-Port, pass it through; otherwise, pass along the\n# server port the client connected to\nmap $http_x_forwarded_port $proxy_x_forwarded_port {\n default $http_x_forwarded_port;\n '' $server_port;\n}\n# If we receive Upgrade, set Connection to \"upgrade\"; otherwise, delete any\n# Connection header that may have been passed to this server\nmap $http_upgrade $proxy_connection {\n default upgrade;\n '' close;\n}\n# Apply fix for very long server names\nserver_names_hash_bucket_size 128;\n# Prevent Nginx Information Disclosure\nserver_tokens off;\n# Default dhparam\n# Set appropriate X-Forwarded-Ssl header\nmap $scheme $proxy_x_forwarded_ssl {\n default off;\n https on;\n}\n\ngzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;\nlog_format vhost '$host $remote_addr - $remote_user [$time_local] '\n '\"$request\" $status $body_bytes_sent '\n '\"$http_referer\" \"$http_user_agent\"';\naccess_log off;\n# HTTP 1.1 support\nproxy_http_version 1.1;\nproxy_buffering off;\nproxy_set_header Host $http_host;\nproxy_set_header Upgrade $http_upgrade;\nproxy_set_header Connection $proxy_connection;\nproxy_set_header X-Real-IP $remote_addr;\nproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\nproxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;\nproxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;\nproxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;\nproxy_buffer_size 128k;\nproxy_buffers 4 256k;\nproxy_busy_buffers_size 256k;\nclient_header_buffer_size 500k;\nlarge_client_header_buffers 4 500k;\n# Mitigate httpoxy attack (see README for details)\nproxy_set_header Proxy \"\";\n\nserver {\n server_name mainnet.demo.btcpayserver.org;\n listen 80;\n access_log /var/log/nginx/access.log vhost;\n return 301 https://$host$request_uri;\n}\nserver {\n client_max_body_size 100M;\n server_name mainnet.demo.btcpayserver.org;\n listen 443 ssl http2 ;\n access_log /var/log/nginx/access.log vhost;\n ssl_protocols TLSv1.2;\n ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';\n ssl_prefer_server_ciphers on;\n ssl_session_timeout 5m;\n ssl_session_cache shared:SSL:50m;\n ssl_session_tickets off;\n ssl_certificate /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/cert.pem;\n ssl_certificate_key /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/privkey.pem;\n ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;\n ssl_stapling on;\n ssl_stapling_verify on;\n ssl_trusted_certificate /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/fullchain.pem;\n add_header Strict-Transport-Security \"max-age=31536000\" always;\n #include /etc/nginx/vhost.d/default;\n\n # Here is the main BTCPay Server application\n location / {\n proxy_pass http://127.0.0.1:23000;\n }\n\n # Include the next two stanzas if and only if you want to expose your lightning gRPC & RPC interfaces to the internet\n location /lnrpc.Lightning {\n grpc_pass grpcs://127.0.0.1:10009;\n }\n\n location /lnd-rest/btc/ {\n rewrite ^/lnd-rest/btc/(.*) /$1 break;\n proxy_pass https://127.0.0.1:8080/;\n }\n\n # Include this stanza if you are planning to set up Ride The Lightning (RTL)\n location /rtl/ {\n proxy_pass http://127.0.0.1:3000/rtl/;\n }\n}\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart nginx\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl status nginx\n")])])]),s("p",[t._v("If there is an error message restarting "),s("code",[t._v("nginx")]),t._v(" try:")]),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" nginx\n")])])]),s("h5",{attrs:{id:"check-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-3"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("h5",{attrs:{id:"1-check-lets-encrypt"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-check-lets-encrypt"}},[t._v("#")]),t._v(" 1. Check Let's Encrypt")]),t._v(" "),s("p",[t._v("It can be a little bit tricky to get everything set up correctly for the Let's Encrypt script to work correctly. Some additional commands are listed below to help with any troubleshooting.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" certbot certificates\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\nFound the following certs:\n Certificate Name: mainnet.demo.btcpayserver.org\n Domains: mainnet.demo.btcpayserver.org\n Expiry Date: "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("-08-10 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("18")]),t._v(":00:31+00:00 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("VALID: "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("79")]),t._v(" days"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n Certificate Path: /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/fullchain.pem\n Private Key Path: /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/privkey.pem\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" /etc/cron.d/certbot "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (check the cron job exists)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" */12 * * * root "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("test")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-x")]),t._v(" /usr/bin/certbot "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-a")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("\\")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-d")]),t._v(" /run/systemd/system "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" perl "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-e")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'sleep int(rand(43200))'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" certbot "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-q")]),t._v(" renew\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tail")]),t._v(" /var/log/letsencrypt/letsencrypt.log "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (check for problems)")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("-05-22 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":36:36,062:DEBUG:certbot.main:certbot version: "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.31")]),t._v(".0\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" certbot renew --dry-run "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# (test renewal)")]),t._v("\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n** DRY RUN: simulating "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'certbot renew'")]),t._v(" close to cert expiry\n** "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("The "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("test")]),t._v(" certificates below have not been saved."),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n\nCongratulations, all renewals succeeded. The following certs have been renewed:\n /etc/letsencrypt/live/mainnet.demo.btcpayserver.org/fullchain.pem "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("success"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n** DRY RUN: simulating "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'certbot renew'")]),t._v(" close to cert expiry\n** "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("The "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("test")]),t._v(" certificates above have not been saved."),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n")])])]),s("h5",{attrs:{id:"2-check-nginx"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-check-nginx"}},[t._v("#")]),t._v(" 2. Check NGINX.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" nginx "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-v")]),t._v("\nnginx version: nginx/1.18.0 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Ubuntu"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("netstat")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-tlnp")]),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(" nginx\ntcp "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:443 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("266275")]),t._v("/nginx: maste\ntcp "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:80 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.0")]),t._v(".0.0:* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("266275")]),t._v("/nginx: maste\ntcp6 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" :::443 :::* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("266275")]),t._v("/nginx: maste\ntcp6 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0")]),t._v(" :::80 :::* LISTEN "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("266275")]),t._v("/nginx: maste\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" nginx "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\n--\n-- A start job "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("for")]),t._v(" unit nginx.service has finished successfully.\n--\n-- The job identifier is "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19471")]),t._v(".\n")])])]),s("p",[t._v("Attempt to open your web site in a browser. At this point it is expected that a "),s("code",[t._v("502 Bad Gateway")]),t._v("error will occur. The "),s("code",[t._v("nginx")]),t._v(" logs can be checked to verify that the connection attempt was received.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tail")]),t._v(" /var/log/nginx/access.log\nmainnet.demo.btcpayserver.org "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.0")]),t._v(".0.1 - - "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v("/Jul/2020:12:19:57 +0100"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"GET / HTTP/2.0"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("502")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("552")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36"')]),t._v("\n")])])]),s("p",[t._v("If there is a problem then the "),s("code",[t._v("nginx")]),t._v(" error log can also be checked.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tail")]),t._v(" /var/log/nginx/error.log\n")])])]),s("h2",{attrs:{id:"bitcoin-core"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#bitcoin-core"}},[t._v("#")]),t._v(" Bitcoin Core")]),t._v(" "),s("p",[t._v("The gateway to the Bitcoin network for BTCPay Server components.")]),t._v(" "),s("h5",{attrs:{id:"install-4"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-4"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("p",[t._v("The full instructions to "),s("strong",[t._v("build Bitcoin Core from source")]),t._v(" are "),s("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("The alternative to building from source is to download a signed binary distribution from "),s("a",{attrs:{href:"https://bitcoincore.org/en/download/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://bitcoincore.org/en/download/"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://bitcoincore.org/bin/bitcoin-core-0.20.0/bitcoin-0.20.0-x86_64-linux-gnu.tar.gz\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://bitcoincore.org/bin/bitcoin-core-0.20.0/SHA256SUMS.asc\n")])])]),s("h5",{attrs:{id:"1-install-pre-requisites-and-dependencies"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-pre-requisites-and-dependencies"}},[t._v("#")]),t._v(" 1. Install Pre-requisites and dependencies")]),t._v(" "),s("p",[t._v("These instructions do not build the Bitcoin Core GUI components as they are not needed for "),s("code",[t._v("BTCPay Server")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" build-essential libtool autotools-dev automake pkg-config bsdmainutils python3\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" libevent-dev libboost-system-dev libboost-filesystem-dev libboost-test-dev libboost-thread-dev libminiupnpc-dev libzmq3-dev\n")])])]),s("h5",{attrs:{id:"2-download-and-build-source"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-download-and-build-source"}},[t._v("#")]),t._v(" 2. Download and Build Source")]),t._v(" "),s("p",[t._v("Before cloning the "),s("code",[t._v("Bitcoin Core")]),t._v(' repository identify the most recent stable version. One convenient way to do this is on the GitHub repository page look at the latest version under the "Releases" heading. At the time of writing the stable version is '),s("code",[t._v("0.20.0")]),t._v(". Adjust the tag in the "),s("code",[t._v("git clone")]),t._v(" command below for the stable version you want to build.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" src\n~/src$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--depth")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--branch")]),t._v(" v0.20.0 https://github.com/bitcoin/bitcoin.git\n~/src$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" bitcoin\n")])])]),s("p",[t._v("A specific version of the Berkeley DB dependency needs to be installed.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~/src/bitcoin$ ./contrib/install_db4.sh "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("pwd")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("`")])]),t._v("\n")])])]),s("p",[t._v("Use the "),s("code",[t._v("autoconf")]),t._v(" scripts to generate the make files and then build.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~/src/bitcoin$ ./autogen.sh\n~/src/bitcoin$ "),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("BDB_PREFIX")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'/home/admin/src/bitcoin/db4'")]),t._v("\n~/src/bitcoin$ ./configure "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BDB_LIBS")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-L'),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("${BDB_PREFIX}")]),t._v('/lib -ldb_cxx-4.8"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BDB_CFLAGS")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"-I'),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("${BDB_PREFIX}")]),t._v('/include"')]),t._v("\n~/src/bitcoin$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v("\n~/src/bitcoin$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v("\n~/src/bitcoin$ bitcoind "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version")]),t._v("\nBitcoin Core version v0.20.0\n")])])]),s("h5",{attrs:{id:"3-create-the-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-the-configuration-file"}},[t._v("#")]),t._v(" 3. Create the configuration file")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("configuration file")]),t._v(" is available on the Bitcoin Core repository at https://github.com/bitcoin/bitcoin/blob/master/share/examples/bitcoin.conf.")]),t._v(" "),s("p",[t._v("Create a "),s("strong",[t._v("bitcoin.conf file")]),t._v(" to suit your needs. An example file that is suitable for BTCPay Server is shown below. This configuration does not prune blocks which means as of May 2019 you will require 235 GB for the Bitcoin blockchain.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" bitcoin.conf\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("server=1 # need RPC for btcpay.\nrpcbind=127.0.0.1 # loopback is default for 0.18.0 but no harm making sure.\nwhitelist=127.0.0.1 # for nbxplorer.\nrpcallowip=127.0.0.1/32 # loopback is default but again no harm.\nzmqpubrawblock=tcp://127.0.0.1:28332 # needed for lightning.\nzmqpubrawtx=tcp://127.0.0.1:28333 # needed for lightning.\n#prune=5000 # Recommended if not enough disk space for full 600+GB blockchain.\n")])])]),s("p",[t._v("Copy the file to the directory specified in the systemd service file and assign read permissions to all users.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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/bitcoin\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" bitcoin.conf /etc/bitcoin\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /etc/bitcoin/bitcoin.conf\n")])])]),s("h5",{attrs:{id:"5-create-a-systemd-service"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#5-create-a-systemd-service"}},[t._v("#")]),t._v(" 5. Create a systemd service")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("systemd service")]),t._v(" file is available in the Bitcoin Core repository at https://raw.githubusercontent.com/bitcoin/bitcoin/master/contrib/init/bitcoind.service.")]),t._v(" "),s("p",[t._v("Edit the service file depending on your needs.")]),t._v(" "),s("p",[t._v("In the example below the "),s("strong",[t._v("User")]),t._v(" and "),s("strong",[t._v("Group")]),t._v(" have been changed to use the "),s("code",[t._v("admin")]),t._v(" user instead of requiring a new "),s("code",[t._v("bitcoin")]),t._v(" user. If the "),s("code",[t._v("admin")]),t._v(" user on your system is intended for running "),s("code",[t._v("BTCPayServer")]),t._v(" this is a reasonable choice. Otherwise consider creating a dedicated "),s("code",[t._v("bitcoin")]),t._v(" user.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" bitcoind.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("[Unit]\nDescription=Bitcoin daemon\nAfter=network.target\n\n[Service]\nExecStart=/usr/bin/bitcoind -daemon \\\n -pid=/run/bitcoind/bitcoind.pid \\\n -conf=/etc/bitcoin/bitcoin.conf \\\n -datadir=/var/lib/bitcoind\n\n# Make sure the config directory is readable by the service user\nPermissionsStartOnly=true\nExecStartPre=/bin/chgrp admin /etc/bitcoin\n\n# Process management\n####################\n\nType=forking\nPIDFile=/run/bitcoind/bitcoind.pid\nRestart=on-failure\nTimeoutStopSec=600\n\n# Run as admin:admin\nUser=admin\nGroup=admin\n\n# /run/bitcoind\nRuntimeDirectory=bitcoind\nRuntimeDirectoryMode=0710\n\n# /etc/bitcoin\nConfigurationDirectory=bitcoin\nConfigurationDirectoryMode=0710\n\n# /var/lib/bitcoind\nStateDirectory=bitcoind\nStateDirectoryMode=0710\n\n# Hardening measures\n####################\n# Provide a private /tmp and /var/tmp.\nPrivateTmp=true\n\n# Deny access to /home, /root and /run/user\nProtectHome=true\n\n# Mount /usr, /boot/ and /etc read-only for the process.\nProtectSystem=full\n\n# Disallow the process and all of its children to gain\n# new privileges through execve().\nNoNewPrivileges=true\n\n# Use a new /dev namespace only populated with API pseudo devices\n# such as /dev/null, /dev/zero and /dev/random.\nPrivateDevices=true\n\n# Deny the creation of writable and executable memory mappings.\nMemoryDenyWriteExecute=true\n\n[Install]\nWantedBy=multi-user.target\n")])])]),s("p",[t._v("Once the service file is ready complete the commands below.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" bitcoind.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" bitcoind\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl status bitcoind\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("26")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("21")]),t._v(":51:52 ubuntu systemd"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[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(": Started Bitcoin daemon.\n")])])]),s("p",[t._v("If the start attempt shows an error message check the log using:")]),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" bitcoind\n")])])]),s("h5",{attrs:{id:"6-create-a-symbolic-link-to-the-bitcoind-cookie-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#6-create-a-symbolic-link-to-the-bitcoind-cookie-file"}},[t._v("#")]),t._v(" 6. Create a symbolic link to the bitcoind cookie file")]),t._v(" "),s("p",[t._v("The "),s("code",[t._v("bitcoin-cli")]),t._v(" client needs to authenticate to "),s("code",[t._v("bitcoind")]),t._v(" for RPC calls. The easiest way to allow this is to create a symbolic link to the cookie file.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),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(" /var/lib/bitcoind/.cookie .bitcoin/.cookie\n")])])]),s("p",[t._v("It's not vital to perform this step but if not done then every "),s("code",[t._v("bitcoin-cli")]),t._v(" command needs to specify the path to the cookie file as below.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ bitcoin-cli "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-rpccookiefile")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/var/lib/bitcoind/.cookie getblockchaininfo\n")])])]),s("h5",{attrs:{id:"check-4"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-4"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("p",[t._v("It will take Bitcoin anywhere from a few hours to a few days to synchronise the blockchain. Use any or all of the commands below to check its status.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl status bitcoind\nActive: active "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("running"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(" since Sun "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-26 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("21")]),t._v(":51:52 IST"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" 2min 47s ago\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tail")]),t._v(" /var/lib/bitcoind/debug.log "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-f")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-26T20:55:09Z UpdateTip: new "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("best")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("0000000000000361c37dfb6fa905ef967b95411fa96f7dcb4eca5dd4434d9e59 "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("height")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("126732")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("version")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("0x00000001 "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("log2_work")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("62.952182")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("tx")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("560114")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("date")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'2011-05-25T21:26:08Z'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("progress")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.001018")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("cache")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("43")]),t._v(".6MiB"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("291168txo"),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("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ bitcoin-cli getblockchaininfo\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"chain"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"main"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"blocks"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("133015")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"headers"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("640929")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"bestblockhash"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0000000000000e81b67de8d61eab726f40585bed954b1dd59f86ab10e4e55398"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"difficulty"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("876954.4935135372")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"mediantime"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1308897947")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"verificationprogress"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.001530462018729556")]),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("When the "),s("code",[t._v("verificationprogress")]),t._v(" gets to either "),s("code",[t._v("0.99..")]),t._v(" or "),s("code",[t._v("1.0")]),t._v(" your node has synchronised. To double check you can also use a public block explorer such as "),s("a",{attrs:{href:"https://blockstream.info/",target:"_blank",rel:"noopener noreferrer"}},[t._v("https://blockstream.info/"),s("OutboundLink")],1),t._v(" to view the latest "),s("code",[t._v("Bitcoin")]),t._v(" block and compare it to the "),s("code",[t._v("blocks")]),t._v(" value from the "),s("code",[t._v("bitcoin-cli getblockchaininfo")]),t._v(" result.")]),t._v(" "),s("h5",{attrs:{id:"check-tor-and-bitcoin"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-tor-and-bitcoin"}},[t._v("#")]),t._v(" Check Tor and Bitcoin")]),t._v(" "),s("p",[t._v("If Tor was installed prior to the Bitcoin Daemon then it should have automatically registered and begun listening on a torv2 onion address (note support for torv3 onion addresses is in the "),s("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/issues/18884",target:"_blank",rel:"noopener noreferrer"}},[t._v("pipeline"),s("OutboundLink")],1),t._v(").")]),t._v(" "),s("p",[t._v("The easiest way to get your Bitcoin Daemon torv2 address is using "),s("code",[t._v("bitcoin-cli")]),t._v(":")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("bitcoin-cli getnetworkinfo\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("200100")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"subversion"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/Satoshi:0.20.1/"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"protocolversion"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("70015")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"localservices"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0000000000000409"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"localaddresses"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[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 string"}},[t._v('"address"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"192.168.11.4"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"port"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8333")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"score"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[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 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 string"}},[t._v('"address"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"v5j6hfz4xafmeckf.onion"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"port"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8333")]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"score"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("156")]),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 string"}},[t._v('"warnings"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('""')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("}")]),t._v("\n")])])]),s("p",[t._v("An alternative approach is to search the Bitcoin daemon log file:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" /var/lib/bitcoind/debug.log "),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(" onion\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("-05-23T18:24:22Z tor: Got "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("service")]),t._v(" ID 4d4al7v4hj5p7bb6, advertising "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("service")]),t._v(" 4d4al7v4hj5p7bb6.onion:8333\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2019")]),t._v("-05-23T18:24:22Z AddLocal"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("4d4al7v4hj5p7bb6.onion:8333,4"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("If there is a problem and no onion address can be found in the log file then check for Tor related error messages:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" /var/lib/bitcoind/debug.log "),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(" tor\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27T08:03:28Z torcontrol thread start\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27T08:03:28Z tor: Authentication cookie /run/tor/control.authcookie could not be opened "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("check permissions"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("The above error message can occur if the user accounts running the Bitcoin service does not have read access to the Tor authentication cookie file, "),s("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md#3-automatically-listen-on-tor",target:"_blank",rel:"noopener noreferrer"}},[t._v("more info"),s("OutboundLink")],1),t._v(". To fix this particular error add the required user account to the "),s("code",[t._v("debian-tor")]),t._v(" group.")]),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("usermod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-a")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-G")]),t._v(" debian-tor admin\n")])])]),s("p",[t._v("To change your onion address:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("rm")]),t._v(" /var/lib/bitcoind/onion_private_key\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart bitcoind\n~$ bitcoin-cli getnetworkinfo "),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(" onion\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"name"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"onion"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"address"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"qud5iwbntqxlfwjv.onion"')]),t._v(",\n")])])]),s("p",[t._v("To check your onion address from a remote host with tor installed:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ torsocks "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--shell")]),t._v("\n~$ telnet 4d4al7v4hj5p7bb6.onion "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8333")]),t._v("\n Trying "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.42")]),t._v(".42.0"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\n Connected to "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("127.42")]),t._v(".42.0.\n Escape character is "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'^]'")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("exit")]),t._v("\n")])])]),s("p",[t._v("To connect another "),s("code",[t._v("bitcoind")]),t._v(" instance to your new node:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ bitcoin-cli addnode "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"4d4al7v4hj5p7bb6.onion"')]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"add"')]),t._v("\n~$ bitcoin-cli getaddednodeinfo\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"addednode"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"4d4al7v4hj5p7bb6.onion"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"connected"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" true,\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"addresses"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[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 string"}},[t._v('"address"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"4d4al7v4hj5p7bb6.onion:8333"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"connected"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"outbound"')]),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("h2",{attrs:{id:"nbxplorer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#nbxplorer"}},[t._v("#")]),t._v(" NBXplorer")]),t._v(" "),s("p",[s("strong",[t._v("NBXplorer")]),t._v(" is a dotnet core application that monitors the Bitcoin blockchain for transactions of interest to your BTCPay Server.")]),t._v(" "),s("h5",{attrs:{id:"install-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-5"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("h5",{attrs:{id:"1-install-net-80-sdk"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-net-80-sdk"}},[t._v("#")]),t._v(" 1. Install .NET 8.0 SDK")]),t._v(" "),s("p",[s("a",{attrs:{href:"https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#2004-",target:"_blank",rel:"noopener noreferrer"}},[t._v("Follow the install instuctions"),s("OutboundLink")],1),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("# Add Microsoft package repository")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-O")]),t._v(" packages-microsoft-prod.deb\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" dpkg "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v(" packages-microsoft-prod.deb\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("rm")]),t._v(" packages-microsoft-prod.deb\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Install the SDK")]),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("apt-get")]),t._v(" update\n"),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" apt-transport-https\n"),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(" update\n"),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-y")]),t._v(" dotnet-sdk-8.0\n\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("## Check")]),t._v("\ndotnet "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\n")])])]),s("h5",{attrs:{id:"2-build-nbxplorer"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-build-nbxplorer"}},[t._v("#")]),t._v(" 2. Build NBXplorer")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),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(" src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" src\n~/src$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/dgarage/NBXplorer\n~/src$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" NBXplorer\n~/src/NBXplorer$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" tag "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--sort")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version:refname")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("awk")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'match($0, /^v[0-9]+\\./)'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("head")]),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("1")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v("\n~/src/NBXplorer$ ./build.sh\n")])])]),s("h5",{attrs:{id:"3-create-postgresql-database"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-postgresql-database"}},[t._v("#")]),t._v(" 3. Create Postgresql Database")]),t._v(" "),s("p",[t._v("While NBXplorer support storing data in a local database via "),s("code",[t._v("--dbtrie")]),t._v(", this is deprecated. Here how to create the appropriate database and user for NBXlporer in "),s("strong",[t._v("Postgresql")]),t._v(".")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" postgres psql\n")])])]),s("p",[t._v("Then execute")]),t._v(" "),s("div",{staticClass:"language-SQL extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("CREATE")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DATABASE")]),t._v(" nbxplorer TEMPLATE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'template0'")]),t._v(" LC_CTYPE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'C'")]),t._v(" LC_COLLATE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'C'")]),t._v(" ENCODING "),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("CREATE")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("USER")]),t._v(" nbxplorer "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WITH")]),t._v(" ENCRYPTED PASSWORD "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'urpassword'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("GRANT")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ALL")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PRIVILEGES")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ON")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DATABASE")]),t._v(" nbxplorer "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("TO")]),t._v(" nbxplorer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("Exit")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("postgres=#\\q\n")])])]),s("h5",{attrs:{id:"4-create-a-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#4-create-a-configuration-file"}},[t._v("#")]),t._v(" 4. Create a configuration file")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" nbxplorer.config\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("### Database ###\npostgres=User ID=nbxplorer;Password=urpassword;Application Name=nbxplorer;MaxPoolSize=20;Host=localhost;Port=5432;Database=nbxplorer;\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" /etc/nbxplorer\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" nbxplorer.config /etc/nbxplorer\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /etc/nbxplorer/nbxplorer.config\n")])])]),s("p",[t._v("Note: If you previously used a "),s("code",[t._v("dbtrie")]),t._v(" backend for NBXplorer, but want to switch to postgres, "),s("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/docs/Postgres-Migration.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("read this documentation"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h5",{attrs:{id:"5-create-a-systemd-service-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#5-create-a-systemd-service-2"}},[t._v("#")]),t._v(" 5. Create a systemd service")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("systemd service")]),t._v(" file is shown below. Adjust the paths, User and Group accordingly.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" nbxplorer.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("[Unit]\nDescription=NBXplorer daemon\nRequires=bitcoind.service\nAfter=bitcoind.service\n\n[Service]\nWorkingDirectory=/home/admin/src/NBXplorer\nExecStart=/home/admin/src/NBXplorer/run.sh --conf=/etc/nbxplorer/nbxplorer.config\nUser=admin\nGroup=admin\nType=simple\nPIDFile=/run/nbxplorer/nbxplorer.pid\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" nbxplorer.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" nbxplorer\n")])])]),s("h5",{attrs:{id:"check-5"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-5"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" nbxplorer "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":13:35 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8065")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Data Directory: /home/admin/.nbxplorer/Main\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":13:35 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8065")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Configuration File: /home/admin/.nbxplorer/Main/settings.config\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":13:35 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8065")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Network: Mainnet\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(":20:04 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8065")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Events: BTC: New block 0000000000000000000c405ba5df5f5533359a4393247a0c52d26c458d4dd989 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("577449")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n")])])]),s("p",[t._v("If it doesn't start correctly stop the service and run the application directly to get any error messages.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop nbxplorer\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ./src/NBXplorer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" ./run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),t._v("\n")])])]),s("h5",{attrs:{id:"update"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#update"}},[t._v("#")]),t._v(" Update")]),t._v(" "),s("p",[t._v("Updating could break things. Be careful on a live 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("# Stop the service")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop nbxplorer\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Checkout and build latest tag")]),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 punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/NBXplorer"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" fetch "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--tags")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" tag "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--sort")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version:refname")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("awk")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'match($0, /^v[0-9]+\\./)'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("head")]),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("1")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" ./build.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Restart the service")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start nbxplorer\n")])])]),s("h5",{attrs:{id:"migration"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#migration"}},[t._v("#")]),t._v(" Migration")]),t._v(" "),s("p",[t._v("With BTCPay Server v1.5 we "),s("a",{attrs:{href:"https://blog.btcpayserver.org/nbxplorer-postgres/",target:"_blank",rel:"noopener noreferrer"}},[t._v("improved NBXplorer by switching to Postgres"),s("OutboundLink")],1),t._v(".\nIf you are still using the DBTrie based version, please consider "),s("a",{attrs:{href:"https://github.com/dgarage/NBXplorer/blob/master/docs/Postgres-Migration.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("migrating NBXplorer"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("p",[t._v("Afterwards you need to set "),s("code",[t._v("BTCPAY_EXPLORERPOSTGRES")]),t._v(" to the same connection string as NBXplorer.")]),t._v(" "),s("h2",{attrs:{id:"btcpay-server"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server"}},[t._v("#")]),t._v(" BTCPay Server")]),t._v(" "),s("p",[t._v("Like NBXplorer the BTCPay Server application is also .NET Core. The install steps assume .NET Core was previosuly installed.")]),t._v(" "),s("h5",{attrs:{id:"install-6"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-6"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("h5",{attrs:{id:"1-build-btcpay-server"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-build-btcpay-server"}},[t._v("#")]),t._v(" 1. Build BTCPay Server")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),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(" src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" src\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Clone the repository")]),t._v("\n~/src$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/btcpayserver/btcpayserver.git\n~/src$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Checkout latest tag")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" tag "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--sort")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version:refname")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("awk")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'match($0, /^v[0-9]+\\.[0-9]+\\.[0-9]+$/)'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("head")]),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("1")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Build the app")]),t._v("\n~/src/btcpayserver$ ./build.sh\n")])])]),s("h5",{attrs:{id:"2-create-postgresql-database"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-create-postgresql-database"}},[t._v("#")]),t._v(" 2. Create Postgresql Database")]),t._v(" "),s("p",[t._v("By default BTCPay Server will store data in a single SQLite file. A more robust option is to use "),s("strong",[t._v("Postgresql")]),t._v(" which requires the appropriate database and user to exist.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" postgres psql\n")])])]),s("p",[t._v("Then execute")]),t._v(" "),s("div",{staticClass:"language-sql extra-class"},[s("pre",{pre:!0,attrs:{class:"language-sql"}},[s("code",[s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("CREATE")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DATABASE")]),t._v(" btcpay TEMPLATE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'template0'")]),t._v(" LC_CTYPE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'C'")]),t._v(" LC_COLLATE "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'C'")]),t._v(" ENCODING "),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("CREATE")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("USER")]),t._v(" btcpay "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("WITH")]),t._v(" ENCRYPTED PASSWORD "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'urpassword'")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("GRANT")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ALL")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("PRIVILEGES")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("ON")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("DATABASE")]),t._v(" btcpay "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("TO")]),t._v(" btcpay"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("Exit")]),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 assign-left variable"}},[t._v("postgres")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("#\\q")]),t._v("\n")])])]),s("h5",{attrs:{id:"3-create-a-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-a-configuration-file"}},[t._v("#")]),t._v(" 3. Create a configuration file")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" btcpay.config\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("### Database ###\npostgres=User ID=btcpay;Password=urpassword;Application Name=btcpayserver;Host=localhost;Port=5432;Database=btcpay;\nexplorer.postgres=User ID=nbxplorer;Password=urpassword;Application Name=nbxplorer;MaxPoolSize=20;Host=localhost;Port=5432;Database=nbxplorer;\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("mkdir")]),t._v(" /etc/btcpay\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" btcpay.config /etc/btcpay\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /etc/btcpay/btcpay.config\n")])])]),s("h5",{attrs:{id:"4-create-a-systemd-service"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#4-create-a-systemd-service"}},[t._v("#")]),t._v(" 4. Create a systemd service")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("systemd service")]),t._v(" file is shown below. Adjust the paths, User and Group accordingly.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" btcpay.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('[Unit]\nDescription=BTCPay Server\nRequires=nbxplorer.service\nAfter=nbxplorer.service\n\n[Service]\nWorkingDirectory=/home/admin/src/btcpayserver\nEnvironment=BTCPAY_BTCEXTERNALRTL="server=https://mainnet.demo.btcpayserver.org/rtl;cookiefile=/var/lib/rtl/.cookie"\nExecStart=/home/admin/src/btcpayserver/run.sh --conf=/etc/btcpay/btcpay.config\nUser=admin\nGroup=admin\nType=simple\nPIDFile=/run/btcpayserver/btcpayserver.pid\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n')])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" btcpay.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" btcpay\n")])])]),s("h5",{attrs:{id:"check-6"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-6"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" btcpay "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\n-- The start-up result is RESULT.\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(":01:25 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10263")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Data Directory: /home/admin/.btcpayserver/Main\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(":01:25 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10263")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Configuration File: /etc/btcpay/btcpay.config\nMay "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(":01:25 btc run.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10263")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": info: Configuration: Network: Mainnet\n")])])]),s("p",[t._v("If it doesn't start correctly stop the service and run the application directly to get any error messages.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop btcpay\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/btcpayserver"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" ./run.sh "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--conf")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/etc/btcpay/btcpay.config"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])]),s("p",[t._v("An example of checking information in the database.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-u")]),t._v(" postgres psql\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("postgres")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# \\connect btcpay;")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("btcpay")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# \\dt")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("btcpay")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v('# select * from "Invoices";')]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("btcpay")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# \\q")]),t._v("\n")])])]),s("p",[t._v('Attempting to open your BTCPay Server domain in a browser now should show the "Welcome to your BTCPay Server" page.\nIf you are not using a Lightning Node this is the end of the install.')]),t._v(" "),s("h5",{attrs:{id:"update-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#update-2"}},[t._v("#")]),t._v(" Update")]),t._v(" "),s("p",[t._v("Updating could break things. Be careful on a live 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("# Stop the service")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop btcpay\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Checkout and build latest tag")]),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 punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/btcpayserver"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" fetch "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--tags")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" checkout "),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" tag "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--sort")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-version:refname")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("awk")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v("'match($0, /^v[0-9]+\\.[0-9]+\\.[0-9]+$/)'")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("|")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("head")]),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("1")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v(")")])]),t._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("&&")]),t._v(" ./build.sh"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Restart the service")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start btcpay\n")])])]),s("h2",{attrs:{id:"lightning-network-daemon-lnd"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-daemon-lnd"}},[t._v("#")]),t._v(" Lightning Network Daemon (LND)")]),t._v(" "),s("h5",{attrs:{id:"install-7"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-7"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("p",[t._v("Full "),s("a",{attrs:{href:"https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md",target:"_blank",rel:"noopener noreferrer"}},[t._v("instructions"),s("OutboundLink")],1),t._v(".")]),t._v(" "),s("h5",{attrs:{id:"1-install-go"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-go"}},[t._v("#")]),t._v(" 1. Install Go")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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 function"}},[t._v("make")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("wget")]),t._v(" https://dl.google.com/go/go1.13.linux-amd64.tar.gz\n~$ sha256sum go1.13.linux-amd64.tar.gz\n68a2297eb099d1a76097905a2ce334e3155004ec08cdea85f24527be3c48e856 go1.13.linux-amd64.tar.gz\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("tar")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-C")]),t._v(" /usr/local "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-xzf")]),t._v(" go1.13.linux-amd64.tar.gz\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"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("PATH")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("$PATH")]),t._v(":/usr/local/go/bin\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("GOPATH")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=~")]),t._v("/gocode\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"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("PATH")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("$PATH")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin\n~$ go version\ngo version go1.13 linux/amd64\n")])])]),s("h5",{attrs:{id:"2-build-and-install-lnd"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-build-and-install-lnd"}},[t._v("#")]),t._v(" 2. Build and install LND")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),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(" src"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" src\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/lightningnetwork/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# installs to a directory in $GOPATH/bin")]),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("cp")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin/lnd "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin/lncli /usr/bin\n~$ lnd "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\nlnd version "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.10")]),t._v(".99-beta "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("commit")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("clock/v1.0.0-229-ge64e71d86dc1ac716c30a80f85a22e8fb544697f\n")])])]),s("h5",{attrs:{id:"3-create-a-symbolic-link-to-the-bitcoin-configuration-file"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-a-symbolic-link-to-the-bitcoin-configuration-file"}},[t._v("#")]),t._v(" 3. Create a symbolic link to the Bitcoin configuration file")]),t._v(" "),s("p",[t._v("lnd looks for bitcoin.conf in a specific location to get necessary RPC and zeromq details.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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(" ~/.bitcoin/bitcoin.conf /etc/bitcoin/bitcoin.conf\n")])])]),s("h5",{attrs:{id:"4-create-a-configuration-file-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#4-create-a-configuration-file-2"}},[t._v("#")]),t._v(" 4. Create a configuration file")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" lnd.conf\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("[Application Options]\ndatadir=/var/lib/lnd/data\ntlscertpath=/var/lib/lnd/tls.cert\ntlskeypath=/var/lib/lnd/tls.key\nlogdir=/var/lib/lnd/logs\nmaxlogfiles=3\nmaxlogfilesize=10\n#externalip=1.1.1.1 # change to your public IP address if required.\nalias=i_luv_btcpay\nlisten=0.0.0.0:9735\n\n[Bitcoin]\nbitcoin.active=1\nbitcoin.node=bitcoind\nbitcoin.mainnet=true\n\n[tor]\ntor.active=true\ntor.v3=true\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chown")]),t._v(" admin:admin "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-R")]),t._v(" /var/lib/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" lnd.conf /etc/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /etc/lnd/lnd.conf\n")])])]),s("h5",{attrs:{id:"5-create-a-systemd-service-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#5-create-a-systemd-service-3"}},[t._v("#")]),t._v(" 5. Create a systemd service")]),t._v(" "),s("p",[t._v("An example "),s("strong",[t._v("systemd service")]),t._v(" file is shown below. Adjust the paths, User and Group accordingly.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" lnd.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("[Unit]\nDescription=LND Lightning Network Daemon\nRequires=bitcoind.service\nAfter=bitcoind.service\n\n[Service]\nExecStart=/usr/bin/lnd --configfile=/etc/lnd/lnd.conf\nExecStop=/usr/bin/lncli --lnddir /var/lib/lnd stop\nPIDFile= /run/lnd/lnd.pid\n\nUser=admin\nGroup=admin\n\nType=simple\nKillMode=process\nTimeoutStartSec=60\nTimeoutStopSec=60\nRestart=always\nRestartSec=60\n\n[Install]\nWantedBy=multi-user.target\n")])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" lnd.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" lnd\n")])])]),s("h5",{attrs:{id:"configuration-4"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#configuration-4"}},[t._v("#")]),t._v(" Configuration")]),t._v(" "),s("div",{staticClass:"custom-block danger"},[s("p",{staticClass:"custom-block-title"},[t._v("DANGER")]),t._v(" "),s("p",[s("strong",[t._v("Running a Bitcoin Lightning daemon requires a hot wallet on your BTCPay Server.")])])]),t._v(" "),s("p",[t._v("With Bitcoin the protocol has evolved and deterministic key derivation means the keys for your wallet can be kept in a different location to the BTCPay Server. Lightning daemons do not have this facility. Any Bitcoins committed or received in your lightning channels are controlled by private keys that are on your BTCPay Server.")]),t._v(" "),s("h5",{attrs:{id:"1-create-a-symbolic-link-to-the-lnd-data-directory"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-create-a-symbolic-link-to-the-lnd-data-directory"}},[t._v("#")]),t._v(" 1. Create a symbolic link to the lnd data directory")]),t._v(" "),s("p",[t._v("The install steps above use "),s("code",[t._v("/var/lib/lnd")]),t._v(" as the data directory rather than the default "),s("code",[t._v("/home/user/.lnd")]),t._v(". In order to save typing when using the "),s("code",[t._v("lncli")]),t._v(" client it's useful to add a symbolic directory link.")]),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(" /var/lib/lnd .lnd\n")])])]),s("h5",{attrs:{id:"2-create-lightning-wallet"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-create-lightning-wallet"}},[t._v("#")]),t._v(" 2. Create Lightning wallet")]),t._v(" "),s("p",[t._v("The first time the lnd is started a new wallet must be created and the backup seed safely recorded (if someone else gets your seed they can steal your funds so keep it safe).")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli create\nInput wallet password:\nConfirm password:\n\nDo you have an existing cipher seed mnemonic you want to use? "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("Enter y/n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(": n\n\nYour cipher seed can optionally be encrypted.\nInput your passphrase "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("if")]),t._v(" you wish to encrypt it "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("(")]),t._v("or press enter to proceed without a cipher seed passphrase"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(")")]),t._v(":\n\nGenerating fresh cipher seed"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\n\n"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("\n---------------BEGIN LND CIPHER SEED---------------\n "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("1")]),t._v(". above "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2")]),t._v(". catch "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("3")]),t._v(". start "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("4")]),t._v(". tape\n "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("5")]),t._v(". sound "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("6")]),t._v(". friend "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("7")]),t._v(". water "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("8")]),t._v(". royal\n "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("9")]),t._v(". solid "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("10")]),t._v(". poet "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("11")]),t._v(". wisdom "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("12")]),t._v(". match\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("13")]),t._v(". virtual "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("14")]),t._v(". zero "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(". slender "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("16")]),t._v(". thrive\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("17")]),t._v(". idle "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("18")]),t._v(". catch "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("19")]),t._v(". robot "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("20")]),t._v(". clay\n"),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("21")]),t._v(". resemble "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("22")]),t._v(". angry "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("23")]),t._v(". work "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("24")]),t._v(". "),s("span",{pre:!0,attrs:{class:"token keyword"}},[t._v("until")]),t._v("\n---------------END LND CIPHER SEED-----------------\n\n"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("\n\nlnd successfully initialized"),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("!")]),t._v("\n")])])]),s("p",[t._v("Note that if the symbolic directory link from the previous step "),s("strong",[t._v("was not")]),t._v(" created the command is:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("lncli "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--lnddir")]),t._v(" /var/lib/lnd create\n")])])]),s("h5",{attrs:{id:"3-unlock-the-wallet"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-unlock-the-wallet"}},[t._v("#")]),t._v(" 3. Unlock the wallet")]),t._v(" "),s("p",[t._v("Every time lnd is restarted the wallet "),s("strong",[t._v("needs to be unlocked")]),t._v(". This is not ideal for a BTCPay Server that can is designed to run unattended but Lighting is still in its infancy.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli unlock\n")])])]),s("h5",{attrs:{id:"check-7"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-7"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli getinfo\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("{")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"version"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"0.10.99-beta commit=clock/v1.0.0-229-ge64e71d86dc1ac716c30a80f85a22e8fb544697f"')]),t._v(",\n "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"commit_hash"')]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"e64e71d86dc1ac716c30a80f85a22e8fb544697f"')]),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("Check the service:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" lnd "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":46:29 ubuntu lnd"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("654474")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":46:29.909 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("INF"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" DISC: Attempting to bootstrap with: BOLT-0010 DNS Seed: "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("nodes.lightning.directory soa.nodes.lightning.directory"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("lseed.bitcoinstats.com "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v("\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":49:41 ubuntu lnd"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("654474")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":49:41.939 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("INF"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" DISC: Attempting to bootstrap with: Authenticated Channel Graph\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":49:41 ubuntu lnd"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("654474")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("2020")]),t._v("-07-27 "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v(":49:41.940 "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),t._v("ERR"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(" SRVR: Unable to retrieve initial bootstrap peers: no addresses found\n")])])]),s("p",[t._v("The "),s("strong",[t._v("Lightning Node Connection String")]),t._v(" to use with "),s("code",[t._v("BTCPay Server")]),t._v(" is:")]),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 assign-left variable"}},[t._v("type")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("lnd-rest"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("server")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("https://127.0.0.1:8080/"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("macaroonfilepath")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/home/admin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("allowinsecure")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("true\n")])])]),s("h5",{attrs:{id:"add-lnd-as-internal-node"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#add-lnd-as-internal-node"}},[t._v("#")]),t._v(" Add LND as internal node")]),t._v(" "),s("p",[t._v("To add LND as internal node you have to edit the "),s("a",{attrs:{href:"#3-create-a-configuration-file"}},[t._v("btcpay.config file")]),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 builtin class-name"}},[t._v("cd")]),t._v(" /etc/btcpay\n"),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" btcpay.config\n")])])]),s("p",[t._v("Right below the database part, add the "),s("code",[t._v("BTC.lightning")]),t._v(" setting:")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("### Lightning ###\nBTC.lightning=type=lnd-rest;server=https://127.0.0.1:8080/;macaroonfilepath=/home/admin/.lnd/data/chain/bitcoin/mainnet/admin.macaroon;allowinsecure=true\n")])])]),s("p",[t._v('See the "Use custom node" view on the Lightning node connection setting screen in BTCPay Server for details on the connection string.')]),t._v(" "),s("p",[t._v("You need to restart BTCPay Server for the settings update to take effect:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl restart btcpay\n")])])]),s("h5",{attrs:{id:"check-tor-and-lnd"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-tor-and-lnd"}},[t._v("#")]),t._v(" Check Tor and LND")]),t._v(" "),s("p",[t._v("As with the Bitcoin daemon if Tor is installed and the configuration file enables it (the one above does) then "),s("code",[t._v("lnd")]),t._v(" will automatically register an onion address. In lnd's case torv3 addresses are supported.")]),t._v(" "),s("p",[t._v("The torv3 onion address below is a lot longer than the torv2 one from the Bitcoin daemon section (16 characters compared to 56 characters).")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli getinfo "),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(" onion\n"),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"029b0e3c05595074afcffdca0fb22fb68a95a9c4698dd20962f647de4891eceabd@liyuvwbbycrvvuzcrsd5rq7svwckabejlsymcxiwzkj3smvlwcsqpjyd.onion:9735"')]),t._v("\n")])])]),s("p",[t._v("The Tor address created by lnd can be used to connect to other Lighting peers on the Tor network. The Tor address can work in parallel with an IPv4 or IPv6 address. To register one of those make sure the "),s("code",[t._v("externalip")]),t._v(" is set in the lnd configuration file.")]),t._v(" "),s("h5",{attrs:{id:"update-3"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#update-3"}},[t._v("#")]),t._v(" Update")]),t._v(" "),s("p",[t._v("Updating could break things. Be careful on a live system.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop lnd\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"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("PATH")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("$PATH")]),t._v(":/usr/local/go/bin\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("GOPATH")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=~")]),t._v("/gocode\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"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("PATH")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),s("span",{pre:!0,attrs:{class:"token environment constant"}},[t._v("$PATH")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(":")]),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/src/lnd\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" pull\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("make")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# installs to a directory in $GOPATH/bin")]),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("cp")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin/lnd "),s("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$GOPATH")]),t._v("/bin/lncli /usr/bin\n~$ lnd "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--version")]),t._v("\nlnd version "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("0.10")]),t._v(".99-beta "),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("commit")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("clock/v1.0.0-229-ge64e71d86dc1ac716c30a80f85a22e8fb544697f\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start lnd\n")])])]),s("p",[t._v("After the daemon has been restarted the wallet needs to be unlocked:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ lncli unlock\n")])])]),s("p",[t._v("If "),s("code",[t._v("Ride The Lightning (RTL)")]),t._v(" is installed, see next section, it may have stopped when lnd disappeared so it will also need to be restarted.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start rtl\n")])])]),s("h2",{attrs:{id:"ride-the-lightning-rtl"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ride-the-lightning-rtl"}},[t._v("#")]),t._v(" Ride The Lightning (RTL)")]),t._v(" "),s("p",[s("strong",[t._v("Ride the Lightning")]),t._v(" is a Node.js application to manage your Lightning peers, channels, wallet etc.")]),t._v(" "),s("p",[t._v("The advantage of the work that has gone into BTCPay Server is that the RTL web page can be controlled and accessed in the same manner as the BTCPay site.")]),t._v(" "),s("h5",{attrs:{id:"install-8"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#install-8"}},[t._v("#")]),t._v(" Install")]),t._v(" "),s("h5",{attrs:{id:"1-install-dependencies"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#1-install-dependencies"}},[t._v("#")]),t._v(" 1. Install dependencies")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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(" nodejs build-essential "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v("\n")])])]),s("h5",{attrs:{id:"2-build-rtl"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#2-build-rtl"}},[t._v("#")]),t._v(" 2. Build RTL")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~/src\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" clone https://github.com/Ride-The-Lightning/RTL.git\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" RTL\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),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("--only")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("prod\n")])])]),s("h5",{attrs:{id:"3-create-a-configuration-file-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#3-create-a-configuration-file-2"}},[t._v("#")]),t._v(" 3. Create a configuration file")]),t._v(" "),s("p",[t._v("Copy the sample config file from "),s("code",[t._v("sample-RTL-Config.json")]),t._v(" and adjust accordingly. An example that works with the rest of the instructions in this document is shown below.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" src/RTL/sample-RTL-Config.json RTL-Config.json\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" RTL-Config.json\n")])])]),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('"port"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"3000"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"defaultNodeIndex"')]),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('"SSO"')]),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('"rtlSSO"')]),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('"rtlCookiePath"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/var/lib/rtl/.cookie"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v(" # Needs to match the value in BTCPay systemd settings.\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"logoutRedirectLink"')]),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/login"')]),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('"nodes"')]),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('"index"')]),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('"lnNode"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"Node 1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lnImplementation"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"LND"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"Authentication"')]),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('"macaroonPath"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/var/lib/lnd/data/chain/bitcoin/mainnet"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"configPath"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/etc/lnd/lnd.conf"')]),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('"Settings"')]),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('"userPersona"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"MERCHANT"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"themeMode"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"DAY"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"themeColor"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"PURPLE"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"channelBackupPath"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"/home/admin/rtl/backup/node-1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"enableLogging"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token boolean"}},[t._v("false")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"lnServerUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"https://localhost:8080/v1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"swapServerUrl"')]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v(":")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[t._v('"http://localhost:8081/v1"')]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(",")]),t._v("\n "),s("span",{pre:!0,attrs:{class:"token property"}},[t._v('"fiatConversion"')]),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 "),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("Note that RTL has different behaviour and requirements compared to the other services documented in theses instructions, specifically:")]),t._v(" "),s("ol",[s("li",[t._v("The configuration file needs to exist in RTL's data directory,")]),t._v(" "),s("li",[t._v("The RTL process may write update to the configuration file.")])]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),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/rtl\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" ~/RTL-Config.json /var/lib/rtl\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chown")]),t._v(" admin:admin "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-R")]),t._v(" /var/lib/rtl\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("chmod")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("644")]),t._v(" /var/lib/rtl/RTL-Config.json\n")])])]),s("h5",{attrs:{id:"4-create-a-systemd-service-2"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#4-create-a-systemd-service-2"}},[t._v("#")]),t._v(" 4. Create a systemd service")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("vi")]),t._v(" rtl.service\n")])])]),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v('[Unit]\nDescription=Ride The Lightning\nRequires=lnd.service\nAfter=lnd.service\n\n[Service]\nEnvironment="RTL_CONFIG_PATH=/var/lib/rtl"\nWorkingDirectory=/var/lib/rtl\nExecStart=/usr/bin/node /home/admin/src/RTL/rtl\nUser=admin\nGroup=admin\nType=simple\nPIDFile=/run/rtl/rtl.pid\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n')])])]),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("cp")]),t._v(" rtl.service /etc/systemd/system\n~$ "),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(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--now")]),t._v(" rtl\n")])])]),s("h5",{attrs:{id:"check-8"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#check-8"}},[t._v("#")]),t._v(" Check")]),t._v(" "),s("p",[t._v("Check the service:")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),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("-xe")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--unit")]),t._v(" rtl "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("--follow")]),t._v("\n"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("..")]),t._v(".\nJul "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("27")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("18")]),t._v(":27:52 ubuntu node"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("[")]),s("span",{pre:!0,attrs:{class:"token number"}},[t._v("988638")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("]")]),t._v(": Server is up and running, please "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),t._v(" the UI at http://localhost:3000\n")])])]),s("p",[t._v("If it doesn't start correctly stop the service and run the application directly to get any error messages.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop rtl\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("RTL_CONFIG_PATH")]),s("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),t._v("/var/lib/rtl"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/RTL"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("node")]),t._v(" rtl"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\nServer is up and running, please "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("open")]),t._v(" the UI at http://localhost:3000\n")])])]),s("p",[t._v("From the "),s("code",[t._v("BTCPay Server")]),t._v(" web page the "),s("code",[t._v("RTL")]),t._v(" interface should be accessible from "),s("code",[t._v("Server Settings->Services")]),t._v(' under the "Crypto services exposed by your server" heading.')]),t._v(" "),s("h5",{attrs:{id:"update-4"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#update-4"}},[t._v("#")]),t._v(" Update")]),t._v(" "),s("p",[t._v("Updating could break things. Be careful on a live system.")]),t._v(" "),s("div",{staticClass:"language-bash extra-class"},[s("pre",{pre:!0,attrs:{class:"language-bash"}},[s("code",[t._v("~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl stop rtl\n~$ "),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" ~"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("pushd")]),t._v(" ~/src/RTL"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("git")]),t._v(" pull"),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("npm")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("install")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v(" "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("popd")]),s("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n~$ "),s("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" systemctl start rtl\n")])])]),s("h2",{attrs:{id:"the-end"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#the-end"}},[t._v("#")]),t._v(" The End")]),t._v(" "),s("h3",{attrs:{id:"questions"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#questions"}},[t._v("#")]),t._v(" Questions")]),t._v(" "),s("p",[t._v("Join the "),s("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[t._v("community chat"),s("OutboundLink")],1),t._v(" on Mattermost by downloading "),s("a",{attrs:{href:"https://mattermost.com/download/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Mattermost app"),s("OutboundLink")],1),t._v(", or on "),s("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[t._v("Telegram"),s("OutboundLink")],1),t._v(" in case you need further help or help or want to hang around with like-minded people.")])])}),[],!1,null,null,null);s.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/12.b25f20a6.js b/assets/js/12.7a1196a8.js similarity index 83% rename from assets/js/12.b25f20a6.js rename to assets/js/12.7a1196a8.js index b7cd628eaa..8110924de0 100644 --- a/assets/js/12.b25f20a6.js +++ b/assets/js/12.7a1196a8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{339:function(e,t,o){e.exports=o.p+"assets/img/16_wix_btcpay-config.5f3fa8a9.png"},695:function(e,t,o){e.exports=o.p+"assets/img/01_wix_dev-mode.d3ebf3bb.png"},696:function(e,t,o){e.exports=o.p+"assets/img/02_wix_service-plugin-payment.99ffd208.png"},697:function(e,t,o){e.exports=o.p+"assets/img/03_wix_ppsp-start-now.044a2d88.png"},698:function(e,t,o){e.exports=o.p+"assets/img/04_wix_ppsp-legal-notice.658c1fe6.png"},699:function(e,t,o){e.exports=o.p+"assets/img/05_wix_ppsp-name.990dfe01.png"},700:function(e,t,o){e.exports=o.p+"assets/img/06_wix_ppsp-btcpay-config.5d4b9637.png"},701:function(e,t,o){e.exports=o.p+"assets/img/07_wix_gh-btcpay-config.a90cd4e2.png"},702:function(e,t,o){e.exports=o.p+"assets/img/08_wix_ppsp-btcpay-config-complete.06d14fc5.png"},703:function(e,t,o){e.exports=o.p+"assets/img/09_wix_gh-btcpay.f4ba84b1.png"},704:function(e,t,o){e.exports=o.p+"assets/img/10_wix_ppsp-btcpay.aa84c719.png"},705:function(e,t,o){e.exports=o.p+"assets/img/11_wix_backend-expose-site-api.a7733acf.png"},706:function(e,t,o){e.exports=o.p+"assets/img/12_wix_backend-http-functions.ba365413.png"},707:function(e,t,o){e.exports=o.p+"assets/img/13_wix_settings.9275944e.png"},708:function(e,t,o){e.exports=o.p+"assets/img/14_wix_accept-payments.984c3b09.png"},709:function(e,t,o){e.exports=o.p+"assets/img/15_wix_list-btcpay.aabe82d7.png"},710:function(e,t,o){e.exports=o.p+"assets/img/17_btcpay-api-key-page.a525c66b.png"},711:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-1.2a52f496.png"},712:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-2.4a634a53.png"},713:function(e,t,o){e.exports=o.p+"assets/img/19_btcpay-api-key-copy.4cb4fc6a.png"},714:function(e,t,o){e.exports=o.p+"assets/img/20_btcpay-store-id.62536621.png"},715:function(e,t,o){e.exports=o.p+"assets/img/21_btcpay-webhook-page.6ca3fd85.png"},716:function(e,t,o){e.exports=o.p+"assets/img/22_btcpay-webhook-saved.1e659e6d.png"},717:function(e,t,o){e.exports=o.p+"assets/img/23_wix_btcpay-config-saved.30337d07.png"},904: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(695),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(696),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(697),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(698),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(699),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(700),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(701),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(702),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(703),alt:"BTCPay.js",title:"BTCPay.js"}}),e._v(" "),t("img",{attrs:{src:o(704),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(705),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(706),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(707),alt:"Settings",title:"Settings"}}),e._v(" "),t("img",{attrs:{src:o(708),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(709),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(339),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(710),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(711),alt:"API Key permissions 1",title:"API Key permissions 1"}}),e._v(" "),t("img",{attrs:{src:o(712),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(713),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(714),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(715),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(716),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(339),alt:"Save configuration",title:"Save configuration"}}),e._v(" "),t("img",{attrs:{src:o(717),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([[12],{339:function(e,t,o){e.exports=o.p+"assets/img/16_wix_btcpay-config.5f3fa8a9.png"},683:function(e,t,o){e.exports=o.p+"assets/img/01_wix_dev-mode.d3ebf3bb.png"},684:function(e,t,o){e.exports=o.p+"assets/img/02_wix_service-plugin-payment.99ffd208.png"},685:function(e,t,o){e.exports=o.p+"assets/img/03_wix_ppsp-start-now.044a2d88.png"},686:function(e,t,o){e.exports=o.p+"assets/img/04_wix_ppsp-legal-notice.658c1fe6.png"},687:function(e,t,o){e.exports=o.p+"assets/img/05_wix_ppsp-name.990dfe01.png"},688:function(e,t,o){e.exports=o.p+"assets/img/06_wix_ppsp-btcpay-config.5d4b9637.png"},689:function(e,t,o){e.exports=o.p+"assets/img/07_wix_gh-btcpay-config.a90cd4e2.png"},690:function(e,t,o){e.exports=o.p+"assets/img/08_wix_ppsp-btcpay-config-complete.06d14fc5.png"},691:function(e,t,o){e.exports=o.p+"assets/img/09_wix_gh-btcpay.f4ba84b1.png"},692:function(e,t,o){e.exports=o.p+"assets/img/10_wix_ppsp-btcpay.aa84c719.png"},693:function(e,t,o){e.exports=o.p+"assets/img/11_wix_backend-expose-site-api.a7733acf.png"},694:function(e,t,o){e.exports=o.p+"assets/img/12_wix_backend-http-functions.ba365413.png"},695:function(e,t,o){e.exports=o.p+"assets/img/13_wix_settings.9275944e.png"},696:function(e,t,o){e.exports=o.p+"assets/img/14_wix_accept-payments.984c3b09.png"},697:function(e,t,o){e.exports=o.p+"assets/img/15_wix_list-btcpay.aabe82d7.png"},698:function(e,t,o){e.exports=o.p+"assets/img/17_btcpay-api-key-page.a525c66b.png"},699:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-1.2a52f496.png"},700:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-2.4a634a53.png"},701:function(e,t,o){e.exports=o.p+"assets/img/19_btcpay-api-key-copy.4cb4fc6a.png"},702:function(e,t,o){e.exports=o.p+"assets/img/20_btcpay-store-id.62536621.png"},703:function(e,t,o){e.exports=o.p+"assets/img/21_btcpay-webhook-page.6ca3fd85.png"},704:function(e,t,o){e.exports=o.p+"assets/img/22_btcpay-webhook-saved.1e659e6d.png"},705:function(e,t,o){e.exports=o.p+"assets/img/23_wix_btcpay-config-saved.30337d07.png"},902: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(683),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(684),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(685),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(686),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(687),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(688),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(689),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(690),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(691),alt:"BTCPay.js",title:"BTCPay.js"}}),e._v(" "),t("img",{attrs:{src:o(692),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(693),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(694),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(695),alt:"Settings",title:"Settings"}}),e._v(" "),t("img",{attrs:{src:o(696),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(697),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(339),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(698),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(699),alt:"API Key permissions 1",title:"API Key permissions 1"}}),e._v(" "),t("img",{attrs:{src:o(700),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(701),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(702),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(703),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(704),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(339),alt:"Save configuration",title:"Save configuration"}}),e._v(" "),t("img",{attrs:{src:o(705),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/120.693bbf3d.js b/assets/js/120.a744840a.js similarity index 99% rename from assets/js/120.693bbf3d.js rename to assets/js/120.a744840a.js index 8acd4a2591..030b5a93e1 100644 --- a/assets/js/120.693bbf3d.js +++ b/assets/js/120.a744840a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[120],{805: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([[120],{806: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/121.0b3c9f6d.js b/assets/js/121.fc35be78.js similarity index 99% rename from assets/js/121.0b3c9f6d.js rename to assets/js/121.fc35be78.js index 28faf8fe97..b3158e0415 100644 --- a/assets/js/121.0b3c9f6d.js +++ b/assets/js/121.fc35be78.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[121],{806: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([[121],{805: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/122.989f333d.js b/assets/js/122.6f3a1eda.js similarity index 99% rename from assets/js/122.989f333d.js rename to assets/js/122.6f3a1eda.js index 370ec8c5c0..a8a187b334 100644 --- a/assets/js/122.989f333d.js +++ b/assets/js/122.6f3a1eda.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[122],{810: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([[122],{807: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/123.db840fc2.js b/assets/js/123.1267bc5a.js similarity index 98% rename from assets/js/123.db840fc2.js rename to assets/js/123.1267bc5a.js index e72e3551d0..91fcfb599f 100644 --- a/assets/js/123.db840fc2.js +++ b/assets/js/123.1267bc5a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{807: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:"introduction-to-web-deployments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction-to-web-deployments"}},[e._v("#")]),e._v(" Introduction to Web Deployments")]),e._v(" "),t("p",[e._v("We will take you through possible "),t("code",[e._v("Web Deployments")]),e._v(" on this page and update the list as more providers offer BTCPay Server as a service.\nBut what is a "),t("code",[e._v("Web deployment")]),e._v("?\nIn short, a third-party hosted environment.")]),e._v(" "),t("p",[e._v("What do they do? They offer you the user, storage space, and compute power.\nAnd in particular, for this page, they offer hosted Bitcoin nodes.")]),e._v(" "),t("p",[e._v("Now you don't have to buy, host and maintain your own hardware. The service provider takes care of this.\nThis comes with the risk factor of trusting someone to host your bitcoin node and BTCPay Server on top of that.\nEvery hoster comes with its own pros and cons. One might be cheaper, and the other maybe has better support levels.\nHowever, we will guide you through the ones we've listed and offer BTCPay Server solutions.")]),e._v(" "),t("p",[e._v("Below you will find a short introduction to each service and a detailed guide on each of them.")]),e._v(" "),t("h2",{attrs:{id:"known-web-deployments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#known-web-deployments"}},[e._v("#")]),e._v(" Known web deployments")]),e._v(" "),t("h3",{attrs:{id:"lunanode-web-wizard"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lunanode-web-wizard"}},[e._v("#")]),e._v(" LunaNode web-wizard")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://www.lunanode.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("LunaNode"),t("OutboundLink")],1),e._v(" is a Canadian-based hosting provider that accepts Bitcoin payments and requires no personal identification except for a phone number verification.")]),e._v(" "),t("p",[e._v("Their web wizard is one of the easiest ways to "),t("strong",[e._v("deploy BTCPay Servers from a very user-friendly interface")]),e._v(".\nLunaNode will provide you with a generic domain for your server to get you started.")]),e._v(" "),t("p",[e._v("For more details on "),t("code",[e._v("LunaNode")]),e._v(" click "),t("RouterLink",{attrs:{to:"/Deployment/LunaNode/"}},[e._v("here")])],1),e._v(" "),t("h3",{attrs:{id:"voltage-cloud"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#voltage-cloud"}},[e._v("#")]),e._v(" Voltage Cloud")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://www.voltage.cloud",target:"_blank",rel:"noopener noreferrer"}},[e._v("Voltage"),t("OutboundLink")],1),e._v(" is an infrastructure provider for Bitcoin.\nBy focusing on Bitcoin exclusively, they can offer quality services to their clients.\nAutomatically connect your Voltage Lightning node.")]),e._v(" "),t("p",[e._v("For more details on "),t("code",[e._v("Voltage Cloud")]),e._v(" click "),t("RouterLink",{attrs:{to:"/Deployment/voltagecloud/"}},[e._v("here")])],1),e._v(" "),t("h3",{attrs:{id:"clovyr"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#clovyr"}},[e._v("#")]),e._v(" Clovyr")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://clovyr.app/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Clovyr"),t("OutboundLink")],1),e._v(" is an application deployment service.\nThey allow deploying services, including BTCPay Server, either to their own servers, or to a variety of other VPS providers, such as Digital Ocean, AWS, and Linode.\nFor more details on "),t("code",[e._v("Clovyr")]),e._v(" click "),t("RouterLink",{attrs:{to:"/Deployment/Clovyr/"}},[e._v("here")])],1),e._v(" "),t("h2",{attrs:{id:"elestio"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#elestio"}},[e._v("#")]),e._v(" Elestio")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://elest.io/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Elestio"),t("OutboundLink")],1),e._v(" is a fully managed DevOps platform to deploy your code and open-source software.\nThey allow you to choose the cloud service provider of your choice such as Digital Ocean, AWS, Linode and many others. Elestio takes care of the migrations, backups, version changes and security to help you deploy your BTCPay Server easily.")]),e._v(" "),t("p",[e._v("For more details on "),t("code",[e._v("Elestio")]),e._v(" click "),t("a",{attrs:{href:"https://elest.io/open-source/btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"missing-deployments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#missing-deployments"}},[e._v("#")]),e._v(" Missing deployments?")]),e._v(" "),t("p",[e._v("As we are a FOSS project, we might miss certain deployments.\nFound a deployment that is missing, and do you want it added or notified us?\nJoin the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("community chat"),t("OutboundLink")],1),e._v(" on Mattermost by downloading "),t("a",{attrs:{href:"https://mattermost.com/download/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost app"),t("OutboundLink")],1),e._v(", or on "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" and tell us about it.\nYou can also create an issue in the BTCPay server Documents on "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(".")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[123],{809: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:"introduction-to-web-deployments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#introduction-to-web-deployments"}},[e._v("#")]),e._v(" Introduction to Web Deployments")]),e._v(" "),t("p",[e._v("We will take you through possible "),t("code",[e._v("Web Deployments")]),e._v(" on this page and update the list as more providers offer BTCPay Server as a service.\nBut what is a "),t("code",[e._v("Web deployment")]),e._v("?\nIn short, a third-party hosted environment.")]),e._v(" "),t("p",[e._v("What do they do? They offer you the user, storage space, and compute power.\nAnd in particular, for this page, they offer hosted Bitcoin nodes.")]),e._v(" "),t("p",[e._v("Now you don't have to buy, host and maintain your own hardware. The service provider takes care of this.\nThis comes with the risk factor of trusting someone to host your bitcoin node and BTCPay Server on top of that.\nEvery hoster comes with its own pros and cons. One might be cheaper, and the other maybe has better support levels.\nHowever, we will guide you through the ones we've listed and offer BTCPay Server solutions.")]),e._v(" "),t("p",[e._v("Below you will find a short introduction to each service and a detailed guide on each of them.")]),e._v(" "),t("h2",{attrs:{id:"known-web-deployments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#known-web-deployments"}},[e._v("#")]),e._v(" Known web deployments")]),e._v(" "),t("h3",{attrs:{id:"lunanode-web-wizard"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#lunanode-web-wizard"}},[e._v("#")]),e._v(" LunaNode web-wizard")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://www.lunanode.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("LunaNode"),t("OutboundLink")],1),e._v(" is a Canadian-based hosting provider that accepts Bitcoin payments and requires no personal identification except for a phone number verification.")]),e._v(" "),t("p",[e._v("Their web wizard is one of the easiest ways to "),t("strong",[e._v("deploy BTCPay Servers from a very user-friendly interface")]),e._v(".\nLunaNode will provide you with a generic domain for your server to get you started.")]),e._v(" "),t("p",[e._v("For more details on "),t("code",[e._v("LunaNode")]),e._v(" click "),t("RouterLink",{attrs:{to:"/Deployment/LunaNode/"}},[e._v("here")])],1),e._v(" "),t("h3",{attrs:{id:"voltage-cloud"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#voltage-cloud"}},[e._v("#")]),e._v(" Voltage Cloud")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://www.voltage.cloud",target:"_blank",rel:"noopener noreferrer"}},[e._v("Voltage"),t("OutboundLink")],1),e._v(" is an infrastructure provider for Bitcoin.\nBy focusing on Bitcoin exclusively, they can offer quality services to their clients.\nAutomatically connect your Voltage Lightning node.")]),e._v(" "),t("p",[e._v("For more details on "),t("code",[e._v("Voltage Cloud")]),e._v(" click "),t("RouterLink",{attrs:{to:"/Deployment/voltagecloud/"}},[e._v("here")])],1),e._v(" "),t("h3",{attrs:{id:"clovyr"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#clovyr"}},[e._v("#")]),e._v(" Clovyr")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://clovyr.app/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Clovyr"),t("OutboundLink")],1),e._v(" is an application deployment service.\nThey allow deploying services, including BTCPay Server, either to their own servers, or to a variety of other VPS providers, such as Digital Ocean, AWS, and Linode.\nFor more details on "),t("code",[e._v("Clovyr")]),e._v(" click "),t("RouterLink",{attrs:{to:"/Deployment/Clovyr/"}},[e._v("here")])],1),e._v(" "),t("h2",{attrs:{id:"elestio"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#elestio"}},[e._v("#")]),e._v(" Elestio")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://elest.io/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Elestio"),t("OutboundLink")],1),e._v(" is a fully managed DevOps platform to deploy your code and open-source software.\nThey allow you to choose the cloud service provider of your choice such as Digital Ocean, AWS, Linode and many others. Elestio takes care of the migrations, backups, version changes and security to help you deploy your BTCPay Server easily.")]),e._v(" "),t("p",[e._v("For more details on "),t("code",[e._v("Elestio")]),e._v(" click "),t("a",{attrs:{href:"https://elest.io/open-source/btcpay",target:"_blank",rel:"noopener noreferrer"}},[e._v("here"),t("OutboundLink")],1)]),e._v(" "),t("h2",{attrs:{id:"missing-deployments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#missing-deployments"}},[e._v("#")]),e._v(" Missing deployments?")]),e._v(" "),t("p",[e._v("As we are a FOSS project, we might miss certain deployments.\nFound a deployment that is missing, and do you want it added or notified us?\nJoin the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("community chat"),t("OutboundLink")],1),e._v(" on Mattermost by downloading "),t("a",{attrs:{href:"https://mattermost.com/download/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mattermost app"),t("OutboundLink")],1),e._v(", or on "),t("a",{attrs:{href:"https://t.me/btcpayserver",target:"_blank",rel:"noopener noreferrer"}},[e._v("Telegram"),t("OutboundLink")],1),e._v(" and tell us about it.\nYou can also create an issue in the BTCPay server Documents on "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[e._v("Github"),t("OutboundLink")],1),e._v(".")])])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/124.e54fba01.js b/assets/js/124.f13046f8.js similarity index 98% rename from assets/js/124.e54fba01.js rename to assets/js/124.f13046f8.js index c359ca452a..6a005319e2 100644 --- a/assets/js/124.e54fba01.js +++ b/assets/js/124.f13046f8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[124],{809: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([[124],{811: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/125.c1532fa3.js b/assets/js/125.3d68b511.js similarity index 99% rename from assets/js/125.c1532fa3.js rename to assets/js/125.3d68b511.js index 0db3403e41..7a23d58533 100644 --- a/assets/js/125.c1532fa3.js +++ b/assets/js/125.3d68b511.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[125],{811: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([[125],{810: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/126.857d9e03.js b/assets/js/126.e5520b14.js similarity index 99% rename from assets/js/126.857d9e03.js rename to assets/js/126.e5520b14.js index d22e212644..43f285f22a 100644 --- a/assets/js/126.857d9e03.js +++ b/assets/js/126.e5520b14.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[126],{814:function(a,s,t){"use strict";t.r(s);var e=t(17),r=Object(e.a)({},(function(){var a=this,s=a._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-example-with-curl"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-example-with-curl"}},[a._v("#")]),a._v(" Greenfield API example with cURL")]),a._v(" "),s("p",[a._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Greenfield API"),s("OutboundLink")],1)]),a._v(" (also available on your instance on "),s("code",[a._v("/docs")]),a._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),a._v(" "),s("p",[a._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"}},[a._v("Swagger file"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("p",[a._v("In this guide, we will show you how to use it via command line on linux using "),s("code",[a._v("curl")]),a._v(" and "),s("code",[a._v("jq")]),a._v(".")]),a._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[a._v("#")]),a._v(" Prerequisites")]),a._v(" "),s("p",[a._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.")]),a._v(" "),s("p",[a._v("You can create a new API key in the BTCPay Server UI under "),s("code",[a._v("Account")]),a._v(" -> "),s("code",[a._v("Manage account")]),a._v(" -> "),s("code",[a._v("API keys")])]),a._v(" "),s("p",[a._v("For the ecommerce examples below the API key needs the following permissions:")]),a._v(" "),s("ul",[s("li",[a._v("View invoices")]),a._v(" "),s("li",[a._v("Create invoice")]),a._v(" "),s("li",[a._v("Modify invoices")]),a._v(" "),s("li",[a._v("Modify stores webhooks")]),a._v(" "),s("li",[a._v("View your stores")]),a._v(" "),s("li",[a._v("Create non-approved pull payments")])]),a._v(" "),s("p",[a._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"}},[a._v("API documentation"),s("OutboundLink")],1),a._v(" or the permissions documented on each endpoint.")]),a._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[a._v("#")]),a._v(" eCommerce examples")]),a._v(" "),s("p",[a._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.")]),a._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[a._v("#")]),a._v(" Create an invoice")]),a._v(" "),s("p",[a._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"}},[a._v("create invoice endpoint"),s("OutboundLink")],1),a._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.")]),a._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 assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("AMOUNT")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"10"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("CURRENCY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"USD"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$AMOUNT")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {amount:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$CURRENCY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {currency:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v('/invoices"')]),a._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[a._v("#")]),a._v(" Register a webhook (optional)")]),a._v(" "),s("p",[a._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"}},[a._v("create webhook endpoint"),s("OutboundLink")],1),a._v(" to register a webhook.")]),a._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 assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("URL")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://example.com/your-webhook-endpoint"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$URL")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {url:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v('/webhooks"')]),a._v("\n")])])]),s("p",[a._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[a._v("Settings")]),a._v(" -> "),s("code",[a._v("Webhooks")]),a._v(".")]),a._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[a._v("#")]),a._v(" Validate and process webhooks")]),a._v(" "),s("p",[a._v("This is not really possible with curl in bash but when you run a webserver. You can check the examples for "),s("RouterLink",{attrs:{to:"/Development/GreenFieldExample-NodeJS/"}},[a._v("NodeJS")]),a._v(" and "),s("RouterLink",{attrs:{to:"/Development/GreenfieldExample-PHP/"}},[a._v("PHP")]),a._v(".")],1),a._v(" "),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"}},[a._v("#")]),a._v(" Issue a full refund of an invoice")]),a._v(" "),s("p",[a._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[a._v("invoice refund endpoint"),s("OutboundLink")],1),a._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.")]),a._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 assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("INVOICE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"EXISTING_INVOICE_ID"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PAYMENT_METHOD")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"BTC"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REFUND_VARIANT")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"CurrentRate"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$REFUND_VARIANT")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {refundVariant:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PAYMENT_METHOD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {paymentMethod:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v("/invoices/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$INVOICE_ID")]),a._v('/refund"')]),a._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[a._v("#")]),a._v(" BTCPay Server management examples")]),a._v(" "),s("p",[a._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.")]),a._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[a._v("#")]),a._v(" Create a new user")]),a._v(" "),s("p",[a._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"}},[a._v("this endpoint"),s("OutboundLink")],1),a._v(".")]),a._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 assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("ADMIN_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_ADMIN_API_KEY"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("USER")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"satoshi.nakamoto@example.com"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PASSWORD")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"SuperSecurePasswordsShouldBeQuiteLong123"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {email:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PASSWORD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {password:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$ADMIN_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v('/api/v1/users"')]),a._v("\n")])])]),s("h3",{attrs:{id:"create-a-store-on-behalf-of-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-store-on-behalf-of-the-user"}},[a._v("#")]),a._v(" Create a store on behalf of the user")]),a._v(" "),s("p",[a._v("Now we create a store with the new users credentials the user becomes the owner "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[a._v("create a new store"),s("OutboundLink")],1),a._v(".")]),a._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 assign-left variable"}},[a._v("STORE_NAME")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"My awesome store"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_NAME")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {name:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--user")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v(":"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PASSWORD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v('/api/v1/stores"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-r")]),a._v(" .id"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"New store id: '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-on-behalf-of-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-on-behalf-of-the-user"}},[a._v("#")]),a._v(" Create a new API key on behalf of the user")]),a._v(" "),s("p",[a._v("Now we can create an API key and limit it to the new store with e.g. the "),s("code",[a._v("btcpay.store.canmodifystoresettings")]),a._v(" permission. Likely you also want to allow API key to create invoices, but for this example we keep it simple.")]),a._v(" "),s("p",[a._v('You can find the needed permissions for endpoints on the endpoint docs under "Authorization" or an overview of permissions in the '),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[a._v("authorization section"),s("OutboundLink")],1),a._v(".")]),a._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 assign-left variable"}},[a._v("ADMIN_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_ADMIN_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("USER")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"satoshi.nakamoto@example.com"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PERMISSION")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.store.canmodifystoresettings"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"NEW_STORE_ID_FROM_PREVIOUS_STEP"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PERMISSION")]),a._v(":"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {permissions:[$a]}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("USER_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$ADMIN_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/users/"),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v('/api-keys"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-r")]),a._v(" .apiKey"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"New user api key: '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$USER_API_KEY")]),a._v('"')]),a._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[a._v("#")]),a._v(" Read store information")]),a._v(" "),s("p",[a._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"}},[a._v("read store"),s("OutboundLink")],1),a._v(" information:")]),a._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 assign-left variable"}},[a._v("USER_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"API_KEY_FROM_PREVIOUS_STEP"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"NEW_STORE_ID_FROM_BEFORE_PREVIOUS_STEP"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$USER_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" GET "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v("\n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[126],{812:function(a,s,t){"use strict";t.r(s);var e=t(17),r=Object(e.a)({},(function(){var a=this,s=a._self._c;return s("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[s("h1",{attrs:{id:"greenfield-api-example-with-curl"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#greenfield-api-example-with-curl"}},[a._v("#")]),a._v(" Greenfield API example with cURL")]),a._v(" "),s("p",[a._v("The "),s("strong",[s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Greenfield API"),s("OutboundLink")],1)]),a._v(" (also available on your instance on "),s("code",[a._v("/docs")]),a._v(") allows you to operate BTCPay Server via an easy-to-use REST API.")]),a._v(" "),s("p",[a._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"}},[a._v("Swagger file"),s("OutboundLink")],1),a._v(".")]),a._v(" "),s("p",[a._v("In this guide, we will show you how to use it via command line on linux using "),s("code",[a._v("curl")]),a._v(" and "),s("code",[a._v("jq")]),a._v(".")]),a._v(" "),s("h2",{attrs:{id:"prerequisites"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[a._v("#")]),a._v(" Prerequisites")]),a._v(" "),s("p",[a._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.")]),a._v(" "),s("p",[a._v("You can create a new API key in the BTCPay Server UI under "),s("code",[a._v("Account")]),a._v(" -> "),s("code",[a._v("Manage account")]),a._v(" -> "),s("code",[a._v("API keys")])]),a._v(" "),s("p",[a._v("For the ecommerce examples below the API key needs the following permissions:")]),a._v(" "),s("ul",[s("li",[a._v("View invoices")]),a._v(" "),s("li",[a._v("Create invoice")]),a._v(" "),s("li",[a._v("Modify invoices")]),a._v(" "),s("li",[a._v("Modify stores webhooks")]),a._v(" "),s("li",[a._v("View your stores")]),a._v(" "),s("li",[a._v("Create non-approved pull payments")])]),a._v(" "),s("p",[a._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"}},[a._v("API documentation"),s("OutboundLink")],1),a._v(" or the permissions documented on each endpoint.")]),a._v(" "),s("h2",{attrs:{id:"ecommerce-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#ecommerce-examples"}},[a._v("#")]),a._v(" eCommerce examples")]),a._v(" "),s("p",[a._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.")]),a._v(" "),s("h3",{attrs:{id:"create-an-invoice"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-an-invoice"}},[a._v("#")]),a._v(" Create an invoice")]),a._v(" "),s("p",[a._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"}},[a._v("create invoice endpoint"),s("OutboundLink")],1),a._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.")]),a._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 assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("AMOUNT")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"10"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("CURRENCY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"USD"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$AMOUNT")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {amount:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$CURRENCY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {currency:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v('/invoices"')]),a._v("\n")])])]),s("h3",{attrs:{id:"register-a-webhook-optional"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#register-a-webhook-optional"}},[a._v("#")]),a._v(" Register a webhook (optional)")]),a._v(" "),s("p",[a._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"}},[a._v("create webhook endpoint"),s("OutboundLink")],1),a._v(" to register a webhook.")]),a._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 assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("URL")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://example.com/your-webhook-endpoint"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$URL")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {url:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v('/webhooks"')]),a._v("\n")])])]),s("p",[a._v("This step is optional, you can also manually create a webhook in the BTCPay Server UI in your store "),s("code",[a._v("Settings")]),a._v(" -> "),s("code",[a._v("Webhooks")]),a._v(".")]),a._v(" "),s("h3",{attrs:{id:"validate-and-process-webhooks"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#validate-and-process-webhooks"}},[a._v("#")]),a._v(" Validate and process webhooks")]),a._v(" "),s("p",[a._v("This is not really possible with curl in bash but when you run a webserver. You can check the examples for "),s("RouterLink",{attrs:{to:"/Development/GreenFieldExample-NodeJS/"}},[a._v("NodeJS")]),a._v(" and "),s("RouterLink",{attrs:{to:"/Development/GreenfieldExample-PHP/"}},[a._v("PHP")]),a._v(".")],1),a._v(" "),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"}},[a._v("#")]),a._v(" Issue a full refund of an invoice")]),a._v(" "),s("p",[a._v("Using the "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_Refund",target:"_blank",rel:"noopener noreferrer"}},[a._v("invoice refund endpoint"),s("OutboundLink")],1),a._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.")]),a._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 assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_STORE_ID"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("INVOICE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"EXISTING_INVOICE_ID"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PAYMENT_METHOD")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"BTC"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REFUND_VARIANT")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"CurrentRate"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$REFUND_VARIANT")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {refundVariant:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PAYMENT_METHOD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {paymentMethod:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_ID")]),a._v("/invoices/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$INVOICE_ID")]),a._v('/refund"')]),a._v("\n")])])]),s("h2",{attrs:{id:"btcpay-server-management-examples"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-server-management-examples"}},[a._v("#")]),a._v(" BTCPay Server management examples")]),a._v(" "),s("p",[a._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.")]),a._v(" "),s("h3",{attrs:{id:"create-a-new-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-user"}},[a._v("#")]),a._v(" Create a new user")]),a._v(" "),s("p",[a._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"}},[a._v("this endpoint"),s("OutboundLink")],1),a._v(".")]),a._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 assign-left variable"}},[a._v("BTCPAY_INSTANCE")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"https://mainnet.demo.btcpayserver.org"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("ADMIN_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_ADMIN_API_KEY"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("USER")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"satoshi.nakamoto@example.com"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PASSWORD")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"SuperSecurePasswordsShouldBeQuiteLong123"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {email:$a}'")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PASSWORD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {password:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$ADMIN_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v('/api/v1/users"')]),a._v("\n")])])]),s("h3",{attrs:{id:"create-a-store-on-behalf-of-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-store-on-behalf-of-the-user"}},[a._v("#")]),a._v(" Create a store on behalf of the user")]),a._v(" "),s("p",[a._v("Now we create a store with the new users credentials the user becomes the owner "),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore",target:"_blank",rel:"noopener noreferrer"}},[a._v("create a new store"),s("OutboundLink")],1),a._v(".")]),a._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 assign-left variable"}},[a._v("STORE_NAME")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"My awesome store"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$STORE_NAME")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {name:$a}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--user")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v(":"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PASSWORD")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v('/api/v1/stores"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-r")]),a._v(" .id"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"New store id: '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v("\n")])])]),s("h3",{attrs:{id:"create-a-new-api-key-on-behalf-of-the-user"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#create-a-new-api-key-on-behalf-of-the-user"}},[a._v("#")]),a._v(" Create a new API key on behalf of the user")]),a._v(" "),s("p",[a._v("Now we can create an API key and limit it to the new store with e.g. the "),s("code",[a._v("btcpay.store.canmodifystoresettings")]),a._v(" permission. Likely you also want to allow API key to create invoices, but for this example we keep it simple.")]),a._v(" "),s("p",[a._v('You can find the needed permissions for endpoints on the endpoint docs under "Authorization" or an overview of permissions in the '),s("a",{attrs:{href:"https://docs.btcpayserver.org/API/Greenfield/v1/#section/Authentication/API_Key",target:"_blank",rel:"noopener noreferrer"}},[a._v("authorization section"),s("OutboundLink")],1),a._v(".")]),a._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 assign-left variable"}},[a._v("ADMIN_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"YOUR_ADMIN_API_KEY"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("USER")])]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"satoshi.nakamoto@example.com"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("PERMISSION")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.store.canmodifystoresettings"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"NEW_STORE_ID_FROM_PREVIOUS_STEP"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BODY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"{}"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--arg")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"a"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$PERMISSION")]),a._v(":"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v("'. + {permissions:[$a]}'")]),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("USER_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$ADMIN_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" POST "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-d")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BODY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/users/"),s("span",{pre:!0,attrs:{class:"token environment constant"}},[a._v("$USER")]),a._v('/api-keys"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" jq "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-r")]),a._v(" .apiKey"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"New user api key: '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$USER_API_KEY")]),a._v('"')]),a._v("\n")])])]),s("h3",{attrs:{id:"read-store-information"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#read-store-information"}},[a._v("#")]),a._v(" Read store information")]),a._v(" "),s("p",[a._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"}},[a._v("read store"),s("OutboundLink")],1),a._v(" information:")]),a._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 assign-left variable"}},[a._v("USER_API_KEY")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"API_KEY_FROM_PREVIOUS_STEP"')]),a._v("\n"),s("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NEW_STORE_ID")]),s("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"NEW_STORE_ID_FROM_BEFORE_PREVIOUS_STEP"')]),a._v("\n\n"),s("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Content-Type: application/json"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-H")]),a._v(" "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"Authorization: token '),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$USER_API_KEY")]),a._v('"')]),a._v(" "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-X")]),a._v(" GET "),s("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("\\")]),a._v("\n "),s("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_INSTANCE")]),a._v("/api/v1/stores/"),s("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$NEW_STORE_ID")]),a._v('"')]),a._v("\n")])])])])}),[],!1,null,null,null);s.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/127.0938d0f6.js b/assets/js/127.7107aeb8.js similarity index 99% rename from assets/js/127.0938d0f6.js rename to assets/js/127.7107aeb8.js index b5b27a80e0..738a041870 100644 --- a/assets/js/127.0938d0f6.js +++ b/assets/js/127.7107aeb8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[127],{894: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([[127],{814: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/128.03961572.js b/assets/js/128.a1f579e1.js similarity index 99% rename from assets/js/128.03961572.js rename to assets/js/128.a1f579e1.js index 20f4f6fed0..da2a03c9f2 100644 --- a/assets/js/128.03961572.js +++ b/assets/js/128.a1f579e1.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[128],{812: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([[128],{813: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/129.656d8ded.js b/assets/js/129.3e6b9d90.js similarity index 99% rename from assets/js/129.656d8ded.js rename to assets/js/129.3e6b9d90.js index 068322ba21..962db9a579 100644 --- a/assets/js/129.656d8ded.js +++ b/assets/js/129.3e6b9d90.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[129],{813: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([[129],{815: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/130.0b1fefa1.js b/assets/js/130.9b8d0bda.js similarity index 99% rename from assets/js/130.0b1fefa1.js rename to assets/js/130.9b8d0bda.js index c59b0a21bb..983f61e5bb 100644 --- a/assets/js/130.0b1fefa1.js +++ b/assets/js/130.9b8d0bda.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[130],{815: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([[130],{816: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/132.6ea08cc4.js b/assets/js/132.1bc55e97.js similarity index 99% rename from assets/js/132.6ea08cc4.js rename to assets/js/132.1bc55e97.js index 1e58621b98..892be458be 100644 --- a/assets/js/132.6ea08cc4.js +++ b/assets/js/132.1bc55e97.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[132],{821: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.05")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.05/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.05/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.05/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/dockerfiles/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/dockerfiles/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/Ride-The-Lightning/RTL/v0.15.4/dockerfiles/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/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("1.13.7$?")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.13.7/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/v1.13.7/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/v1.13.7/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.12")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.12/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.12/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.12/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.13")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.13/Postgres/13.13/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.13/Postgres/13.13/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.13/Postgres/13.13/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.12.3-alpha-path-prefix")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.12.3-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.12.3-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([[132],{822: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.05")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/lightning/basedon-v24.05/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.05/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.05/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/dockerfiles/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/dockerfiles/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/Ride-The-Lightning/RTL/v0.15.4/dockerfiles/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/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("1.13.7$?")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/btcpayserver/v1.13.7/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/v1.13.7/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/v1.13.7/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.12")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/dgarage/nbxplorer/v2.5.12/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.12/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.12/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.13")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/btcpayserver/dockerfile-deps/Postgres/13.13/Postgres/13.13/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.13/Postgres/13.13/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.13/Postgres/13.13/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.12.3-alpha-path-prefix")]),e._v(" "),t("td",{staticStyle:{"text-align":"center"}},[t("a",{attrs:{href:"https://raw.githubusercontent.com/lightninglabs/lightning-terminal/v0.12.3-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.12.3-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/133.2f039671.js b/assets/js/133.15c24758.js similarity index 99% rename from assets/js/133.2f039671.js rename to assets/js/133.15c24758.js index ddf36a4fcd..6b0bf025fd 100644 --- a/assets/js/133.2f039671.js +++ b/assets/js/133.15c24758.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[133],{822: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([[133],{823: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.6e9dd4bf.js b/assets/js/135.8d4d856a.js similarity index 97% rename from assets/js/135.6e9dd4bf.js rename to assets/js/135.8d4d856a.js index 9e19479999..c513d0a719 100644 --- a/assets/js/135.6e9dd4bf.js +++ b/assets/js/135.8d4d856a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[135],{825: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([[135],{828: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/136.7596e91f.js b/assets/js/136.179f2907.js similarity index 99% rename from assets/js/136.7596e91f.js rename to assets/js/136.179f2907.js index 4ee6553fcf..d83247ba33 100644 --- a/assets/js/136.7596e91f.js +++ b/assets/js/136.179f2907.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[136],{826: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([[136],{827: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/137.98929bae.js b/assets/js/137.ed690439.js similarity index 97% rename from assets/js/137.98929bae.js rename to assets/js/137.ed690439.js index 0ca0328b51..46ce38995b 100644 --- a/assets/js/137.98929bae.js +++ b/assets/js/137.ed690439.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[137],{828: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([[137],{829: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/138.422099a8.js b/assets/js/138.c8991843.js similarity index 98% rename from assets/js/138.422099a8.js rename to assets/js/138.c8991843.js index d2470b3781..f6bc879fbe 100644 --- a/assets/js/138.422099a8.js +++ b/assets/js/138.c8991843.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[138],{829: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([[138],{830: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/139.c3739c64.js b/assets/js/139.117fd5ad.js similarity index 98% rename from assets/js/139.c3739c64.js rename to assets/js/139.117fd5ad.js index b343e7160c..de405cf6b6 100644 --- a/assets/js/139.c3739c64.js +++ b/assets/js/139.117fd5ad.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[139],{830: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([[139],{831: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/14.4fa83066.js b/assets/js/14.71884343.js similarity index 89% rename from assets/js/14.4fa83066.js rename to assets/js/14.71884343.js index fe5ef81c4c..0da6abe8b9 100644 --- a/assets/js/14.4fa83066.js +++ b/assets/js/14.71884343.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{332:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--19-troubleshoot-403-callback.51193927.png"},633:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--01-install-web.4d28e0bd.png"},634:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--02-install-upload.8972740d.png"},635:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--03-enable-plugin.1b4a6c9f.png"},636:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--04-add-new-payment-method.e5a94ee3.png"},637:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--05-payment-method-details.adf89c97.png"},638:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--06-payment-method-configuration-tab.45617db0.png"},639:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--07-account-manage.d477b8b4.png"},640:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--08-add-api-key.a58b2941.png"},641:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--09-permissions-and-select-store.9ccef388.png"},642:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--10-permissions-set.74d76936.png"},643:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--11-copy-api-key.94be9878.png"},644:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--12-copy-store-id.84c19f9f.png"},645:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--13-save-vm-payment-method-form.0a3e52bd.png"},646:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--14-create-webhook.1b6e4881.png"},647:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--15-webhook-payload-url.37a4f55f.png"},648:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-webhook-copy-secret.71b0dd07.png"},649:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-virtuemart-configuration-save.ee549862.png"},650:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--17-webhook-save.dfd4fca5.png"},651:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--18-troubleshoot-copy-callback-url.70d08e31.png"},896: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(633),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(634),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(635),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(636),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(637),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(638),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(639),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(640),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(641),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(642),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(643),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(644),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(645),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(646),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(647),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(648),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}}),e._v(" "),t("img",{attrs:{src:a(649),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(650),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(651),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([[14],{332:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--19-troubleshoot-403-callback.51193927.png"},622:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--01-install-web.4d28e0bd.png"},623:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--02-install-upload.8972740d.png"},624:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--03-enable-plugin.1b4a6c9f.png"},625:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--04-add-new-payment-method.e5a94ee3.png"},626:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--05-payment-method-details.adf89c97.png"},627:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--06-payment-method-configuration-tab.45617db0.png"},628:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--07-account-manage.d477b8b4.png"},629:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--08-add-api-key.a58b2941.png"},630:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--09-permissions-and-select-store.9ccef388.png"},631:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--10-permissions-set.74d76936.png"},632:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--11-copy-api-key.94be9878.png"},633:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--12-copy-store-id.84c19f9f.png"},634:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--13-save-vm-payment-method-form.0a3e52bd.png"},635:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--14-create-webhook.1b6e4881.png"},636:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--15-webhook-payload-url.37a4f55f.png"},637:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-webhook-copy-secret.71b0dd07.png"},638:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-virtuemart-configuration-save.ee549862.png"},639:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--17-webhook-save.dfd4fca5.png"},640:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--18-troubleshoot-copy-callback-url.70d08e31.png"},895: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(622),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(623),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(624),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(625),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(626),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(627),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(628),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(629),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(630),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(631),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(632),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(633),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(634),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(635),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(636),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(637),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}}),e._v(" "),t("img",{attrs:{src:a(638),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(639),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(640),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/141.c875732b.js b/assets/js/141.b8553449.js similarity index 99% rename from assets/js/141.c875732b.js rename to assets/js/141.b8553449.js index 39b115e0f7..742918e74a 100644 --- a/assets/js/141.c875732b.js +++ b/assets/js/141.b8553449.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[141],{831: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([[141],{833: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/142.192bf544.js b/assets/js/142.4db575f5.js similarity index 96% rename from assets/js/142.192bf544.js rename to assets/js/142.4db575f5.js index 146ea854cc..7858e23a14 100644 --- a/assets/js/142.192bf544.js +++ b/assets/js/142.4db575f5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{833:function(e,t,r){"use strict";r.r(t);var a=r(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:"dynamic-reports-plugin-for-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dynamic-reports-plugin-for-btcpay-server"}},[e._v("#")]),e._v(" Dynamic Reports Plugin for BTCPay Server")]),e._v(" "),t("p",[e._v("This plugin allows you to create dynamic reports in BTCPay Server, along with re-enabling the old invoice export report.")]),e._v(" "),t("h2",{attrs:{id:"usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[e._v("#")]),e._v(" Usage")]),e._v(" "),t("p",[e._v('After installing the plugin, go to "Server Settings" -> "Dynamic Reports".')]),e._v(" "),t("h3",{attrs:{id:"re-enabling-the-old-invoice-export-report"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#re-enabling-the-old-invoice-export-report"}},[e._v("#")]),e._v(" Re-enabling the old invoice export report")]),e._v(" "),t("p",[e._v('There is a toggle button called "Enable legacy report" available to re-enable the old invoice export. After enabling it will be available in the "Reporting" menu alongside the other existing reports. This report will be available to all users on your instance.')]),e._v(" "),t("h3",{attrs:{id:"creating-custom-reports"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#creating-custom-reports"}},[e._v("#")]),e._v(" Creating custom reports")]),e._v(" "),t("p",[e._v("You can create new reports using raw sql (postgres). These reports are only viewable if you are a server admin by default. You can change this by explicitly specifying it in the report.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{834:function(e,t,r){"use strict";r.r(t);var a=r(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:"dynamic-reports-plugin-for-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dynamic-reports-plugin-for-btcpay-server"}},[e._v("#")]),e._v(" Dynamic Reports Plugin for BTCPay Server")]),e._v(" "),t("p",[e._v("This plugin allows you to create dynamic reports in BTCPay Server, along with re-enabling the old invoice export report.")]),e._v(" "),t("h2",{attrs:{id:"usage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[e._v("#")]),e._v(" Usage")]),e._v(" "),t("p",[e._v('After installing the plugin, go to "Server Settings" -> "Dynamic Reports".')]),e._v(" "),t("h3",{attrs:{id:"re-enabling-the-old-invoice-export-report"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#re-enabling-the-old-invoice-export-report"}},[e._v("#")]),e._v(" Re-enabling the old invoice export report")]),e._v(" "),t("p",[e._v('There is a toggle button called "Enable legacy report" available to re-enable the old invoice export. After enabling it will be available in the "Reporting" menu alongside the other existing reports. This report will be available to all users on your instance.')]),e._v(" "),t("h3",{attrs:{id:"creating-custom-reports"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#creating-custom-reports"}},[e._v("#")]),e._v(" Creating custom reports")]),e._v(" "),t("p",[e._v("You can create new reports using raw sql (postgres). These reports are only viewable if you are a server admin by default. You can change this by explicitly specifying it in the report.")])])}),[],!1,null,null,null);t.default=i.exports}}]); \ No newline at end of file diff --git a/assets/js/143.ae977f45.js b/assets/js/143.1e642c42.js similarity index 99% rename from assets/js/143.ae977f45.js rename to assets/js/143.1e642c42.js index ce3aae7f03..86f2fb11b1 100644 --- a/assets/js/143.ae977f45.js +++ b/assets/js/143.1e642c42.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[143],{834:function(e,t,r){"use strict";r.r(t);var o=r(17),n=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrum-personal-server-eps-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrum-personal-server-eps-integration"}},[e._v("#")]),e._v(" Electrum Personal Server (EPS) integration")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server",target:"_blank",rel:"noopener noreferrer"}},[e._v("Electrum Personal Server or EPS"),t("OutboundLink")],1),e._v(" is a personal version of public Electrum servers like "),t("RouterLink",{attrs:{to:"/ElectrumX/"}},[e._v("ElectrumX")]),e._v(".")],1),e._v(" "),t("p",[t("strong",[e._v("EPS can be integrated into BTCPay Server")]),e._v(" using the optional docker fragment "),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.yml"),t("OutboundLink")],1),e._v(". Use EPS when you want to use your own full node (included in BTCPay Server) to verify your own transactions privately when using Electrum Wallet.")]),e._v(" "),t("p",[e._v("The biggest difference with public Electrum servers (eg. ElectrumX), is that "),t("strong",[e._v("EPS is for monitoring only your own wallet(s)")]),e._v('. The "XPUB" (extended public key) of the wallet you use in Electrum must be shared with EPS in order for it to function all all. Other than this, it functions (from an end user perspective) in the same way as ElectrumX etc. It is '),t("strong",[e._v("easy to integrate into BTCPay")]),e._v(" just follow the instructions below.")]),e._v(" "),t("p",[e._v("EPS does not require "),t("code",[e._v("txindex")]),e._v(" and works on a pruned node.")]),e._v(" "),t("h2",{attrs:{id:"about-tor-support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#about-tor-support"}},[e._v("#")]),e._v(" About Tor support")]),e._v(" "),t("p",[e._v("By default your EPS is accessible over Tor. You can run the following command line via SSH on your server to get your Tor address:")]),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("cat")]),e._v(" /var/lib/docker/volumes/generated_tor_servicesdir/_data/btc-electrum-ps/hostname\n")])])]),t("p",[e._v("You can can also go to your BTCPay Server > Server Settings > Services and find the tor link in "),t("code",[e._v("Other TOR hidden services")]),e._v(".")]),e._v(" "),t("p",[e._v("On the Electrum wallet machine, if you want to connect to your server via Tor, we assume in this tutorial that you run the Tor Browser locally, and thus you will use SOCKS5 port "),t("code",[e._v("9150")]),e._v(". If you run Tor through the command line instead, the local SOCKS5 port is "),t("code",[e._v("9050")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-to-enable-electrum-personal-server-eps-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-enable-electrum-personal-server-eps-in-btcpay"}},[e._v("#")]),e._v(" How to enable Electrum Personal Server (EPS) in BTCPay:")]),e._v(" "),t("ol",[t("li",[t("p",[t("strong",[e._v("If you do not use Tor")]),e._v(", EPS 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. If you use Tor, you can skip this step.")])]),e._v(" "),t("li",[t("p",[e._v('As EPS is for a single wallet (single user), you must specify the XPUB/YPUB/ZPUB of your wallet as an environment varable before you enable the EPS docker-fragment. In Electrum Wallet go to the "Wallet" menu then select "Information" to copy and paste yours. Set ENV variable for your wallet XPUB and enable the Docker Additional Fragment on your BTCPay node by running the following steps:')])])]),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-add-electrum-ps"')]),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("EPS_XPUB")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"XPUB_ADD_YOUR_XPUB_YPUB_OR_ZPUB_HERE"')]),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("ol",{attrs:{start:"3"}},[t("li",[e._v("WAIT for your Bitcoin full node and EPS server 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:\n"),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)\n"),t("code",[e._v("docker logs generated_electrum_ps_1")]),e._v(" - this will show you the EPS sync status. Note: EPS 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 EPS have finished synching, you can proceed to the next step. (Note: Electrum wallets will not connect to an EPS server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"how-to-connect-electrum-wallet-to-eps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-connect-electrum-wallet-to-eps"}},[e._v("#")]),e._v(" How to connect Electrum Wallet to EPS")]),e._v(" "),t("p",[e._v("There are three ways to use your server from Electrum Wallet:")]),e._v(" "),t("ol",[t("li",[e._v("By editing the configuration file")]),e._v(" "),t("li",[e._v("By running Electrum by the command line")]),e._v(" "),t("li",[e._v("Via the user interface (not recommended, bad privacy)")])]),e._v(" "),t("h4",{attrs:{id:"option-1-connect-to-your-eps-server-by-directly-editing-electrum-wallet-config-file-before-even-opening-the-electrum-wallet-gui-recommended-for-full-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-1-connect-to-your-eps-server-by-directly-editing-electrum-wallet-config-file-before-even-opening-the-electrum-wallet-gui-recommended-for-full-privacy"}},[e._v("#")]),e._v(" Option 1: Connect to your EPS Server by directly editing Electrum Wallet config file (before even opening the Electrum wallet GUI - recommended for full privacy):")]),e._v(" "),t("p",[e._v("You can "),t("strong",[e._v("setup your Electrum server")]),e._v(" by editing the configuration file.")]),e._v(" "),t("p",[e._v("In the "),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("Electrum Wallet folder"),t("OutboundLink")],1),e._v(", 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": "yourserver:50002:s",')]),e._v("and switch it to your own EPS 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 strongly recommended for full privacy by locking down Electrum Wallet to one single connection with your private server only ("),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("ol",{attrs:{start:"4"}},[t("li",[e._v("("),t("strong",[e._v("If you use Tor")]),e._v(") If you run Tor Browser, you can use it as SOCK5 proxy by adding "),t("code",[e._v('"proxy": "socks5:127.0.0.1:9150::",')]),e._v(" to the configuration file.")])]),e._v(" "),t("h4",{attrs:{id:"option-3-connect-to-your-eps-server-by-command-line"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-3-connect-to-your-eps-server-by-command-line"}},[e._v("#")]),e._v(" Option 3: Connect to your EPS Server by command line")]),e._v(" "),t("p",[e._v("You can run electrum via command line "),t("code",[e._v("electrum --oneserver --server yourserver:50002:s")]),e._v(".")]),e._v(" "),t("p",[e._v("If you use Tor, add "),t("code",[e._v("-p socks5:localhost:9150")]),e._v(".")]),e._v(" "),t("h4",{attrs:{id:"option-4-connect-to-your-eps-server-from-electrum-wallet-gui-not-recommended-as-this-will-momentarily-connects-with-other-random-public-electrum-servers-if-you-are-online"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-4-connect-to-your-eps-server-from-electrum-wallet-gui-not-recommended-as-this-will-momentarily-connects-with-other-random-public-electrum-servers-if-you-are-online"}},[e._v("#")]),e._v(" Option 4: Connect to your EPS Server from Electrum Wallet GUI (not recommended as this will momentarily connects with other random public Electrum servers if you are online):")]),e._v(" "),t("ol",[t("li",[e._v("Open Electrum Wallet. When you click the traffic light (green or red) at the bottom of your Electrum Wallet, you will see a screen with a list of all the available Electrum servers that your wallet can connect to, normally with the "),t("code",[e._v("Select Server Automatically")]),e._v(" box 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("ol",{attrs:{start:"2"}},[t("li",[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 EPS Server. In the case below, the EPS 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:"EnterElectrumServerIP",title:"EnterElectrumServerIP"}})]),e._v(" "),t("ol",{attrs:{start:"4"}},[t("li",[t("p",[e._v("("),t("strong",[e._v("If you use Tor")]),e._v(") Go to proxy, then click on "),t("code",[e._v("Use Tor Proxy at port 9150")]),e._v(".")])]),e._v(" "),t("li",[t("p",[e._v("If all of the above worked well, and your node is healthy and synched, you will get a green traffic light down the bottom right of the wallet screen - that means success!")])])]),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 EPS Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your EPS 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 "),t("strong",[e._v("EPS server")]),e._v(". 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=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[143],{835:function(e,t,r){"use strict";r.r(t);var o=r(17),n=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrum-personal-server-eps-integration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrum-personal-server-eps-integration"}},[e._v("#")]),e._v(" Electrum Personal Server (EPS) integration")]),e._v(" "),t("p",[t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server",target:"_blank",rel:"noopener noreferrer"}},[e._v("Electrum Personal Server or EPS"),t("OutboundLink")],1),e._v(" is a personal version of public Electrum servers like "),t("RouterLink",{attrs:{to:"/ElectrumX/"}},[e._v("ElectrumX")]),e._v(".")],1),e._v(" "),t("p",[t("strong",[e._v("EPS can be integrated into BTCPay Server")]),e._v(" using the optional docker fragment "),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.yml"),t("OutboundLink")],1),e._v(". Use EPS when you want to use your own full node (included in BTCPay Server) to verify your own transactions privately when using Electrum Wallet.")]),e._v(" "),t("p",[e._v("The biggest difference with public Electrum servers (eg. ElectrumX), is that "),t("strong",[e._v("EPS is for monitoring only your own wallet(s)")]),e._v('. The "XPUB" (extended public key) of the wallet you use in Electrum must be shared with EPS in order for it to function all all. Other than this, it functions (from an end user perspective) in the same way as ElectrumX etc. It is '),t("strong",[e._v("easy to integrate into BTCPay")]),e._v(" just follow the instructions below.")]),e._v(" "),t("p",[e._v("EPS does not require "),t("code",[e._v("txindex")]),e._v(" and works on a pruned node.")]),e._v(" "),t("h2",{attrs:{id:"about-tor-support"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#about-tor-support"}},[e._v("#")]),e._v(" About Tor support")]),e._v(" "),t("p",[e._v("By default your EPS is accessible over Tor. You can run the following command line via SSH on your server to get your Tor address:")]),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("cat")]),e._v(" /var/lib/docker/volumes/generated_tor_servicesdir/_data/btc-electrum-ps/hostname\n")])])]),t("p",[e._v("You can can also go to your BTCPay Server > Server Settings > Services and find the tor link in "),t("code",[e._v("Other TOR hidden services")]),e._v(".")]),e._v(" "),t("p",[e._v("On the Electrum wallet machine, if you want to connect to your server via Tor, we assume in this tutorial that you run the Tor Browser locally, and thus you will use SOCKS5 port "),t("code",[e._v("9150")]),e._v(". If you run Tor through the command line instead, the local SOCKS5 port is "),t("code",[e._v("9050")]),e._v(".")]),e._v(" "),t("h2",{attrs:{id:"how-to-enable-electrum-personal-server-eps-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-enable-electrum-personal-server-eps-in-btcpay"}},[e._v("#")]),e._v(" How to enable Electrum Personal Server (EPS) in BTCPay:")]),e._v(" "),t("ol",[t("li",[t("p",[t("strong",[e._v("If you do not use Tor")]),e._v(", EPS 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. If you use Tor, you can skip this step.")])]),e._v(" "),t("li",[t("p",[e._v('As EPS is for a single wallet (single user), you must specify the XPUB/YPUB/ZPUB of your wallet as an environment varable before you enable the EPS docker-fragment. In Electrum Wallet go to the "Wallet" menu then select "Information" to copy and paste yours. Set ENV variable for your wallet XPUB and enable the Docker Additional Fragment on your BTCPay node by running the following steps:')])])]),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-add-electrum-ps"')]),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("EPS_XPUB")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"XPUB_ADD_YOUR_XPUB_YPUB_OR_ZPUB_HERE"')]),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("ol",{attrs:{start:"3"}},[t("li",[e._v("WAIT for your Bitcoin full node and EPS server 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:\n"),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)\n"),t("code",[e._v("docker logs generated_electrum_ps_1")]),e._v(" - this will show you the EPS sync status. Note: EPS 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 EPS have finished synching, you can proceed to the next step. (Note: Electrum wallets will not connect to an EPS server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"how-to-connect-electrum-wallet-to-eps"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-connect-electrum-wallet-to-eps"}},[e._v("#")]),e._v(" How to connect Electrum Wallet to EPS")]),e._v(" "),t("p",[e._v("There are three ways to use your server from Electrum Wallet:")]),e._v(" "),t("ol",[t("li",[e._v("By editing the configuration file")]),e._v(" "),t("li",[e._v("By running Electrum by the command line")]),e._v(" "),t("li",[e._v("Via the user interface (not recommended, bad privacy)")])]),e._v(" "),t("h4",{attrs:{id:"option-1-connect-to-your-eps-server-by-directly-editing-electrum-wallet-config-file-before-even-opening-the-electrum-wallet-gui-recommended-for-full-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-1-connect-to-your-eps-server-by-directly-editing-electrum-wallet-config-file-before-even-opening-the-electrum-wallet-gui-recommended-for-full-privacy"}},[e._v("#")]),e._v(" Option 1: Connect to your EPS Server by directly editing Electrum Wallet config file (before even opening the Electrum wallet GUI - recommended for full privacy):")]),e._v(" "),t("p",[e._v("You can "),t("strong",[e._v("setup your Electrum server")]),e._v(" by editing the configuration file.")]),e._v(" "),t("p",[e._v("In the "),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("Electrum Wallet folder"),t("OutboundLink")],1),e._v(", 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": "yourserver:50002:s",')]),e._v("and switch it to your own EPS 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 strongly recommended for full privacy by locking down Electrum Wallet to one single connection with your private server only ("),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("ol",{attrs:{start:"4"}},[t("li",[e._v("("),t("strong",[e._v("If you use Tor")]),e._v(") If you run Tor Browser, you can use it as SOCK5 proxy by adding "),t("code",[e._v('"proxy": "socks5:127.0.0.1:9150::",')]),e._v(" to the configuration file.")])]),e._v(" "),t("h4",{attrs:{id:"option-3-connect-to-your-eps-server-by-command-line"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-3-connect-to-your-eps-server-by-command-line"}},[e._v("#")]),e._v(" Option 3: Connect to your EPS Server by command line")]),e._v(" "),t("p",[e._v("You can run electrum via command line "),t("code",[e._v("electrum --oneserver --server yourserver:50002:s")]),e._v(".")]),e._v(" "),t("p",[e._v("If you use Tor, add "),t("code",[e._v("-p socks5:localhost:9150")]),e._v(".")]),e._v(" "),t("h4",{attrs:{id:"option-4-connect-to-your-eps-server-from-electrum-wallet-gui-not-recommended-as-this-will-momentarily-connects-with-other-random-public-electrum-servers-if-you-are-online"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#option-4-connect-to-your-eps-server-from-electrum-wallet-gui-not-recommended-as-this-will-momentarily-connects-with-other-random-public-electrum-servers-if-you-are-online"}},[e._v("#")]),e._v(" Option 4: Connect to your EPS Server from Electrum Wallet GUI (not recommended as this will momentarily connects with other random public Electrum servers if you are online):")]),e._v(" "),t("ol",[t("li",[e._v("Open Electrum Wallet. When you click the traffic light (green or red) at the bottom of your Electrum Wallet, you will see a screen with a list of all the available Electrum servers that your wallet can connect to, normally with the "),t("code",[e._v("Select Server Automatically")]),e._v(" box 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("ol",{attrs:{start:"2"}},[t("li",[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 EPS Server. In the case below, the EPS 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:"EnterElectrumServerIP",title:"EnterElectrumServerIP"}})]),e._v(" "),t("ol",{attrs:{start:"4"}},[t("li",[t("p",[e._v("("),t("strong",[e._v("If you use Tor")]),e._v(") Go to proxy, then click on "),t("code",[e._v("Use Tor Proxy at port 9150")]),e._v(".")])]),e._v(" "),t("li",[t("p",[e._v("If all of the above worked well, and your node is healthy and synched, you will get a green traffic light down the bottom right of the wallet screen - that means success!")])])]),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 EPS Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your EPS 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 "),t("strong",[e._v("EPS server")]),e._v(". 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=n.exports}}]); \ No newline at end of file diff --git a/assets/js/145.d1ef63cc.js b/assets/js/145.17bddbf5.js similarity index 99% rename from assets/js/145.d1ef63cc.js rename to assets/js/145.17bddbf5.js index c323ca2a62..68e19d572b 100644 --- a/assets/js/145.d1ef63cc.js +++ b/assets/js/145.17bddbf5.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[145],{836: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([[145],{839: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/146.6d120ca3.js b/assets/js/146.411299f9.js similarity index 99% rename from assets/js/146.6d120ca3.js rename to assets/js/146.411299f9.js index ee4be41baf..47179f32f6 100644 --- a/assets/js/146.6d120ca3.js +++ b/assets/js/146.411299f9.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[146],{842:function(t,e,o){"use strict";o.r(e);var a=o(17),n=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"frequently-asked-questions-and-common-issues"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#frequently-asked-questions-and-common-issues"}},[t._v("#")]),t._v(" Frequently Asked Questions and Common Issues")]),t._v(" "),e("p",[t._v("This document contains a Table of contents to all FAQ and common issues.")]),t._v(" "),e("h2",{attrs:{id:"general-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#general-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/General/"}},[t._v("General FAQ")])],1),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#what-is-btcpay-server"}},[t._v("What is BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#why-should-i-choose-btcpay-over-other-processors"}},[t._v("Why should I choose BTCPay over other processors?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#why-is-everyone-so-excited-about-btcpay"}},[t._v("Why is everyone so excited about BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#who-can-use-btcpay"}},[t._v("Who can use BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-to-install-btcpay-server"}},[t._v("How to install BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#where-to-find-btcpay-video-tutorials"}},[t._v("Where to find BTCPay video tutorials?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#do-i-need-to-have-an-online-store-to-use-btcpay-server"}},[t._v("Do I need to have an online store to use BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#why-cant-i-just-give-my-bitcoin-address-to-a-buyer"}},[t._v("Why can't I just give my public address to a buyer?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-does-btcpay-create-a-new-address-for-each-invoice"}},[t._v("How does BTCPay create a new address for each invoice?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#does-btcpay-need-myprivate-key"}},[t._v("Does BTCPay need my private key?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#does-btcpay-server-support-crypto-to-fiat-conversion"}},[t._v("Does BTCPay Server support crypto to fiat conversion?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#what-if-i-have-a-problem-paying-an-invoice"}},[t._v("What if I have a problem paying a BTCPay Server invoice?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#what-if-i-have-a-problem-with-a-paid-invoice"}},[t._v("What if I have a problem with a paid invoice?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#where-can-i-get-help-and-support"}},[t._v("Where can I get help and support?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-can-i-contribute-to-btcpay"}},[t._v("How can I contribute to BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-can-i-use-the-btcpay-server-api"}},[t._v("How can I use the BTCPay Server API?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-can-i-backup-my-btcpay-server"}},[t._v("How can I backup my BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-can-i-charge-for-using-my-btcpay-server-instance"}},[t._v("How can I charge for using my BTCPay Server instance?")])],1)]),t._v(" "),e("h2",{attrs:{id:"deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/"}},[t._v("Deployment FAQ")])],1),t._v(" "),e("p",[t._v("Questions and solutions to BTCPay installation.")]),t._v(" "),e("h3",{attrs:{id:"general-deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#general-deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/#general-deployment-faq"}},[t._v("General Deployment FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-much-does-it-cost-to-run-btcpay-server"}},[t._v("How much does it cost to run BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#what-are-the-minimal-requirements-for-btcpay"}},[t._v("What are the minimal requirements for BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#what-is-the-easiest-method-to-deploy-a-self-hosted-btcpay-server"}},[t._v("What is the easiest method to deploy a self-hosted BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-choose-a-proper-deployment-method"}},[t._v("How to choose a proper deployment method?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/FAQ-Deployment/#can-i-run-btcpay-on-my-home-computer"}},[t._v("Why do I need a VPS? Can't I just run BTCPay on my home computer?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-run-btcpay-on-my-own-hardware"}},[t._v("Can I run BTCPay on my hardware?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-deploy-btcpay-on-my-existing-vps"}},[t._v("Can I deploy on my existing VPS?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#are-there-free-hosts-where-i-can-test"}},[t._v("Are there free hosts where I can test?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#after-initial-deployment-i-can-t-register-and-i-don-t-have-a-login-yet"}},[t._v("After initial deployment, I can't register and I don't have a login yet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-do-i-activate-tor-on-my-btcpay-server"}},[t._v("How do I activate Tor on my BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-do-i-disable-tor-on-my-btcpay-server"}},[t._v("How do I disable Tor on my BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#why-activate-tor-does-it-mean-that-nobody-knows-who-i-am"}},[t._v("Why activate Tor? Does it mean that nobody knows who I am?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-access-the-onion-address-without-clearnet"}},[t._v("How to access the .onion address without clearnet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-modify-or-deactivate-environment-variables"}},[t._v("How can I modify or deactivate environment variables?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-run-btcpay-on-testnet"}},[t._v("How can I run BTCPay on testnet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-start-btcpay-only-when-i-m-expecting-a-payment"}},[t._v("Can I start BTCPay only when I'm expecting a payment?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-connect-to-my-btcpay-bitcoin-p2p-on-port-8333"}},[t._v("Can I connect to my BTCPay Bitcoin P2P on port 8333?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-renew-my-ssl-certificate"}},[t._v("How can I renew my SSL certificate?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-use-an-existing-nginx-server-as-a-reverse-proxy-with-ssl-termination"}},[t._v("Can I use an existing Nginx server as a reverse proxy with SSL termination?")])],1)]),t._v(" "),e("h3",{attrs:{id:"web-deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#web-deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/#web-deployment-faq"}},[t._v("Web Deployment FAQ")])],1),t._v(" "),e("h4",{attrs:{id:"luna-node-web-deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#luna-node-web-deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/#luna-node-web-deployment-faq"}},[t._v("Luna Node Web Deployment FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-change-domain-name-on-my-lunanode-btcpay"}},[t._v("How to change domain name on my LunaNode BTCPay?")])],1)]),t._v(" "),e("h3",{attrs:{id:"manual-deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#manual-deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/#manual-deployment"}},[t._v("Manual Deployment FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-manually-install-btcpay-on-ubuntu-18-04"}},[t._v("How to manually install BTCPay on Ubuntu 18.04?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-do-i-completely-uninstall-btcpay-from-a-linux-environment-docker-version"}},[t._v("How do I completely uninstall BTCPay from a linux environment (docker version)")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-deploy-btcpay-server-alongside-existing-bitcoin-node"}},[t._v("How to deploy BTCPay Server alongside existing Bitcoin full node?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#with-the-docker-deployment-how-to-use-a-different-volume-for-the-data"}},[t._v("With the docker deployment, how to use a different volume for the data?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#cause-4-getting-500-nginx-error-on-a-local-server-https-and-for-http-btcpay-is-expecting-you-to-access-this-website-from"}},[t._v("Getting 500 nginx error on a local server https and for http (BTCPay is expecting you to access this website from)")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#cause-3-btcpay-is-expecting-you-to-access-this-website-from"}},[t._v("Error: BTCPay is expecting you to access this website from...")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#cause-3-btcpay-is-expecting-you-to-access-this-website-from"}},[t._v("You access BTCPay Server over an unsecured network")])],1)]),t._v(" "),e("h2",{attrs:{id:"synchronization-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#synchronization-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Synchronization/"}},[t._v("Synchronization FAQ")])],1),t._v(" "),e("p",[t._v("Common questions and issues that may occur during the initial sync of BTCPay.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#why-does-btcpay-sync"}},[t._v("Why does BTCPay sync?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#can-i-skip-the-synchronization"}},[t._v("Can I skip/speed up the sync?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#how-do-i-know-that-btcpay-synced-completely"}},[t._v("How do I know that the sync is finished?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#how-can-i-check-the-block-height-of-my-bitcoin-node"}},[t._v("How can I check the block height of my bitcoin node?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#btcpay-server-takes-forever-to-synchronize"}},[t._v("BTCPay takes forever to synchronize")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[t._v("BTCPay Server keeps showing that my node is always starting")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#im-running-a-full-node-and-have-a-synched-blockchain-can-btcpay-use-it-so-that-it-doesnt-have-to-do-a-full-sync"}},[t._v("I already have a synced full node, can I use it with BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#how-to-enable-bitcoin-node-pruning"}},[t._v("How to enable Bitcoin node pruning?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#how-to-disable-bitcoin-node-pruning"}},[t._v("How to disable Bitcoin node pruning?")])],1)]),t._v(" "),e("h2",{attrs:{id:"integrations-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#integrations-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Integrations/"}},[t._v("Integrations FAQ")])],1),t._v(" "),e("p",[t._v("Questions about e-commerce and other integrations.")]),t._v(" "),e("h3",{attrs:{id:"integrations-general"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#integrations-general"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Integrations/#integrations-general-faq"}},[t._v("Integrations General")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#what-e-commerce-integrations-are-available"}},[t._v("What e-commerce integrations are available?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#does-btcpay-have-a-shopify-plugin"}},[t._v("Does BTCPay have a Shopify plugin?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#can-i-use-btcpay-without-an-integration"}},[t._v("Can I use BTCPay without an integration?")])],1)]),t._v(" "),e("h3",{attrs:{id:"woocommerce-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#woocommerce-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Integrations/#woocommerce-faq-2"}},[t._v("WooCommerce FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#how-to-configure-order-status-in-woocommerce"}},[t._v("How to configure order status in WooCommerce?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#how-to-customize-e-mail-confirmations-in-woocommerce"}},[t._v("How to customize e-mail confirmations in WooCommerce?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#error-if-you-use-an-alternative-order-numbering-system-please-see-class-wc-gateway-btcpayphp-to-apply-a-search-filter"}},[t._v("Error: If you use an alternative order numbering system, please see class-wc-gateway-btcpay.php to apply a search filter")])],1)]),t._v(" "),e("h2",{attrs:{id:"server-settings-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#server-settings-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/"}},[t._v("Server Settings FAQ")])],1),t._v(" "),e("p",[t._v("Common problems and questions server admins have.")]),t._v(" "),e("h3",{attrs:{id:"maintenance-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maintenance-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#maintainance"}},[t._v("Maintenance FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-update-btcpay-server"}},[t._v("How to update BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-restart-btcpay-server"}},[t._v("How to restart BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-ssh-into-my-btcpay-running-on-vps"}},[t._v("How to SSH into my BTCPay running on VPS?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-can-i-see-my-btcpay-version"}},[t._v("How can I check my BTCPay Server version?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-can-i-check-my-btcpay-server-version-via-terminal"}},[t._v("How can I check my BTCPay Server version via terminal?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#what-is-btcpay-ssh-key-file"}},[t._v("What is BTCPay SSH key file")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#forgot-btcpay-admin-password"}},[t._v("Forgot BTCPay Admin password")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-add-a-new-user-by-invite"}},[t._v("How to add a new user by invite?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-disable-u2f-and-2fa-for-a-user"}},[t._v("How to disable U2F and 2FA for a user?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-configure-smtp-settings-in-btcpay"}},[t._v("How to configure SMTP settings in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#error-maintenance-feature-requires-access-to-SSH-properly-configured-in-btcpayserver-configuration"}},[t._v("Error: Maintenance feature requires access to SSH properly configured in BTCPayServer configuration")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#error-your-local-changes-to-the-following-files-would-be-overwritten-by-merge"}},[t._v("Error: Your local changes to the following files would be overwritten by merge")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#error-btcpay-sshkeyfile-is-not-set-when-running-the-docker-install-or-unable-to-update-through-server-settings-maintenance"}},[t._v("Error: the BTCPAY_SSHKEYFILE variable is not set/ Unable to update")])],1)]),t._v(" "),e("h3",{attrs:{id:"theme-customization-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#theme-customization-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#theme-customization"}},[t._v("Theme / Customization FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-customize-my-btcpay-theme-style"}},[t._v("How to customize my BTCPay theme style?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-modify-the-checkout-page"}},[t._v("How to modify BTCPay the checkout page?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Development/Theme/#2-bootstrap-themes"}},[t._v("How to customize the POS app theme?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-add-google-analytics-code-to-btcpay"}},[t._v("How to add Google Analytics code to BTCPay?")])],1)]),t._v(" "),e("h3",{attrs:{id:"policies-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#policies-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#policies"}},[t._v("Policies FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-allow-registration-on-my-btcpay-server"}},[t._v("How to allow registration on my BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-hide-my-btcpay-server-from-search-engines"}},[t._v("How to hide my BTCPay Server from Search Engines?")])],1)]),t._v(" "),e("h3",{attrs:{id:"services-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#services-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#services"}},[t._v("Services FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-remotely-connect-to-my-btcpay-full-node"}},[t._v("How to remotely connect to my BTCPay full node?")])],1)]),t._v(" "),e("h3",{attrs:{id:"files-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#files-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#files"}},[t._v("Files FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-upload-files-to-btcpay"}},[t._v("How to upload files to BTCPay?")])],1)]),t._v(" "),e("h2",{attrs:{id:"stores-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#stores-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Stores/"}},[t._v("Stores FAQ")])],1),t._v(" "),e("p",[t._v("Store settings explained.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-create-a-store-in-btcpay"}},[t._v("How to create a store in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-many-stores-can-i-create"}},[t._v("How many stores can I create?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#why-are-invoices-without-payment-showing-as-complete"}},[t._v("Why are invoices without payment showing as complete?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#store-general-settings"}},[t._v("Store General Settings")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#add-network-fee-to-invoice-vary-with-mining-fees"}},[t._v("Add network fee to invoice (vary with mining fees)?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#allow-anyone-to-create-invoice"}},[t._v("Allow anyone to create invoice?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#invoice-expires-if-the-full-amount-has-not-been-paid-after-minutes"}},[t._v("Invoice expires if the full amount has not been paid after ... minutes?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#payment-invalid-if-transactions-fails-to-confirm-minutes-after-invoice-expiration"}},[t._v("Payment invalid if transactions fails to confirm ... minutes after invoice expiration?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#consider-the-invoice-confirmed-when-the-payment-transaction"}},[t._v("Consider the invoice confirmed when the payment transaction?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#consider-the-invoice-paid-even-if-the-paid-amount-is-less-than-expected"}},[t._v("Consider the invoice paid even if the paid amount is ... % less than expected?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-disable-email-on-invoices"}},[t._v("How to disable email on invoices?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-denominate-invoices-in-sats"}},[t._v("How to denominate invoices in sats?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-collect-additional-buyer-information"}},[t._v("How to collect additional buyer information?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-redirect-store-invoices-after-payment"}},[t._v("How to redirect store invoices after payment?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#can-i-delete-invoices-from-btcpay"}},[t._v("Can I delete invoices from BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-change-the-exchange-rate-provider-for-invoices"}},[t._v("How to change the exchange rate provider for invoices?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#getting-getratesasync-was-called-on-coinaverage-error"}},[t._v("Getting GetRatesAsync was called on coinaverage error")])],1)]),t._v(" "),e("h2",{attrs:{id:"wallet-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#wallet-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Wallet/"}},[t._v("Wallet FAQ")])],1),t._v(" "),e("p",[t._v("Here are some of the questions and problems about wallets in BTCPay.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#what-is-btcpay-server-wallet"}},[t._v("What is BTCPay Server wallet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#how-to-set-up-my-wallet-with-btcpay-server"}},[t._v("How to set up my wallet with BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#can-i-use-a-hardware-wallet-with-btcpay-server"}},[t._v("Can I use a hardware wallet with BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#do-i-have-to-use-btcpay-server-wallet"}},[t._v("Do I have to use BTCPay Server wallet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#why-is-sending-a-transaction-using-trezor-failing"}},[t._v("Why is sending a transaction using Trezor failing?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#missing-payments-in-my-software-or-hardware-wallet"}},[t._v("Missing payments in wallet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#what-is-a-derivation-scheme"}},[t._v("What is a derivation scheme?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#what-is-a-replace-by-fee-rbf-transaction"}},[t._v("What is a Replace-By-Fee (RBF) transaction?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#how-to-add-custom-labels-and-comments-to-transactions"}},[t._v("How to add custom labels and comments to transactions?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#i-dont-see-lightning-network-payments-in-btcpay-wallet"}},[t._v("I don't see Lightning network payments in BTCPay wallet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#is-there-a-mobile-app-for-btcpay-server-wallet"}},[t._v("Is there a mobile app for BTCPay Server wallet?")])],1)]),t._v(" "),e("h2",{attrs:{id:"apps-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#apps-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Apps/"}},[t._v("Apps FAQ")])],1),t._v(" "),e("p",[t._v("Frequent questions about the applications in BTCPay.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#what-are-the-apps-in-btcpay"}},[t._v("What are the Apps in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#is-there-a-limit-on-the-number-of-apps-i-can-create"}},[t._v("Is there a limit on the number of Apps I can create?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#is-there-a-point-of-sale-feature-in-btcpay"}},[t._v("Is there a Point of Sale feature in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-can-i-use-btcpay-in-a-physical-store"}},[t._v("How can I use BTCPay in a physical store?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-customize-the-appearance-of-Point-of-Sale-App-in-BTCPay"}},[t._v("How to customize the appearance of POS in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#what-is-a-payment-button"}},[t._v("What is a Payment Button?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-create-a-pay-button-with-a-custom-amount"}},[t._v("How to create a Pay Button with a custom amount?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-map-a-domain-name-to-an-app"}},[t._v("How to map a domain name to an app?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-redirect-to-another-site-after-payment"}},[t._v("How to redirect to another site after payment?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-integrate-woocommerce-store-into-a-btcpay-crowdfund-app"}},[t._v("How to integrate WooCommerce Store in BTCPay Crowdfund app?")])],1)]),t._v(" "),e("h2",{attrs:{id:"lightning-network-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/"}},[t._v("Lightning Network FAQ")])],1),t._v(" "),e("p",[t._v("Lightning Network troubleshooting and common problems.")]),t._v(" "),e("h3",{attrs:{id:"lightning-network-general-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-general-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lightning-network-general-faq"}},[t._v("Lightning Network General FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-many-users-can-use-lightning-network-in-btcpay"}},[t._v("How many users can use Lightning Network in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-find-node-info-and-open-a-direct-channel-with-a-store-using-btcpay"}},[t._v("How to find node info and open a direct channel with a store using BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#as-a-merchant-do-i-need-to-open-direct-channels"}},[t._v("As a merchant, do I need to open direct channels?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-can-i-get-inbound-capacity-to-my-node"}},[t._v("How can I get inbound capacity to my node?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#i-previously-installed-btcpayserver-without-lightning-can-i-enable-it"}},[t._v("Previously installed BTCPay without Lightning, can I enable it?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#can-i-use-a-pruned-node-with-ln-in-btcpay"}},[t._v("Can I use a pruned node with LN in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#can-i-use-my-existing-ln-node-with-btcpay"}},[t._v("Can I use my existing LN node with BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-change-from-core-lightning-cln-to-lnd-or-vice-versa"}},[t._v("How to change from Core Lightning (CLN) to LND or vice-versa?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#i-switched-lightning-network-implementation-but-getting-no-payment-available-error"}},[t._v('Switched Lightning Network implementation, getting "no payment available" error')])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#i-get-warning-the-lightning-alias-variable-is-not-set-defaulting-to-a-blank-string-when-starting-container"}},[t._v('WARNING: The LIGHTNING_ALIAS variable is not set. Defaulting to a blank string" when starting container')])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-display-my-lightning-node-information-so-that-others-can-connect-to-me"}},[t._v("How to display my Lightning Node information so that others can connect to me?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#where-can-i-find-recovery-seed-backup-for-my-lightning-network-wallet-in-btcpay-server"}},[t._v("Where can I find recovery seed backup for my Lightning Network wallet in BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-disable-on-chain-payments-and-use-ln-payments-only"}},[t._v("How to disable on-chain payments and use LN payments only?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lightning-network-questions-and-support"}},[t._v("Where can I get Lightning Network Support?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-see-my-lightning-network-version"}},[t._v("How to see my Lightning Network version?")])],1)]),t._v(" "),e("h3",{attrs:{id:"lightning-network-lnd-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-lnd-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lightning-network-lnd-faq"}},[t._v("Lightning Network LND FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-restart-my-lnd"}},[t._v("How to restart my LND?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-see-lnd-logs"}},[t._v("How to see LND logs?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#what-s-the-default-directory-of-lnd-in-btcpay"}},[t._v("What’s the default LND Directory in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#which-macaroon-needs-to-be-provided-for-external-nodes"}},[t._v("Which macaroon needs to be provided for external nodes?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lnd-connection-issues-after-an-update"}},[t._v("LND connection issue - cannot get macaroon: root key with id 0 doesn’t exist")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-change-my-LND-Node-alias"}},[t._v("How to change LND Node alias")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-edit-lndconf"}},[t._v("How to edit lnd.conf")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-install-thunderhub"}},[t._v("How to install ThunderHub")])],1)]),t._v(" "),e("h3",{attrs:{id:"lightning-network-core-lightning-cln-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-core-lightning-cln-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lightning-network-core-lightning-cln-faq"}},[t._v("Lightning Network Core Lightning (CLN) FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-restart-my-core-lightning-cln"}},[t._v("How to restart my Core Lightning (CLN)?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-announce-an-ipv6-address"}},[t._v("How to announce an IPv6 address?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-edit-lightningconfig"}},[t._v("How to edit .lightning/config")])],1)]),t._v(" "),e("h2",{attrs:{id:"altcoins-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#altcoins-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Altcoin/"}},[t._v("Altcoins FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#which-coins-does-btcpay-server-support"}},[t._v("Which coins does BTCPay Server support?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("Can an XYZ coin be added in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#how-to-add-an-altcoin-in-btcpay"}},[t._v("How to add an altcoin to BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("How to add an altcoin to an existing BTCPay deployment?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#how-to-remove-a-coin-from-btcpay"}},[t._v("How to remove a coin from BTCPay?")])],1)])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[146],{844:function(t,e,o){"use strict";o.r(e);var a=o(17),n=Object(a.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"frequently-asked-questions-and-common-issues"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#frequently-asked-questions-and-common-issues"}},[t._v("#")]),t._v(" Frequently Asked Questions and Common Issues")]),t._v(" "),e("p",[t._v("This document contains a Table of contents to all FAQ and common issues.")]),t._v(" "),e("h2",{attrs:{id:"general-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#general-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/General/"}},[t._v("General FAQ")])],1),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#what-is-btcpay-server"}},[t._v("What is BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#why-should-i-choose-btcpay-over-other-processors"}},[t._v("Why should I choose BTCPay over other processors?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#why-is-everyone-so-excited-about-btcpay"}},[t._v("Why is everyone so excited about BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#who-can-use-btcpay"}},[t._v("Who can use BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-to-install-btcpay-server"}},[t._v("How to install BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#where-to-find-btcpay-video-tutorials"}},[t._v("Where to find BTCPay video tutorials?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#do-i-need-to-have-an-online-store-to-use-btcpay-server"}},[t._v("Do I need to have an online store to use BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#why-cant-i-just-give-my-bitcoin-address-to-a-buyer"}},[t._v("Why can't I just give my public address to a buyer?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-does-btcpay-create-a-new-address-for-each-invoice"}},[t._v("How does BTCPay create a new address for each invoice?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#does-btcpay-need-myprivate-key"}},[t._v("Does BTCPay need my private key?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#does-btcpay-server-support-crypto-to-fiat-conversion"}},[t._v("Does BTCPay Server support crypto to fiat conversion?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#what-if-i-have-a-problem-paying-an-invoice"}},[t._v("What if I have a problem paying a BTCPay Server invoice?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#what-if-i-have-a-problem-with-a-paid-invoice"}},[t._v("What if I have a problem with a paid invoice?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#where-can-i-get-help-and-support"}},[t._v("Where can I get help and support?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-can-i-contribute-to-btcpay"}},[t._v("How can I contribute to BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-can-i-use-the-btcpay-server-api"}},[t._v("How can I use the BTCPay Server API?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-can-i-backup-my-btcpay-server"}},[t._v("How can I backup my BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/General/#how-can-i-charge-for-using-my-btcpay-server-instance"}},[t._v("How can I charge for using my BTCPay Server instance?")])],1)]),t._v(" "),e("h2",{attrs:{id:"deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/"}},[t._v("Deployment FAQ")])],1),t._v(" "),e("p",[t._v("Questions and solutions to BTCPay installation.")]),t._v(" "),e("h3",{attrs:{id:"general-deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#general-deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/#general-deployment-faq"}},[t._v("General Deployment FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-much-does-it-cost-to-run-btcpay-server"}},[t._v("How much does it cost to run BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#what-are-the-minimal-requirements-for-btcpay"}},[t._v("What are the minimal requirements for BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#what-is-the-easiest-method-to-deploy-a-self-hosted-btcpay-server"}},[t._v("What is the easiest method to deploy a self-hosted BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-choose-a-proper-deployment-method"}},[t._v("How to choose a proper deployment method?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/FAQ-Deployment/#can-i-run-btcpay-on-my-home-computer"}},[t._v("Why do I need a VPS? Can't I just run BTCPay on my home computer?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-run-btcpay-on-my-own-hardware"}},[t._v("Can I run BTCPay on my hardware?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-deploy-btcpay-on-my-existing-vps"}},[t._v("Can I deploy on my existing VPS?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#are-there-free-hosts-where-i-can-test"}},[t._v("Are there free hosts where I can test?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#after-initial-deployment-i-can-t-register-and-i-don-t-have-a-login-yet"}},[t._v("After initial deployment, I can't register and I don't have a login yet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-do-i-activate-tor-on-my-btcpay-server"}},[t._v("How do I activate Tor on my BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-do-i-disable-tor-on-my-btcpay-server"}},[t._v("How do I disable Tor on my BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#why-activate-tor-does-it-mean-that-nobody-knows-who-i-am"}},[t._v("Why activate Tor? Does it mean that nobody knows who I am?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-access-the-onion-address-without-clearnet"}},[t._v("How to access the .onion address without clearnet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-modify-or-deactivate-environment-variables"}},[t._v("How can I modify or deactivate environment variables?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-run-btcpay-on-testnet"}},[t._v("How can I run BTCPay on testnet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-start-btcpay-only-when-i-m-expecting-a-payment"}},[t._v("Can I start BTCPay only when I'm expecting a payment?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-connect-to-my-btcpay-bitcoin-p2p-on-port-8333"}},[t._v("Can I connect to my BTCPay Bitcoin P2P on port 8333?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-can-i-renew-my-ssl-certificate"}},[t._v("How can I renew my SSL certificate?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#can-i-use-an-existing-nginx-server-as-a-reverse-proxy-with-ssl-termination"}},[t._v("Can I use an existing Nginx server as a reverse proxy with SSL termination?")])],1)]),t._v(" "),e("h3",{attrs:{id:"web-deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#web-deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/#web-deployment-faq"}},[t._v("Web Deployment FAQ")])],1),t._v(" "),e("h4",{attrs:{id:"luna-node-web-deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#luna-node-web-deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/#luna-node-web-deployment-faq"}},[t._v("Luna Node Web Deployment FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-change-domain-name-on-my-lunanode-btcpay"}},[t._v("How to change domain name on my LunaNode BTCPay?")])],1)]),t._v(" "),e("h3",{attrs:{id:"manual-deployment-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#manual-deployment-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Deployment/#manual-deployment"}},[t._v("Manual Deployment FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-manually-install-btcpay-on-ubuntu-18-04"}},[t._v("How to manually install BTCPay on Ubuntu 18.04?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-do-i-completely-uninstall-btcpay-from-a-linux-environment-docker-version"}},[t._v("How do I completely uninstall BTCPay from a linux environment (docker version)")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#how-to-deploy-btcpay-server-alongside-existing-bitcoin-node"}},[t._v("How to deploy BTCPay Server alongside existing Bitcoin full node?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#with-the-docker-deployment-how-to-use-a-different-volume-for-the-data"}},[t._v("With the docker deployment, how to use a different volume for the data?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#cause-4-getting-500-nginx-error-on-a-local-server-https-and-for-http-btcpay-is-expecting-you-to-access-this-website-from"}},[t._v("Getting 500 nginx error on a local server https and for http (BTCPay is expecting you to access this website from)")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#cause-3-btcpay-is-expecting-you-to-access-this-website-from"}},[t._v("Error: BTCPay is expecting you to access this website from...")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Deployment/#cause-3-btcpay-is-expecting-you-to-access-this-website-from"}},[t._v("You access BTCPay Server over an unsecured network")])],1)]),t._v(" "),e("h2",{attrs:{id:"synchronization-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#synchronization-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Synchronization/"}},[t._v("Synchronization FAQ")])],1),t._v(" "),e("p",[t._v("Common questions and issues that may occur during the initial sync of BTCPay.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#why-does-btcpay-sync"}},[t._v("Why does BTCPay sync?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#can-i-skip-the-synchronization"}},[t._v("Can I skip/speed up the sync?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#how-do-i-know-that-btcpay-synced-completely"}},[t._v("How do I know that the sync is finished?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#how-can-i-check-the-block-height-of-my-bitcoin-node"}},[t._v("How can I check the block height of my bitcoin node?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#btcpay-server-takes-forever-to-synchronize"}},[t._v("BTCPay takes forever to synchronize")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#btcpay-server-keeps-showing-that-my-node-is-always-starting"}},[t._v("BTCPay Server keeps showing that my node is always starting")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#im-running-a-full-node-and-have-a-synched-blockchain-can-btcpay-use-it-so-that-it-doesnt-have-to-do-a-full-sync"}},[t._v("I already have a synced full node, can I use it with BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#how-to-enable-bitcoin-node-pruning"}},[t._v("How to enable Bitcoin node pruning?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Synchronization/#how-to-disable-bitcoin-node-pruning"}},[t._v("How to disable Bitcoin node pruning?")])],1)]),t._v(" "),e("h2",{attrs:{id:"integrations-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#integrations-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Integrations/"}},[t._v("Integrations FAQ")])],1),t._v(" "),e("p",[t._v("Questions about e-commerce and other integrations.")]),t._v(" "),e("h3",{attrs:{id:"integrations-general"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#integrations-general"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Integrations/#integrations-general-faq"}},[t._v("Integrations General")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#what-e-commerce-integrations-are-available"}},[t._v("What e-commerce integrations are available?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#does-btcpay-have-a-shopify-plugin"}},[t._v("Does BTCPay have a Shopify plugin?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#can-i-use-btcpay-without-an-integration"}},[t._v("Can I use BTCPay without an integration?")])],1)]),t._v(" "),e("h3",{attrs:{id:"woocommerce-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#woocommerce-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Integrations/#woocommerce-faq-2"}},[t._v("WooCommerce FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#how-to-configure-order-status-in-woocommerce"}},[t._v("How to configure order status in WooCommerce?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#how-to-customize-e-mail-confirmations-in-woocommerce"}},[t._v("How to customize e-mail confirmations in WooCommerce?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Integrations/#error-if-you-use-an-alternative-order-numbering-system-please-see-class-wc-gateway-btcpayphp-to-apply-a-search-filter"}},[t._v("Error: If you use an alternative order numbering system, please see class-wc-gateway-btcpay.php to apply a search filter")])],1)]),t._v(" "),e("h2",{attrs:{id:"server-settings-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#server-settings-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/"}},[t._v("Server Settings FAQ")])],1),t._v(" "),e("p",[t._v("Common problems and questions server admins have.")]),t._v(" "),e("h3",{attrs:{id:"maintenance-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#maintenance-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#maintainance"}},[t._v("Maintenance FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-update-btcpay-server"}},[t._v("How to update BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-restart-btcpay-server"}},[t._v("How to restart BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-ssh-into-my-btcpay-running-on-vps"}},[t._v("How to SSH into my BTCPay running on VPS?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-can-i-see-my-btcpay-version"}},[t._v("How can I check my BTCPay Server version?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-can-i-check-my-btcpay-server-version-via-terminal"}},[t._v("How can I check my BTCPay Server version via terminal?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#what-is-btcpay-ssh-key-file"}},[t._v("What is BTCPay SSH key file")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#forgot-btcpay-admin-password"}},[t._v("Forgot BTCPay Admin password")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-add-a-new-user-by-invite"}},[t._v("How to add a new user by invite?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-disable-u2f-and-2fa-for-a-user"}},[t._v("How to disable U2F and 2FA for a user?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-configure-smtp-settings-in-btcpay"}},[t._v("How to configure SMTP settings in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#error-maintenance-feature-requires-access-to-SSH-properly-configured-in-btcpayserver-configuration"}},[t._v("Error: Maintenance feature requires access to SSH properly configured in BTCPayServer configuration")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#error-your-local-changes-to-the-following-files-would-be-overwritten-by-merge"}},[t._v("Error: Your local changes to the following files would be overwritten by merge")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#error-btcpay-sshkeyfile-is-not-set-when-running-the-docker-install-or-unable-to-update-through-server-settings-maintenance"}},[t._v("Error: the BTCPAY_SSHKEYFILE variable is not set/ Unable to update")])],1)]),t._v(" "),e("h3",{attrs:{id:"theme-customization-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#theme-customization-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#theme-customization"}},[t._v("Theme / Customization FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-customize-my-btcpay-theme-style"}},[t._v("How to customize my BTCPay theme style?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-modify-the-checkout-page"}},[t._v("How to modify BTCPay the checkout page?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/Development/Theme/#2-bootstrap-themes"}},[t._v("How to customize the POS app theme?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-add-google-analytics-code-to-btcpay"}},[t._v("How to add Google Analytics code to BTCPay?")])],1)]),t._v(" "),e("h3",{attrs:{id:"policies-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#policies-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#policies"}},[t._v("Policies FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-allow-registration-on-my-btcpay-server"}},[t._v("How to allow registration on my BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-hide-my-btcpay-server-from-search-engines"}},[t._v("How to hide my BTCPay Server from Search Engines?")])],1)]),t._v(" "),e("h3",{attrs:{id:"services-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#services-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#services"}},[t._v("Services FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-remotely-connect-to-my-btcpay-full-node"}},[t._v("How to remotely connect to my BTCPay full node?")])],1)]),t._v(" "),e("h3",{attrs:{id:"files-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#files-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#files"}},[t._v("Files FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/ServerSettings/#how-to-upload-files-to-btcpay"}},[t._v("How to upload files to BTCPay?")])],1)]),t._v(" "),e("h2",{attrs:{id:"stores-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#stores-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Stores/"}},[t._v("Stores FAQ")])],1),t._v(" "),e("p",[t._v("Store settings explained.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-create-a-store-in-btcpay"}},[t._v("How to create a store in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-many-stores-can-i-create"}},[t._v("How many stores can I create?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#why-are-invoices-without-payment-showing-as-complete"}},[t._v("Why are invoices without payment showing as complete?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#store-general-settings"}},[t._v("Store General Settings")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#add-network-fee-to-invoice-vary-with-mining-fees"}},[t._v("Add network fee to invoice (vary with mining fees)?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#allow-anyone-to-create-invoice"}},[t._v("Allow anyone to create invoice?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#invoice-expires-if-the-full-amount-has-not-been-paid-after-minutes"}},[t._v("Invoice expires if the full amount has not been paid after ... minutes?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#payment-invalid-if-transactions-fails-to-confirm-minutes-after-invoice-expiration"}},[t._v("Payment invalid if transactions fails to confirm ... minutes after invoice expiration?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#consider-the-invoice-confirmed-when-the-payment-transaction"}},[t._v("Consider the invoice confirmed when the payment transaction?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#consider-the-invoice-paid-even-if-the-paid-amount-is-less-than-expected"}},[t._v("Consider the invoice paid even if the paid amount is ... % less than expected?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-disable-email-on-invoices"}},[t._v("How to disable email on invoices?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-denominate-invoices-in-sats"}},[t._v("How to denominate invoices in sats?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-collect-additional-buyer-information"}},[t._v("How to collect additional buyer information?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-redirect-store-invoices-after-payment"}},[t._v("How to redirect store invoices after payment?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#can-i-delete-invoices-from-btcpay"}},[t._v("Can I delete invoices from BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#how-to-change-the-exchange-rate-provider-for-invoices"}},[t._v("How to change the exchange rate provider for invoices?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Stores/#getting-getratesasync-was-called-on-coinaverage-error"}},[t._v("Getting GetRatesAsync was called on coinaverage error")])],1)]),t._v(" "),e("h2",{attrs:{id:"wallet-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#wallet-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Wallet/"}},[t._v("Wallet FAQ")])],1),t._v(" "),e("p",[t._v("Here are some of the questions and problems about wallets in BTCPay.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#what-is-btcpay-server-wallet"}},[t._v("What is BTCPay Server wallet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#how-to-set-up-my-wallet-with-btcpay-server"}},[t._v("How to set up my wallet with BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#can-i-use-a-hardware-wallet-with-btcpay-server"}},[t._v("Can I use a hardware wallet with BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#do-i-have-to-use-btcpay-server-wallet"}},[t._v("Do I have to use BTCPay Server wallet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#why-is-sending-a-transaction-using-trezor-failing"}},[t._v("Why is sending a transaction using Trezor failing?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#missing-payments-in-my-software-or-hardware-wallet"}},[t._v("Missing payments in wallet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#what-is-a-derivation-scheme"}},[t._v("What is a derivation scheme?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#what-is-a-replace-by-fee-rbf-transaction"}},[t._v("What is a Replace-By-Fee (RBF) transaction?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#how-to-add-custom-labels-and-comments-to-transactions"}},[t._v("How to add custom labels and comments to transactions?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#i-dont-see-lightning-network-payments-in-btcpay-wallet"}},[t._v("I don't see Lightning network payments in BTCPay wallet?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Wallet/#is-there-a-mobile-app-for-btcpay-server-wallet"}},[t._v("Is there a mobile app for BTCPay Server wallet?")])],1)]),t._v(" "),e("h2",{attrs:{id:"apps-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#apps-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Apps/"}},[t._v("Apps FAQ")])],1),t._v(" "),e("p",[t._v("Frequent questions about the applications in BTCPay.")]),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#what-are-the-apps-in-btcpay"}},[t._v("What are the Apps in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#is-there-a-limit-on-the-number-of-apps-i-can-create"}},[t._v("Is there a limit on the number of Apps I can create?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#is-there-a-point-of-sale-feature-in-btcpay"}},[t._v("Is there a Point of Sale feature in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-can-i-use-btcpay-in-a-physical-store"}},[t._v("How can I use BTCPay in a physical store?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-customize-the-appearance-of-Point-of-Sale-App-in-BTCPay"}},[t._v("How to customize the appearance of POS in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#what-is-a-payment-button"}},[t._v("What is a Payment Button?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-create-a-pay-button-with-a-custom-amount"}},[t._v("How to create a Pay Button with a custom amount?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-map-a-domain-name-to-an-app"}},[t._v("How to map a domain name to an app?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-redirect-to-another-site-after-payment"}},[t._v("How to redirect to another site after payment?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Apps/#how-to-integrate-woocommerce-store-into-a-btcpay-crowdfund-app"}},[t._v("How to integrate WooCommerce Store in BTCPay Crowdfund app?")])],1)]),t._v(" "),e("h2",{attrs:{id:"lightning-network-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/"}},[t._v("Lightning Network FAQ")])],1),t._v(" "),e("p",[t._v("Lightning Network troubleshooting and common problems.")]),t._v(" "),e("h3",{attrs:{id:"lightning-network-general-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-general-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lightning-network-general-faq"}},[t._v("Lightning Network General FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-many-users-can-use-lightning-network-in-btcpay"}},[t._v("How many users can use Lightning Network in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-find-node-info-and-open-a-direct-channel-with-a-store-using-btcpay"}},[t._v("How to find node info and open a direct channel with a store using BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#as-a-merchant-do-i-need-to-open-direct-channels"}},[t._v("As a merchant, do I need to open direct channels?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-can-i-get-inbound-capacity-to-my-node"}},[t._v("How can I get inbound capacity to my node?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#i-previously-installed-btcpayserver-without-lightning-can-i-enable-it"}},[t._v("Previously installed BTCPay without Lightning, can I enable it?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#can-i-use-a-pruned-node-with-ln-in-btcpay"}},[t._v("Can I use a pruned node with LN in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#can-i-use-my-existing-ln-node-with-btcpay"}},[t._v("Can I use my existing LN node with BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-change-from-core-lightning-cln-to-lnd-or-vice-versa"}},[t._v("How to change from Core Lightning (CLN) to LND or vice-versa?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#i-switched-lightning-network-implementation-but-getting-no-payment-available-error"}},[t._v('Switched Lightning Network implementation, getting "no payment available" error')])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#i-get-warning-the-lightning-alias-variable-is-not-set-defaulting-to-a-blank-string-when-starting-container"}},[t._v('WARNING: The LIGHTNING_ALIAS variable is not set. Defaulting to a blank string" when starting container')])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-display-my-lightning-node-information-so-that-others-can-connect-to-me"}},[t._v("How to display my Lightning Node information so that others can connect to me?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#where-can-i-find-recovery-seed-backup-for-my-lightning-network-wallet-in-btcpay-server"}},[t._v("Where can I find recovery seed backup for my Lightning Network wallet in BTCPay Server?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-disable-on-chain-payments-and-use-ln-payments-only"}},[t._v("How to disable on-chain payments and use LN payments only?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lightning-network-questions-and-support"}},[t._v("Where can I get Lightning Network Support?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-see-my-lightning-network-version"}},[t._v("How to see my Lightning Network version?")])],1)]),t._v(" "),e("h3",{attrs:{id:"lightning-network-lnd-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-lnd-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lightning-network-lnd-faq"}},[t._v("Lightning Network LND FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-restart-my-lnd"}},[t._v("How to restart my LND?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-see-lnd-logs"}},[t._v("How to see LND logs?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#what-s-the-default-directory-of-lnd-in-btcpay"}},[t._v("What’s the default LND Directory in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#which-macaroon-needs-to-be-provided-for-external-nodes"}},[t._v("Which macaroon needs to be provided for external nodes?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lnd-connection-issues-after-an-update"}},[t._v("LND connection issue - cannot get macaroon: root key with id 0 doesn’t exist")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-change-my-LND-Node-alias"}},[t._v("How to change LND Node alias")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-edit-lndconf"}},[t._v("How to edit lnd.conf")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-install-thunderhub"}},[t._v("How to install ThunderHub")])],1)]),t._v(" "),e("h3",{attrs:{id:"lightning-network-core-lightning-cln-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#lightning-network-core-lightning-cln-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#lightning-network-core-lightning-cln-faq"}},[t._v("Lightning Network Core Lightning (CLN) FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-restart-my-core-lightning-cln"}},[t._v("How to restart my Core Lightning (CLN)?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-announce-an-ipv6-address"}},[t._v("How to announce an IPv6 address?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/LightningNetwork/#how-to-edit-lightningconfig"}},[t._v("How to edit .lightning/config")])],1)]),t._v(" "),e("h2",{attrs:{id:"altcoins-faq"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#altcoins-faq"}},[t._v("#")]),t._v(" "),e("RouterLink",{attrs:{to:"/FAQ/Altcoin/"}},[t._v("Altcoins FAQ")])],1),t._v(" "),e("ul",[e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#which-coins-does-btcpay-server-support"}},[t._v("Which coins does BTCPay Server support?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#can-an-xyz-coin-be-added-in-btcpay"}},[t._v("Can an XYZ coin be added in BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#how-to-add-an-altcoin-in-btcpay"}},[t._v("How to add an altcoin to BTCPay?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#how-to-add-an-altcoin-to-an-existing-btcpay-deployment"}},[t._v("How to add an altcoin to an existing BTCPay deployment?")])],1),t._v(" "),e("li",[e("RouterLink",{attrs:{to:"/FAQ/Altcoin/#how-to-remove-a-coin-from-btcpay"}},[t._v("How to remove a coin from BTCPay?")])],1)])])}),[],!1,null,null,null);e.default=n.exports}}]); \ No newline at end of file diff --git a/assets/js/147.a48e3aa8.js b/assets/js/147.80b09c45.js similarity index 99% rename from assets/js/147.a48e3aa8.js rename to assets/js/147.80b09c45.js index 517d9cdf7f..75b7c6c835 100644 --- a/assets/js/147.a48e3aa8.js +++ b/assets/js/147.80b09c45.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[147],{846: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([[147],{847: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/148.bdbd287c.js b/assets/js/148.2d7f89ee.js similarity index 99% rename from assets/js/148.bdbd287c.js rename to assets/js/148.2d7f89ee.js index 09de673b14..008f489a02 100644 --- a/assets/js/148.bdbd287c.js +++ b/assets/js/148.2d7f89ee.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[148],{849: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([[148],{850: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/149.3a4743f7.js b/assets/js/149.bfe29348.js similarity index 98% rename from assets/js/149.3a4743f7.js rename to assets/js/149.bfe29348.js index 8f80ffc36a..67c58e9cd3 100644 --- a/assets/js/149.3a4743f7.js +++ b/assets/js/149.bfe29348.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[149],{856: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([[149],{858: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/15.87e48d14.js b/assets/js/15.0ae99419.js similarity index 80% rename from assets/js/15.87e48d14.js rename to assets/js/15.0ae99419.js index f6a42469fa..58994108e4 100644 --- a/assets/js/15.87e48d14.js +++ b/assets/js/15.0ae99419.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{571:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify1.ec985913.png"},572:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify2.fef21751.png"},573:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify3.14ff79a8.png"},574:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify4.4f0a10ba.png"},575:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify5.9c789888.png"},576:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify6.b3df5c96.png"},577:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify7.74cbdef7.png"},578:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify8.03fc6a31.png"},579:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify9.c5dd42ec.png"},580:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify10.d1cd1d3e.png"},581:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify11.e0bbe9e5.png"},582:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify12.1818b41d.png"},583:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify13.d0551bae.png"},584:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify14.eb96845f.png"},585:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify14-2.a9094415.png"},586:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify15.dac5277c.png"},587:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify16.dca8f695.png"},588:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify17.fa8dddec.png"},589:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify18.102dac6f.png"},879:function(e,t,s){"use strict";s.r(t);var o=s(17),i=Object(o.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:"/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("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("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 720e9d04ff..f1c43bfd6e 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://docs.btcpayserver.org/AdvancedForms/dailyhttps://docs.btcpayserver.org/Apps/dailyhttps://docs.btcpayserver.org/BTCPayServer/Security/dailyhttps://docs.btcpayserver.org/BTCPayServer/LocalDevSetup/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/Bringin/dailyhttps://docs.btcpayserver.org/Breez/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/Contribute/Design/dailyhttps://docs.btcpayserver.org/Contribute/Dev/dailyhttps://docs.btcpayserver.org/Contribute/DevCode/dailyhttps://docs.btcpayserver.org/ConnectWallet/dailyhttps://docs.btcpayserver.org/Contribute/Misc/dailyhttps://docs.btcpayserver.org/Contribute/DevTest/dailyhttps://docs.btcpayserver.org/Contribute/Translate/dailyhttps://docs.btcpayserver.org/Contribute/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/Dashboard/dailyhttps://docs.btcpayserver.org/CustomIntegration/dailyhttps://docs.btcpayserver.org/Deployment/Azure/dailyhttps://docs.btcpayserver.org/Deployment/AzurePennyPinching/dailyhttps://docs.btcpayserver.org/Deployment/GoogleCloud/dailyhttps://docs.btcpayserver.org/Deployment/DynamicDNS/dailyhttps://docs.btcpayserver.org/Deployment/Clovyr/dailyhttps://docs.btcpayserver.org/Deployment/Hack0/dailyhttps://docs.btcpayserver.org/Deployment/HardwareAsAService/dailyhttps://docs.btcpayserver.org/Deployment/Hardware/dailyhttps://docs.btcpayserver.org/Deployment/LightningInABox/dailyhttps://docs.btcpayserver.org/Deployment/LunaNode/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeploymentExtended/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeployment/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/webdeployment/dailyhttps://docs.btcpayserver.org/Deployment/voltagecloud/dailyhttps://docs.btcpayserver.org/Development/Altcoins/dailyhttps://docs.btcpayserver.org/Deployment/ThirdPartyHosting/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample-NodeJS/dailyhttps://docs.btcpayserver.org/Development/InvoiceMetadata/dailyhttps://docs.btcpayserver.org/Development/LocalDev/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample/dailyhttps://docs.btcpayserver.org/Development/LocalDevelopment/dailyhttps://docs.btcpayserver.org/Development/Plugins/dailyhttps://docs.btcpayserver.org/Development/dailyhttps://docs.btcpayserver.org/Development/TestnetDemo/dailyhttps://docs.btcpayserver.org/Development/Theme/dailyhttps://docs.btcpayserver.org/Development/ecommerce-integration-guide/dailyhttps://docs.btcpayserver.org/Docker/dailyhttps://docs.btcpayserver.org/Docker/backup-restore/dailyhttps://docs.btcpayserver.org/Docker/cloudflare-tunnel/dailyhttps://docs.btcpayserver.org/Docker/chatwoot/dailyhttps://docs.btcpayserver.org/Docker/fireflyiii/dailyhttps://docs.btcpayserver.org/Docker/joinmarket/dailyhttps://docs.btcpayserver.org/Docker/fastsync/dailyhttps://docs.btcpayserver.org/Docker/lightning-terminal/dailyhttps://docs.btcpayserver.org/Docker/ndlc/dailyhttps://docs.btcpayserver.org/Docker/pihole/dailyhttps://docs.btcpayserver.org/Drupal/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/ElectrumX/dailyhttps://docs.btcpayserver.org/FAQ/Apps/dailyhttps://docs.btcpayserver.org/FAQ/General/dailyhttps://docs.btcpayserver.org/FAQ/Deployment/dailyhttps://docs.btcpayserver.org/FAQ/Integrations/dailyhttps://docs.btcpayserver.org/FAQ/dailyhttps://docs.btcpayserver.org/FAQ/ServerSettings/dailyhttps://docs.btcpayserver.org/FAQ/Stores/dailyhttps://docs.btcpayserver.org/FAQ/LightningNetwork/dailyhttps://docs.btcpayserver.org/FAQ/Synchronization/dailyhttps://docs.btcpayserver.org/FAQ/Wallet/dailyhttps://docs.btcpayserver.org/Forms/dailyhttps://docs.btcpayserver.org/Grandnode/dailyhttps://docs.btcpayserver.org/HardwareWalletIntegration/dailyhttps://docs.btcpayserver.org/Guide/dailyhttps://docs.btcpayserver.org/InvoiceNinja/dailyhttps://docs.btcpayserver.org/Invoices/dailyhttps://docs.btcpayserver.org/LNDhubAPI/dailyhttps://docs.btcpayserver.org/LedgerWallet/dailyhttps://docs.btcpayserver.org/LightningNetwork_PaymentChannels/dailyhttps://docs.btcpayserver.org/NBXplorer/API/dailyhttps://docs.btcpayserver.org/Magento/dailyhttps://docs.btcpayserver.org/LightningNetwork/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/Notifications/dailyhttps://docs.btcpayserver.org/Nostr/dailyhttps://docs.btcpayserver.org/PaymentRequests/dailyhttps://docs.btcpayserver.org/Payouts/dailyhttps://docs.btcpayserver.org/Payjoin/dailyhttps://docs.btcpayserver.org/PhocaCart/dailyhttps://docs.btcpayserver.org/Payroll/dailyhttps://docs.btcpayserver.org/Odoo/dailyhttps://docs.btcpayserver.org/PodServer/dailyhttps://docs.btcpayserver.org/PullPayments/dailyhttps://docs.btcpayserver.org/Refund/dailyhttps://docs.btcpayserver.org/PrestaShop/dailyhttps://docs.btcpayserver.org/dailyhttps://docs.btcpayserver.org/RegisterAccount/dailyhttps://docs.btcpayserver.org/Reporting/dailyhttps://docs.btcpayserver.org/Shopify/dailyhttps://docs.btcpayserver.org/Shopware/dailyhttps://docs.btcpayserver.org/Sign-PSBT-with-sparrow-wallet/dailyhttps://docs.btcpayserver.org/Smartstore/dailyhttps://docs.btcpayserver.org/SideShift/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/Vault/HowToVerify/dailyhttps://docs.btcpayserver.org/TryItOut/dailyhttps://docs.btcpayserver.org/Development/GreenfieldExample-PHP/dailyhttps://docs.btcpayserver.org/Vault/dailyhttps://docs.btcpayserver.org/VirtueMart/dailyhttps://docs.btcpayserver.org/Walkthrough/dailyhttps://docs.btcpayserver.org/UseCase/dailyhttps://docs.btcpayserver.org/Wabisabi/dailyhttps://docs.btcpayserver.org/Wallet/dailyhttps://docs.btcpayserver.org/WalletSetup/dailyhttps://docs.btcpayserver.org/WasabiWallet/dailyhttps://docs.btcpayserver.org/WhatsNext/dailyhttps://docs.btcpayserver.org/Wix/dailyhttps://docs.btcpayserver.org/Xenforo/dailyhttps://docs.btcpayserver.org/WooCommerce/dailyhttps://docs.btcpayserver.org/Zapier/dailyhttps://docs.btcpayserver.org/OpenCart/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/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/WriteBlog/dailyhttps://docs.btcpayserver.org/Contribute/WriteDocs/dailyhttps://docs.btcpayserver.org/Contribute/WriteSoftware/dailyhttps://docs.btcpayserver.org/CreateStore/dailyhttps://docs.btcpayserver.org/CustomIntegration/dailyhttps://docs.btcpayserver.org/CreateWallet/dailyhttps://docs.btcpayserver.org/Dashboard/dailyhttps://docs.btcpayserver.org/Deployment/Azure/dailyhttps://docs.btcpayserver.org/Deployment/AzurePennyPinching/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/HardwareAsAService/dailyhttps://docs.btcpayserver.org/Deployment/LightningInABox/dailyhttps://docs.btcpayserver.org/Deployment/LunaNode/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeployment/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeploymentExtended/dailyhttps://docs.btcpayserver.org/Deployment/dailyhttps://docs.btcpayserver.org/Deployment/RaspberryPi4/dailyhttps://docs.btcpayserver.org/Deployment/ReverseSSHtunnel/dailyhttps://docs.btcpayserver.org/Deployment/ReverseProxyToTor/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/Altcoins/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample/dailyhttps://docs.btcpayserver.org/Development/InvoiceMetadata/dailyhttps://docs.btcpayserver.org/Development/GreenfieldExample-PHP/dailyhttps://docs.btcpayserver.org/Development/LocalDev/dailyhttps://docs.btcpayserver.org/Development/LocalDevelopment/dailyhttps://docs.btcpayserver.org/Development/Plugins/dailyhttps://docs.btcpayserver.org/Development/TestnetDemo/dailyhttps://docs.btcpayserver.org/Development/dailyhttps://docs.btcpayserver.org/Development/Theme/dailyhttps://docs.btcpayserver.org/Development/ecommerce-integration-guide/dailyhttps://docs.btcpayserver.org/Docker/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/fastsync/dailyhttps://docs.btcpayserver.org/Docker/joinmarket/dailyhttps://docs.btcpayserver.org/Docker/fireflyiii/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/Drupal/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/Apps/dailyhttps://docs.btcpayserver.org/FAQ/Altcoin/dailyhttps://docs.btcpayserver.org/FAQ/Deployment/dailyhttps://docs.btcpayserver.org/FAQ/General/dailyhttps://docs.btcpayserver.org/FAQ/Integrations/dailyhttps://docs.btcpayserver.org/FAQ/LightningNetwork/dailyhttps://docs.btcpayserver.org/FAQ/dailyhttps://docs.btcpayserver.org/FAQ/ServerSettings/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/Grandnode/dailyhttps://docs.btcpayserver.org/Guide/dailyhttps://docs.btcpayserver.org/HardwareWalletIntegration/dailyhttps://docs.btcpayserver.org/InvoiceNinja/dailyhttps://docs.btcpayserver.org/Invoices/dailyhttps://docs.btcpayserver.org/LNDhubAPI/dailyhttps://docs.btcpayserver.org/LedgerWallet/dailyhttps://docs.btcpayserver.org/LightningNetwork/dailyhttps://docs.btcpayserver.org/LightningNetwork_PaymentChannels/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/Notifications/dailyhttps://docs.btcpayserver.org/Nostr/dailyhttps://docs.btcpayserver.org/Odoo/dailyhttps://docs.btcpayserver.org/Payouts/dailyhttps://docs.btcpayserver.org/Payroll/dailyhttps://docs.btcpayserver.org/PhocaCart/dailyhttps://docs.btcpayserver.org/PodServer/dailyhttps://docs.btcpayserver.org/PrestaShop/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/Shopware/dailyhttps://docs.btcpayserver.org/SideShift/dailyhttps://docs.btcpayserver.org/Sign-PSBT-with-sparrow-wallet/dailyhttps://docs.btcpayserver.org/Support/dailyhttps://docs.btcpayserver.org/Smartstore/dailyhttps://docs.btcpayserver.org/TicketTailor/dailyhttps://docs.btcpayserver.org/Translations/dailyhttps://docs.btcpayserver.org/Transmuter/DCA/dailyhttps://docs.btcpayserver.org/Transmuter/EmailReceiptsPreset/dailyhttps://docs.btcpayserver.org/Transmuter/dailyhttps://docs.btcpayserver.org/Trocador/dailyhttps://docs.btcpayserver.org/Troubleshooting/dailyhttps://docs.btcpayserver.org/TryItOut/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/Walkthrough/dailyhttps://docs.btcpayserver.org/Wallet/dailyhttps://docs.btcpayserver.org/WalletSetup/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/dailyhttps://docs.btcpayserver.org/OpenCart/dailyhttps://docs.btcpayserver.org/Payjoin/dailyhttps://docs.btcpayserver.org/PaymentRequests/daily \ No newline at end of file