From 7788abd1ece819cb913a8a4923253a0c26b97fd4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 11 Nov 2024 14:45:47 +0000 Subject: [PATCH] deploy: 9d5abd62713367c975b19b28dc22f43cd17fde4b --- 404.html | 6 +++--- AdvancedForms/index.html | 4 ++-- Apps/index.html | 4 ++-- BTCPayServer/LocalDevSetup/index.html | 4 ++-- BTCPayServer/Security/index.html | 4 ++-- BTCPayServer/db-migration/index.html | 4 ++-- BTCPayServer/greenfield-authorization/index.html | 4 ++-- BTCPayServer/greenfield-development/index.html | 4 ++-- BTCPayVsOthers/index.html | 4 ++-- BigCommerce/index.html | 4 ++-- Breez/index.html | 4 ++-- Bringin/index.html | 4 ++-- ColdCardWallet/index.html | 4 ++-- Community/index.html | 4 ++-- Conference-PoS-guide/index.html | 4 ++-- Configurator/index.html | 4 ++-- Contribute/Design/index.html | 4 ++-- Contribute/Dev/index.html | 4 ++-- Contribute/DevCode/index.html | 4 ++-- Contribute/DevTest/index.html | 4 ++-- Contribute/Misc/index.html | 4 ++-- Contribute/Translate/index.html | 4 ++-- Contribute/Write/index.html | 4 ++-- Contribute/WriteBlog/index.html | 4 ++-- Contribute/WriteDocs/index.html | 4 ++-- Contribute/WriteSoftware/index.html | 4 ++-- Contribute/index.html | 4 ++-- CreateStore/index.html | 4 ++-- CreateWallet/index.html | 4 ++-- CustomIntegration/index.html | 4 ++-- Dashboard/index.html | 4 ++-- Deployment/Azure/index.html | 4 ++-- Deployment/AzurePennyPinching/index.html | 4 ++-- Deployment/Clovyr/index.html | 4 ++-- Deployment/DynamicDNS/index.html | 4 ++-- Deployment/GoogleCloud/index.html | 4 ++-- Deployment/Hack0/index.html | 4 ++-- Deployment/Hardware/index.html | 4 ++-- Deployment/HardwareAsAService/index.html | 4 ++-- Deployment/LightningInABox/index.html | 4 ++-- Deployment/LunaNode/index.html | 4 ++-- Deployment/ManualDeployment/index.html | 4 ++-- Deployment/ManualDeploymentExtended/index.html | 4 ++-- Deployment/RaspberryPi4/index.html | 4 ++-- Deployment/ReverseProxyToTor/index.html | 4 ++-- Deployment/ReverseSSHtunnel/index.html | 4 ++-- Deployment/ThirdPartyHosting/index.html | 4 ++-- Deployment/index.html | 4 ++-- Deployment/voltagecloud/index.html | 4 ++-- Deployment/webdeployment/index.html | 4 ++-- Development/Altcoins/index.html | 4 ++-- Development/GreenFieldExample-NodeJS/index.html | 4 ++-- Development/GreenFieldExample/index.html | 4 ++-- Development/GreenfieldExample-PHP/index.html | 4 ++-- Development/InvoiceMetadata/index.html | 4 ++-- Development/LocalDev/index.html | 4 ++-- Development/LocalDevelopment/index.html | 4 ++-- Development/Plugins/index.html | 4 ++-- Development/TestnetDemo/index.html | 4 ++-- Development/Theme/index.html | 4 ++-- Development/ecommerce-integration-guide/index.html | 4 ++-- Development/index.html | 4 ++-- Docker/backup-restore/index.html | 4 ++-- Docker/chatwoot/index.html | 4 ++-- Docker/cloudflare-tunnel/index.html | 4 ++-- Docker/fastsync/index.html | 4 ++-- Docker/fireflyiii/index.html | 4 ++-- Docker/index.html | 4 ++-- Docker/joinmarket/index.html | 4 ++-- Docker/lightning-terminal/index.html | 4 ++-- Docker/ndlc/index.html | 4 ++-- Docker/pihole/index.html | 4 ++-- Docker/tallycoin-connect/index.html | 4 ++-- Drupal/index.html | 4 ++-- DynamicReports/index.html | 4 ++-- ElectrumPersonalServer/index.html | 4 ++-- ElectrumWallet/index.html | 4 ++-- ElectrumX/index.html | 4 ++-- FAQ/Altcoin/index.html | 4 ++-- FAQ/Apps/index.html | 4 ++-- FAQ/Deployment/index.html | 4 ++-- FAQ/General/index.html | 4 ++-- FAQ/Integrations/index.html | 4 ++-- FAQ/LightningNetwork/index.html | 4 ++-- FAQ/ServerSettings/index.html | 4 ++-- FAQ/Stores/index.html | 4 ++-- FAQ/Synchronization/index.html | 4 ++-- FAQ/Wallet/index.html | 4 ++-- FAQ/index.html | 4 ++-- Forms/index.html | 4 ++-- Grandnode/index.html | 4 ++-- Guide/index.html | 4 ++-- HardwareWalletIntegration/index.html | 4 ++-- InvoiceNinja/index.html | 4 ++-- Invoices/index.html | 4 ++-- LNDhubAPI/index.html | 4 ++-- LedgerWallet/index.html | 4 ++-- LightningNetwork/index.html | 4 ++-- LightningNetwork_PaymentChannels/index.html | 4 ++-- Magento/index.html | 4 ++-- NBXplorer/API/index.html | 4 ++-- NBXplorer/Postgres-Migration/index.html | 4 ++-- NBXplorer/Postgres-Schema/index.html | 4 ++-- NBXplorer/index.html | 4 ++-- Nopcommerce/index.html | 4 ++-- Nostr/index.html | 4 ++-- Notifications/index.html | 4 ++-- Odoo/index.html | 4 ++-- OpenCart/index.html | 4 ++-- Payjoin/index.html | 4 ++-- PaymentRequests/index.html | 4 ++-- Payouts/index.html | 4 ++-- Payroll/index.html | 4 ++-- 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/{103.9a0312c4.js => 103.e818b26a.js} | 2 +- assets/js/{104.347afe3f.js => 104.5f4a82f2.js} | 2 +- assets/js/{105.c450d787.js => 105.86ccd5bf.js} | 2 +- assets/js/{106.fb39169f.js => 106.f5773566.js} | 2 +- assets/js/{107.837f3527.js => 107.1ec1a0fc.js} | 2 +- assets/js/{110.7f345214.js => 110.bbadf97d.js} | 2 +- assets/js/{112.15e1024f.js => 112.cad8b2ce.js} | 2 +- assets/js/{113.9ff290fc.js => 113.935aa0a2.js} | 2 +- assets/js/{115.ff438356.js => 115.793289df.js} | 2 +- assets/js/{116.60f40a67.js => 116.4bc4ee22.js} | 2 +- assets/js/{119.48742a3e.js => 119.a1a8996a.js} | 2 +- assets/js/{12.c48c9b8a.js => 12.ce026eff.js} | 2 +- assets/js/{120.090b4799.js => 120.a7024ac3.js} | 2 +- assets/js/{121.fe70db9e.js => 121.37c702c8.js} | 2 +- assets/js/{122.3e8812de.js => 122.dfe6aec8.js} | 2 +- assets/js/{128.16e307fe.js => 128.f130b037.js} | 2 +- assets/js/{129.f1fa83c8.js => 129.cd4052fa.js} | 2 +- assets/js/{130.b557180e.js => 130.1c926a74.js} | 2 +- assets/js/{133.24f55a5f.js => 133.11f768ef.js} | 2 +- assets/js/{134.b469f2f7.js => 134.32163e29.js} | 2 +- assets/js/{135.7fa4f2d9.js => 135.2b74e671.js} | 2 +- assets/js/{14.d2dbf36f.js => 14.756cac58.js} | 2 +- assets/js/{141.ff820d8b.js => 141.a620cdc0.js} | 2 +- assets/js/{142.98605cd6.js => 142.5015792a.js} | 2 +- assets/js/{143.60bbe972.js => 143.38df769c.js} | 2 +- assets/js/{144.c7b403b0.js => 144.52aa4297.js} | 2 +- assets/js/{145.0ea355f6.js => 145.a69ed524.js} | 2 +- assets/js/{146.be7fd625.js => 146.cc61c537.js} | 2 +- assets/js/{15.d389c326.js => 15.4da95642.js} | 2 +- assets/js/{150.8997bdcf.js => 150.ef25e5cb.js} | 2 +- assets/js/{151.f7a88b13.js => 151.4371c0fd.js} | 2 +- assets/js/{152.05f5f1e5.js => 152.d2cc70f1.js} | 2 +- assets/js/{153.7fcade1d.js => 153.b0155346.js} | 2 +- assets/js/{154.5a5ba203.js => 154.c066685c.js} | 2 +- assets/js/{155.d5edb0bc.js => 155.b295be44.js} | 2 +- assets/js/{156.60b0c173.js => 156.0caaba91.js} | 2 +- assets/js/{157.e565cad1.js => 157.7971e4a2.js} | 2 +- assets/js/{158.bf5f8df0.js => 158.654beedc.js} | 2 +- assets/js/{159.b68b8c7a.js => 159.bdf359c7.js} | 2 +- assets/js/{16.f1b7485c.js => 16.64e135c7.js} | 2 +- assets/js/{160.0bed5cbf.js => 160.d7a094b2.js} | 2 +- assets/js/{161.ca33a73a.js => 161.c1a4b973.js} | 2 +- assets/js/{167.e71ef21f.js => 167.233b8f7e.js} | 2 +- assets/js/{168.595d30af.js => 168.c1f7ec26.js} | 2 +- assets/js/{169.675d69b1.js => 169.a16bbf17.js} | 2 +- assets/js/{17.fbc15883.js => 17.7c7d0076.js} | 2 +- assets/js/{170.b166c426.js => 170.3181eb17.js} | 2 +- assets/js/{171.e257c6f4.js => 171.93bce963.js} | 2 +- assets/js/{172.9b7de00f.js => 172.ef222ffe.js} | 2 +- assets/js/{18.33c94249.js => 18.9e0c777e.js} | 2 +- assets/js/{19.ba4595f9.js => 19.758d929a.js} | 2 +- assets/js/{20.94f8067f.js => 20.8abcfbd4.js} | 2 +- assets/js/{21.564c8f4c.js => 21.439f61af.js} | 2 +- assets/js/{22.10bb14fa.js => 22.5bea5b89.js} | 2 +- assets/js/{23.9853d2e8.js => 23.b50926b5.js} | 2 +- assets/js/{24.1ee30d9b.js => 24.3ea24c28.js} | 2 +- assets/js/{28.d2404a5c.js => 28.8f230633.js} | 2 +- assets/js/{29.441a6f3b.js => 29.6204b040.js} | 2 +- assets/js/{30.6258256e.js => 30.63695ae9.js} | 2 +- assets/js/{31.8c26fe8e.js => 31.29ea8e05.js} | 2 +- assets/js/{33.77a33cce.js => 33.a3b7d6a4.js} | 2 +- assets/js/{34.77addac3.js => 34.8177e4fb.js} | 2 +- assets/js/{35.744def5f.js => 35.c8c093ed.js} | 2 +- assets/js/{38.75d784d3.js => 38.ef8a9fa0.js} | 2 +- assets/js/{42.5fdb1d33.js => 42.face2a56.js} | 2 +- assets/js/{43.534e52af.js => 43.70f3d886.js} | 2 +- assets/js/{44.b4ef4822.js => 44.cd4cb62a.js} | 2 +- assets/js/{49.1a4349b3.js => 49.2041656d.js} | 2 +- assets/js/{51.58284308.js => 51.96c041b1.js} | 2 +- assets/js/{52.424695ff.js => 52.1e5708b7.js} | 2 +- assets/js/{56.ab57fd37.js => 56.dab41b64.js} | 2 +- assets/js/{57.e0952280.js => 57.253b009b.js} | 2 +- assets/js/{58.838984f2.js => 58.9361d3e8.js} | 2 +- assets/js/{63.d8534131.js => 63.229bd752.js} | 2 +- assets/js/{67.5d0005ef.js => 67.b2f07b4c.js} | 2 +- assets/js/{68.79dfaa74.js => 68.25c6adba.js} | 2 +- assets/js/{73.325c8624.js => 73.31e82d99.js} | 2 +- assets/js/{76.b250126e.js => 76.db60fa89.js} | 2 +- assets/js/{78.0a5cd876.js => 78.2ff398a0.js} | 2 +- assets/js/{79.8f87bcfe.js => 79.75e3f426.js} | 2 +- assets/js/{81.c0d4b2e9.js => 81.8febfab1.js} | 2 +- assets/js/{82.89055d29.js => 82.f7e79949.js} | 2 +- assets/js/{83.f198c366.js => 83.cdc78bde.js} | 2 +- assets/js/{84.e05c0bd3.js => 84.e54a3efa.js} | 2 +- assets/js/{87.47ed4cd4.js => 87.57e72cff.js} | 2 +- assets/js/{88.bb4c5cad.js => 88.f11ae243.js} | 2 +- assets/js/{89.db563e41.js => 89.a9f527ca.js} | 2 +- assets/js/{91.72fea574.js => 91.c5c2deee.js} | 2 +- assets/js/{92.09d408cc.js => 92.4be7ea6f.js} | 2 +- assets/js/{93.82bf218e.js => 93.a817586e.js} | 2 +- assets/js/{94.ed401324.js => 94.9cf32e96.js} | 2 +- assets/js/{95.c266d9f1.js => 95.4b6ce4fa.js} | 2 +- assets/js/{96.390a256c.js => 96.f147626a.js} | 2 +- assets/js/{97.2b353780.js => 97.58b22867.js} | 2 +- assets/js/{app.c68863a8.js => app.72d73f31.js} | 4 ++-- index.html | 4 ++-- sitemap.xml | 2 +- 243 files changed, 392 insertions(+), 392 deletions(-) rename assets/js/{103.9a0312c4.js => 103.e818b26a.js} (97%) rename assets/js/{104.347afe3f.js => 104.5f4a82f2.js} (98%) rename assets/js/{105.c450d787.js => 105.86ccd5bf.js} (99%) rename assets/js/{106.fb39169f.js => 106.f5773566.js} (96%) rename assets/js/{107.837f3527.js => 107.1ec1a0fc.js} (98%) rename assets/js/{110.7f345214.js => 110.bbadf97d.js} (99%) rename assets/js/{112.15e1024f.js => 112.cad8b2ce.js} (99%) rename assets/js/{113.9ff290fc.js => 113.935aa0a2.js} (98%) rename assets/js/{115.ff438356.js => 115.793289df.js} (98%) rename assets/js/{116.60f40a67.js => 116.4bc4ee22.js} (99%) rename assets/js/{119.48742a3e.js => 119.a1a8996a.js} (99%) rename assets/js/{12.c48c9b8a.js => 12.ce026eff.js} (82%) rename assets/js/{120.090b4799.js => 120.a7024ac3.js} (99%) rename assets/js/{121.fe70db9e.js => 121.37c702c8.js} (99%) rename assets/js/{122.3e8812de.js => 122.dfe6aec8.js} (99%) rename assets/js/{128.16e307fe.js => 128.f130b037.js} (99%) rename assets/js/{129.f1fa83c8.js => 129.cd4052fa.js} (99%) rename assets/js/{130.b557180e.js => 130.1c926a74.js} (99%) rename assets/js/{133.24f55a5f.js => 133.11f768ef.js} (99%) rename assets/js/{134.b469f2f7.js => 134.32163e29.js} (98%) rename assets/js/{135.7fa4f2d9.js => 135.2b74e671.js} (97%) rename assets/js/{14.d2dbf36f.js => 14.756cac58.js} (89%) rename assets/js/{141.ff820d8b.js => 141.a620cdc0.js} (99%) rename assets/js/{142.98605cd6.js => 142.5015792a.js} (96%) rename assets/js/{143.60bbe972.js => 143.38df769c.js} (99%) rename assets/js/{144.c7b403b0.js => 144.52aa4297.js} (99%) rename assets/js/{145.0ea355f6.js => 145.a69ed524.js} (99%) rename assets/js/{146.be7fd625.js => 146.cc61c537.js} (99%) rename assets/js/{15.d389c326.js => 15.4da95642.js} (80%) rename assets/js/{150.8997bdcf.js => 150.ef25e5cb.js} (96%) rename assets/js/{151.f7a88b13.js => 151.4371c0fd.js} (99%) rename assets/js/{152.05f5f1e5.js => 152.d2cc70f1.js} (98%) rename assets/js/{153.7fcade1d.js => 153.b0155346.js} (99%) rename assets/js/{154.5a5ba203.js => 154.c066685c.js} (99%) rename assets/js/{155.d5edb0bc.js => 155.b295be44.js} (97%) rename assets/js/{156.60b0c173.js => 156.0caaba91.js} (99%) rename assets/js/{157.e565cad1.js => 157.7971e4a2.js} (98%) rename assets/js/{158.bf5f8df0.js => 158.654beedc.js} (99%) rename assets/js/{159.b68b8c7a.js => 159.bdf359c7.js} (94%) rename assets/js/{16.f1b7485c.js => 16.64e135c7.js} (93%) rename assets/js/{160.0bed5cbf.js => 160.d7a094b2.js} (95%) rename assets/js/{161.ca33a73a.js => 161.c1a4b973.js} (98%) rename assets/js/{167.e71ef21f.js => 167.233b8f7e.js} (99%) rename assets/js/{168.595d30af.js => 168.c1f7ec26.js} (98%) rename assets/js/{169.675d69b1.js => 169.a16bbf17.js} (99%) rename assets/js/{17.fbc15883.js => 17.7c7d0076.js} (82%) rename assets/js/{170.b166c426.js => 170.3181eb17.js} (95%) rename assets/js/{171.e257c6f4.js => 171.93bce963.js} (99%) rename assets/js/{172.9b7de00f.js => 172.ef222ffe.js} (99%) rename assets/js/{18.33c94249.js => 18.9e0c777e.js} (89%) rename assets/js/{19.ba4595f9.js => 19.758d929a.js} (95%) rename assets/js/{20.94f8067f.js => 20.8abcfbd4.js} (99%) rename assets/js/{21.564c8f4c.js => 21.439f61af.js} (99%) rename assets/js/{22.10bb14fa.js => 22.5bea5b89.js} (83%) rename assets/js/{23.9853d2e8.js => 23.b50926b5.js} (86%) rename assets/js/{24.1ee30d9b.js => 24.3ea24c28.js} (88%) rename assets/js/{28.d2404a5c.js => 28.8f230633.js} (73%) rename assets/js/{29.441a6f3b.js => 29.6204b040.js} (75%) rename assets/js/{30.6258256e.js => 30.63695ae9.js} (91%) rename assets/js/{31.8c26fe8e.js => 31.29ea8e05.js} (93%) rename assets/js/{33.77a33cce.js => 33.a3b7d6a4.js} (96%) rename assets/js/{34.77addac3.js => 34.8177e4fb.js} (90%) rename assets/js/{35.744def5f.js => 35.c8c093ed.js} (89%) rename assets/js/{38.75d784d3.js => 38.ef8a9fa0.js} (99%) rename assets/js/{42.5fdb1d33.js => 42.face2a56.js} (86%) rename assets/js/{43.534e52af.js => 43.70f3d886.js} (84%) rename assets/js/{44.b4ef4822.js => 44.cd4cb62a.js} (99%) rename assets/js/{49.1a4349b3.js => 49.2041656d.js} (99%) rename assets/js/{51.58284308.js => 51.96c041b1.js} (99%) rename assets/js/{52.424695ff.js => 52.1e5708b7.js} (87%) rename assets/js/{56.ab57fd37.js => 56.dab41b64.js} (87%) rename assets/js/{57.e0952280.js => 57.253b009b.js} (94%) rename assets/js/{58.838984f2.js => 58.9361d3e8.js} (97%) rename assets/js/{63.d8534131.js => 63.229bd752.js} (94%) rename assets/js/{67.5d0005ef.js => 67.b2f07b4c.js} (99%) rename assets/js/{68.79dfaa74.js => 68.25c6adba.js} (99%) rename assets/js/{73.325c8624.js => 73.31e82d99.js} (97%) rename assets/js/{76.b250126e.js => 76.db60fa89.js} (99%) rename assets/js/{78.0a5cd876.js => 78.2ff398a0.js} (99%) rename assets/js/{79.8f87bcfe.js => 79.75e3f426.js} (99%) rename assets/js/{81.c0d4b2e9.js => 81.8febfab1.js} (92%) rename assets/js/{82.89055d29.js => 82.f7e79949.js} (95%) rename assets/js/{83.f198c366.js => 83.cdc78bde.js} (97%) rename assets/js/{84.e05c0bd3.js => 84.e54a3efa.js} (98%) rename assets/js/{87.47ed4cd4.js => 87.57e72cff.js} (99%) rename assets/js/{88.bb4c5cad.js => 88.f11ae243.js} (96%) rename assets/js/{89.db563e41.js => 89.a9f527ca.js} (97%) rename assets/js/{91.72fea574.js => 91.c5c2deee.js} (99%) rename assets/js/{92.09d408cc.js => 92.4be7ea6f.js} (96%) rename assets/js/{93.82bf218e.js => 93.a817586e.js} (92%) rename assets/js/{94.ed401324.js => 94.9cf32e96.js} (98%) rename assets/js/{95.c266d9f1.js => 95.4b6ce4fa.js} (98%) rename assets/js/{96.390a256c.js => 96.f147626a.js} (99%) rename assets/js/{97.2b353780.js => 97.58b22867.js} (98%) rename assets/js/{app.c68863a8.js => app.72d73f31.js} (70%) diff --git a/404.html b/404.html index b7eab67103..d0a61fcb4e 100644 --- a/404.html +++ b/404.html @@ -9,13 +9,13 @@ - + -

404

That's a Four-Oh-Four.
+ - + diff --git a/AdvancedForms/index.html b/AdvancedForms/index.html index ae88c3aef6..dba6d70791 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 27c59b7d6e..07e8fc0064 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 6e7bd8ed05..fb7cfb3672 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 c05e38b2fd..a17186a049 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 2790f620a0..d9965b5c81 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 91dae44f18..8bca970032 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 a595938f6c..7dc88d80b0 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 4a4f896707..ec5eedc6ca 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 15bbf488fb..6267026b7d 100644 --- a/BigCommerce/index.html +++ b/BigCommerce/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/Breez/index.html b/Breez/index.html index 4d54da8ca0..f266df0875 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 e47b0bcfff..6ef9479477 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 515f1e16b8..298b26869d 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 849f150e69..5e5ca7903c 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 ff0b7a648f..6fe4835094 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 9a3dfedb16..f9405400a2 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 4a6bce35d3..7ca01c3313 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 58edebd296..edcc85c040 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 f455af7dba..162ef7808c 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 e5d6c35fc3..a256f4107a 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 9614232e88..33bb817dc9 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 a4b91f3ad8..229565a36b 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 4fd244142c..4b1e2d43ba 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 73db43641b..46a77f41cf 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 1d93ed3226..33ebd90ae4 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 fae9686c99..c3a4b03fb9 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 f57d6b3310..d4c3f048e3 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 9da796bdfa..2441f0eb91 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 3bbac5eadb..fa9152875a 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 48f5d6b108..d3b58057ab 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 9198dabfc2..70659625c6 100644 --- a/Dashboard/index.html +++ b/Dashboard/index.html @@ -9,7 +9,7 @@ - + @@ -69,6 +69,6 @@ →

- + diff --git a/Deployment/Azure/index.html b/Deployment/Azure/index.html index e427d7f7a5..ef95986ec2 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 94c1e9be50..3c06d70bcc 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 990cf84fe5..5318f8432c 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 34d7954f93..1cb6cf789c 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 44b700498c..eb702ea23c 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 e287ff1cca..754f63d8d0 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 3963758a0a..d5eb8d47fa 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 d9d02dc499..00a65fb547 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 075f757824..2828fbea33 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 ab5d6c8cdc..ae407d511d 100644 --- a/Deployment/LunaNode/index.html +++ b/Deployment/LunaNode/index.html @@ -9,7 +9,7 @@ - + @@ -75,6 +75,6 @@ →

- + diff --git a/Deployment/ManualDeployment/index.html b/Deployment/ManualDeployment/index.html index 38b6074096..3e6108e6e5 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 5dfa2c257e..509568d558 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 c1bc2babf6..e3357969e3 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 991ec84fdc..71b48e3f54 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 67625ebf9c..0cce14d70a 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 6f1196edf0..2756291ebe 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 c33505b206..0bcf350eee 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 41d61fa39f..5f00063246 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 00e831143a..ef21a616a1 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 d0b481030a..0c74cc74d7 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 29e7703623..ec34927395 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 3fb8a4e113..c099df8297 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 af9200bac1..ba941b676e 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 625b224de7..44a805f911 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 e3a3234617..1fe381fbc8 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 0fb3c9e067..b0eac979d0 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 accefc06b4..ee492be4a6 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 368c604646..22fb027772 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 076b0647a9..6a0249ea5d 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 465e5b39da..3681a4f975 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 5b10850919..6deba1d14a 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 ee97aa09aa..307a43a856 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 e3672971f9..1435775885 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 c9c2bada17..dfb233ea6b 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 668441c769..e5ae48d6aa 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 7e7bccd247..01ad27de89 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 4d494bf1c1..e747656dbb 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 79b483ab4a..98ff06e134 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 959e796783..8bbdd72818 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 2647dd1d7f..4ee3d82187 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 f77f300cf6..f8e737cc67 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 8aa8a5ff53..7fac412809 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 fb7d09797d..124caa941c 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 7a6849c7c2..a969a36988 100644 --- a/DynamicReports/index.html +++ b/DynamicReports/index.html @@ -9,7 +9,7 @@ - + @@ -67,6 +67,6 @@ →

- + diff --git a/ElectrumPersonalServer/index.html b/ElectrumPersonalServer/index.html index 3cd4bcc364..4dc0b92b99 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 614fb4a878..40778c5c87 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 f4f71037d7..3637178ae9 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 073e99c7db..c328de9e10 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 5d7d0a2ba1..955b890212 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 c456c8c2df..414fa3bf17 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 7df40697c6..f2598447bf 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 26375d7917..a68a40e944 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 530b6dfee4..8da44b1dac 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 621d022c2c..7d196bdf7a 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 be091279fb..9b411928a7 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 bdaa92334c..1162db8c24 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 8af206d7e4..d9cd025f61 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 45c015f423..873f9e8814 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 eb78ff5e01..be4f99569f 100644 --- a/Forms/index.html +++ b/Forms/index.html @@ -9,7 +9,7 @@ - + @@ -90,6 +90,6 @@ Unbank

If you'd like to support the project, please visit the donation page.

- + diff --git a/Grandnode/index.html b/Grandnode/index.html index 769157375d..ec58e187db 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 63a558d2c7..71786c19e9 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 cd52079db0..35e18a2487 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 e4998affb2..24a7fd2e8a 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 ec51c47051..64bde01f6e 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 d60e2cd799..ab8fa857d1 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 ad5c039c7e..2324077f07 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 d3e662835d..350efb1b4d 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 38192be607..20c3e5fa4a 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 dea2f6dc3f..4fef6d9a46 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 6fd9680500..dfec7f6df7 100644 --- a/NBXplorer/API/index.html +++ b/NBXplorer/API/index.html @@ -9,7 +9,7 @@ - + @@ -696,6 +696,6 @@ →

- + diff --git a/NBXplorer/Postgres-Migration/index.html b/NBXplorer/Postgres-Migration/index.html index 9456bb475a..a5e40c6c65 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 29a952153c..f9dce16054 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 13b0f008b9..042c251680 100644 --- a/NBXplorer/index.html +++ b/NBXplorer/index.html @@ -9,7 +9,7 @@ - + @@ -108,6 +108,6 @@ →

- + diff --git a/Nopcommerce/index.html b/Nopcommerce/index.html index 2edf20f12d..4c3c7f6c60 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 b7a704d243..990cd86751 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 829b177918..357e8e9436 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 413c52009e..75a3c1c625 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 c970992016..0324141445 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 c0d5e41c7a..2b1d58a788 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 f1625208fb..e41e5c85b7 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 8b043cf370..31f38f898b 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 2eb769d062..baff45410d 100644 --- a/Payroll/index.html +++ b/Payroll/index.html @@ -9,7 +9,7 @@ - + @@ -70,6 +70,6 @@ →

- + diff --git a/PodServer/index.html b/PodServer/index.html index 68fb1b52c5..316a23e65c 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 528ea239e7..b0da62fed6 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 f1a052ead8..8bae887b1e 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 2b7f2eb66f..45e76e9290 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 730eb455b3..7c390f98b4 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 174b95d5fb..6541b3da8e 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 2557db5cbe..d1ff4c28a8 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 b09770f9d1..70c0d229b8 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 c4410c1901..cdd79409e2 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 f3fe23e191..efd3dcf273 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 5b26bdc639..29f5510db1 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 1af83bea29..8dd0838dbb 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 d03d60353c..55240a07a9 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 9df06b05fb..f54cc6b1ca 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 a9f1fbb686..16a8ce4cca 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 ac9f0fe6b2..aaffe46832 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 dc213f3ef4..5324599d98 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 b4d65a298a..0f3a24f949 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 97d1da4612..7e901331cd 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 36725144f7..56a6d08b89 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 b72d412c45..291ac06762 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 21fbd74f9c..15735d0a2f 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 e564a9a480..7fb3e91fa4 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 ead4972226..9451af4cfa 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 50be0ec68d..f7067ccece 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 5981bc05e2..60f0d6cb81 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 c44e2c7923..9dd25a0f02 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 05761bfd3c..49d73e2ce8 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 6ffe432cb2..6c0dbe60cd 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 fa877d2648..052a323368 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 131ad533c8..f890df1659 100644 --- a/WooCommerce/index.html +++ b/WooCommerce/index.html @@ -9,7 +9,7 @@ - + @@ -116,6 +116,6 @@ →

    - + diff --git a/Xenforo/index.html b/Xenforo/index.html index 021997b77b..4dac14a507 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 6249a32026..7715e326b0 100644 --- a/Zapier/index.html +++ b/Zapier/index.html @@ -9,7 +9,7 @@ - + @@ -77,6 +77,6 @@ →

    - + diff --git a/assets/js/103.9a0312c4.js b/assets/js/103.e818b26a.js similarity index 97% rename from assets/js/103.9a0312c4.js rename to assets/js/103.e818b26a.js index 00bfad96ed..89d243a886 100644 --- a/assets/js/103.9a0312c4.js +++ b/assets/js/103.e818b26a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[103],{732:function(e,t,n){"use strict";n.r(t);var a=n(10),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],{733:function(e,t,n){"use strict";n.r(t);var a=n(10),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/104.347afe3f.js b/assets/js/104.5f4a82f2.js similarity index 98% rename from assets/js/104.347afe3f.js rename to assets/js/104.5f4a82f2.js index 8af12131b7..eadf2cf6d7 100644 --- a/assets/js/104.347afe3f.js +++ b/assets/js/104.5f4a82f2.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[104],{733:function(e,t,o){"use strict";o.r(t);var a=o(10),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:"connecting-coldcard-wallet-to-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connecting-coldcard-wallet-to-btcpay-server"}},[e._v("#")]),e._v(" Connecting Coldcard Wallet to BTCPay Server")]),e._v(" "),t("p",[e._v("This document shows how to use a "),t("strong",[e._v("Coldcard Wallet")]),e._v(" with your BTCPay Server.")]),e._v(" "),t("h2",{attrs:{id:"coldcard-wallet-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#coldcard-wallet-setup"}},[e._v("#")]),e._v(" Coldcard Wallet Setup")]),e._v(" "),t("p",[e._v("This guide assumes, you have a Coldcard wallet set up. To configure the "),t("strong",[e._v("Coldcard")]),e._v(", please see the "),t("a",{attrs:{href:"https://coldcardwallet.com/docs/quick",target:"_blank",rel:"noopener noreferrer"}},[e._v("quick setup guide on manufacturer's website"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"quick-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-setup"}},[e._v("#")]),e._v(" Quick Setup")]),e._v(" "),t("ol",[t("li",[e._v("Insert the MicroSD card into the Coldcard wallet.")]),e._v(" "),t("li",[e._v("Go to Advanced > MicroSD Card > Electrum Wallet > Native-Segwit")]),e._v(" "),t("li",[e._v("Insert the MicroSD card back into your PC")]),e._v(" "),t("li",[e._v("In BTCPay Server, Stores > Settings > Setup > Connect an existing wallet > "),t("code",[e._v("Import wallet file")])]),e._v(" "),t("li",[e._v("Choose File > select the wallet file earlier exported from Coldcard.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Continue")])]),e._v(" "),t("li",[e._v("Confirm the addresses match the ones shown in your BTCPay Server.")])]),e._v(" "),t("p",[e._v("The "),t("strong",[e._v("Coldcard is now connected to your BTCPay Server")]),e._v(". Payments go directly to Coldcard. The video below shows how to connect your BTCPay store to your Coldcard.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/N0eVwdP_7EQ/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=N0eVwdP_7EQ",title:"BTCPay and Coldcard","data-id":"N0eVwdP_7EQ"}},[t("iframe",{attrs:{title:"BTCPay and Coldcard","data-src":"https://www.youtube-nocookie.com/embed/N0eVwdP_7EQ?&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:"spending-from-btcpay-server-wallet-with-coldcard-psbt"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#spending-from-btcpay-server-wallet-with-coldcard-psbt"}},[e._v("#")]),e._v(" Spending from BTCPay Server wallet with Coldcard (PSBT)")]),e._v(" "),t("p",[e._v("Once there are some funds in received to your "),t("strong",[e._v("BTCPay Wallet connected to Coldcard")]),e._v(", you can spend them by using "),t("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/psbt.md#psbt-in-general",target:"_blank",rel:"noopener noreferrer"}},[e._v("PSBT"),t("OutboundLink")],1),e._v(" (Partially Signed Bitcoin Transactions). This allows completely offline signing of your transactions, without ever having to connect your hardware wallet to the internet.")]),e._v(" "),t("ol",[t("li",[e._v("Wallets > Manage > Send")]),e._v(" "),t("li",[e._v("Fill in destination address and the amount")]),e._v(" "),t("li",[e._v("Click on the Sign with "),t("code",[e._v("a wallet supporting PSBT")]),e._v(" button.")]),e._v(" "),t("li",[e._v("You will be redirected to PSBT tab, with pre-filled information, click on the "),t("code",[e._v("Sign with a wallet supporting PSBT (save as file)")])]),e._v(" "),t("li",[e._v("Save the file onto MicroSD card")]),e._v(" "),t("li",[e._v("Insert MicroSD into your Coldcard.")]),e._v(" "),t("li",[e._v("In Coldcard, click on the "),t("code",[e._v("Ready To Sign")])]),e._v(" "),t("li",[e._v("Review the transaction information, and click OK button to sign it.")]),e._v(" "),t("li",[e._v("Transaction will be saved onto MicroSD.")]),e._v(" "),t("li",[e._v("In BTCPay, go to PSBT tab of the wallet and upload the signed PSBT file.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Decode")])]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Other Actions")]),e._v(" and select "),t("code",[e._v("Review")])]),e._v(" "),t("li",[e._v("Review your transactions and click "),t("code",[e._v("Broadcast")]),e._v(" to broadcast it on the network.")])]),e._v(" "),t("p",[e._v("The video below shows "),t("strong",[e._v("how to connect your BTCPay store to your Coldcard")]),e._v(".")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/XyqvYaXMfNU/hqdefault.jpg)"},attrs:{href:"https://youtu.be/XyqvYaXMfNU",title:"BTCPay Server and Coldcard","data-id":"XyqvYaXMfNU"}},[t("iframe",{attrs:{title:"BTCPay Server and Coldcard","data-src":"https://www.youtube-nocookie.com/embed/XyqvYaXMfNU?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[104],{732:function(e,t,o){"use strict";o.r(t);var a=o(10),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:"connecting-coldcard-wallet-to-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connecting-coldcard-wallet-to-btcpay-server"}},[e._v("#")]),e._v(" Connecting Coldcard Wallet to BTCPay Server")]),e._v(" "),t("p",[e._v("This document shows how to use a "),t("strong",[e._v("Coldcard Wallet")]),e._v(" with your BTCPay Server.")]),e._v(" "),t("h2",{attrs:{id:"coldcard-wallet-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#coldcard-wallet-setup"}},[e._v("#")]),e._v(" Coldcard Wallet Setup")]),e._v(" "),t("p",[e._v("This guide assumes, you have a Coldcard wallet set up. To configure the "),t("strong",[e._v("Coldcard")]),e._v(", please see the "),t("a",{attrs:{href:"https://coldcardwallet.com/docs/quick",target:"_blank",rel:"noopener noreferrer"}},[e._v("quick setup guide on manufacturer's website"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"quick-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#quick-setup"}},[e._v("#")]),e._v(" Quick Setup")]),e._v(" "),t("ol",[t("li",[e._v("Insert the MicroSD card into the Coldcard wallet.")]),e._v(" "),t("li",[e._v("Go to Advanced > MicroSD Card > Electrum Wallet > Native-Segwit")]),e._v(" "),t("li",[e._v("Insert the MicroSD card back into your PC")]),e._v(" "),t("li",[e._v("In BTCPay Server, Stores > Settings > Setup > Connect an existing wallet > "),t("code",[e._v("Import wallet file")])]),e._v(" "),t("li",[e._v("Choose File > select the wallet file earlier exported from Coldcard.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Continue")])]),e._v(" "),t("li",[e._v("Confirm the addresses match the ones shown in your BTCPay Server.")])]),e._v(" "),t("p",[e._v("The "),t("strong",[e._v("Coldcard is now connected to your BTCPay Server")]),e._v(". Payments go directly to Coldcard. The video below shows how to connect your BTCPay store to your Coldcard.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/N0eVwdP_7EQ/hqdefault.jpg)"},attrs:{href:"https://www.youtube.com/watch?v=N0eVwdP_7EQ",title:"BTCPay and Coldcard","data-id":"N0eVwdP_7EQ"}},[t("iframe",{attrs:{title:"BTCPay and Coldcard","data-src":"https://www.youtube-nocookie.com/embed/N0eVwdP_7EQ?&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:"spending-from-btcpay-server-wallet-with-coldcard-psbt"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#spending-from-btcpay-server-wallet-with-coldcard-psbt"}},[e._v("#")]),e._v(" Spending from BTCPay Server wallet with Coldcard (PSBT)")]),e._v(" "),t("p",[e._v("Once there are some funds in received to your "),t("strong",[e._v("BTCPay Wallet connected to Coldcard")]),e._v(", you can spend them by using "),t("a",{attrs:{href:"https://github.com/bitcoin/bitcoin/blob/master/doc/psbt.md#psbt-in-general",target:"_blank",rel:"noopener noreferrer"}},[e._v("PSBT"),t("OutboundLink")],1),e._v(" (Partially Signed Bitcoin Transactions). This allows completely offline signing of your transactions, without ever having to connect your hardware wallet to the internet.")]),e._v(" "),t("ol",[t("li",[e._v("Wallets > Manage > Send")]),e._v(" "),t("li",[e._v("Fill in destination address and the amount")]),e._v(" "),t("li",[e._v("Click on the Sign with "),t("code",[e._v("a wallet supporting PSBT")]),e._v(" button.")]),e._v(" "),t("li",[e._v("You will be redirected to PSBT tab, with pre-filled information, click on the "),t("code",[e._v("Sign with a wallet supporting PSBT (save as file)")])]),e._v(" "),t("li",[e._v("Save the file onto MicroSD card")]),e._v(" "),t("li",[e._v("Insert MicroSD into your Coldcard.")]),e._v(" "),t("li",[e._v("In Coldcard, click on the "),t("code",[e._v("Ready To Sign")])]),e._v(" "),t("li",[e._v("Review the transaction information, and click OK button to sign it.")]),e._v(" "),t("li",[e._v("Transaction will be saved onto MicroSD.")]),e._v(" "),t("li",[e._v("In BTCPay, go to PSBT tab of the wallet and upload the signed PSBT file.")]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Decode")])]),e._v(" "),t("li",[e._v("Click "),t("code",[e._v("Other Actions")]),e._v(" and select "),t("code",[e._v("Review")])]),e._v(" "),t("li",[e._v("Review your transactions and click "),t("code",[e._v("Broadcast")]),e._v(" to broadcast it on the network.")])]),e._v(" "),t("p",[e._v("The video below shows "),t("strong",[e._v("how to connect your BTCPay store to your Coldcard")]),e._v(".")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/XyqvYaXMfNU/hqdefault.jpg)"},attrs:{href:"https://youtu.be/XyqvYaXMfNU",title:"BTCPay Server and Coldcard","data-id":"XyqvYaXMfNU"}},[t("iframe",{attrs:{title:"BTCPay Server and Coldcard","data-src":"https://www.youtube-nocookie.com/embed/XyqvYaXMfNU?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/105.c450d787.js b/assets/js/105.86ccd5bf.js similarity index 99% rename from assets/js/105.c450d787.js rename to assets/js/105.86ccd5bf.js index 05164f6c86..7e91b49d15 100644 --- a/assets/js/105.c450d787.js +++ b/assets/js/105.86ccd5bf.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[105],{740:function(e,t,a){"use strict";a.r(t);var r=a(10),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"setting-up-btcpay-server-for-conference-event-local-community"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-btcpay-server-for-conference-event-local-community"}},[e._v("#")]),e._v(" Setting up BTCPay Server for Conference / Event / Local Community")]),e._v(" "),t("p",[e._v("We will be going through the setup we used at "),t("a",{attrs:{href:"https://blog.btcpayserver.org/case-study-bitcoin-atlantis/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Atlantis"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://bitcoinmagazine.com/business/case-study-enabling-bitcoin-as-a-medium-of-exchange-at-the-bitcoin-asia-conference-in-hong-kong",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Hong Kong"),t("OutboundLink")],1),e._v(" and other conferences for a great user experience for attendees and merchants.")]),e._v(" "),t("p",[e._v("For Point of Sale (PoS) devices we use the "),t("a",{attrs:{href:"https://bitcoinize.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoinize"),t("OutboundLink")],1),e._v(" devices with receipt printer (but you can use any other Android-based PoS device).")]),e._v(" "),t("p",[e._v("The Lightning Network part will be done by "),t("a",{attrs:{href:"https://blink.sv",target:"_blank",rel:"noopener noreferrer"}},[e._v("Blink.sv"),t("OutboundLink")],1),e._v(" with the Blink plugin (but you can swap it for any other LN service like Alby, Breez, use our internal LN node or connect to your own LN node).")]),e._v(" "),t("p",[e._v("To allow an even smoother UX for attendees without an internet connection or no prior Bitcoin knowledge we show how to set up and issue Bolt Cards and allow users to top-up.")]),e._v(" "),t("p",[e._v("To get an overview of the whole setup and steps you can watch our workshop from BTCPrague 2024.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Hpd-IytvI4Y/hqdefault.jpg)"},attrs:{href:"https://youtu.be/Hpd-IytvI4Y",title:"BTCPrague 2024 Workshop","data-id":"Hpd-IytvI4Y"}},[t("iframe",{attrs:{title:"BTCPrague 2024 Workshop","data-src":"https://www.youtube-nocookie.com/embed/Hpd-IytvI4Y?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("hr"),e._v(" "),t("p",[t("strong",[e._v("Table of contents")])]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#initial-setup"}},[e._v("Initial setup")])]),t("li",[t("a",{attrs:{href:"#setup-merchant-stores-and-initialize-bitcoinize-devices"}},[e._v("Setup merchant stores and initialize Bitcoinize devices")]),t("ul",[t("li",[t("a",{attrs:{href:"#preparation-of-bitcoinize-devices"}},[e._v("Preparation of Bitcoinize devices")])])])]),t("li",[t("a",{attrs:{href:"#setup-merchant-stores"}},[e._v("Setup merchant stores")]),t("ul",[t("li",[t("a",{attrs:{href:"#1-create-store"}},[e._v("1. Create store")])]),t("li",[t("a",{attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("2. Setup Lightning Network wallet")])]),t("li",[t("a",{attrs:{href:"#3-configure-spread-and-enable-sounds"}},[e._v("3. Configure spread and enable sounds")])]),t("li",[t("a",{attrs:{href:"#4-setup-point-of-sale-pos"}},[e._v("4. Setup Point of Sale (PoS)")])]),t("li",[t("a",{attrs:{href:"#5-put-pos-link-and-labels-on-bitcoinize-device"}},[e._v("5. Put PoS link and labels on Bitcoinize device")])]),t("li",[t("a",{attrs:{href:"#6-give-merchants-access-to-the-payment-history-optional"}},[e._v("6. Give merchants access to the payment history (optional)")])])])]),t("li",[t("a",{attrs:{href:"#setup-a-bolt-cards-provider"}},[e._v("Setup a Bolt Cards provider")]),t("ul",[t("li",[t("a",{attrs:{href:"#1-create-a-store"}},[e._v("1. Create a store")])]),t("li",[t("a",{attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("2. Setup Lightning Network wallet")])]),t("li",[t("a",{attrs:{href:"#3-setup-automated-payouts"}},[e._v("3. Setup automated payouts")])]),t("li",[t("a",{attrs:{href:"#4-setup-bolt-cards-factory"}},[e._v("4. Setup Bolt Cards Factory")])]),t("li",[t("a",{attrs:{href:"#5-checking-the-balance-of-cards-and-topping-them-up"}},[e._v("5. Checking the balance of cards and topping them up")])]),t("li",[t("a",{attrs:{href:"#6-resetting-bolt-cards-after-the-conferenceevent"}},[e._v("6. Resetting Bolt Cards after the conference/event")])])])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"initial-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#initial-setup"}},[e._v("#")]),e._v(" Initial setup")]),e._v(" "),t("ul",[t("li",[e._v("Setup BTCPay Server v1.13.2 or later on a VPS (with public IP)")]),e._v(" "),t("li",[e._v("Setup a subdomain or use one provided by VPS hosting (e.g. Lunanode)")]),e._v(" "),t("li",[e._v("Register the admin account and create a first test store")]),e._v(" "),t("li",[e._v("Do "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[e._v("FastSync")]),e._v(" (optional)")],1)]),e._v(" "),t("p",[t("strong",[e._v("Once the server is up, install these plugins:")])]),e._v(" "),t("ul",[t("li",[e._v("Blink plugin")]),e._v(" "),t("li",[e._v("Bolt Cards plugin")])]),e._v(" "),t("p",[e._v("Then restart BTCPay Server (via UI or "),t("code",[e._v("docker restart generated_btcpayserver_1")]),e._v(" via SSH)")]),e._v(" "),t("h2",{attrs:{id:"setup-merchant-stores-and-initialize-bitcoinize-devices"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-merchant-stores-and-initialize-bitcoinize-devices"}},[e._v("#")]),e._v(" Setup merchant stores and initialize Bitcoinize devices")]),e._v(" "),t("h3",{attrs:{id:"preparation-of-bitcoinize-devices"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparation-of-bitcoinize-devices"}},[e._v("#")]),e._v(" Preparation of Bitcoinize devices")]),e._v(" "),t("ul",[t("li",[e._v("Make sure Bitcoinize devices battery level is 90%+ (if less, then charge)")]),e._v(" "),t("li",[e._v("Extension cords / high-powered USB hubs are critical when setting up 10+ devices")]),e._v(" "),t("li",[e._v("Insert the paper roll in the device's printer")])]),e._v(" "),t("h2",{attrs:{id:"setup-merchant-stores"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-merchant-stores"}},[e._v("#")]),e._v(" Setup merchant stores")]),e._v(" "),t("p",[e._v("Log into your BTCPay Server instance with your admin account.")]),e._v(" "),t("p",[t("em",[t("strong",[e._v("Repeat the following steps for each merchant:")])])]),e._v(" "),t("h3",{attrs:{id:"1-create-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-store"}},[e._v("#")]),e._v(" 1. Create store")]),e._v(" "),t("ul",[t("li",[e._v('Top left dropdown -> "'),t("strong",[e._v("Create store")]),e._v('" button\n'),t("ul",[t("li",[t("strong",[e._v("Name")]),e._v(": e.g. Nakamoto's Pineapple Pizza")]),e._v(" "),t("li",[t("strong",[e._v("Default Currency")]),e._v(": USD, HKD, ... depending on location")]),e._v(" "),t("li",[t("strong",[e._v("Preferred Price Source")]),e._v(": For USD, EUR Kraken is recommended, HKD Coingecko, for more exotic currencies you can try Coingecko or check if there is a local exchange listed in the dropdown")])])]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Create store")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"2-setup-lightning-network-wallet"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("#")]),e._v(" 2. Setup Lightning Network wallet")]),e._v(" "),t("p",[e._v("Setup the Lightning wallet to be connected to the merchants' Blink account, follow the "),t("a",{attrs:{href:"https://dev.blink.sv/examples/btcpayserver-plugin#how-to-connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions on Blink docs"),t("OutboundLink")],1),e._v(".\n(Alternatively, in case your merchants want to get paid in local currency you can set up your conference Blink account and distribute funds later on fiat ramps)")]),e._v(" "),t("h3",{attrs:{id:"3-configure-spread-and-enable-sounds"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-configure-spread-and-enable-sounds"}},[e._v("#")]),e._v(" 3. Configure spread and enable sounds")]),e._v(" "),t("ul",[t("li",[e._v('Click "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Rates")]),e._v('"')]),e._v(" "),t("li",[t("strong",[e._v("Add Exchange Rate Spread")]),e._v(": enter "),t("code",[e._v("1")]),e._v(", so we have extra room (Blink charges 0.2% for hedging in StableSats USD")]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Save")]),e._v('" button')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Checkout Appearance")]),e._v('"')]),e._v(" "),t("li",[e._v('On dropdown "'),t("strong",[e._v("Select a preset")]),e._v('", select "'),t("strong",[e._v("In-store")]),e._v('"')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Save")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"4-setup-point-of-sale-pos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-setup-point-of-sale-pos"}},[e._v("#")]),e._v(" 4. Setup Point of Sale (PoS)")]),e._v(" "),t("ul",[t("li",[e._v('Left sidebar under "Plugins", click on "'),t("strong",[e._v("Point of Sale")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("App Name")]),e._v('": enter the same merchant name as for the store')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Create")]),e._v('" button')]),e._v(" "),t("li",[e._v('Now on PoS settings, make sure "'),t("strong",[e._v("App Name")]),e._v('" and "'),t("strong",[e._v("Display Title")]),e._v('" are filled out')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Choose Point of Sale Style")]),e._v('": select "'),t("strong",[e._v("Keypad")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Currency")]),e._v('", select the same currency as your store')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')]),e._v(" "),t("li",[e._v('On the top right click on the "'),t("strong",[e._v("View")]),e._v('" button and make sure the keypad is shown')])]),e._v(" "),t("h3",{attrs:{id:"5-put-pos-link-and-labels-on-bitcoinize-device"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#5-put-pos-link-and-labels-on-bitcoinize-device"}},[e._v("#")]),e._v(" 5. Put PoS link and labels on Bitcoinize device")]),e._v(" "),t("ul",[t("li",[e._v('Go back to PoS settings in your browser and click on the "'),t("strong",[e._v("QR-code icon")]),e._v('"')]),e._v(" "),t("li",[e._v('On your Bitcoinize (or other) device, open the "'),t("strong",[e._v("Camera")]),e._v('" app')]),e._v(" "),t("li",[e._v('Scroll to the right until you find "'),t("strong",[e._v("more")]),e._v('" category -> select "'),t("strong",[e._v("QR-Code")]),e._v('"')]),e._v(" "),t("li",[e._v("Now scan the QR-Code shown in your browser (on the PoS settings page)")]),e._v(" "),t("li",[e._v("After scanning open the URL in the Chrome browser")]),e._v(" "),t("li",[e._v("Check that you see the keypad and the correct merchant name")]),e._v(" "),t("li",[e._v('Tap on the 3 dots "'),t("strong",[e._v("...")]),e._v('" on the top right and select "'),t("strong",[e._v("Add to home")]),e._v('"')]),e._v(" "),t("li",[e._v("Place the icon on the main home screen for easy access")]),e._v(" "),t("li",[e._v("Label the device and box with stickers bearing the merchant name")])]),e._v(" "),t("p",[t("em",[t("strong",[e._v("Testing the PoS device payments and give permissions:")])])]),e._v(" "),t("ul",[t("li",[e._v("Start the PoS page from the home screen")]),e._v(" "),t("li",[e._v("Ensure that the sound on the device is turned up so that there is audio feedback on payment, especially if Bolt Cards are used")]),e._v(" "),t("li",[e._v('Enter 0.01 USD (or other currency equivalent) and tap on "'),t("strong",[e._v("Charge")]),e._v('" button')]),e._v(" "),t("li",[e._v("Only first time the browser will ask for NFC permission, tap on the button to give it the requested permission")]),e._v(" "),t("li",[e._v("Pay the invoice either with a Bolt Card or Lightning wallet")]),e._v(" "),t("li",[e._v("Ensure you hear the sound after the payment")]),e._v(" "),t("li",[e._v('Tap on "'),t("strong",[e._v("View receipt")]),e._v('" button, test printing the receipt by selecting the '),t("strong",[e._v("POSPrinter")]),e._v(' from the dropdown, tap on the "'),t("strong",[e._v("Print")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"6-give-merchants-access-to-the-payment-history-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#6-give-merchants-access-to-the-payment-history-optional"}},[e._v("#")]),e._v(" 6. Give merchants access to the payment history (optional)")]),e._v(" "),t("p",[e._v('Optionally you can also create a login for each store/merchant on the PoS device so they can access the payment history. This is helpful to double-check what was the last payment or if a payment was already made. You can do so by adding a "Merchant" role with the following permissions:')]),e._v(" "),t("ul",[t("li",[e._v("btcpay.store.canmodifyinvoices")]),e._v(" "),t("li",[e._v("btcpay.store.canviewstoresettings")]),e._v(" "),t("li",[e._v("btcpay.store.canviewpaymentrequestes")]),e._v(" "),t("li",[e._v("btcpay.store.canarchivepullpayments")]),e._v(" "),t("li",[e._v("btcpay.store.cancreatenonapprovedpullpayments")])]),e._v(" "),t("p",[e._v("After that create a user for each store and assign them to the right store.")]),e._v(" "),t("h2",{attrs:{id:"setup-a-bolt-cards-provider"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-a-bolt-cards-provider"}},[e._v("#")]),e._v(" Setup a Bolt Cards provider")]),e._v(" "),t("p",[e._v('We will create a separate store that is serving as a Bolt Cards provider. To find it easier in the list of stores you can append the store name with a "z", e.g. "z - Bolt Cards Provider".')]),e._v(" "),t("p",[e._v("For this special store we will connect a Blink account with the important differences compared to merchant Blink accounts:")]),e._v(" "),t("ul",[t("li",[e._v("the API key has to have also "),t("strong",[e._v("write permission")]),e._v(", otherwise Bolt Cards won't be able to pull the funds")]),e._v(" "),t("li",[e._v("Make sure you connect the "),t("strong",[e._v("Bitcoin wallet")]),e._v(" (and "),t("em",[e._v("not")]),e._v(" StableSats USD)")])]),e._v(" "),t("h3",{attrs:{id:"1-create-a-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-a-store"}},[e._v("#")]),e._v(" 1. Create a store")]),e._v(" "),t("ul",[t("li",[e._v('Create a store with the name "'),t("strong",[e._v("z - Bolt Cards Provider")]),e._v('" (same steps as shown for merchant stores above)')])]),e._v(" "),t("h3",{attrs:{id:"2-setup-lightning-network-wallet-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-setup-lightning-network-wallet-2"}},[e._v("#")]),e._v(" 2. Setup Lightning Network wallet")]),e._v(" "),t("p",[e._v("Setup the Lightning wallet to be connected to your Blink account as per "),t("a",{attrs:{href:"https://dev.blink.sv/examples/btcpayserver-plugin#how-to-connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions on Blink docs"),t("OutboundLink")],1),e._v(" but make sure:")]),e._v(" "),t("ul",[t("li",[e._v('the API key has "Read", "Receive" and "Write" permissions, otherwise Bolt Cards won\'t be able to pull the funds')]),e._v(" "),t("li",[e._v("make sure you connect to the "),t("strong",[e._v("Bitcoin wallet")]),e._v(" (and "),t("em",[e._v("not")]),e._v(" StableSats USD)")])]),e._v(" "),t("h3",{attrs:{id:"3-setup-automated-payouts"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-setup-automated-payouts"}},[e._v("#")]),e._v(" 3. Setup automated payouts")]),e._v(" "),t("p",[e._v("To allow no-interaction top-ups of Bolt Cards we need to make sure payouts are processing automatically.")]),e._v(" "),t("ul",[t("li",[e._v('Go "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Payout Processors")]),e._v('"')]),e._v(" "),t("li",[e._v('Below "'),t("strong",[e._v("Automated Lightning Sender")]),e._v('", click on "'),t("strong",[e._v("Configure")]),e._v('"')]),e._v(" "),t("li",[e._v('Enable "**Process approved payouts instantly"')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"4-setup-bolt-cards-factory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-setup-bolt-cards-factory"}},[e._v("#")]),e._v(" 4. Setup Bolt Cards Factory")]),e._v(" "),t("h4",{attrs:{id:"setup-a-bolt-card-factory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-a-bolt-card-factory"}},[e._v("#")]),e._v(" Setup a Bolt Card factory")]),e._v(" "),t("ul",[t("li",[e._v('On the left sidebar go to "'),t("strong",[e._v("Boltcard Factories")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("App Name")]),e._v('": Enter a name like "Your conference" (it will be displayed when the card is read)')]),e._v(" "),t("li",[e._v('Click on the "'),t("strong",[e._v("Create")]),e._v('" button, and you will see the following settings. For example, if you want to preload the cards with 210 Sats, enter the following:\n'),t("ul",[t("li",[e._v('"'),t("strong",[e._v("Name")]),e._v('": Name of the conference/event that is displayed when a Bolt Card is read')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Amount")]),e._v('": 210')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Currency")]),e._v('": SATS (The currency must to be '),t("strong",[e._v("SATS")]),e._v(", do not set any other currency)")]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Automatically approve claims")]),e._v('": checked (true)')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Payment Methods")]),e._v('": "BTC (Off-Chain)" checked (true)')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')])])])]),e._v(" "),t("h4",{attrs:{id:"program-bolt-cards"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#program-bolt-cards"}},[e._v("#")]),e._v(" Program Bolt Cards")]),e._v(" "),t("p",[e._v('Still, on that Boltcards Factory settings page, you now click on "'),t("strong",[e._v("View")]),e._v('" button on the top right, the page that opens will need to be opened on a mobile device with NFC writing support (e.g. a Bitcoinize device).')]),e._v(" "),t("ul",[t("li",[e._v("Ensure that you have the "),t("a",{attrs:{href:"https://play.google.com/store/apps/details?id=com.lightningnfcapp&hl=en&gl=US",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bolt Card NFC Card Creator"),t("OutboundLink")],1),e._v(" installed on the mobile device")]),e._v(" "),t("li",[e._v("If there is a Bolt Card NFC Card Creator app already installed - "),t("em",[t("strong",[e._v("make sure it's the latest version")])]),e._v(", optionally uninstall and install the newest version from the app store")]),e._v(" "),t("li",[e._v('When you click on the "'),t("strong",[e._v("Setup")]),e._v('" button on the Boltcard Factory it should open the Bolt Card NFC Card Creator app')]),e._v(" "),t("li",[e._v("Make sure you hold the Bolt Card *"),t("strong",[e._v("until ALL green checkmarks are done")])]),e._v(" "),t("li",[e._v('You can now batch initialize cards. Just click on the "'),t("strong",[e._v("Write again")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"5-checking-the-balance-of-cards-and-topping-them-up"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#5-checking-the-balance-of-cards-and-topping-them-up"}},[e._v("#")]),e._v(" 5. Checking the balance of cards and topping them up")]),e._v(" "),t("p",[e._v('In the same store that serves as the Bolt Card provider you will have a "'),t("strong",[e._v("Boltcard Balance")]),e._v('" menu item on the left sidebar. The URL will look like this '),t("a",{attrs:{href:"https://btcpay.yourdomain.tld/boltcards/balance",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://btcpay.yourdomain.tld/boltcards/balance"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v('When you open that link on a mobile device with NFC support (such as Bitcoinize), you can use it to allow users to check their balance and also for topping their cards up with Sats, to do that, tap on the "'),t("strong",[e._v("QR-Code icon")]),e._v('" after reading the balance of the card.')]),e._v(" "),t("h3",{attrs:{id:"6-resetting-bolt-cards-after-the-conferenceevent"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#6-resetting-bolt-cards-after-the-conferenceevent"}},[e._v("#")]),e._v(" 6. Resetting Bolt Cards after the conference/event")]),e._v(" "),t("p",[e._v("Like the balance page, you can find the link on the left sidebar. The URL will look like this "),t("a",{attrs:{href:"https://btcpay.yourdomain.tld/boltcards/balance?view=Reset",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://btcpay.yourdomain.tld/boltcards/balance?view=Reset"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("You should consider publishing this link during or even before the event and allow attendees to sweep and reset their cards after the event, so they can reuse the Bolt Cards and reprogram them. This is only possible after the reset is done successfully.")]),e._v(" "),t("p",[e._v("To reset Bolt Cards, like for setting them up, you need the Bolt Card NFC Card Creator app.")]),e._v(" "),t("p",[e._v("See "),t("a",{attrs:{href:"https://x.com/r0ckstardev/status/1767618114139639817",target:"_blank",rel:"noopener noreferrer"}},[e._v("this tweet by Uncle Rockstar Dev"),t("OutboundLink")],1),e._v(" how the instructions could look like.")]),e._v(" "),t("p",[e._v("Congratulations, you have now set up a BTCPay Server for a conference or event with a smooth user experience for attendees and merchants. Enjoy the event!")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[105],{735:function(e,t,a){"use strict";a.r(t);var r=a(10),o=Object(r.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"setting-up-btcpay-server-for-conference-event-local-community"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setting-up-btcpay-server-for-conference-event-local-community"}},[e._v("#")]),e._v(" Setting up BTCPay Server for Conference / Event / Local Community")]),e._v(" "),t("p",[e._v("We will be going through the setup we used at "),t("a",{attrs:{href:"https://blog.btcpayserver.org/case-study-bitcoin-atlantis/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Atlantis"),t("OutboundLink")],1),e._v(", "),t("a",{attrs:{href:"https://bitcoinmagazine.com/business/case-study-enabling-bitcoin-as-a-medium-of-exchange-at-the-bitcoin-asia-conference-in-hong-kong",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoin Hong Kong"),t("OutboundLink")],1),e._v(" and other conferences for a great user experience for attendees and merchants.")]),e._v(" "),t("p",[e._v("For Point of Sale (PoS) devices we use the "),t("a",{attrs:{href:"https://bitcoinize.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bitcoinize"),t("OutboundLink")],1),e._v(" devices with receipt printer (but you can use any other Android-based PoS device).")]),e._v(" "),t("p",[e._v("The Lightning Network part will be done by "),t("a",{attrs:{href:"https://blink.sv",target:"_blank",rel:"noopener noreferrer"}},[e._v("Blink.sv"),t("OutboundLink")],1),e._v(" with the Blink plugin (but you can swap it for any other LN service like Alby, Breez, use our internal LN node or connect to your own LN node).")]),e._v(" "),t("p",[e._v("To allow an even smoother UX for attendees without an internet connection or no prior Bitcoin knowledge we show how to set up and issue Bolt Cards and allow users to top-up.")]),e._v(" "),t("p",[e._v("To get an overview of the whole setup and steps you can watch our workshop from BTCPrague 2024.")]),e._v(" "),t("a",{staticClass:"ytEmbed",staticStyle:{"background-image":"url(https://img.youtube.com/vi/Hpd-IytvI4Y/hqdefault.jpg)"},attrs:{href:"https://youtu.be/Hpd-IytvI4Y",title:"BTCPrague 2024 Workshop","data-id":"Hpd-IytvI4Y"}},[t("iframe",{attrs:{title:"BTCPrague 2024 Workshop","data-src":"https://www.youtube-nocookie.com/embed/Hpd-IytvI4Y?&autoplay=1&autohide=1&modestbranding=1&color=white&rel=0",frameborder:"0",allow:"autoplay;encrypted-media;picture-in-picture",allowfullscreen:""}})]),e._v(" "),t("hr"),e._v(" "),t("p",[t("strong",[e._v("Table of contents")])]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#initial-setup"}},[e._v("Initial setup")])]),t("li",[t("a",{attrs:{href:"#setup-merchant-stores-and-initialize-bitcoinize-devices"}},[e._v("Setup merchant stores and initialize Bitcoinize devices")]),t("ul",[t("li",[t("a",{attrs:{href:"#preparation-of-bitcoinize-devices"}},[e._v("Preparation of Bitcoinize devices")])])])]),t("li",[t("a",{attrs:{href:"#setup-merchant-stores"}},[e._v("Setup merchant stores")]),t("ul",[t("li",[t("a",{attrs:{href:"#1-create-store"}},[e._v("1. Create store")])]),t("li",[t("a",{attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("2. Setup Lightning Network wallet")])]),t("li",[t("a",{attrs:{href:"#3-configure-spread-and-enable-sounds"}},[e._v("3. Configure spread and enable sounds")])]),t("li",[t("a",{attrs:{href:"#4-setup-point-of-sale-pos"}},[e._v("4. Setup Point of Sale (PoS)")])]),t("li",[t("a",{attrs:{href:"#5-put-pos-link-and-labels-on-bitcoinize-device"}},[e._v("5. Put PoS link and labels on Bitcoinize device")])]),t("li",[t("a",{attrs:{href:"#6-give-merchants-access-to-the-payment-history-optional"}},[e._v("6. Give merchants access to the payment history (optional)")])])])]),t("li",[t("a",{attrs:{href:"#setup-a-bolt-cards-provider"}},[e._v("Setup a Bolt Cards provider")]),t("ul",[t("li",[t("a",{attrs:{href:"#1-create-a-store"}},[e._v("1. Create a store")])]),t("li",[t("a",{attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("2. Setup Lightning Network wallet")])]),t("li",[t("a",{attrs:{href:"#3-setup-automated-payouts"}},[e._v("3. Setup automated payouts")])]),t("li",[t("a",{attrs:{href:"#4-setup-bolt-cards-factory"}},[e._v("4. Setup Bolt Cards Factory")])]),t("li",[t("a",{attrs:{href:"#5-checking-the-balance-of-cards-and-topping-them-up"}},[e._v("5. Checking the balance of cards and topping them up")])]),t("li",[t("a",{attrs:{href:"#6-resetting-bolt-cards-after-the-conferenceevent"}},[e._v("6. Resetting Bolt Cards after the conference/event")])])])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"initial-setup"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#initial-setup"}},[e._v("#")]),e._v(" Initial setup")]),e._v(" "),t("ul",[t("li",[e._v("Setup BTCPay Server v1.13.2 or later on a VPS (with public IP)")]),e._v(" "),t("li",[e._v("Setup a subdomain or use one provided by VPS hosting (e.g. Lunanode)")]),e._v(" "),t("li",[e._v("Register the admin account and create a first test store")]),e._v(" "),t("li",[e._v("Do "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[e._v("FastSync")]),e._v(" (optional)")],1)]),e._v(" "),t("p",[t("strong",[e._v("Once the server is up, install these plugins:")])]),e._v(" "),t("ul",[t("li",[e._v("Blink plugin")]),e._v(" "),t("li",[e._v("Bolt Cards plugin")])]),e._v(" "),t("p",[e._v("Then restart BTCPay Server (via UI or "),t("code",[e._v("docker restart generated_btcpayserver_1")]),e._v(" via SSH)")]),e._v(" "),t("h2",{attrs:{id:"setup-merchant-stores-and-initialize-bitcoinize-devices"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-merchant-stores-and-initialize-bitcoinize-devices"}},[e._v("#")]),e._v(" Setup merchant stores and initialize Bitcoinize devices")]),e._v(" "),t("h3",{attrs:{id:"preparation-of-bitcoinize-devices"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#preparation-of-bitcoinize-devices"}},[e._v("#")]),e._v(" Preparation of Bitcoinize devices")]),e._v(" "),t("ul",[t("li",[e._v("Make sure Bitcoinize devices battery level is 90%+ (if less, then charge)")]),e._v(" "),t("li",[e._v("Extension cords / high-powered USB hubs are critical when setting up 10+ devices")]),e._v(" "),t("li",[e._v("Insert the paper roll in the device's printer")])]),e._v(" "),t("h2",{attrs:{id:"setup-merchant-stores"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-merchant-stores"}},[e._v("#")]),e._v(" Setup merchant stores")]),e._v(" "),t("p",[e._v("Log into your BTCPay Server instance with your admin account.")]),e._v(" "),t("p",[t("em",[t("strong",[e._v("Repeat the following steps for each merchant:")])])]),e._v(" "),t("h3",{attrs:{id:"1-create-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-store"}},[e._v("#")]),e._v(" 1. Create store")]),e._v(" "),t("ul",[t("li",[e._v('Top left dropdown -> "'),t("strong",[e._v("Create store")]),e._v('" button\n'),t("ul",[t("li",[t("strong",[e._v("Name")]),e._v(": e.g. Nakamoto's Pineapple Pizza")]),e._v(" "),t("li",[t("strong",[e._v("Default Currency")]),e._v(": USD, HKD, ... depending on location")]),e._v(" "),t("li",[t("strong",[e._v("Preferred Price Source")]),e._v(": For USD, EUR Kraken is recommended, HKD Coingecko, for more exotic currencies you can try Coingecko or check if there is a local exchange listed in the dropdown")])])]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Create store")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"2-setup-lightning-network-wallet"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-setup-lightning-network-wallet"}},[e._v("#")]),e._v(" 2. Setup Lightning Network wallet")]),e._v(" "),t("p",[e._v("Setup the Lightning wallet to be connected to the merchants' Blink account, follow the "),t("a",{attrs:{href:"https://dev.blink.sv/examples/btcpayserver-plugin#how-to-connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions on Blink docs"),t("OutboundLink")],1),e._v(".\n(Alternatively, in case your merchants want to get paid in local currency you can set up your conference Blink account and distribute funds later on fiat ramps)")]),e._v(" "),t("h3",{attrs:{id:"3-configure-spread-and-enable-sounds"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-configure-spread-and-enable-sounds"}},[e._v("#")]),e._v(" 3. Configure spread and enable sounds")]),e._v(" "),t("ul",[t("li",[e._v('Click "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Rates")]),e._v('"')]),e._v(" "),t("li",[t("strong",[e._v("Add Exchange Rate Spread")]),e._v(": enter "),t("code",[e._v("1")]),e._v(", so we have extra room (Blink charges 0.2% for hedging in StableSats USD")]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Save")]),e._v('" button')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Checkout Appearance")]),e._v('"')]),e._v(" "),t("li",[e._v('On dropdown "'),t("strong",[e._v("Select a preset")]),e._v('", select "'),t("strong",[e._v("In-store")]),e._v('"')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Save")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"4-setup-point-of-sale-pos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-setup-point-of-sale-pos"}},[e._v("#")]),e._v(" 4. Setup Point of Sale (PoS)")]),e._v(" "),t("ul",[t("li",[e._v('Left sidebar under "Plugins", click on "'),t("strong",[e._v("Point of Sale")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("App Name")]),e._v('": enter the same merchant name as for the store')]),e._v(" "),t("li",[e._v('Click "'),t("strong",[e._v("Create")]),e._v('" button')]),e._v(" "),t("li",[e._v('Now on PoS settings, make sure "'),t("strong",[e._v("App Name")]),e._v('" and "'),t("strong",[e._v("Display Title")]),e._v('" are filled out')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Choose Point of Sale Style")]),e._v('": select "'),t("strong",[e._v("Keypad")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Currency")]),e._v('", select the same currency as your store')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')]),e._v(" "),t("li",[e._v('On the top right click on the "'),t("strong",[e._v("View")]),e._v('" button and make sure the keypad is shown')])]),e._v(" "),t("h3",{attrs:{id:"5-put-pos-link-and-labels-on-bitcoinize-device"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#5-put-pos-link-and-labels-on-bitcoinize-device"}},[e._v("#")]),e._v(" 5. Put PoS link and labels on Bitcoinize device")]),e._v(" "),t("ul",[t("li",[e._v('Go back to PoS settings in your browser and click on the "'),t("strong",[e._v("QR-code icon")]),e._v('"')]),e._v(" "),t("li",[e._v('On your Bitcoinize (or other) device, open the "'),t("strong",[e._v("Camera")]),e._v('" app')]),e._v(" "),t("li",[e._v('Scroll to the right until you find "'),t("strong",[e._v("more")]),e._v('" category -> select "'),t("strong",[e._v("QR-Code")]),e._v('"')]),e._v(" "),t("li",[e._v("Now scan the QR-Code shown in your browser (on the PoS settings page)")]),e._v(" "),t("li",[e._v("After scanning open the URL in the Chrome browser")]),e._v(" "),t("li",[e._v("Check that you see the keypad and the correct merchant name")]),e._v(" "),t("li",[e._v('Tap on the 3 dots "'),t("strong",[e._v("...")]),e._v('" on the top right and select "'),t("strong",[e._v("Add to home")]),e._v('"')]),e._v(" "),t("li",[e._v("Place the icon on the main home screen for easy access")]),e._v(" "),t("li",[e._v("Label the device and box with stickers bearing the merchant name")])]),e._v(" "),t("p",[t("em",[t("strong",[e._v("Testing the PoS device payments and give permissions:")])])]),e._v(" "),t("ul",[t("li",[e._v("Start the PoS page from the home screen")]),e._v(" "),t("li",[e._v("Ensure that the sound on the device is turned up so that there is audio feedback on payment, especially if Bolt Cards are used")]),e._v(" "),t("li",[e._v('Enter 0.01 USD (or other currency equivalent) and tap on "'),t("strong",[e._v("Charge")]),e._v('" button')]),e._v(" "),t("li",[e._v("Only first time the browser will ask for NFC permission, tap on the button to give it the requested permission")]),e._v(" "),t("li",[e._v("Pay the invoice either with a Bolt Card or Lightning wallet")]),e._v(" "),t("li",[e._v("Ensure you hear the sound after the payment")]),e._v(" "),t("li",[e._v('Tap on "'),t("strong",[e._v("View receipt")]),e._v('" button, test printing the receipt by selecting the '),t("strong",[e._v("POSPrinter")]),e._v(' from the dropdown, tap on the "'),t("strong",[e._v("Print")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"6-give-merchants-access-to-the-payment-history-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#6-give-merchants-access-to-the-payment-history-optional"}},[e._v("#")]),e._v(" 6. Give merchants access to the payment history (optional)")]),e._v(" "),t("p",[e._v('Optionally you can also create a login for each store/merchant on the PoS device so they can access the payment history. This is helpful to double-check what was the last payment or if a payment was already made. You can do so by adding a "Merchant" role with the following permissions:')]),e._v(" "),t("ul",[t("li",[e._v("btcpay.store.canmodifyinvoices")]),e._v(" "),t("li",[e._v("btcpay.store.canviewstoresettings")]),e._v(" "),t("li",[e._v("btcpay.store.canviewpaymentrequestes")]),e._v(" "),t("li",[e._v("btcpay.store.canarchivepullpayments")]),e._v(" "),t("li",[e._v("btcpay.store.cancreatenonapprovedpullpayments")])]),e._v(" "),t("p",[e._v("After that create a user for each store and assign them to the right store.")]),e._v(" "),t("h2",{attrs:{id:"setup-a-bolt-cards-provider"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-a-bolt-cards-provider"}},[e._v("#")]),e._v(" Setup a Bolt Cards provider")]),e._v(" "),t("p",[e._v('We will create a separate store that is serving as a Bolt Cards provider. To find it easier in the list of stores you can append the store name with a "z", e.g. "z - Bolt Cards Provider".')]),e._v(" "),t("p",[e._v("For this special store we will connect a Blink account with the important differences compared to merchant Blink accounts:")]),e._v(" "),t("ul",[t("li",[e._v("the API key has to have also "),t("strong",[e._v("write permission")]),e._v(", otherwise Bolt Cards won't be able to pull the funds")]),e._v(" "),t("li",[e._v("Make sure you connect the "),t("strong",[e._v("Bitcoin wallet")]),e._v(" (and "),t("em",[e._v("not")]),e._v(" StableSats USD)")])]),e._v(" "),t("h3",{attrs:{id:"1-create-a-store"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#1-create-a-store"}},[e._v("#")]),e._v(" 1. Create a store")]),e._v(" "),t("ul",[t("li",[e._v('Create a store with the name "'),t("strong",[e._v("z - Bolt Cards Provider")]),e._v('" (same steps as shown for merchant stores above)')])]),e._v(" "),t("h3",{attrs:{id:"2-setup-lightning-network-wallet-2"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#2-setup-lightning-network-wallet-2"}},[e._v("#")]),e._v(" 2. Setup Lightning Network wallet")]),e._v(" "),t("p",[e._v("Setup the Lightning wallet to be connected to your Blink account as per "),t("a",{attrs:{href:"https://dev.blink.sv/examples/btcpayserver-plugin#how-to-connect",target:"_blank",rel:"noopener noreferrer"}},[e._v("instructions on Blink docs"),t("OutboundLink")],1),e._v(" but make sure:")]),e._v(" "),t("ul",[t("li",[e._v('the API key has "Read", "Receive" and "Write" permissions, otherwise Bolt Cards won\'t be able to pull the funds')]),e._v(" "),t("li",[e._v("make sure you connect to the "),t("strong",[e._v("Bitcoin wallet")]),e._v(" (and "),t("em",[e._v("not")]),e._v(" StableSats USD)")])]),e._v(" "),t("h3",{attrs:{id:"3-setup-automated-payouts"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#3-setup-automated-payouts"}},[e._v("#")]),e._v(" 3. Setup automated payouts")]),e._v(" "),t("p",[e._v("To allow no-interaction top-ups of Bolt Cards we need to make sure payouts are processing automatically.")]),e._v(" "),t("ul",[t("li",[e._v('Go "'),t("strong",[e._v("Settings")]),e._v('" -> "'),t("strong",[e._v("Payout Processors")]),e._v('"')]),e._v(" "),t("li",[e._v('Below "'),t("strong",[e._v("Automated Lightning Sender")]),e._v('", click on "'),t("strong",[e._v("Configure")]),e._v('"')]),e._v(" "),t("li",[e._v('Enable "**Process approved payouts instantly"')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"4-setup-bolt-cards-factory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#4-setup-bolt-cards-factory"}},[e._v("#")]),e._v(" 4. Setup Bolt Cards Factory")]),e._v(" "),t("h4",{attrs:{id:"setup-a-bolt-card-factory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-a-bolt-card-factory"}},[e._v("#")]),e._v(" Setup a Bolt Card factory")]),e._v(" "),t("ul",[t("li",[e._v('On the left sidebar go to "'),t("strong",[e._v("Boltcard Factories")]),e._v('"')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("App Name")]),e._v('": Enter a name like "Your conference" (it will be displayed when the card is read)')]),e._v(" "),t("li",[e._v('Click on the "'),t("strong",[e._v("Create")]),e._v('" button, and you will see the following settings. For example, if you want to preload the cards with 210 Sats, enter the following:\n'),t("ul",[t("li",[e._v('"'),t("strong",[e._v("Name")]),e._v('": Name of the conference/event that is displayed when a Bolt Card is read')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Amount")]),e._v('": 210')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Currency")]),e._v('": SATS (The currency must to be '),t("strong",[e._v("SATS")]),e._v(", do not set any other currency)")]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Automatically approve claims")]),e._v('": checked (true)')]),e._v(" "),t("li",[e._v('"'),t("strong",[e._v("Payment Methods")]),e._v('": "BTC (Off-Chain)" checked (true)')]),e._v(" "),t("li",[e._v('Click on "'),t("strong",[e._v("Save")]),e._v('" button')])])])]),e._v(" "),t("h4",{attrs:{id:"program-bolt-cards"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#program-bolt-cards"}},[e._v("#")]),e._v(" Program Bolt Cards")]),e._v(" "),t("p",[e._v('Still, on that Boltcards Factory settings page, you now click on "'),t("strong",[e._v("View")]),e._v('" button on the top right, the page that opens will need to be opened on a mobile device with NFC writing support (e.g. a Bitcoinize device).')]),e._v(" "),t("ul",[t("li",[e._v("Ensure that you have the "),t("a",{attrs:{href:"https://play.google.com/store/apps/details?id=com.lightningnfcapp&hl=en&gl=US",target:"_blank",rel:"noopener noreferrer"}},[e._v("Bolt Card NFC Card Creator"),t("OutboundLink")],1),e._v(" installed on the mobile device")]),e._v(" "),t("li",[e._v("If there is a Bolt Card NFC Card Creator app already installed - "),t("em",[t("strong",[e._v("make sure it's the latest version")])]),e._v(", optionally uninstall and install the newest version from the app store")]),e._v(" "),t("li",[e._v('When you click on the "'),t("strong",[e._v("Setup")]),e._v('" button on the Boltcard Factory it should open the Bolt Card NFC Card Creator app')]),e._v(" "),t("li",[e._v("Make sure you hold the Bolt Card *"),t("strong",[e._v("until ALL green checkmarks are done")])]),e._v(" "),t("li",[e._v('You can now batch initialize cards. Just click on the "'),t("strong",[e._v("Write again")]),e._v('" button')])]),e._v(" "),t("h3",{attrs:{id:"5-checking-the-balance-of-cards-and-topping-them-up"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#5-checking-the-balance-of-cards-and-topping-them-up"}},[e._v("#")]),e._v(" 5. Checking the balance of cards and topping them up")]),e._v(" "),t("p",[e._v('In the same store that serves as the Bolt Card provider you will have a "'),t("strong",[e._v("Boltcard Balance")]),e._v('" menu item on the left sidebar. The URL will look like this '),t("a",{attrs:{href:"https://btcpay.yourdomain.tld/boltcards/balance",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://btcpay.yourdomain.tld/boltcards/balance"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v('When you open that link on a mobile device with NFC support (such as Bitcoinize), you can use it to allow users to check their balance and also for topping their cards up with Sats, to do that, tap on the "'),t("strong",[e._v("QR-Code icon")]),e._v('" after reading the balance of the card.')]),e._v(" "),t("h3",{attrs:{id:"6-resetting-bolt-cards-after-the-conferenceevent"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#6-resetting-bolt-cards-after-the-conferenceevent"}},[e._v("#")]),e._v(" 6. Resetting Bolt Cards after the conference/event")]),e._v(" "),t("p",[e._v("Like the balance page, you can find the link on the left sidebar. The URL will look like this "),t("a",{attrs:{href:"https://btcpay.yourdomain.tld/boltcards/balance?view=Reset",target:"_blank",rel:"noopener noreferrer"}},[e._v("https://btcpay.yourdomain.tld/boltcards/balance?view=Reset"),t("OutboundLink")],1)]),e._v(" "),t("p",[e._v("You should consider publishing this link during or even before the event and allow attendees to sweep and reset their cards after the event, so they can reuse the Bolt Cards and reprogram them. This is only possible after the reset is done successfully.")]),e._v(" "),t("p",[e._v("To reset Bolt Cards, like for setting them up, you need the Bolt Card NFC Card Creator app.")]),e._v(" "),t("p",[e._v("See "),t("a",{attrs:{href:"https://x.com/r0ckstardev/status/1767618114139639817",target:"_blank",rel:"noopener noreferrer"}},[e._v("this tweet by Uncle Rockstar Dev"),t("OutboundLink")],1),e._v(" how the instructions could look like.")]),e._v(" "),t("p",[e._v("Congratulations, you have now set up a BTCPay Server for a conference or event with a smooth user experience for attendees and merchants. Enjoy the event!")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/106.fb39169f.js b/assets/js/106.f5773566.js similarity index 96% rename from assets/js/106.fb39169f.js rename to assets/js/106.f5773566.js index cdc057a237..80919a3a9c 100644 --- a/assets/js/106.fb39169f.js +++ b/assets/js/106.f5773566.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[106],{737:function(e,t,r){"use strict";r.r(t);var n=r(10),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],{738:function(e,t,r){"use strict";r.r(t);var n=r(10),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/107.837f3527.js b/assets/js/107.1ec1a0fc.js similarity index 98% rename from assets/js/107.837f3527.js rename to assets/js/107.1ec1a0fc.js index 904b61e868..c4c4c6a46e 100644 --- a/assets/js/107.837f3527.js +++ b/assets/js/107.1ec1a0fc.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[107],{738:function(e,t,r){"use strict";r.r(t);var o=r(10),a=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"coding-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#coding-btcpay-server"}},[e._v("#")]),e._v(" Coding BTCPay Server")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#why-coding-matters"}},[e._v("Why coding matters")])]),t("li",[t("a",{attrs:{href:"#where-to-start"}},[e._v("Where to start")]),t("ul",[t("li",[t("a",{attrs:{href:"#setup-developer-environment"}},[e._v("Setup Developer Environment")])]),t("li",[t("a",{attrs:{href:"#local-btcpay-development"}},[e._v("Local BTCPay Development")])]),t("li",[t("a",{attrs:{href:"#local-btcpay-testing"}},[e._v("Local BTCPay Testing")])])])]),t("li",[t("a",{attrs:{href:"#requirements"}},[e._v("Requirements")])]),t("li",[t("a",{attrs:{href:"#videos"}},[e._v("Videos")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"why-coding-matters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-coding-matters"}},[e._v("#")]),e._v(" Why coding matters")]),e._v(" "),t("p",[e._v("By helping the project grow, become more mature, advanced and elaborate, coders working on BTCPay Server are a central component of the project.")]),e._v(" "),t("p",[e._v("If you have coding skills, be it writing or reviewing code, you can contribute to BTCPay Server.")]),e._v(" "),t("h2",{attrs:{id:"where-to-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#where-to-start"}},[e._v("#")]),e._v(" Where to start")]),e._v(" "),t("p",[e._v("If you're a developer looking to help, but you're not sure where to begin, check the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22",target:"_blank",rel:"noopener noreferrer"}},[e._v("good first issue label"),t("OutboundLink")],1),e._v(", which contains small pieces of work that have been specifically flagged as being friendly to new contributors.")]),e._v(" "),t("p",[e._v("Contributors looking to do something a bit more challenging, before opening a pull request, please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/new/choose",target:"_blank",rel:"noopener noreferrer"}},[e._v("create an issue"),t("OutboundLink")],1),e._v(" or join "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("our community chat"),t("OutboundLink")],1),e._v(" to get early feedback, discuss best ways to tackle the problem and to ensure there is no work duplication.")]),e._v(" "),t("p",[e._v("We are actively looking for developers who can take on and resolve GitHub issues and help with development. If you would like to help us, but need some guidance, the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/dev",target:"_blank",rel:"noopener noreferrer"}},[e._v("#dev channel on Mattermost"),t("OutboundLink")],1),e._v(" is the place to ask questions.")]),e._v(" "),t("h3",{attrs:{id:"setup-developer-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-developer-environment"}},[e._v("#")]),e._v(" Setup Developer Environment")]),e._v(" "),t("p",[e._v("If you are interested in getting started as a developer or tester of the software behind BTCPay Server, check out the "),t("RouterLink",{attrs:{to:"/Contribute/DevCode/"}},[e._v("Setup Developer Environment")]),e._v(" guide that will walk you step by step through every software used in development with BTCPay such as Git, GitBash, Github, Docker, Visual Studio, Postgres, etc. If you have never coded before and you are looking to learn something new, start here.")],1),e._v(" "),t("h3",{attrs:{id:"local-btcpay-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-btcpay-development"}},[e._v("#")]),e._v(" Local BTCPay Development")]),e._v(" "),t("p",[e._v("If you already have a developer environment setup you can start with the BTCPay specific "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/"}},[e._v("Local Development")]),e._v(" documentation.")],1),e._v(" "),t("h3",{attrs:{id:"local-btcpay-testing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-btcpay-testing"}},[e._v("#")]),e._v(" Local BTCPay Testing")]),e._v(" "),t("p",[e._v("Once you have your development environment tools setup and your local BTCPay Server running, view the "),t("RouterLink",{attrs:{to:"/Contribute/DevTest/"}},[e._v("Local Testing")]),e._v(" guide. This shows you how to use BTCPay in regtest mode for use in development and for users who want to test new features before they are released.")],1),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("p",[e._v("Software requirements (ie. IDE) can also be found in "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/#which-ide"}},[e._v("local development")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("BTCPay Server development videos can be found "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/#videos"}},[e._v("here")]),e._v(" or on the "),t("a",{attrs:{href:"https://www.youtube.com/channel/UCpG9WL6TJuoNfFVkaDMp9ug",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer YouTube"),t("OutboundLink")],1),e._v(" channel.")],1)])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[107],{739:function(e,t,r){"use strict";r.r(t);var o=r(10),a=Object(o.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"coding-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#coding-btcpay-server"}},[e._v("#")]),e._v(" Coding BTCPay Server")]),e._v(" "),t("p"),t("div",{staticClass:"table-of-contents"},[t("ul",[t("li",[t("a",{attrs:{href:"#why-coding-matters"}},[e._v("Why coding matters")])]),t("li",[t("a",{attrs:{href:"#where-to-start"}},[e._v("Where to start")]),t("ul",[t("li",[t("a",{attrs:{href:"#setup-developer-environment"}},[e._v("Setup Developer Environment")])]),t("li",[t("a",{attrs:{href:"#local-btcpay-development"}},[e._v("Local BTCPay Development")])]),t("li",[t("a",{attrs:{href:"#local-btcpay-testing"}},[e._v("Local BTCPay Testing")])])])]),t("li",[t("a",{attrs:{href:"#requirements"}},[e._v("Requirements")])]),t("li",[t("a",{attrs:{href:"#videos"}},[e._v("Videos")])])])]),t("p"),e._v(" "),t("h2",{attrs:{id:"why-coding-matters"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#why-coding-matters"}},[e._v("#")]),e._v(" Why coding matters")]),e._v(" "),t("p",[e._v("By helping the project grow, become more mature, advanced and elaborate, coders working on BTCPay Server are a central component of the project.")]),e._v(" "),t("p",[e._v("If you have coding skills, be it writing or reviewing code, you can contribute to BTCPay Server.")]),e._v(" "),t("h2",{attrs:{id:"where-to-start"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#where-to-start"}},[e._v("#")]),e._v(" Where to start")]),e._v(" "),t("p",[e._v("If you're a developer looking to help, but you're not sure where to begin, check the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22",target:"_blank",rel:"noopener noreferrer"}},[e._v("good first issue label"),t("OutboundLink")],1),e._v(", which contains small pieces of work that have been specifically flagged as being friendly to new contributors.")]),e._v(" "),t("p",[e._v("Contributors looking to do something a bit more challenging, before opening a pull request, please "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/issues/new/choose",target:"_blank",rel:"noopener noreferrer"}},[e._v("create an issue"),t("OutboundLink")],1),e._v(" or join "),t("a",{attrs:{href:"https://chat.btcpayserver.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("our community chat"),t("OutboundLink")],1),e._v(" to get early feedback, discuss best ways to tackle the problem and to ensure there is no work duplication.")]),e._v(" "),t("p",[e._v("We are actively looking for developers who can take on and resolve GitHub issues and help with development. If you would like to help us, but need some guidance, the "),t("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/dev",target:"_blank",rel:"noopener noreferrer"}},[e._v("#dev channel on Mattermost"),t("OutboundLink")],1),e._v(" is the place to ask questions.")]),e._v(" "),t("h3",{attrs:{id:"setup-developer-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-developer-environment"}},[e._v("#")]),e._v(" Setup Developer Environment")]),e._v(" "),t("p",[e._v("If you are interested in getting started as a developer or tester of the software behind BTCPay Server, check out the "),t("RouterLink",{attrs:{to:"/Contribute/DevCode/"}},[e._v("Setup Developer Environment")]),e._v(" guide that will walk you step by step through every software used in development with BTCPay such as Git, GitBash, Github, Docker, Visual Studio, Postgres, etc. If you have never coded before and you are looking to learn something new, start here.")],1),e._v(" "),t("h3",{attrs:{id:"local-btcpay-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-btcpay-development"}},[e._v("#")]),e._v(" Local BTCPay Development")]),e._v(" "),t("p",[e._v("If you already have a developer environment setup you can start with the BTCPay specific "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/"}},[e._v("Local Development")]),e._v(" documentation.")],1),e._v(" "),t("h3",{attrs:{id:"local-btcpay-testing"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-btcpay-testing"}},[e._v("#")]),e._v(" Local BTCPay Testing")]),e._v(" "),t("p",[e._v("Once you have your development environment tools setup and your local BTCPay Server running, view the "),t("RouterLink",{attrs:{to:"/Contribute/DevTest/"}},[e._v("Local Testing")]),e._v(" guide. This shows you how to use BTCPay in regtest mode for use in development and for users who want to test new features before they are released.")],1),e._v(" "),t("h2",{attrs:{id:"requirements"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[e._v("#")]),e._v(" Requirements")]),e._v(" "),t("p",[e._v("Software requirements (ie. IDE) can also be found in "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/#which-ide"}},[e._v("local development")]),e._v(".")],1),e._v(" "),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("BTCPay Server development videos can be found "),t("RouterLink",{attrs:{to:"/Development/LocalDevelopment/#videos"}},[e._v("here")]),e._v(" or on the "),t("a",{attrs:{href:"https://www.youtube.com/channel/UCpG9WL6TJuoNfFVkaDMp9ug",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer YouTube"),t("OutboundLink")],1),e._v(" channel.")],1)])}),[],!1,null,null,null);t.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/110.7f345214.js b/assets/js/110.bbadf97d.js similarity index 99% rename from assets/js/110.7f345214.js rename to assets/js/110.bbadf97d.js index b9c2e10cd1..a2215ae237 100644 --- a/assets/js/110.7f345214.js +++ b/assets/js/110.bbadf97d.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[110],{744:function(t,e,r){"use strict";r.r(e);var o=r(10),a=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"documenting-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#documenting-btcpay-server"}},[t._v("#")]),t._v(" Documenting BTCPay Server")]),t._v(" "),e("p"),e("div",{staticClass:"table-of-contents"},[e("ul",[e("li",[e("a",{attrs:{href:"#why-documentation-matters"}},[t._v("Why documentation matters")])]),e("li",[e("a",{attrs:{href:"#btcpay-documentation"}},[t._v("BTCPay Documentation")])]),e("li",[e("a",{attrs:{href:"#btcpay-blog"}},[t._v("BTCPay Blog")])]),e("li",[e("a",{attrs:{href:"#requirements"}},[t._v("Requirements")])]),e("li",[e("a",{attrs:{href:"#recommended-software"}},[t._v("Recommended software")]),e("ul",[e("li",[e("a",{attrs:{href:"#text-editor"}},[t._v("Text Editor")])]),e("li",[e("a",{attrs:{href:"#version-control"}},[t._v("Version Control")])])])])])]),e("p"),t._v(" "),e("h2",{attrs:{id:"why-documentation-matters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#why-documentation-matters"}},[t._v("#")]),t._v(" Why documentation matters")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("h2",{attrs:{id:"btcpay-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-documentation"}},[t._v("#")]),t._v(" BTCPay Documentation")]),t._v(" "),e("p",[t._v("Documentation work needing to be completed can be found in the "),e("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[t._v("open issues page"),e("OutboundLink")],1),t._v(" on Github. For information on how to start a documentation task, see the "),e("RouterLink",{attrs:{to:"/Contribute/WriteDocs/"}},[t._v("documentation guide")]),t._v(".")],1),t._v(" "),e("p",[t._v("For documentation guidance or discussion of a new documentation idea, join the "),e("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/documentation",target:"_blank",rel:"noopener noreferrer"}},[t._v("#documentation channel on Mattermost"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"btcpay-blog"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-blog"}},[t._v("#")]),t._v(" BTCPay Blog")]),t._v(" "),e("p",[t._v("Another great way to contribute is by writing content for the "),e("RouterLink",{attrs:{to:"/Contribute/WriteBlog/"}},[t._v("BTCPay blog")]),t._v(". To get started on a blog topic, join the "),e("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/content-creation",target:"_blank",rel:"noopener noreferrer"}},[t._v("#content creation channel on Mattermost"),e("OutboundLink")],1),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"requirements"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),e("p",[t._v("In order to contribute to BTCPay Server as a writer there are some requirements.")]),t._v(" "),e("p",[t._v("Since most of the documentation done in BTCPay Server is submitted and reviewed through Github, you must have a "),e("a",{attrs:{href:"https://github.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Github account"),e("OutboundLink")],1),t._v(". It's also on Github that you can contribute by reviewing the documentation work done by others (pull requests).")]),t._v(" "),e("p",[e("strong",[t._v("Important note")]),t._v(": Contributions explained in this documentation are meant to be done in "),e("strong",[t._v("English")]),t._v(" only. If you wish to contribute in other languages, see "),e("RouterLink",{attrs:{to:"/Contribute/Translate/"}},[t._v("Translations")]),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"recommended-software"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#recommended-software"}},[t._v("#")]),t._v(" Recommended software")]),t._v(" "),e("h3",{attrs:{id:"text-editor"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#text-editor"}},[t._v("#")]),t._v(" Text Editor")]),t._v(" "),e("p",[t._v("It is recommended to have a Rich-Text editor.")]),t._v(" "),e("p",[e("a",{attrs:{href:"https://notepad-plus-plus.org/downloads/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Notepad++"),e("OutboundLink")],1),t._v(" is a decent software and easy to use for the newer contributors.")]),t._v(" "),e("p",[t._v("For more advanced users, "),e("a",{attrs:{href:"https://visualstudio.microsoft.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Visual Studio Code (VS Code)"),e("OutboundLink")],1),t._v(" is a good choice.\nThe "),e("code",[t._v("Markdown All In One")]),t._v(" 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.")]),t._v(" "),e("p",[t._v("These are only recommended: If you already use other similar software that you're accustomed to, you are free to continue using them.")]),t._v(" "),e("h3",{attrs:{id:"version-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#version-control"}},[t._v("#")]),t._v(" Version Control")]),t._v(" "),e("p",[t._v("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 "),e("a",{attrs:{href:"https://desktop.github.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Github Desktop"),e("OutboundLink")],1),t._v(". You can see the step by step guide to making a pull request using Github Desktop "),e("RouterLink",{attrs:{to:"/Contribute/WriteSoftware/"}},[t._v("here")]),t._v(".")],1)])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[110],{745:function(t,e,r){"use strict";r.r(e);var o=r(10),a=Object(o.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"documenting-btcpay-server"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#documenting-btcpay-server"}},[t._v("#")]),t._v(" Documenting BTCPay Server")]),t._v(" "),e("p"),e("div",{staticClass:"table-of-contents"},[e("ul",[e("li",[e("a",{attrs:{href:"#why-documentation-matters"}},[t._v("Why documentation matters")])]),e("li",[e("a",{attrs:{href:"#btcpay-documentation"}},[t._v("BTCPay Documentation")])]),e("li",[e("a",{attrs:{href:"#btcpay-blog"}},[t._v("BTCPay Blog")])]),e("li",[e("a",{attrs:{href:"#requirements"}},[t._v("Requirements")])]),e("li",[e("a",{attrs:{href:"#recommended-software"}},[t._v("Recommended software")]),e("ul",[e("li",[e("a",{attrs:{href:"#text-editor"}},[t._v("Text Editor")])]),e("li",[e("a",{attrs:{href:"#version-control"}},[t._v("Version Control")])])])])])]),e("p"),t._v(" "),e("h2",{attrs:{id:"why-documentation-matters"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#why-documentation-matters"}},[t._v("#")]),t._v(" Why documentation matters")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("h2",{attrs:{id:"btcpay-documentation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-documentation"}},[t._v("#")]),t._v(" BTCPay Documentation")]),t._v(" "),e("p",[t._v("Documentation work needing to be completed can be found in the "),e("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-doc/issues",target:"_blank",rel:"noopener noreferrer"}},[t._v("open issues page"),e("OutboundLink")],1),t._v(" on Github. For information on how to start a documentation task, see the "),e("RouterLink",{attrs:{to:"/Contribute/WriteDocs/"}},[t._v("documentation guide")]),t._v(".")],1),t._v(" "),e("p",[t._v("For documentation guidance or discussion of a new documentation idea, join the "),e("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/documentation",target:"_blank",rel:"noopener noreferrer"}},[t._v("#documentation channel on Mattermost"),e("OutboundLink")],1),t._v(".")]),t._v(" "),e("h2",{attrs:{id:"btcpay-blog"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#btcpay-blog"}},[t._v("#")]),t._v(" BTCPay Blog")]),t._v(" "),e("p",[t._v("Another great way to contribute is by writing content for the "),e("RouterLink",{attrs:{to:"/Contribute/WriteBlog/"}},[t._v("BTCPay blog")]),t._v(". To get started on a blog topic, join the "),e("a",{attrs:{href:"https://chat.btcpayserver.org/btcpayserver/channels/content-creation",target:"_blank",rel:"noopener noreferrer"}},[t._v("#content creation channel on Mattermost"),e("OutboundLink")],1),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"requirements"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#requirements"}},[t._v("#")]),t._v(" Requirements")]),t._v(" "),e("p",[t._v("In order to contribute to BTCPay Server as a writer there are some requirements.")]),t._v(" "),e("p",[t._v("Since most of the documentation done in BTCPay Server is submitted and reviewed through Github, you must have a "),e("a",{attrs:{href:"https://github.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Github account"),e("OutboundLink")],1),t._v(". It's also on Github that you can contribute by reviewing the documentation work done by others (pull requests).")]),t._v(" "),e("p",[e("strong",[t._v("Important note")]),t._v(": Contributions explained in this documentation are meant to be done in "),e("strong",[t._v("English")]),t._v(" only. If you wish to contribute in other languages, see "),e("RouterLink",{attrs:{to:"/Contribute/Translate/"}},[t._v("Translations")]),t._v(".")],1),t._v(" "),e("h2",{attrs:{id:"recommended-software"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#recommended-software"}},[t._v("#")]),t._v(" Recommended software")]),t._v(" "),e("h3",{attrs:{id:"text-editor"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#text-editor"}},[t._v("#")]),t._v(" Text Editor")]),t._v(" "),e("p",[t._v("It is recommended to have a Rich-Text editor.")]),t._v(" "),e("p",[e("a",{attrs:{href:"https://notepad-plus-plus.org/downloads/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Notepad++"),e("OutboundLink")],1),t._v(" is a decent software and easy to use for the newer contributors.")]),t._v(" "),e("p",[t._v("For more advanced users, "),e("a",{attrs:{href:"https://visualstudio.microsoft.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Visual Studio Code (VS Code)"),e("OutboundLink")],1),t._v(" is a good choice.\nThe "),e("code",[t._v("Markdown All In One")]),t._v(" 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.")]),t._v(" "),e("p",[t._v("These are only recommended: If you already use other similar software that you're accustomed to, you are free to continue using them.")]),t._v(" "),e("h3",{attrs:{id:"version-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#version-control"}},[t._v("#")]),t._v(" Version Control")]),t._v(" "),e("p",[t._v("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 "),e("a",{attrs:{href:"https://desktop.github.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Github Desktop"),e("OutboundLink")],1),t._v(". You can see the step by step guide to making a pull request using Github Desktop "),e("RouterLink",{attrs:{to:"/Contribute/WriteSoftware/"}},[t._v("here")]),t._v(".")],1)])}),[],!1,null,null,null);e.default=a.exports}}]); \ No newline at end of file diff --git a/assets/js/112.15e1024f.js b/assets/js/112.cad8b2ce.js similarity index 99% rename from assets/js/112.15e1024f.js rename to assets/js/112.cad8b2ce.js index bc9ba53787..6e62c60c1d 100644 --- a/assets/js/112.15e1024f.js +++ b/assets/js/112.cad8b2ce.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[112],{750:function(t,a,e){"use strict";e.r(a);var s=e(10),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],{751:function(t,a,e){"use strict";e.r(a);var s=e(10),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/113.9ff290fc.js b/assets/js/113.935aa0a2.js similarity index 98% rename from assets/js/113.9ff290fc.js rename to assets/js/113.935aa0a2.js index 663ba98d21..8d5e7df4a2 100644 --- a/assets/js/113.9ff290fc.js +++ b/assets/js/113.935aa0a2.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[113],{756:function(e,r,t){"use strict";t.r(r);var a=t(10),o=Object(a.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"dynamic-dns-service"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#dynamic-dns-service"}},[e._v("#")]),e._v(" Dynamic DNS Service")]),e._v(" "),r("h2",{attrs:{id:"motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[e._v("#")]),e._v(" Motivation")]),e._v(" "),r("p",[r("strong",[e._v("Dynamic DNS")]),e._v(" is needed if:")]),e._v(" "),r("ul",[r("li",[e._v("You are running BTCPay Server with a hosting provider that does not provide a default domain for your server")]),e._v(" "),r("li",[e._v("You don't want to buy your own domain name (e.g. "),r("code",[e._v("mybusiness.com")]),e._v(")")]),e._v(" "),r("li",[e._v("You need to access your BTCPay Server over internet via HTTPS. (Your BTCPayServer is accessed by other internet users)")])]),e._v(" "),r("p",[e._v("Then you want to use "),r("strong",[e._v("BTCPayServer Dynamic DNS service")]),e._v(".")]),e._v(" "),r("p",[e._v("You "),r("strong",[e._v("don't need")]),e._v(" Dynamic DNS Service if:")]),e._v(" "),r("ul",[r("li",[e._v("You host BTCPay Server at home and only access it via the local network (just using HTTP locally or using Tor is fine)")]),e._v(" "),r("li",[e._v("Your BTCPay Server should be only accessed by yourself (just use Tor browser and the Tor address of you instance)")]),e._v(" "),r("li",[e._v("Your hosting provider provides a domain name for your server by default (i.e. Lunanode for example provides a subdomain of "),r("code",[e._v(".lndyn.com")]),e._v(" for free, and Azure provides for "),r("code",[e._v(".azurewebsites.net")]),e._v(")")])]),e._v(" "),r("p",[e._v("A "),r("strong",[e._v("Dynamic DNS Providers")]),e._v(" allows you to have a free domain like "),r("code",[e._v("example.ddns.net")]),e._v(" for your server.\nAdditionally Dynamic DNS Providers expose a simple API to update the DNS record automatically when your BTCPay Server instance changes its external IP address.")]),e._v(" "),r("p",[e._v("BTCPay Server, when configured to use Dynamic DNS, will periodically check and update the DNS record if an external IP change is detected.")]),e._v(" "),r("h2",{attrs:{id:"how-to-use"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[e._v("#")]),e._v(" How to use")]),e._v(" "),r("h3",{attrs:{id:"step-1-create-the-domain"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-1-create-the-domain"}},[e._v("#")]),e._v(" Step 1: Create the domain")]),e._v(" "),r("p",[e._v("First, create an account on a Dynamic DNS provider, the most popular providers are:")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.noip.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("noip"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.duckdns.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("duckdns"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.zoneedit.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("zoneedit"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://dyn.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("dyndns"),r("OutboundLink")],1),e._v(" (not free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://domains.google.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("google"),r("OutboundLink")],1),e._v(" (not free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.easydns.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("easydns"),r("OutboundLink")],1),e._v(" (not free)")])]),e._v(" "),r("p",[e._v("Once you've created an account, you can create a free domain name through their website.")]),e._v(" "),r("h3",{attrs:{id:"step-2-configure-dynamic-dns-on-btcpay-server"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-2-configure-dynamic-dns-on-btcpay-server"}},[e._v("#")]),e._v(" Step 2: Configure Dynamic DNS on BTCPay Server")]),e._v(" "),r("p",[e._v("You need to be administrator of your instance.\nGo to Server Settings > Services > Dynamic DNS.")]),e._v(" "),r("ul",[r("li",[e._v("Add a Dynamic DNS")]),e._v(" "),r("li",[e._v("Select your Dynamic DNS provider")]),e._v(" "),r("li",[e._v("Enter the domain you created in step 1")]),e._v(" "),r("li",[e._v("Add the login and password you created in step 1")]),e._v(" "),r("li",[e._v("Check the "),r("code",[e._v("enabled")]),e._v(" box and save")])]),e._v(" "),r("h3",{attrs:{id:"step-3-configure-your-btcpay-docker-install-to-provide-https-certificates"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-3-configure-your-btcpay-docker-install-to-provide-https-certificates"}},[e._v("#")]),e._v(" Step 3: Configure your BTCPay docker install to provide HTTPS certificates")]),e._v(" "),r("p",[e._v("If you are using a docker deployment, you also need to update your BTCPayServer install.\nConnect via SSH to your instance and run:")]),e._v(" "),r("div",{staticClass:"language-bash extra-class"},[r("pre",{pre:!0,attrs:{class:"language-bash"}},[r("code",[r("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ADDITIONAL_HOSTS")]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"example.ddns.net"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),r("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),r("p",[e._v("If you have any other hosts in "),r("code",[e._v("BTCPAY_ADDITIONAL_HOSTS")]),e._v(", just separate them with "),r("code",[e._v(",")]),e._v(".")])])}),[],!1,null,null,null);r.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[113],{755:function(e,r,t){"use strict";t.r(r);var a=t(10),o=Object(a.a)({},(function(){var e=this,r=e._self._c;return r("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[r("h1",{attrs:{id:"dynamic-dns-service"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#dynamic-dns-service"}},[e._v("#")]),e._v(" Dynamic DNS Service")]),e._v(" "),r("h2",{attrs:{id:"motivation"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#motivation"}},[e._v("#")]),e._v(" Motivation")]),e._v(" "),r("p",[r("strong",[e._v("Dynamic DNS")]),e._v(" is needed if:")]),e._v(" "),r("ul",[r("li",[e._v("You are running BTCPay Server with a hosting provider that does not provide a default domain for your server")]),e._v(" "),r("li",[e._v("You don't want to buy your own domain name (e.g. "),r("code",[e._v("mybusiness.com")]),e._v(")")]),e._v(" "),r("li",[e._v("You need to access your BTCPay Server over internet via HTTPS. (Your BTCPayServer is accessed by other internet users)")])]),e._v(" "),r("p",[e._v("Then you want to use "),r("strong",[e._v("BTCPayServer Dynamic DNS service")]),e._v(".")]),e._v(" "),r("p",[e._v("You "),r("strong",[e._v("don't need")]),e._v(" Dynamic DNS Service if:")]),e._v(" "),r("ul",[r("li",[e._v("You host BTCPay Server at home and only access it via the local network (just using HTTP locally or using Tor is fine)")]),e._v(" "),r("li",[e._v("Your BTCPay Server should be only accessed by yourself (just use Tor browser and the Tor address of you instance)")]),e._v(" "),r("li",[e._v("Your hosting provider provides a domain name for your server by default (i.e. Lunanode for example provides a subdomain of "),r("code",[e._v(".lndyn.com")]),e._v(" for free, and Azure provides for "),r("code",[e._v(".azurewebsites.net")]),e._v(")")])]),e._v(" "),r("p",[e._v("A "),r("strong",[e._v("Dynamic DNS Providers")]),e._v(" allows you to have a free domain like "),r("code",[e._v("example.ddns.net")]),e._v(" for your server.\nAdditionally Dynamic DNS Providers expose a simple API to update the DNS record automatically when your BTCPay Server instance changes its external IP address.")]),e._v(" "),r("p",[e._v("BTCPay Server, when configured to use Dynamic DNS, will periodically check and update the DNS record if an external IP change is detected.")]),e._v(" "),r("h2",{attrs:{id:"how-to-use"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[e._v("#")]),e._v(" How to use")]),e._v(" "),r("h3",{attrs:{id:"step-1-create-the-domain"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-1-create-the-domain"}},[e._v("#")]),e._v(" Step 1: Create the domain")]),e._v(" "),r("p",[e._v("First, create an account on a Dynamic DNS provider, the most popular providers are:")]),e._v(" "),r("ul",[r("li",[r("a",{attrs:{href:"https://www.noip.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("noip"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.duckdns.org/",target:"_blank",rel:"noopener noreferrer"}},[e._v("duckdns"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.zoneedit.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("zoneedit"),r("OutboundLink")],1),e._v(" (free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://dyn.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("dyndns"),r("OutboundLink")],1),e._v(" (not free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://domains.google.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("google"),r("OutboundLink")],1),e._v(" (not free)")]),e._v(" "),r("li",[r("a",{attrs:{href:"https://www.easydns.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("easydns"),r("OutboundLink")],1),e._v(" (not free)")])]),e._v(" "),r("p",[e._v("Once you've created an account, you can create a free domain name through their website.")]),e._v(" "),r("h3",{attrs:{id:"step-2-configure-dynamic-dns-on-btcpay-server"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-2-configure-dynamic-dns-on-btcpay-server"}},[e._v("#")]),e._v(" Step 2: Configure Dynamic DNS on BTCPay Server")]),e._v(" "),r("p",[e._v("You need to be administrator of your instance.\nGo to Server Settings > Services > Dynamic DNS.")]),e._v(" "),r("ul",[r("li",[e._v("Add a Dynamic DNS")]),e._v(" "),r("li",[e._v("Select your Dynamic DNS provider")]),e._v(" "),r("li",[e._v("Enter the domain you created in step 1")]),e._v(" "),r("li",[e._v("Add the login and password you created in step 1")]),e._v(" "),r("li",[e._v("Check the "),r("code",[e._v("enabled")]),e._v(" box and save")])]),e._v(" "),r("h3",{attrs:{id:"step-3-configure-your-btcpay-docker-install-to-provide-https-certificates"}},[r("a",{staticClass:"header-anchor",attrs:{href:"#step-3-configure-your-btcpay-docker-install-to-provide-https-certificates"}},[e._v("#")]),e._v(" Step 3: Configure your BTCPay docker install to provide HTTPS certificates")]),e._v(" "),r("p",[e._v("If you are using a docker deployment, you also need to update your BTCPayServer install.\nConnect via SSH to your instance and run:")]),e._v(" "),r("div",{staticClass:"language-bash extra-class"},[r("pre",{pre:!0,attrs:{class:"language-bash"}},[r("code",[r("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_ADDITIONAL_HOSTS")]),r("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),r("span",{pre:!0,attrs:{class:"token string"}},[e._v('"example.ddns.net"')]),e._v("\n"),r("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v(".")]),e._v(" btcpay-setup.sh "),r("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-i")]),e._v("\n")])])]),r("p",[e._v("If you have any other hosts in "),r("code",[e._v("BTCPAY_ADDITIONAL_HOSTS")]),e._v(", just separate them with "),r("code",[e._v(",")]),e._v(".")])])}),[],!1,null,null,null);r.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/115.ff438356.js b/assets/js/115.793289df.js similarity index 98% rename from assets/js/115.ff438356.js rename to assets/js/115.793289df.js index 547b29414b..da8af248e6 100644 --- a/assets/js/115.ff438356.js +++ b/assets/js/115.793289df.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[115],{761:function(e,r,t){"use strict";t.r(r);var a=t(10),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://lightninginabox.co/",target:"_blank",rel:"noopener noreferrer"}},[e._v("LightningInABox"),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("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],{760:function(e,r,t){"use strict";t.r(r);var a=t(10),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://lightninginabox.co/",target:"_blank",rel:"noopener noreferrer"}},[e._v("LightningInABox"),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("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/116.60f40a67.js b/assets/js/116.4bc4ee22.js similarity index 99% rename from assets/js/116.60f40a67.js rename to assets/js/116.4bc4ee22.js index 893cf061ba..1c7b20e4a2 100644 --- a/assets/js/116.60f40a67.js +++ b/assets/js/116.4bc4ee22.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[116],{760:function(a,t,e){"use strict";e.r(t);var s=e(10),r=Object(s.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"hardware-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hardware-deployment"}},[a._v("#")]),a._v(" Hardware Deployment")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://lightninginabox.co",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning in a Box"),t("OutboundLink")],1),a._v('\n"Your hardware. Your node. Your keys. Your Bitcoin".')]),a._v(" "),t("p",[a._v("In order for your Bitcoin experience to be truly self-sovereign and trustless you should consider "),t("strong",[a._v("running nodes on your own hardware")]),a._v(" and internet connection.\n"),t("strong",[a._v("BTCPay Server is an excellent way to run both Bitcoin & Lightning nodes")]),a._v(".\nNot only are you validating transactions you also get the ability to accept base layer Bitcoin and second layer Lightning payments.\nFollowing are instructions to install and host your very own BTCPay Server.")]),a._v(" "),t("p",[a._v("The process is basically the following:")]),a._v(" "),t("ol",[t("li",[a._v("Purchase and assemble hardware.")]),a._v(" "),t("li",[a._v("Install base Operating System and configure networking.")]),a._v(" "),t("li",[a._v("Install BTCPayServer-Docker.")])]),a._v(" "),t("p",[t("strong",[a._v("BTCPay Server can be installed on the following hardware")]),a._v(". The end result is a small, quiet node that is fast enough to sync from block zero. The total cost is approximately $300.")]),a._v(" "),t("ol",[t("li",[t("a",{attrs:{href:"https://www.amazon.com/dp/B0C89TQ1YF?ref=nb_sb_ss_w_as-reorder-t1_k0_1_4&=&crid=SHKYOXZIRAO0&=&sprefix=beel",target:"_blank",rel:"noopener noreferrer"}},[a._v("BeeLink S12 - Mini PC - $169.00"),t("OutboundLink")],1)]),a._v(" "),t("li",[t("a",{attrs:{href:"https://www.amazon.com/Western-Digital-SA510-Internal-Solid/dp/B0C14TF467/ref=sr_1_3?crid=2WDY52E7ESSEB&dib=eyJ2IjoiMSJ9.MBxkb5ZIvwjKXOzscB0GUvsbhX1rVhilXNFzID6n0xHORsDBPkIxQhIixVuiLY9I16rlFs5COExAAD8761Do-tzuAnZiutbqN-KM9rAL4zCw94kA_ArCJeR_RTDynZbiXf2Phnahw1Gw2dqXVek3p0dpe6_a_fbJrqx4BRaieoYo0zj1mX6YPGaYZAmF2Vf_Quk1TrkARk6s1_wZ0vFUw7EWdjKJ9hmNLxPWMfADML90A1rXk8gSCcRnwV2jdzN7jCfg2_urfJZ3IWOW5X3iwnP7s-vSec88PGmQ3RhS-Rc.sEURveFhiTAHYwZQdwyJX72hpWL5UgD_3tEPet747oE&dib_tag=se&keywords=2tb+ssd+wd+blue&qid=1710685725&s=electronics&sprefix=2tb+ssd+wd+blue%2Celectronics%2C90&sr=1-3",target:"_blank",rel:"noopener noreferrer"}},[a._v("WD Blue 2TB SSD - $129.00"),t("OutboundLink")],1)])]),a._v(" "),t("p",[a._v("Other requirements are as follows:")]),a._v(" "),t("ol",[t("li",[a._v("High speed internet connection.")]),a._v(" "),t("li",[a._v("Static IP")]),a._v(" "),t("li",[a._v("Domain Name")]),a._v(" "),t("li",[a._v("Ability to open ports on your router (optional, BTCPayServer can be accessed over TOR or by Dynamic DNS).")]),a._v(" "),t("li",[a._v("Tiny Screwdriver")]),a._v(" "),t("li",[a._v("USB Thumb Drive")]),a._v(" "),t("li",[a._v("USB Keyboard, Mouse and Monitor (for initial install only). Can be headless when completed.")])]),a._v(" "),t("p",[a._v("Assuming you purchased the hardware mentioned above, here are the build instructions.")]),a._v(" "),t("h3",{attrs:{id:"configure-your-domain-name"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-your-domain-name"}},[a._v("#")]),a._v(" Configure your domain name.")]),a._v(" "),t("p",[a._v('It can take several hours for DNS changes to propagate so you should do this step first.\nLogin to your domain registrar and point an A record from your domain to the external IP address of your internet connection.\nI suggest that you use a subdomain (ie. btcpay.yourdomain.com).\nTo find your external IP address Google "whats my ip".')]),a._v(" "),t("h3",{attrs:{id:"assemble-your-lightning-in-a-box-liab"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#assemble-your-lightning-in-a-box-liab"}},[a._v("#")]),a._v(" Assemble your Lightning in a Box (LIAB).")]),a._v(" "),t("ul",[t("li",[a._v("Remove back cover with screwdriver.")]),a._v(" "),t("li",[a._v("Insert SSD")]),a._v(" "),t("li",[a._v("Install hard drive using included cage.")])]),a._v(" "),t("h3",{attrs:{id:"download-ubuntu-2204-lts-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-ubuntu-2204-lts-server"}},[a._v("#")]),a._v(" Download "),t("a",{attrs:{href:"https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso",target:"_blank",rel:"noopener noreferrer"}},[a._v("Ubuntu 22.04 LTS Server"),t("OutboundLink")],1)]),a._v(" "),t("h3",{attrs:{id:"download-and-install-balena-etcher"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-install-balena-etcher"}},[a._v("#")]),a._v(" Download and install "),t("a",{attrs:{href:"https://etcher.balena.io/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Balena Etcher"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("p",[a._v("Etcher is software that is used to flash OS images to SD cards and USB Drives.\nIn this case we will be using Etcher to flash our USB Thumb Drive with the Ubuntu OS.")]),a._v(" "),t("h3",{attrs:{id:"connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[a._v("#")]),a._v(" Connect your USB keyboard, mouse, monitor and thumb drive.")]),a._v(" "),t("p",[a._v('Press the power button to boot your LIAB. Press the "DEL" key to access the bios and change the boot order to use the thumb drive first.\nThe Ubuntu installation process is pretty simple and easy to follow. Here\'s a tutorial from the Ubuntu website. '),t("a",{attrs:{href:"https://ubuntu.com/tutorials/install-ubuntu-server#1-overview",target:"_blank",rel:"noopener noreferrer"}},[a._v("Install Ubuntu Server"),t("OutboundLink")],1),a._v(". The BeeLink S12 ships with Windows Pre-Installed so you will have to delete the NVME partitions and install Ubuntu on that drive.")]),a._v(" "),t("p",[a._v('*During the install process make sure you set the hostname to "btcpay" and enable SSH.')]),a._v(" "),t("h3",{attrs:{id:"give-your-liab-a-static-ip-address-on-your-local-network"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#give-your-liab-a-static-ip-address-on-your-local-network"}},[a._v("#")]),a._v(" Give your LIAB a static IP address on your local network.")]),a._v(" "),t("p",[a._v("There are a few different ways to do this and you will find a ton of articles online. Here's a pretty simple one to follow "),t("a",{attrs:{href:"https://www.linuxtechi.com/static-ip-address-on-ubuntu-server/",target:"_blank",rel:"noopener noreferrer"}},[a._v("How to configure a static IP address on Ubuntu 22.04"),t("OutboundLink")],1),a._v('. To avoid conflicts with other devices on your network you should also set a "reservation" for your LIAB.')]),a._v(" "),t("h3",{attrs:{id:"log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[a._v("#")]),a._v(" Log into your router and forward ports 80, 443 and 9735 to your LIAB's local IP address. (optional, if using .local, or Tor only)")]),a._v(" "),t("p",[a._v('Every router is different and you should be able to find instructions for your router by searching for "Port Forward + your router make and model".')]),a._v(" "),t("h3",{attrs:{id:"install-fail2ban-git-and-avahi-daemon"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-fail2ban-git-and-avahi-daemon"}},[a._v("#")]),a._v(" Install Fail2ban, GIT and Avahi-Daemon.")]),a._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/fail2ban/fail2ban/wiki/How-to-install-fail2ban-packages",target:"_blank",rel:"noopener noreferrer"}},[a._v("Fail2ban"),t("OutboundLink")],1),a._v(" bans IP's that attempt to connect to your server and show malicious signs. GIT allows you to clone and manage repositories on github.com.")]),a._v(" "),t("li",[t("a",{attrs:{href:"https://avahi.org/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Avahi"),t("OutboundLink")],1),a._v(" is a system which facilitates service discovery on a local network via the mDNS/DNS-SD protocol suite.\nOpen a new terminal window and type the following commands:")])]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" avahi-daemon\n")])])]),t("h3",{attrs:{id:"configuring-the-firewall"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-firewall"}},[a._v("#")]),a._v(" Configuring the firewall")]),a._v(" "),t("p",[a._v("Install a firewall and allow SSH, HTTP, HTTPS, Bitcoin, and Lightning:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" ufw\nufw default deny incoming\nufw default allow outgoing\n")])])]),t("p",[a._v("This command allows SSH connections from internal networks only:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("10.0")]),a._v(".0.0/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("172.16")]),a._v(".0.0/12 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("169.254")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fc00::/7 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fe80::/10 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from ff00::/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\n")])])]),t("p",[a._v("These ports need to be accessible from anywhere (The default subnet is 'any' unless you specify one):")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("443")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("8333")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("9735")]),a._v("/tcp\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Enable the firewall")]),a._v("\nufw "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Verify the configuration")]),a._v("\nufw status\n")])])]),t("h3",{attrs:{id:"install-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-docker"}},[a._v("#")]),a._v(" Install Docker")]),a._v(" "),t("div",{staticClass:"language-Bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" apt-transport-https ca-certificates "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" software-properties-common\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-fsSL")]),a._v(" https://download.docker.com/linux/ubuntu/gpg "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" gpg "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--dearmor")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" /usr/share/keyrings/docker-archive-keyring.gpg\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"deb [arch='),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("dpkg --print-architecture"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(" signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("lsb_release "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-cs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(' stable"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" /etc/apt/sources.list.d/docker.list "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" /dev/null\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt-cache")]),a._v(" policy docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" systemctl status "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"configuring-the-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-storage"}},[a._v("#")]),a._v(" Configuring the storage")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("fdisk")]),a._v(" /dev/sda\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'p' to list existing partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'd' to delete currently selected partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'n' to create a new partition")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'w' to write the new partition table and exit fdisk")]),a._v("\nmkfs.ext4 /dev/sda1\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" /mnt/usb\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("UUID")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" blkid "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" UUID "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" value /dev/sda1"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"UUID='),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$UUID")]),a._v(' /mnt/usb ext4 defaults,noatime,nofail 0 0"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v(" /etc/fstab\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v("\n")])])]),t("h3",{attrs:{id:"create-mount-for-docker-volumes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-mount-for-docker-volumes"}},[a._v("#")]),a._v(" Create mount for Docker volumes")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("rm")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-rf")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-p")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--bind")]),a._v(" /mnt/usb /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"/mnt/docker /var/lib/docker none bind,nobootwait 0 2"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">>")]),a._v(" /etc/fstab\nsystemctl restart "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"setup-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-btcpay-server"}},[a._v("#")]),a._v(" Setup BTCPay Server")]),a._v(" "),t("p",[a._v("Download BTCPay Server from GitHub:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# ensure we are in root home")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" btcpayserver-docker\n")])])]),t("p",[a._v("Configure BTCPay by setting some "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#environment-variables",target:"_blank",rel:"noopener noreferrer"}},[a._v("environment variables"),t("OutboundLink")],1),a._v(":")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.local"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REVERSEPROXY_DEFAULT_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_HOST")]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"mainnet"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btc"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"clightning"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"nginx"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("true\n")])])]),t("p",[a._v("If you want to use multiple hostnames, add them via the optional "),t("code",[a._v("BTCPAY_ADDITIONAL_HOSTS")]),a._v(" variable:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ADDITIONAL_HOSTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.YourDomain.com"')]),a._v("\n")])])]),t("p",[a._v("In case you want to restrict access to your local network only, please note that you need to use a "),t("code",[a._v(".local")]),a._v(" domain.")]),a._v(" "),t("p",[a._v("Run the BTCPay installation:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("It should be up and running within a few minutes. Try opening http://btcpay.local in your web browser. If everything is correct, you will see BTCPay Server front page.")]),a._v(" "),t("p",[a._v("Now, you just need to wait a day or so for the Bitcoin blockchain to "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/"}},[a._v("sync and full verify")]),a._v(". The bottom of the BTCPay Server web GUI will show a pop-up dialog box to monitor the progress.")],1),a._v(" "),t("h3",{attrs:{id:"fastsync-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#fastsync-optional"}},[a._v("#")]),a._v(" FastSync (optional)")]),a._v(" "),t("p",[a._v("Please read very carefully to understand what "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[a._v("FastSync")]),a._v(" is and why it is important to verify the UTXO set yourself.")],1),a._v(" "),t("p",[a._v("By using FastSync, you are exposing yourself to attacks if a "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#what-are-the-downsides-of-fast-sync",target:"_blank",rel:"noopener noreferrer"}},[a._v("malicious UTXO set snapshot"),t("OutboundLink")],1),a._v(" is sent to you.\nIf you have another trusted node somewhere else, you can check the validity of the UTXO set gathered by FastSync by following "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#dont-trust-verify",target:"_blank",rel:"noopener noreferrer"}},[a._v("these instructions"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Stop BTCPay Server")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" /root/btcpayserver/btcpayserver-docker\n./btcpay-down.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Import FastSync UTXO set")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" contrib/FastSync\n./load-utxo-set.sh\n")])])]),t("p",[a._v("FastSync currently takes about 30 minutes on a high-speed internet connection.\nAfter FastSync finishes, run the following command to restart BTCPay Server:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("/"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("\n./btcpay-up.sh\n")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[116],{761:function(a,t,e){"use strict";e.r(t);var s=e(10),r=Object(s.a)({},(function(){var a=this,t=a._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":a.$parent.slotKey}},[t("h1",{attrs:{id:"hardware-deployment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#hardware-deployment"}},[a._v("#")]),a._v(" Hardware Deployment")]),a._v(" "),t("p",[t("a",{attrs:{href:"https://lightninginabox.co",target:"_blank",rel:"noopener noreferrer"}},[a._v("Lightning in a Box"),t("OutboundLink")],1),a._v('\n"Your hardware. Your node. Your keys. Your Bitcoin".')]),a._v(" "),t("p",[a._v("In order for your Bitcoin experience to be truly self-sovereign and trustless you should consider "),t("strong",[a._v("running nodes on your own hardware")]),a._v(" and internet connection.\n"),t("strong",[a._v("BTCPay Server is an excellent way to run both Bitcoin & Lightning nodes")]),a._v(".\nNot only are you validating transactions you also get the ability to accept base layer Bitcoin and second layer Lightning payments.\nFollowing are instructions to install and host your very own BTCPay Server.")]),a._v(" "),t("p",[a._v("The process is basically the following:")]),a._v(" "),t("ol",[t("li",[a._v("Purchase and assemble hardware.")]),a._v(" "),t("li",[a._v("Install base Operating System and configure networking.")]),a._v(" "),t("li",[a._v("Install BTCPayServer-Docker.")])]),a._v(" "),t("p",[t("strong",[a._v("BTCPay Server can be installed on the following hardware")]),a._v(". The end result is a small, quiet node that is fast enough to sync from block zero. The total cost is approximately $300.")]),a._v(" "),t("ol",[t("li",[t("a",{attrs:{href:"https://www.amazon.com/dp/B0C89TQ1YF?ref=nb_sb_ss_w_as-reorder-t1_k0_1_4&=&crid=SHKYOXZIRAO0&=&sprefix=beel",target:"_blank",rel:"noopener noreferrer"}},[a._v("BeeLink S12 - Mini PC - $169.00"),t("OutboundLink")],1)]),a._v(" "),t("li",[t("a",{attrs:{href:"https://www.amazon.com/Western-Digital-SA510-Internal-Solid/dp/B0C14TF467/ref=sr_1_3?crid=2WDY52E7ESSEB&dib=eyJ2IjoiMSJ9.MBxkb5ZIvwjKXOzscB0GUvsbhX1rVhilXNFzID6n0xHORsDBPkIxQhIixVuiLY9I16rlFs5COExAAD8761Do-tzuAnZiutbqN-KM9rAL4zCw94kA_ArCJeR_RTDynZbiXf2Phnahw1Gw2dqXVek3p0dpe6_a_fbJrqx4BRaieoYo0zj1mX6YPGaYZAmF2Vf_Quk1TrkARk6s1_wZ0vFUw7EWdjKJ9hmNLxPWMfADML90A1rXk8gSCcRnwV2jdzN7jCfg2_urfJZ3IWOW5X3iwnP7s-vSec88PGmQ3RhS-Rc.sEURveFhiTAHYwZQdwyJX72hpWL5UgD_3tEPet747oE&dib_tag=se&keywords=2tb+ssd+wd+blue&qid=1710685725&s=electronics&sprefix=2tb+ssd+wd+blue%2Celectronics%2C90&sr=1-3",target:"_blank",rel:"noopener noreferrer"}},[a._v("WD Blue 2TB SSD - $129.00"),t("OutboundLink")],1)])]),a._v(" "),t("p",[a._v("Other requirements are as follows:")]),a._v(" "),t("ol",[t("li",[a._v("High speed internet connection.")]),a._v(" "),t("li",[a._v("Static IP")]),a._v(" "),t("li",[a._v("Domain Name")]),a._v(" "),t("li",[a._v("Ability to open ports on your router (optional, BTCPayServer can be accessed over TOR or by Dynamic DNS).")]),a._v(" "),t("li",[a._v("Tiny Screwdriver")]),a._v(" "),t("li",[a._v("USB Thumb Drive")]),a._v(" "),t("li",[a._v("USB Keyboard, Mouse and Monitor (for initial install only). Can be headless when completed.")])]),a._v(" "),t("p",[a._v("Assuming you purchased the hardware mentioned above, here are the build instructions.")]),a._v(" "),t("h3",{attrs:{id:"configure-your-domain-name"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configure-your-domain-name"}},[a._v("#")]),a._v(" Configure your domain name.")]),a._v(" "),t("p",[a._v('It can take several hours for DNS changes to propagate so you should do this step first.\nLogin to your domain registrar and point an A record from your domain to the external IP address of your internet connection.\nI suggest that you use a subdomain (ie. btcpay.yourdomain.com).\nTo find your external IP address Google "whats my ip".')]),a._v(" "),t("h3",{attrs:{id:"assemble-your-lightning-in-a-box-liab"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#assemble-your-lightning-in-a-box-liab"}},[a._v("#")]),a._v(" Assemble your Lightning in a Box (LIAB).")]),a._v(" "),t("ul",[t("li",[a._v("Remove back cover with screwdriver.")]),a._v(" "),t("li",[a._v("Insert SSD")]),a._v(" "),t("li",[a._v("Install hard drive using included cage.")])]),a._v(" "),t("h3",{attrs:{id:"download-ubuntu-2204-lts-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-ubuntu-2204-lts-server"}},[a._v("#")]),a._v(" Download "),t("a",{attrs:{href:"https://releases.ubuntu.com/jammy/ubuntu-22.04.4-live-server-amd64.iso",target:"_blank",rel:"noopener noreferrer"}},[a._v("Ubuntu 22.04 LTS Server"),t("OutboundLink")],1)]),a._v(" "),t("h3",{attrs:{id:"download-and-install-balena-etcher"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#download-and-install-balena-etcher"}},[a._v("#")]),a._v(" Download and install "),t("a",{attrs:{href:"https://etcher.balena.io/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Balena Etcher"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("p",[a._v("Etcher is software that is used to flash OS images to SD cards and USB Drives.\nIn this case we will be using Etcher to flash our USB Thumb Drive with the Ubuntu OS.")]),a._v(" "),t("h3",{attrs:{id:"connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-your-usb-keyboard-mouse-monitor-and-thumb-drive"}},[a._v("#")]),a._v(" Connect your USB keyboard, mouse, monitor and thumb drive.")]),a._v(" "),t("p",[a._v('Press the power button to boot your LIAB. Press the "DEL" key to access the bios and change the boot order to use the thumb drive first.\nThe Ubuntu installation process is pretty simple and easy to follow. Here\'s a tutorial from the Ubuntu website. '),t("a",{attrs:{href:"https://ubuntu.com/tutorials/install-ubuntu-server#1-overview",target:"_blank",rel:"noopener noreferrer"}},[a._v("Install Ubuntu Server"),t("OutboundLink")],1),a._v(". The BeeLink S12 ships with Windows Pre-Installed so you will have to delete the NVME partitions and install Ubuntu on that drive.")]),a._v(" "),t("p",[a._v('*During the install process make sure you set the hostname to "btcpay" and enable SSH.')]),a._v(" "),t("h3",{attrs:{id:"give-your-liab-a-static-ip-address-on-your-local-network"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#give-your-liab-a-static-ip-address-on-your-local-network"}},[a._v("#")]),a._v(" Give your LIAB a static IP address on your local network.")]),a._v(" "),t("p",[a._v("There are a few different ways to do this and you will find a ton of articles online. Here's a pretty simple one to follow "),t("a",{attrs:{href:"https://www.linuxtechi.com/static-ip-address-on-ubuntu-server/",target:"_blank",rel:"noopener noreferrer"}},[a._v("How to configure a static IP address on Ubuntu 22.04"),t("OutboundLink")],1),a._v('. To avoid conflicts with other devices on your network you should also set a "reservation" for your LIAB.')]),a._v(" "),t("h3",{attrs:{id:"log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#log-into-your-router-and-forward-ports-80-443-and-9735-to-your-liabs-local-ip-address-optional-if-using-local-or-tor-only"}},[a._v("#")]),a._v(" Log into your router and forward ports 80, 443 and 9735 to your LIAB's local IP address. (optional, if using .local, or Tor only)")]),a._v(" "),t("p",[a._v('Every router is different and you should be able to find instructions for your router by searching for "Port Forward + your router make and model".')]),a._v(" "),t("h3",{attrs:{id:"install-fail2ban-git-and-avahi-daemon"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-fail2ban-git-and-avahi-daemon"}},[a._v("#")]),a._v(" Install Fail2ban, GIT and Avahi-Daemon.")]),a._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/fail2ban/fail2ban/wiki/How-to-install-fail2ban-packages",target:"_blank",rel:"noopener noreferrer"}},[a._v("Fail2ban"),t("OutboundLink")],1),a._v(" bans IP's that attempt to connect to your server and show malicious signs. GIT allows you to clone and manage repositories on github.com.")]),a._v(" "),t("li",[t("a",{attrs:{href:"https://avahi.org/",target:"_blank",rel:"noopener noreferrer"}},[a._v("Avahi"),t("OutboundLink")],1),a._v(" is a system which facilitates service discovery on a local network via the mDNS/DNS-SD protocol suite.\nOpen a new terminal window and type the following commands:")])]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" avahi-daemon\n")])])]),t("h3",{attrs:{id:"configuring-the-firewall"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-firewall"}},[a._v("#")]),a._v(" Configuring the firewall")]),a._v(" "),t("p",[a._v("Install a firewall and allow SSH, HTTP, HTTPS, Bitcoin, and Lightning:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" ufw\nufw default deny incoming\nufw default allow outgoing\n")])])]),t("p",[a._v("This command allows SSH connections from internal networks only:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("10.0")]),a._v(".0.0/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("172.16")]),a._v(".0.0/12 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("192.168")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("169.254")]),a._v(".0.0/16 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fc00::/7 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from fe80::/10 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\nufw allow from ff00::/8 to any port "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("22")]),a._v(" proto tcp\n")])])]),t("p",[a._v("These ports need to be accessible from anywhere (The default subnet is 'any' unless you specify one):")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[a._v("ufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("80")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("443")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("8333")]),a._v("/tcp\nufw allow "),t("span",{pre:!0,attrs:{class:"token number"}},[a._v("9735")]),a._v("/tcp\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Enable the firewall")]),a._v("\nufw "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("enable")]),a._v("\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Verify the configuration")]),a._v("\nufw status\n")])])]),t("h3",{attrs:{id:"install-docker"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#install-docker"}},[a._v("#")]),a._v(" Install Docker")]),a._v(" "),t("div",{staticClass:"language-Bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" apt-transport-https ca-certificates "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" software-properties-common\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("curl")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-fsSL")]),a._v(" https://download.docker.com/linux/ubuntu/gpg "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" gpg "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--dearmor")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" /usr/share/keyrings/docker-archive-keyring.gpg\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"deb [arch='),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("dpkg --print-architecture"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(" signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu "),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),a._v("lsb_release "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-cs")]),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v(' stable"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" /etc/apt/sources.list.d/docker.list "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">")]),a._v(" /dev/null\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" update\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt-cache")]),a._v(" policy docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" docker-ce\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" systemctl status "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"configuring-the-storage"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#configuring-the-storage"}},[a._v("#")]),a._v(" Configuring the storage")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("fdisk")]),a._v(" /dev/sda\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'p' to list existing partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'd' to delete currently selected partitions")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'n' to create a new partition")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# type 'w' to write the new partition table and exit fdisk")]),a._v("\nmkfs.ext4 /dev/sda1\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" /mnt/usb\n"),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("UUID")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$(")]),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" blkid "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-s")]),a._v(" UUID "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-o")]),a._v(" value /dev/sda1"),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v(")")])]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"UUID='),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$UUID")]),a._v(' /mnt/usb ext4 defaults,noatime,nofail 0 0"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("|")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("sudo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("tee")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v(" /etc/fstab\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-a")]),a._v("\n")])])]),t("h3",{attrs:{id:"create-mount-for-docker-volumes"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#create-mount-for-docker-volumes"}},[a._v("#")]),a._v(" Create mount for Docker volumes")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[a._v("rm")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-rf")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mkdir")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-p")]),a._v(" /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("mount")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("--bind")]),a._v(" /mnt/usb /var/lib/docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("echo")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"/mnt/docker /var/lib/docker none bind,nobootwait 0 2"')]),a._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v(">>")]),a._v(" /etc/fstab\nsystemctl restart "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("docker")]),a._v("\n")])])]),t("h3",{attrs:{id:"setup-btcpay-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#setup-btcpay-server"}},[a._v("#")]),a._v(" Setup BTCPay Server")]),a._v(" "),t("p",[a._v("Download BTCPay Server from GitHub:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# ensure we are in root home")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("apt")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("install")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-y")]),a._v(" fail2ban "),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token function"}},[a._v("git")]),a._v(" clone https://github.com/btcpayserver/btcpayserver-docker\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" btcpayserver-docker\n")])])]),t("p",[a._v("Configure BTCPay by setting some "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#environment-variables",target:"_blank",rel:"noopener noreferrer"}},[a._v("environment variables"),t("OutboundLink")],1),a._v(":")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.local"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("REVERSEPROXY_DEFAULT_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"'),t("span",{pre:!0,attrs:{class:"token variable"}},[a._v("$BTCPAY_HOST")]),a._v('"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"mainnet"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btc"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"clightning"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"nginx"')]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ENABLE_SSH")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),a._v("true\n")])])]),t("p",[a._v("If you want to use multiple hostnames, add them via the optional "),t("code",[a._v("BTCPAY_ADDITIONAL_HOSTS")]),a._v(" variable:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("export")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[a._v("BTCPAY_ADDITIONAL_HOSTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[a._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[a._v('"btcpay.YourDomain.com"')]),a._v("\n")])])]),t("p",[a._v("In case you want to restrict access to your local network only, please note that you need to use a "),t("code",[a._v(".local")]),a._v(" domain.")]),a._v(" "),t("p",[a._v("Run the BTCPay installation:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v(".")]),a._v(" ./btcpay-setup.sh "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[a._v("-i")]),a._v("\n")])])]),t("p",[a._v("It should be up and running within a few minutes. Try opening http://btcpay.local in your web browser. If everything is correct, you will see BTCPay Server front page.")]),a._v(" "),t("p",[a._v("Now, you just need to wait a day or so for the Bitcoin blockchain to "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/"}},[a._v("sync and full verify")]),a._v(". The bottom of the BTCPay Server web GUI will show a pop-up dialog box to monitor the progress.")],1),a._v(" "),t("h3",{attrs:{id:"fastsync-optional"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#fastsync-optional"}},[a._v("#")]),a._v(" FastSync (optional)")]),a._v(" "),t("p",[a._v("Please read very carefully to understand what "),t("RouterLink",{attrs:{to:"/Docker/fastsync/"}},[a._v("FastSync")]),a._v(" is and why it is important to verify the UTXO set yourself.")],1),a._v(" "),t("p",[a._v("By using FastSync, you are exposing yourself to attacks if a "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#what-are-the-downsides-of-fast-sync",target:"_blank",rel:"noopener noreferrer"}},[a._v("malicious UTXO set snapshot"),t("OutboundLink")],1),a._v(" is sent to you.\nIf you have another trusted node somewhere else, you can check the validity of the UTXO set gathered by FastSync by following "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/contrib/FastSync/README.md#dont-trust-verify",target:"_blank",rel:"noopener noreferrer"}},[a._v("these instructions"),t("OutboundLink")],1),a._v(".")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Stop BTCPay Server")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" /root/btcpayserver/btcpayserver-docker\n./btcpay-down.sh\n\n"),t("span",{pre:!0,attrs:{class:"token comment"}},[a._v("# Import FastSync UTXO set")]),a._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" contrib/FastSync\n./load-utxo-set.sh\n")])])]),t("p",[a._v("FastSync currently takes about 30 minutes on a high-speed internet connection.\nAfter FastSync finishes, run the following command to restart BTCPay Server:")]),a._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[a._v("cd")]),a._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("/"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[a._v("..")]),a._v("\n./btcpay-up.sh\n")])])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/119.48742a3e.js b/assets/js/119.a1a8996a.js similarity index 99% rename from assets/js/119.48742a3e.js rename to assets/js/119.a1a8996a.js index f1b86f3261..331d0c08d3 100644 --- a/assets/js/119.48742a3e.js +++ b/assets/js/119.a1a8996a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[119],{764:function(t,s,a){"use strict";a.r(s);var e=a(10),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],{765:function(t,s,a){"use strict";a.r(s);var e=a(10),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.c48c9b8a.js b/assets/js/12.ce026eff.js similarity index 82% rename from assets/js/12.c48c9b8a.js rename to assets/js/12.ce026eff.js index e86595e79f..f317fdf14b 100644 --- a/assets/js/12.c48c9b8a.js +++ b/assets/js/12.ce026eff.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[12],{302:function(e,t,o){e.exports=o.p+"assets/img/16_wix_btcpay-config.5f3fa8a9.png"},664:function(e,t,o){e.exports=o.p+"assets/img/01_wix_dev-mode.d3ebf3bb.png"},665:function(e,t,o){e.exports=o.p+"assets/img/02_wix_service-plugin-payment.99ffd208.png"},666:function(e,t,o){e.exports=o.p+"assets/img/03_wix_ppsp-start-now.044a2d88.png"},667:function(e,t,o){e.exports=o.p+"assets/img/04_wix_ppsp-legal-notice.658c1fe6.png"},668:function(e,t,o){e.exports=o.p+"assets/img/05_wix_ppsp-name.990dfe01.png"},669:function(e,t,o){e.exports=o.p+"assets/img/06_wix_ppsp-btcpay-config.5d4b9637.png"},670:function(e,t,o){e.exports=o.p+"assets/img/07_wix_gh-btcpay-config.a90cd4e2.png"},671:function(e,t,o){e.exports=o.p+"assets/img/08_wix_ppsp-btcpay-config-complete.06d14fc5.png"},672:function(e,t,o){e.exports=o.p+"assets/img/09_wix_gh-btcpay.f4ba84b1.png"},673:function(e,t,o){e.exports=o.p+"assets/img/10_wix_ppsp-btcpay.aa84c719.png"},674:function(e,t,o){e.exports=o.p+"assets/img/11_wix_backend-expose-site-api.a7733acf.png"},675:function(e,t,o){e.exports=o.p+"assets/img/12_wix_backend-http-functions.ba365413.png"},676:function(e,t,o){e.exports=o.p+"assets/img/13_wix_settings.9275944e.png"},677:function(e,t,o){e.exports=o.p+"assets/img/14_wix_accept-payments.984c3b09.png"},678:function(e,t,o){e.exports=o.p+"assets/img/15_wix_list-btcpay.aabe82d7.png"},679:function(e,t,o){e.exports=o.p+"assets/img/17_btcpay-api-key-page.a525c66b.png"},680:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-1.2a52f496.png"},681:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-2.4a634a53.png"},682:function(e,t,o){e.exports=o.p+"assets/img/19_btcpay-api-key-copy.4cb4fc6a.png"},683:function(e,t,o){e.exports=o.p+"assets/img/20_btcpay-store-id.62536621.png"},684:function(e,t,o){e.exports=o.p+"assets/img/21_btcpay-webhook-page.6ca3fd85.png"},685:function(e,t,o){e.exports=o.p+"assets/img/22_btcpay-webhook-saved.1e659e6d.png"},686:function(e,t,o){e.exports=o.p+"assets/img/23_wix_btcpay-config-saved.30337d07.png"},864:function(e,t,o){"use strict";o.r(t);var a=o(10),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(664),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(665),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(666),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(667),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(668),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(669),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(670),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(671),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(672),alt:"BTCPay.js",title:"BTCPay.js"}}),e._v(" "),t("img",{attrs:{src:o(673),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(674),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(675),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(676),alt:"Settings",title:"Settings"}}),e._v(" "),t("img",{attrs:{src:o(677),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(678),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(302),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(679),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(680),alt:"API Key permissions 1",title:"API Key permissions 1"}}),e._v(" "),t("img",{attrs:{src:o(681),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(682),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(683),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(684),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(685),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(302),alt:"Save configuration",title:"Save configuration"}}),e._v(" "),t("img",{attrs:{src:o(686),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],{301:function(e,t,o){e.exports=o.p+"assets/img/16_wix_btcpay-config.5f3fa8a9.png"},640:function(e,t,o){e.exports=o.p+"assets/img/01_wix_dev-mode.d3ebf3bb.png"},641:function(e,t,o){e.exports=o.p+"assets/img/02_wix_service-plugin-payment.99ffd208.png"},642:function(e,t,o){e.exports=o.p+"assets/img/03_wix_ppsp-start-now.044a2d88.png"},643:function(e,t,o){e.exports=o.p+"assets/img/04_wix_ppsp-legal-notice.658c1fe6.png"},644:function(e,t,o){e.exports=o.p+"assets/img/05_wix_ppsp-name.990dfe01.png"},645:function(e,t,o){e.exports=o.p+"assets/img/06_wix_ppsp-btcpay-config.5d4b9637.png"},646:function(e,t,o){e.exports=o.p+"assets/img/07_wix_gh-btcpay-config.a90cd4e2.png"},647:function(e,t,o){e.exports=o.p+"assets/img/08_wix_ppsp-btcpay-config-complete.06d14fc5.png"},648:function(e,t,o){e.exports=o.p+"assets/img/09_wix_gh-btcpay.f4ba84b1.png"},649:function(e,t,o){e.exports=o.p+"assets/img/10_wix_ppsp-btcpay.aa84c719.png"},650:function(e,t,o){e.exports=o.p+"assets/img/11_wix_backend-expose-site-api.a7733acf.png"},651:function(e,t,o){e.exports=o.p+"assets/img/12_wix_backend-http-functions.ba365413.png"},652:function(e,t,o){e.exports=o.p+"assets/img/13_wix_settings.9275944e.png"},653:function(e,t,o){e.exports=o.p+"assets/img/14_wix_accept-payments.984c3b09.png"},654:function(e,t,o){e.exports=o.p+"assets/img/15_wix_list-btcpay.aabe82d7.png"},655:function(e,t,o){e.exports=o.p+"assets/img/17_btcpay-api-key-page.a525c66b.png"},656:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-1.2a52f496.png"},657:function(e,t,o){e.exports=o.p+"assets/img/18_btcpay-api-key-permissions-2.4a634a53.png"},658:function(e,t,o){e.exports=o.p+"assets/img/19_btcpay-api-key-copy.4cb4fc6a.png"},659:function(e,t,o){e.exports=o.p+"assets/img/20_btcpay-store-id.62536621.png"},660:function(e,t,o){e.exports=o.p+"assets/img/21_btcpay-webhook-page.6ca3fd85.png"},661:function(e,t,o){e.exports=o.p+"assets/img/22_btcpay-webhook-saved.1e659e6d.png"},662:function(e,t,o){e.exports=o.p+"assets/img/23_wix_btcpay-config-saved.30337d07.png"},863:function(e,t,o){"use strict";o.r(t);var a=o(10),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(640),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(641),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(642),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(643),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(644),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(645),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(646),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(647),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(648),alt:"BTCPay.js",title:"BTCPay.js"}}),e._v(" "),t("img",{attrs:{src:o(649),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(650),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(651),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(652),alt:"Settings",title:"Settings"}}),e._v(" "),t("img",{attrs:{src:o(653),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(654),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(301),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(655),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(656),alt:"API Key permissions 1",title:"API Key permissions 1"}}),e._v(" "),t("img",{attrs:{src:o(657),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(658),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(659),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(660),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(661),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(301),alt:"Save configuration",title:"Save configuration"}}),e._v(" "),t("img",{attrs:{src:o(662),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.090b4799.js b/assets/js/120.a7024ac3.js similarity index 99% rename from assets/js/120.090b4799.js rename to assets/js/120.a7024ac3.js index abc67cd4c2..fcdd165fd0 100644 --- a/assets/js/120.090b4799.js +++ b/assets/js/120.a7024ac3.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[120],{766:function(t,s,a){"use strict";a.r(s);var e=a(10),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],{769:function(t,s,a){"use strict";a.r(s);var e=a(10),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.fe70db9e.js b/assets/js/121.37c702c8.js similarity index 99% rename from assets/js/121.fe70db9e.js rename to assets/js/121.37c702c8.js index db3676c57a..bfdb591f79 100644 --- a/assets/js/121.fe70db9e.js +++ b/assets/js/121.37c702c8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[121],{768:function(t,s,a){"use strict";a.r(s);var e=a(10),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],{767:function(t,s,a){"use strict";a.r(s);var e=a(10),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.3e8812de.js b/assets/js/122.dfe6aec8.js similarity index 99% rename from assets/js/122.3e8812de.js rename to assets/js/122.dfe6aec8.js index 1d9fb7684d..387981e670 100644 --- a/assets/js/122.3e8812de.js +++ b/assets/js/122.dfe6aec8.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[122],{769:function(e,t,r){"use strict";r.r(t);var s=r(10),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],{768:function(e,t,r){"use strict";r.r(t);var s=r(10),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/128.16e307fe.js b/assets/js/128.f130b037.js similarity index 99% rename from assets/js/128.16e307fe.js rename to assets/js/128.f130b037.js index 6fc063ddf2..6d5def6fe4 100644 --- a/assets/js/128.16e307fe.js +++ b/assets/js/128.f130b037.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[128],{776:function(t,s,a){"use strict";a.r(s);var e=a(10),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],{779:function(t,s,a){"use strict";a.r(s);var e=a(10),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.f1fa83c8.js b/assets/js/129.cd4052fa.js similarity index 99% rename from assets/js/129.f1fa83c8.js rename to assets/js/129.cd4052fa.js index dd60053722..04324cf787 100644 --- a/assets/js/129.f1fa83c8.js +++ b/assets/js/129.cd4052fa.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[129],{777:function(e,t,r){"use strict";r.r(t);var s=r(10),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],{776:function(e,t,r){"use strict";r.r(t);var s=r(10),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.b557180e.js b/assets/js/130.1c926a74.js similarity index 99% rename from assets/js/130.b557180e.js rename to assets/js/130.1c926a74.js index 99af3ccff3..3ee2b04756 100644 --- a/assets/js/130.b557180e.js +++ b/assets/js/130.1c926a74.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[130],{778:function(e,t,s){"use strict";s.r(t);var a=s(10),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],{777:function(e,t,s){"use strict";s.r(t);var a=s(10),r=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#local-development"}},[e._v("#")]),e._v(" Local development")]),e._v(" "),t("h2",{attrs:{id:"prerequisites"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites"}},[e._v("#")]),e._v(" Prerequisites")]),e._v(" "),t("p",[e._v("For the "),t("strong",[e._v("development environment")]),e._v(" you need to install these tools:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://dotnet.microsoft.com/en-us/download/dotnet/8.0",target:"_blank",rel:"noopener noreferrer"}},[e._v(".NET 8.0 SDK"),t("OutboundLink")],1)]),e._v(" "),t("li",[e._v("Docker: "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-windows/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Windows"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/docker-for-mac/install/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Mac OS"),t("OutboundLink")],1),e._v(" | "),t("a",{attrs:{href:"https://docs.docker.com/install/linux/docker-ce/ubuntu/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Linux"),t("OutboundLink")],1)])]),e._v(" "),t("h2",{attrs:{id:"dependencies"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#dependencies"}},[e._v("#")]),e._v(" Dependencies")]),e._v(" "),t("p",[e._v("To execute tests and run the project for debugging, you need to run a number of "),t("strong",[e._v("dependencies")]),e._v(".")]),e._v(" "),t("p",[e._v("We wrapped all our dependencies in a docker-compose file that you can use to bootstrap the development environment:\nThe file "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(" can be used to spin everything up:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token function"}},[e._v("git")]),e._v(" clone https://github.com/btcpayserver/btcpayserver.git\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" btcpayserver/BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" up dev\n")])])]),t("h2",{attrs:{id:"which-ide"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#which-ide"}},[e._v("#")]),e._v(" Which IDE?")]),e._v(" "),t("p",[e._v("We recommend using Visual Studio 2022 (Windows Only) or Rider (cross platform). Visual Studio Code (cross platform) should also be possible, but isn't as straightforward to setup for a comfortable development environment.\nYou can of course use VIM if you are hardcore, .NET Core is easy to use via command-line.")]),e._v(" "),t("p",[e._v("Visual Studio Code, Visual Studio and Rider will run the launch profile "),t("code",[e._v("Bitcoin")]),e._v(".\nThis will run a "),t("strong",[e._v("BTCPay Server instance connecting to the services in your Docker service")]),e._v(", so you can easily debug and step through the code.")]),e._v(" "),t("h2",{attrs:{id:"build-configuration"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#build-configuration"}},[e._v("#")]),e._v(" Build configuration")]),e._v(" "),t("p",[e._v("A build configuration defines how to "),t("strong",[e._v("build BTCPay Server")]),e._v(". For example, whether to include some source files, whether to optimize for debugging or performance.")]),e._v(" "),t("p",[e._v("There are several build configurations:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Debug")])]),e._v(" "),t("li",[t("code",[e._v("Release")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Debug")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-Release")])])]),e._v(" "),t("p",[e._v("How to use a different one during your local development depends on your IDE.\nBy default "),t("code",[e._v("Debug")]),e._v(" is used, this is a Bitcoin only build excluding any altcoin dependencies. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("You can select which build to use via the "),t("code",[e._v("-c")]),e._v(" switch in "),t("code",[e._v("dotnet")]),e._v(" command line. If you use command line and want to run a Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("h2",{attrs:{id:"launch-profiles"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#launch-profiles"}},[e._v("#")]),e._v(" Launch profiles")]),e._v(" "),t("p",[e._v("When you "),t("strong",[e._v("start BTCPay Server locally for local development")]),e._v(", it needs the right parameter so it can connect to the development time dependencies in the docker-compose file.")]),e._v(" "),t("p",[e._v("Those parameters are wrapped into the dotnet concept of "),t("code",[e._v("launch profile")]),e._v(".")]),e._v(" "),t("p",[e._v("The launch profiles are specified in the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Properties/launchSettings.json",target:"_blank",rel:"noopener noreferrer"}},[e._v("launchSettings.json"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("There are currently three launch profiles:")]),e._v(" "),t("ul",[t("li",[t("code",[e._v("Bitcoin")])]),e._v(" "),t("li",[t("code",[e._v("Bitcoin-HTTPS")])]),e._v(" "),t("li",[t("code",[e._v("Altcoins-HTTPS")])])]),e._v(" "),t("p",[e._v("By default, "),t("code",[e._v("Bitcoin")]),e._v(" is used. How to use a different one during your local development depends on your IDE.")]),e._v(" "),t("p",[e._v("If you use command line, "),t("code",[e._v("dotnet run")]),e._v(" allows you to select the launch profile of your choice:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet run --launch-profile Bitcoin\n")])])]),t("h2",{attrs:{id:"running-tests"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#running-tests"}},[e._v("#")]),e._v(" Running tests")]),e._v(" "),t("p",[e._v("Running tests is functioning in the exact same way as running the development time BTCPay Server.")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v("\n")])])]),t("p",[e._v("The concept of "),t("code",[e._v("launch profile")]),e._v(" does not apply for tests, but the concept of build configuration does. For example, if I want to run tests on the Release build:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Release\n")])])]),t("p",[e._v("The tests are already configured to use the development time dependencies in the docker-compose presented earlier.")]),e._v(" "),t("p",[e._v("You can use the "),t("code",[e._v("--f")]),e._v(" (filter) switch to run a specific test.")]),e._v(" "),t("p",[e._v("If you use an IDE, consult your IDE documentation to run tests or switch to different configurations.")]),e._v(" "),t("h2",{attrs:{id:"altcoin-support-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#altcoin-support-development"}},[e._v("#")]),e._v(" Altcoin support development")]),e._v(" "),t("p",[e._v("By default, your IDE or simple "),t("code",[e._v("dotnet run")]),e._v(" will use "),t("code",[e._v("Bitcoin")]),e._v(" launch profile on "),t("code",[e._v("Debug")]),e._v(" build.")]),e._v(" "),t("ul",[t("li",[e._v("This means that BTCPay Server will be hosted on a local HTTP port, building without altcoin support,")]),e._v(" "),t("li",[e._v("Run BTCPay Server to connect to Bitcoin only dependencies specified in "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.yml"),t("OutboundLink")],1),e._v(".")])]),e._v(" "),t("p",[e._v("If you want to "),t("strong",[e._v("develop with altcoins support")]),e._v(" you need to use the "),t("code",[e._v("Altcoins-HTTPS")]),e._v(" launch profile, on the "),t("code",[e._v("Altcoins-Debug")]),e._v(" build, and run the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/docker-compose.altcoins.yml",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPayServer.Tests/docker-compose.altcoins.yml"),t("OutboundLink")],1),e._v(".")]),e._v(" "),t("p",[e._v("If using command line:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\n"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("docker-compose")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-f")]),e._v(" docker-compose.altcoins.yml up dev\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("..")]),e._v("/BTCPayServer\ndotnet run "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug --launch-profile Altcoins-HTTPS\n")])])]),t("p",[e._v("For tests")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("cd")]),e._v(" BTCPayServer.Tests\ndotnet "),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("test")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("-c")]),e._v(" Altcoins-Debug\n")])])]),t("h2",{attrs:{id:"https-support-for-local-development"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#https-support-for-local-development"}},[e._v("#")]),e._v(" HTTPS support for local development")]),e._v(" "),t("p",[e._v("Some browser security features may require that you use "),t("strong",[e._v("HTTPS")]),e._v(" to be properly tested.")]),e._v(" "),t("p",[e._v("In this case, use "),t("code",[e._v("Bitcoin-HTTPS")]),e._v(" (or "),t("code",[e._v("Altcoin-HTTPS")]),e._v(") launch profile. This will create a self signed certificate for your development purpose.")]),e._v(" "),t("p",[e._v("However, your browser will not trust it, making it difficult to debug.")]),e._v(" "),t("p",[e._v("You can instruct your OS to trust this development time certificate by running:")]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[e._v("dotnet dev-certs https "),t("span",{pre:!0,attrs:{class:"token parameter variable"}},[e._v("--trust")]),e._v("\n")])])]),t("h2",{attrs:{id:"videos"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#videos"}},[e._v("#")]),e._v(" Videos")]),e._v(" "),t("p",[e._v("For more information check out these videos:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=ZePbMPSIvHM",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to contribute to BTCPay Server Development (Windows)"),t("OutboundLink")],1),e._v(" by Nicolas Dorier")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=j486T_Rk-yw",target:"_blank",rel:"noopener noreferrer"}},[e._v("Setting up BTCPayServer development environment on Linux (Ubuntu)"),t("OutboundLink")],1),e._v(" by RockStarDev")]),e._v(" "),t("li",[t("a",{attrs:{href:"https://youtube.com/watch?v=GWR_CcMsEV0",target:"_blank",rel:"noopener noreferrer"}},[e._v("BTCPay Server Development - Testing pull request, payments (MacOS)"),t("OutboundLink")],1),e._v(" by Pavlenex")])]),e._v(" "),t("p",[e._v("and these notes:")]),e._v(" "),t("ul",[t("li",[t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer.Tests/README.md",target:"_blank",rel:"noopener noreferrer"}},[e._v("How to get started with development"),t("OutboundLink")],1),e._v(" by Nicolas Dorier (covering relevant docker commands, paying regtest invoices)")])]),e._v(" "),t("h2",{attrs:{id:"how-to-manually-test-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-manually-test-payments"}},[e._v("#")]),e._v(" How to manually test payments")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-bitcoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-bitcoin-cli"}},[e._v("#")]),e._v(" Using the test bitcoin-cli")]),e._v(" "),t("p",[e._v("You can call bitcoin-cli inside the container with "),t("code",[e._v("docker exec")]),e._v(".\nFor example, if you want to send "),t("code",[e._v("0.23111090")]),e._v(" to "),t("code",[e._v("mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf")]),e._v(":")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-bitcoin-cli.sh sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0.23111090")]),e._v("\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 sendtoaddress "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mohu16LH66ptoWGEL1GtP6KHTBJYXMWhEf"')]),e._v(" 0"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("23111090\n")])])]),t("p",[e._v("You can also generate blocks:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-bitcoin-generate"),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 3\n")])])]),t("h3",{attrs:{id:"using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a Lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h3",{attrs:{id:"using-the-test-litecoin-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-litecoin-cli"}},[e._v("#")]),e._v(" Using the test litecoin-cli")]),e._v(" "),t("p",[e._v("Same as bitcoin-cli, but with "),t("code",[e._v(".\\docker-litecoin-cli.ps1")]),e._v(" and "),t("code",[e._v(".\\docker-litecoin-cli.sh")]),e._v(" instead.")]),e._v(" "),t("h3",{attrs:{id:"using-the-test-lightning-cli"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#using-the-test-lightning-cli"}},[e._v("#")]),e._v(" Using the test lightning-cli")]),e._v(" "),t("p",[e._v("If you are using Linux:")]),e._v(" "),t("div",{staticClass:"language-sh extra-class"},[t("pre",{pre:!0,attrs:{class:"language-sh"}},[t("code",[e._v("./docker-customer-lightning-cli.sh pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you are using Powershell:")]),e._v(" "),t("div",{staticClass:"language-powershell extra-class"},[t("pre",{pre:!0,attrs:{class:"language-powershell"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("\\docker-customer-lightning-"),t("span",{pre:!0,attrs:{class:"token function"}},[e._v("cli")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(".")]),e._v("ps1 pay lnbcrt100u1pd2e6uspp5ajnadvhazjrz55twd5k6yeg9u87wpw0q2fdr7g960yl5asv5fmnqdq9d3hkccqpxmedyrk0ehw5ueqx5e0r4qrrv74cewddfcvsxaawqz7634cmjj39sqwy5tvhz0hasktkk6t9pqfdh3edmf3z09zst5y7khv3rvxh8ctqqw6mwhh\n")])])]),t("p",[e._v("If you get this message:")]),e._v(" "),t("div",{staticClass:"language-json extra-class"},[t("pre",{pre:!0,attrs:{class:"language-json"}},[t("code",[t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"code"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("205")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"message"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"Could not find a route"')]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"data"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("{")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"getroute_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("1")]),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v(",")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token property"}},[e._v('"sendpay_tries"')]),e._v(" "),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v(":")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token number"}},[e._v("0")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token punctuation"}},[e._v("}")]),e._v("\n")])])]),t("p",[e._v("Please, run the test "),t("code",[e._v("CanSetLightningServer")]),e._v(", this will establish a channel between the customer and the merchant, then, retry.")]),e._v(" "),t("p",[e._v("Alternatively you can run the "),t("code",[e._v("./docker-lightning-channel-setup.sh")]),e._v(" script to establish the channel connection.\nThe "),t("code",[e._v("./docker-lightning-channel-teardown.sh")]),e._v(" script closes any existing lightning channels.")]),e._v(" "),t("h3",{attrs:{id:"alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#alternative-lightning-testing-using-polar-to-test-lightning-payments"}},[e._v("#")]),e._v(" Alternative Lightning testing: Using Polar to test Lightning payments")]),e._v(" "),t("ul",[t("li",[e._v("Install and run "),t("a",{attrs:{href:"https://lightningpolar.com/",target:"_blank",rel:"noopener noreferrer"}},[e._v("Polar"),t("OutboundLink")],1),e._v(". Setup a small network of nodes.")]),e._v(" "),t("li",[e._v("Go to your store's General Settings and enable Lightning.")]),e._v(" "),t("li",[e._v("Build your connection string using the Connect information in the Polar app.")])]),e._v(" "),t("p",[e._v('LND Connection string example:\ntype=lnd-rest;server=https://127.0.0.1:8084/;macaroonfilepath="local path to admin.macaroon on your computer, without these quotes";allowinsecure=true')]),e._v(" "),t("p",[e._v("Now you can create a lightning invoice on BTCPay Server regtest and make a payment through Polar.")]),e._v(" "),t("p",[e._v('PLEASE NOTE: You may get an exception break in Visual Studio. You must quickly click "Continue" in VS so the invoice is generated.\nOr, uncheck the box that says, "Break when this exception type is thrown".')]),e._v(" "),t("h2",{attrs:{id:"faq"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#faq"}},[e._v("#")]),e._v(" FAQ")]),e._v(" "),t("h3",{attrs:{id:"docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#docker-compose-up-dev-failed-or-tests-are-not-passing-what-should-i-do"}},[e._v("#")]),e._v(" "),t("code",[e._v("docker-compose up dev")]),e._v(" failed or tests are not passing, what should I do?")]),e._v(" "),t("ol",[t("li",[e._v("Run "),t("code",[e._v("docker-compose down --volumes")]),e._v(" (this will reset your test environment)")]),e._v(" "),t("li",[e._v("Run "),t("code",[e._v("docker-compose pull")]),e._v(" (this will ensure you have the latest images)")]),e._v(" "),t("li",[e._v("Run again with "),t("code",[e._v("docker-compose up dev")])])]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-altcoin-environment"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-altcoin-environment"}},[e._v("#")]),e._v(" How to run the Altcoin environment?")]),e._v(" "),t("p",[t("code",[e._v("docker-compose -f docker-compose.altcoins.yml up dev")])]),e._v(" "),t("p",[e._v("If you still have issues, try to restart docker.")]),e._v(" "),t("h3",{attrs:{id:"how-to-run-the-selenium-test-with-a-browser"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-run-the-selenium-test-with-a-browser"}},[e._v("#")]),e._v(" How to run the Selenium test with a browser?")]),e._v(" "),t("p",[e._v("Run "),t("code",[e._v("dotnet user-secrets set RunSeleniumInBrowser true")]),e._v(" to run tests in browser.")]),e._v(" "),t("p",[e._v("To switch back to headless mode (recommended) you can run "),t("code",[e._v("dotnet user-secrets remove RunSeleniumInBrowser")]),e._v(".")]),e._v(" "),t("h3",{attrs:{id:"session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#session-not-created-this-version-of-chromedriver-only-supports-chrome-version-88"}},[e._v("#")]),e._v(" Session not created: This version of ChromeDriver only supports Chrome version 88")]),e._v(" "),t("p",[e._v("When you run tests for selenium, you may end up with this error.\nThis happen when we update the selenium packages on BTCPay Server while you did not update your chrome version.")]),e._v(" "),t("p",[e._v("If you want to use a older chrome driver on "),t("a",{attrs:{href:"https://chromedriver.chromium.org/downloads",target:"_blank",rel:"noopener noreferrer"}},[e._v("this page"),t("OutboundLink")],1),e._v(" then point to it with")]),e._v(" "),t("p",[t("code",[e._v('dotnet user-secrets set ChromeDriverDirectory "path/to/the/driver/directory"')])])])}),[],!1,null,null,null);t.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/133.24f55a5f.js b/assets/js/133.11f768ef.js similarity index 99% rename from assets/js/133.24f55a5f.js rename to assets/js/133.11f768ef.js index 1adcf304dc..01698cbdb0 100644 --- a/assets/js/133.24f55a5f.js +++ b/assets/js/133.11f768ef.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[133],{786:function(e,t,a){"use strict";a.r(t);var s=a(10),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],{785:function(e,t,a){"use strict";a.r(t);var s=a(10),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/134.b469f2f7.js b/assets/js/134.32163e29.js similarity index 98% rename from assets/js/134.b469f2f7.js rename to assets/js/134.32163e29.js index 1861adbafa..55bce1cb4f 100644 --- a/assets/js/134.b469f2f7.js +++ b/assets/js/134.32163e29.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[134],{785:function(t,a,s){"use strict";s.r(a);var e=s(10),r=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"chatwoot-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#chatwoot-support"}},[t._v("#")]),t._v(" Chatwoot support")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.chatwoot.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Chatwoot"),a("OutboundLink")],1),t._v(" is a customer support tool for instant messaging channels which can help businesses provide exceptional customer support.")]),t._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),a("ol",[a("li",[t._v("Connect as root to your server")]),t._v(" "),a("li",[t._v("create chatwoot configuration file where "),a("code",[t._v("{CONFIG DATA HERE}")]),t._v(" is replaced by settings from "),a("a",{attrs:{href:"https://www.chatwoot.com/docs/environment-variables",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">>")]),t._v(" Generated/chatwoot-config.env "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("EOL\n{CONFIG DATA HERE}\n{CONFIG DATA HERE}\nEOL")]),t._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Add chatwoot as an option to your BTCPay deployment and set the host to use (point DNS to server as well)")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("CHATWOOT_HOST")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"chatwoot.xpayserver.com"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-chatwoot"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Wait for BTPay to be online and then create the database for chatwoot")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("exec")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" chatwoot "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sh")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"export DISABLE_DATABASE_ENVIRONMENT_CHECK=1 && bundle exec rails db:reset"')]),t._v("\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Go to chatwoot website at https://chatwoot.xpayserver.com and set up.")])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[134],{786:function(t,a,s){"use strict";s.r(a);var e=s(10),r=Object(e.a)({},(function(){var t=this,a=t._self._c;return a("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[a("h1",{attrs:{id:"chatwoot-support"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#chatwoot-support"}},[t._v("#")]),t._v(" Chatwoot support")]),t._v(" "),a("p",[a("a",{attrs:{href:"https://www.chatwoot.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Chatwoot"),a("OutboundLink")],1),t._v(" is a customer support tool for instant messaging channels which can help businesses provide exceptional customer support.")]),t._v(" "),a("h2",{attrs:{id:"how-to-use"}},[a("a",{staticClass:"header-anchor",attrs:{href:"#how-to-use"}},[t._v("#")]),t._v(" How to use")]),t._v(" "),a("ol",[a("li",[t._v("Connect as root to your server")]),t._v(" "),a("li",[t._v("create chatwoot configuration file where "),a("code",[t._v("{CONFIG DATA HERE}")]),t._v(" is replaced by settings from "),a("a",{attrs:{href:"https://www.chatwoot.com/docs/environment-variables",target:"_blank",rel:"noopener noreferrer"}},[t._v("here"),a("OutboundLink")],1)])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sudo")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("su")]),t._v(" -\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("cd")]),t._v(" btcpayserver-docker\n"),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("cat")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v(">>")]),t._v(" Generated/chatwoot-config.env "),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("<<")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v("EOL\n{CONFIG DATA HERE}\n{CONFIG DATA HERE}\nEOL")]),t._v("\n")])])]),a("ol",{attrs:{start:"3"}},[a("li",[t._v("Add chatwoot as an option to your BTCPay deployment and set the host to use (point DNS to server as well)")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("CHATWOOT_HOST")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"chatwoot.xpayserver.com"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token assign-left variable"}},[t._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),a("span",{pre:!0,attrs:{class:"token operator"}},[t._v("=")]),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"'),a("span",{pre:!0,attrs:{class:"token variable"}},[t._v("$BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t._v(';opt-add-chatwoot"')]),t._v("\n"),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v(".")]),t._v(" btcpay-setup.sh "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-i")]),t._v("\n\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Wait for BTPay to be online and then create the database for chatwoot")])]),t._v(" "),a("div",{staticClass:"language-bash extra-class"},[a("pre",{pre:!0,attrs:{class:"language-bash"}},[a("code",[a("span",{pre:!0,attrs:{class:"token function"}},[t._v("docker")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token builtin class-name"}},[t._v("exec")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-ti")]),t._v(" chatwoot "),a("span",{pre:!0,attrs:{class:"token function"}},[t._v("sh")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token parameter variable"}},[t._v("-c")]),t._v(" "),a("span",{pre:!0,attrs:{class:"token string"}},[t._v('"export DISABLE_DATABASE_ENVIRONMENT_CHECK=1 && bundle exec rails db:reset"')]),t._v("\n")])])]),a("ol",{attrs:{start:"4"}},[a("li",[t._v("Go to chatwoot website at https://chatwoot.xpayserver.com and set up.")])])])}),[],!1,null,null,null);a.default=r.exports}}]); \ No newline at end of file diff --git a/assets/js/135.7fa4f2d9.js b/assets/js/135.2b74e671.js similarity index 97% rename from assets/js/135.7fa4f2d9.js rename to assets/js/135.2b74e671.js index 046a32843a..28057cd0cd 100644 --- a/assets/js/135.7fa4f2d9.js +++ b/assets/js/135.2b74e671.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[135],{789:function(s,e,t){"use strict";t.r(e);var a=t(10),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. It’s 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],{788:function(s,e,t){"use strict";t.r(e);var a=t(10),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. It’s 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/14.d2dbf36f.js b/assets/js/14.756cac58.js similarity index 89% rename from assets/js/14.d2dbf36f.js rename to assets/js/14.756cac58.js index 9570af0fa7..50f24b67d6 100644 --- a/assets/js/14.d2dbf36f.js +++ b/assets/js/14.756cac58.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{294:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--19-troubleshoot-403-callback.51193927.png"},615:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--01-install-web.4d28e0bd.png"},616:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--02-install-upload.8972740d.png"},617:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--03-enable-plugin.1b4a6c9f.png"},618:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--04-add-new-payment-method.e5a94ee3.png"},619:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--05-payment-method-details.adf89c97.png"},620:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--06-payment-method-configuration-tab.45617db0.png"},621:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--07-account-manage.d477b8b4.png"},622:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--08-add-api-key.a58b2941.png"},623:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--09-permissions-and-select-store.9ccef388.png"},624:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--10-permissions-set.74d76936.png"},625:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--11-copy-api-key.94be9878.png"},626:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--12-copy-store-id.84c19f9f.png"},627:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--13-save-vm-payment-method-form.0a3e52bd.png"},628:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--14-create-webhook.1b6e4881.png"},629:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--15-webhook-payload-url.37a4f55f.png"},630:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-webhook-copy-secret.71b0dd07.png"},631:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-virtuemart-configuration-save.ee549862.png"},632:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--17-webhook-save.dfd4fca5.png"},633:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--18-troubleshoot-copy-callback-url.70d08e31.png"},859:function(e,t,a){"use strict";a.r(t);var o=a(10),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(615),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(616),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(617),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(618),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(619),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(620),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(621),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(622),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(623),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(624),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(625),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(626),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(627),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(628),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(629),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(630),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}}),e._v(" "),t("img",{attrs:{src:a(631),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(632),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(633),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(294),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],{294:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--19-troubleshoot-403-callback.51193927.png"},608:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--01-install-web.4d28e0bd.png"},609:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--02-install-upload.8972740d.png"},610:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--03-enable-plugin.1b4a6c9f.png"},611:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--04-add-new-payment-method.e5a94ee3.png"},612:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--05-payment-method-details.adf89c97.png"},613:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--06-payment-method-configuration-tab.45617db0.png"},614:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--07-account-manage.d477b8b4.png"},615:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--08-add-api-key.a58b2941.png"},616:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--09-permissions-and-select-store.9ccef388.png"},617:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--10-permissions-set.74d76936.png"},618:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--11-copy-api-key.94be9878.png"},619:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--12-copy-store-id.84c19f9f.png"},620:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--13-save-vm-payment-method-form.0a3e52bd.png"},621:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--14-create-webhook.1b6e4881.png"},622:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--15-webhook-payload-url.37a4f55f.png"},623:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-webhook-copy-secret.71b0dd07.png"},624:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--16-virtuemart-configuration-save.ee549862.png"},625:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--17-webhook-save.dfd4fca5.png"},626:function(e,t,a){e.exports=a.p+"assets/img/btcpay-vm--18-troubleshoot-copy-callback-url.70d08e31.png"},859:function(e,t,a){"use strict";a.r(t);var o=a(10),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(608),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(609),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(610),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(611),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(612),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(613),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(614),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(615),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(616),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(617),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(618),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(619),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(620),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(621),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(622),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(623),alt:"BTCPay Joomla VirtueMart: Webhook payload URL",title:"BTCPay Joomla VirtueMart: Webhook payload URL"}}),e._v(" "),t("img",{attrs:{src:a(624),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(625),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(626),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(294),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.ff820d8b.js b/assets/js/141.a620cdc0.js similarity index 99% rename from assets/js/141.ff820d8b.js rename to assets/js/141.a620cdc0.js index 22fec35764..91c8b747f4 100644 --- a/assets/js/141.ff820d8b.js +++ b/assets/js/141.a620cdc0.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[141],{795:function(e,t,r){"use strict";r.r(t);var a=r(10),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],{796:function(e,t,r){"use strict";r.r(t);var a=r(10),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.98605cd6.js b/assets/js/142.5015792a.js similarity index 96% rename from assets/js/142.98605cd6.js rename to assets/js/142.5015792a.js index 43ef1e2889..8e938967f3 100644 --- a/assets/js/142.98605cd6.js +++ b/assets/js/142.5015792a.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{797:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("p",[e._v("# Dynamic Reports Plugin for BTCPay Server\nThis 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=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{795:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("p",[e._v("# Dynamic Reports Plugin for BTCPay Server\nThis 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=o.exports}}]); \ No newline at end of file diff --git a/assets/js/143.60bbe972.js b/assets/js/143.38df769c.js similarity index 99% rename from assets/js/143.60bbe972.js rename to assets/js/143.38df769c.js index 862641f005..13af438a62 100644 --- a/assets/js/143.60bbe972.js +++ b/assets/js/143.38df769c.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[143],{796:function(e,t,r){"use strict";r.r(t);var o=r(10),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],{797:function(e,t,r){"use strict";r.r(t);var o=r(10),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/144.c7b403b0.js b/assets/js/144.52aa4297.js similarity index 99% rename from assets/js/144.c7b403b0.js rename to assets/js/144.52aa4297.js index 10eb565750..474ddb1fa5 100644 --- a/assets/js/144.c7b403b0.js +++ b/assets/js/144.52aa4297.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[144],{799:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrumx"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrumx"}},[e._v("#")]),e._v(" ElectrumX")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("connect Electrum Wallet to an ElectrumX Server")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Note:")]),e._v(" the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker version of BTCPay Server"),t("OutboundLink")],1),e._v(" (since Nov 7th 2019, version 1.0.3.137) supports full integration with "),t("a",{attrs:{href:"https://electrumx.readthedocs.io/en/latest/features.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX"),t("OutboundLink")],1),e._v(" is the most widely implemented software used for Electrum public servers that your local Electrum wallet relies upon to get all the details of, or broadcast transactions to the bitcoin blockchain. Skip to Section 2 below, to read more on what this all means, and how to set it up on your BTCPay stack.")]),e._v(" "),t("h2",{attrs:{id:"how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[e._v("#")]),e._v(" How to integrate ElectrumX into your BTCPay Server and connect your Electrum Wallet to it for your complete privacy")]),e._v(" "),t("h3",{attrs:{id:"only-available-in-btcpay-docker-version"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#only-available-in-btcpay-docker-version"}},[e._v("#")]),e._v(" (only available in BTCPay docker version)")]),e._v(" "),t("p",[e._v("Before we proceed, it is important to understand how your Electrum wallet on your PC/Mac functions so well/fast, without having its own bitcoin full node. In actual fact, Electrum Wallet relies on a community effort to maintain a bunch of servers all around the world with a bitcoin full node that do this job for you! They are called Electrum Servers, and you can be a part of that community to make that network even stronger, lets see how.")]),e._v(" "),t("p",[e._v("When you click the little traffic light at the bottom of your Electrum Wallet here:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v('You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "Select Server Automatically" already checked:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v('While using Electrum Wallet with "Select Server Automatically" on is the easiest, every transaction that you make/browse/broadcast in your Electrum Wallet will be done via someone else\'s server - this is a privacy risk, that will be mitigated by setting up and using your own ElectrumX Server.')]),e._v(" "),t("h2",{attrs:{id:"section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[e._v("#")]),e._v(" Section 2.1 Enable Your Own ElectrumX Server (fully integrated with your BTCPay Server's full bitcoin node)")]),e._v(" "),t("h3",{attrs:{id:"prerequisites-mandatory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites-mandatory"}},[e._v("#")]),e._v(" Prerequisites (mandatory):")]),e._v(" "),t("ol",[t("li",[e._v("Docker only: Only the "),t("RouterLink",{attrs:{to:"/Docker/"}},[e._v("Docker version of BTCPay Server")]),e._v(" is supported.")],1),e._v(" "),t("li",[e._v("Unpruned BTCPay node: Make sure your BTCPay implementation is NOT "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/#can-i-skip-the-synchronization"}},[e._v("pruned")]),e._v(" (i.e. you have synched and stored from genesis block. Check that you do NOT use the opt-save-storage "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("Environment Variable")]),e._v(")")],1),e._v(" "),t("li",[e._v("Drive space: At least 400GB of drive space on the device where your docker volumes are stored is required (as at the writing of this documentation on 9th Nov 2019, the total hard drive space used is 333GB - with full node and ElectrumX enabled - and of course this will grow further over time).")]),e._v(" "),t("li",[e._v("Additional Fragments: You are familiar with how to use BTCPay's "),t("RouterLink",{attrs:{to:"/Docker/#environment-variables"}},[e._v("Additional Fragment")]),e._v(" feature as part of your environment variable setup.")],1),e._v(" "),t("li",[e._v("Server architecture: The (official) "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX docker"),t("OutboundLink")],1),e._v(" used here is only tested on a BTCPay Server running on x86_64 architecture. So far it is tested extensively on Ubuntu 18.04 and Debian Buster. Unless it is overhauled and tested well on Raspberry Pi (and other architectures) it likely will not work.")]),e._v(" "),t("li",[e._v("Basic Linux command line knowledge: is assumed.")])]),e._v(" "),t("h3",{attrs:{id:"how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[e._v("#")]),e._v(" How will enabling ElectrumX Server affect an existing BTCPay implementation?:")]),e._v(" "),t("p",[e._v("Fundamentally, setting up ElectrumX in BTCPay server is simple, and will not affect the rest of your implementation. The only pre-requisites are as above. The "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX official docker release"),t("OutboundLink")],1),e._v(" is enabled in BTCPay by activating the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("additional fragment")]),e._v(" called "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[t("code",[e._v("opt-add-electumx")]),t("OutboundLink")],1),e._v(". This fragment will not only enable and start the ElectrumX server, it will also enable "),t("code",[e._v("txindex=1")]),e._v(" in your bitcoin full node. "),t("code",[e._v("txindex=1")]),e._v(" (Transaction Index=ON) is a bitcoin core feature required for ElectrumX to be able to serve your Electrum Wallet detailed transaction data for any transaction, directly from the blockchain, without getting it from any third party server.")],1),e._v(" "),t("p",[e._v("If you have been running your BTCPay Server for a while but haven't had "),t("code",[e._v("txindex=1")]),e._v(" set until now, then it might take a few hours to build the index, this is no issue and it should not involve downtime of more than a few hours - better to set this to run overnight though when nobody will be using your node. Note: If you want to rebuild the index from scratch, launch bitcoind once with the "),t("code",[e._v("reindex=1")]),e._v(" option (warning: this reindex option may take a VERY long time, and is not enabled out of the box as you likely dont need it, and hence is not in scope of this document).")]),e._v(" "),t("h3",{attrs:{id:"steps-to-enable-electrumx-server-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-enable-electrumx-server-in-btcpay"}},[e._v("#")]),e._v(" Steps to enable ElectrumX Server in BTCPay:")]),e._v(" "),t("p",[e._v("Here are all the steps to "),t("strong",[e._v("enable ElectrumX Server in your BTCPay node")]),e._v(' (read carefully as you may need to adjust for your specific setup, especially if you use other custom or conflicting "fragments" (pruning, less-memory etc. To reiterate, you should NOT proceed further here if you run a pruned BTCPay node.')]),e._v(" "),t("ol",[t("li",[t("p",[e._v("ElectrumX Server is accessible for Electrum Wallets via TCP port 50002. You need to open this port up fully at least to be available within your own network to any PC or Android device running Electrum Wallet, and turn on port forwarding (you can also port forward 50002 from your Internet/WAN, to enable other Electrum Wallet users from the Internet to query your server).")])]),e._v(" "),t("li",[t("p",[e._v("Enable the Docker Additional Fragment on your BTCPay node by running the following commands (this is assuming a brand new BTCPay installation with LND and ElectrumX, please tweak accordingly using the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("relevant documentation")]),e._v(":")],1)]),e._v(" "),t("li",[t("p",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#full-installation-for-technical-users",target:"_blank",rel:"noopener noreferrer"}},[e._v("normal setup and install of BTCPay Server"),t("OutboundLink")],1),e._v(", then after this command "),t("code",[e._v("cd btcpayserver-docker")]),e._v(", follow the below instructions instead of those in the link. If you already have a BTCPay Server running, then just follow from the next step.")])]),e._v(" "),t("li",[t("p",[e._v("Set your environment variables:")])])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"YOURHOST.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"lnd"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LIGHTNING_ALIAS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"MY_LN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"you@example.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-add-electrumx;opt-more-memory"')]),e._v("\n")])])]),t("p",[e._v("You can run all of that as one command after you tweak it to your needs. The main part for our purposes in this guide of course is "),t("code",[e._v('BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-add-electrumx"')]),e._v(". Note: "),t("code",[e._v("opt-more-memory")]),e._v(" can be removed if you like, but I really recommend it if your system has more than 1GB of RAM/memory that you can assign to BTCPay server, it will speed synching your node and the general performance of ElectrumX up drastically.")]),e._v(" "),t("ol",{attrs:{start:"5"}},[t("li",[t("p",[e._v("Set up or reconfigure BTCPay Server with ElectrumX:")]),e._v(" "),t("p",[t("code",[e._v("cd ~/BTCPayServer/btcpayserver-docker && . ./btcpay-setup.sh -i")])]),e._v(" "),t("p",[e._v('This will setup (or re-setup) your server with everything needed including ElectrumX, and it all should "just work". But, it will trigger at least a couple of hours of syncing the '),t("code",[e._v("txindex")]),e._v(", and if it is a new server, could be a couple of days depending on your hardware.")])]),e._v(" "),t("li",[t("p",[e._v("WAIT for your node to fully sync:\nYou can check the status of bitcoin core sync by going to your domain for BTCPay server, and it will show you on the front page. Or, you can check from the command line as well, using these commands:")]),e._v(" "),t("p",[t("code",[e._v("docker logs btcpayserver_bitcoind")]),e._v(" - this will show you the bitcoin core blockchain sync status (and ALL other info about your node, including any errors)")]),e._v(" "),t("p",[t("code",[e._v("docker logs generated_electrumx_1")]),e._v(" - this will show you the ElectrumX sync status. Note: ElectrumX will NOT start syncing until bitcoin full node has finished syncing, you will see errors until that is finished and these can be ignored.")])])]),e._v(" "),t("p",[e._v("Once all syncing for both bitcoin and ElectrumX has finished you can proceed to the next step. (Note: Electrum wallets will not connect to an Electrum server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[e._v("#")]),e._v(" Section 2.2 Connect your Electrum Wallet (Desktop or Android) to your ElectrumX Server")]),e._v(" "),t("h3",{attrs:{id:"connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[e._v("#")]),e._v(" Connect to ElectrumX from Electrum Wallet on your Mac/PC/Linux Machine:")]),e._v(" "),t("p",[e._v('Read all of this first before proceeding. You may wish to do just the "Protip" below instead of the manual steps in the Electrum Wallet GUI.')]),e._v(" "),t("p",[e._v("Open Electrum Wallet. When you click the traffic light at the bottom of your Electrum Wallet:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v("You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "),t("code",[e._v("Select Server Automatically")]),e._v(" already checked:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v("Now is the time to UNCHECK that "),t("code",[e._v("Select Server Automatically")]),e._v(" setting, which will enable you to enter the IP address or domain or hostname of your ElectrumX Server. In the case below, the ElectrumX server is on the local network at "),t("code",[e._v("192.168.1.3")]),e._v(" so we enter that manually (leave port as 50002) and press "),t("code",[e._v("close")]),e._v(".")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68496320-4e276580-0252-11ea-8caf-facc8a246d70.png",alt:"EnterElectrumXServerIP",title:"EnterElectrumXServerIP"}})]),e._v(" "),t("p",[e._v("If all of the above worked well, and your node is healthy, you will get a green traffic light down the bottom right of the wallet interface as pictured here - that means success!:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("h4",{attrs:{id:"protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[e._v("#")]),e._v(" Protip - optionally perform the above steps directly in Electrum Wallet config file before even opening the wallet GUI:")]),e._v(" "),t("p",[e._v("If you prefer to avoid connecting to other servers from the outset when you open Electrum Wallet, do the following before you open Electrum Wallet GUI.")]),e._v(" "),t("p",[e._v("In the Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is), open and edit the "),t("code",[e._v("config")]),e._v(" file like this:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"auto_connect": true,')]),e._v(" and switch it to: "),t("code",[e._v('"auto_connect": false,')]),e._v(" - this will prevent your Electrum Wallet from auto-connecting to other 3rd party Electrum Servers at launch time (to obtain block headers and transaction information).")])]),e._v(" "),t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"oneserver": false,')]),e._v(" and switch it to: "),t("code",[e._v('"oneserver": true,')]),e._v(" - ensures that all data is obtained from just one server.")])]),e._v(" "),t("li",[t("p",[e._v("Find or add line: "),t("code",[e._v('"server": "SOMEIPADDRESS:50002:s",')]),e._v("and switch it to your own ElectrumX Server's IP address, in the example above this would be: "),t("code",[e._v('"server": "192.168.1.3:50002:s",')]),e._v("- hard code your IP address as the default upon opening the Wallet.")])])]),e._v(" "),t("p",[e._v("These 3 steps optional but recommended for full privacy by locking down Electrum Wallet to one single connection with your private server ("),t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server#how-to",target:"_blank",rel:"noopener noreferrer"}},[e._v("Reference"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("h3",{attrs:{id:"reflection-on-what-has-been-achieved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#reflection-on-what-has-been-achieved"}},[e._v("#")]),e._v(" Reflection on what has been achieved:")]),e._v(" "),t("p",[e._v("You are now running your very "),t("strong",[e._v("own private ElectrumX Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your ElectrumX Server and the bitcoin blockchain, without going over any other 3rd party servers. You have attained full bitcoin transaction privacy (at least from the perspective of your blockchain queries and transactions, payment/receive addresses etc - nobody except you and the blockchain can see what you are doing).")]),e._v(" "),t("h3",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting:")]),e._v(" "),t("p",[e._v("So there is one thing you may encounter, where even after you did everything correctly, you still get a red traffic light (which means not connected to any server) in the steps above. Any other troubleshooting tips that people encounter can be added, I would suggest to make a PR to this document directly.")]),e._v(" "),t("ul",[t("li",[e._v("If you get a red traffic light, shutdown Electrum Wallet completely, then go to your Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is).")])]),e._v(" "),t("p",[e._v("Inside the Electrum Wallet folder (in this case below, it is what it looks like on a Mac) locate the "),t("code",[e._v("certs")]),e._v(" directory and delete the certificate for the server you are trying to connect to, in this case "),t("code",[e._v("192.168.1.3")]),e._v(", by dragging it to the Trash.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68497330-9a73a500-0254-11ea-9349-71bdb3bd9511.png",alt:"Certs",title:"Certs"}})]),e._v(" "),t("p",[e._v("Start up Electrum Wallet again, and connect to your ElectrumX server. If it is fully synched, it will now likely show a green traffic light, and you are good to go.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[144],{800:function(e,t,r){"use strict";r.r(t);var a=r(10),o=Object(a.a)({},(function(){var e=this,t=e._self._c;return t("ContentSlotsDistributor",{attrs:{"slot-key":e.$parent.slotKey}},[t("h1",{attrs:{id:"electrumx"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#electrumx"}},[e._v("#")]),e._v(" ElectrumX")]),e._v(" "),t("p",[e._v("This document explains how to "),t("strong",[e._v("connect Electrum Wallet to an ElectrumX Server")]),e._v(".")]),e._v(" "),t("p",[t("strong",[e._v("Note:")]),e._v(" the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker",target:"_blank",rel:"noopener noreferrer"}},[e._v("docker version of BTCPay Server"),t("OutboundLink")],1),e._v(" (since Nov 7th 2019, version 1.0.3.137) supports full integration with "),t("a",{attrs:{href:"https://electrumx.readthedocs.io/en/latest/features.html",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX"),t("OutboundLink")],1),e._v(" is the most widely implemented software used for Electrum public servers that your local Electrum wallet relies upon to get all the details of, or broadcast transactions to the bitcoin blockchain. Skip to Section 2 below, to read more on what this all means, and how to set it up on your BTCPay stack.")]),e._v(" "),t("h2",{attrs:{id:"how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-to-integrate-electrumx-into-your-btcpay-server-and-connect-your-electrum-wallet-to-it-for-your-complete-privacy"}},[e._v("#")]),e._v(" How to integrate ElectrumX into your BTCPay Server and connect your Electrum Wallet to it for your complete privacy")]),e._v(" "),t("h3",{attrs:{id:"only-available-in-btcpay-docker-version"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#only-available-in-btcpay-docker-version"}},[e._v("#")]),e._v(" (only available in BTCPay docker version)")]),e._v(" "),t("p",[e._v("Before we proceed, it is important to understand how your Electrum wallet on your PC/Mac functions so well/fast, without having its own bitcoin full node. In actual fact, Electrum Wallet relies on a community effort to maintain a bunch of servers all around the world with a bitcoin full node that do this job for you! They are called Electrum Servers, and you can be a part of that community to make that network even stronger, lets see how.")]),e._v(" "),t("p",[e._v("When you click the little traffic light at the bottom of your Electrum Wallet here:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v('You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "Select Server Automatically" already checked:')]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v('While using Electrum Wallet with "Select Server Automatically" on is the easiest, every transaction that you make/browse/broadcast in your Electrum Wallet will be done via someone else\'s server - this is a privacy risk, that will be mitigated by setting up and using your own ElectrumX Server.')]),e._v(" "),t("h2",{attrs:{id:"section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-21-enable-your-own-electrumx-server-fully-integrated-with-your-btcpay-servers-full-bitcoin-node"}},[e._v("#")]),e._v(" Section 2.1 Enable Your Own ElectrumX Server (fully integrated with your BTCPay Server's full bitcoin node)")]),e._v(" "),t("h3",{attrs:{id:"prerequisites-mandatory"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#prerequisites-mandatory"}},[e._v("#")]),e._v(" Prerequisites (mandatory):")]),e._v(" "),t("ol",[t("li",[e._v("Docker only: Only the "),t("RouterLink",{attrs:{to:"/Docker/"}},[e._v("Docker version of BTCPay Server")]),e._v(" is supported.")],1),e._v(" "),t("li",[e._v("Unpruned BTCPay node: Make sure your BTCPay implementation is NOT "),t("RouterLink",{attrs:{to:"/FAQ/Synchronization/#can-i-skip-the-synchronization"}},[e._v("pruned")]),e._v(" (i.e. you have synched and stored from genesis block. Check that you do NOT use the opt-save-storage "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("Environment Variable")]),e._v(")")],1),e._v(" "),t("li",[e._v("Drive space: At least 400GB of drive space on the device where your docker volumes are stored is required (as at the writing of this documentation on 9th Nov 2019, the total hard drive space used is 333GB - with full node and ElectrumX enabled - and of course this will grow further over time).")]),e._v(" "),t("li",[e._v("Additional Fragments: You are familiar with how to use BTCPay's "),t("RouterLink",{attrs:{to:"/Docker/#environment-variables"}},[e._v("Additional Fragment")]),e._v(" feature as part of your environment variable setup.")],1),e._v(" "),t("li",[e._v("Server architecture: The (official) "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX docker"),t("OutboundLink")],1),e._v(" used here is only tested on a BTCPay Server running on x86_64 architecture. So far it is tested extensively on Ubuntu 18.04 and Debian Buster. Unless it is overhauled and tested well on Raspberry Pi (and other architectures) it likely will not work.")]),e._v(" "),t("li",[e._v("Basic Linux command line knowledge: is assumed.")])]),e._v(" "),t("h3",{attrs:{id:"how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#how-will-enabling-electrumx-server-affect-an-existing-btcpay-implementation"}},[e._v("#")]),e._v(" How will enabling ElectrumX Server affect an existing BTCPay implementation?:")]),e._v(" "),t("p",[e._v("Fundamentally, setting up ElectrumX in BTCPay server is simple, and will not affect the rest of your implementation. The only pre-requisites are as above. The "),t("a",{attrs:{href:"https://github.com/lukechilds/docker-electrumx",target:"_blank",rel:"noopener noreferrer"}},[e._v("ElectrumX official docker release"),t("OutboundLink")],1),e._v(" is enabled in BTCPay by activating the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("additional fragment")]),e._v(" called "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker/blob/master/docker-compose-generator/docker-fragments/opt-add-electrumx.yml",target:"_blank",rel:"noopener noreferrer"}},[t("code",[e._v("opt-add-electumx")]),t("OutboundLink")],1),e._v(". This fragment will not only enable and start the ElectrumX server, it will also enable "),t("code",[e._v("txindex=1")]),e._v(" in your bitcoin full node. "),t("code",[e._v("txindex=1")]),e._v(" (Transaction Index=ON) is a bitcoin core feature required for ElectrumX to be able to serve your Electrum Wallet detailed transaction data for any transaction, directly from the blockchain, without getting it from any third party server.")],1),e._v(" "),t("p",[e._v("If you have been running your BTCPay Server for a while but haven't had "),t("code",[e._v("txindex=1")]),e._v(" set until now, then it might take a few hours to build the index, this is no issue and it should not involve downtime of more than a few hours - better to set this to run overnight though when nobody will be using your node. Note: If you want to rebuild the index from scratch, launch bitcoind once with the "),t("code",[e._v("reindex=1")]),e._v(" option (warning: this reindex option may take a VERY long time, and is not enabled out of the box as you likely dont need it, and hence is not in scope of this document).")]),e._v(" "),t("h3",{attrs:{id:"steps-to-enable-electrumx-server-in-btcpay"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#steps-to-enable-electrumx-server-in-btcpay"}},[e._v("#")]),e._v(" Steps to enable ElectrumX Server in BTCPay:")]),e._v(" "),t("p",[e._v("Here are all the steps to "),t("strong",[e._v("enable ElectrumX Server in your BTCPay node")]),e._v(' (read carefully as you may need to adjust for your specific setup, especially if you use other custom or conflicting "fragments" (pruning, less-memory etc. To reiterate, you should NOT proceed further here if you run a pruned BTCPay node.')]),e._v(" "),t("ol",[t("li",[t("p",[e._v("ElectrumX Server is accessible for Electrum Wallets via TCP port 50002. You need to open this port up fully at least to be available within your own network to any PC or Android device running Electrum Wallet, and turn on port forwarding (you can also port forward 50002 from your Internet/WAN, to enable other Electrum Wallet users from the Internet to query your server).")])]),e._v(" "),t("li",[t("p",[e._v("Enable the Docker Additional Fragment on your BTCPay node by running the following commands (this is assuming a brand new BTCPay installation with LND and ElectrumX, please tweak accordingly using the "),t("RouterLink",{attrs:{to:"/Docker/#generated-docker-compose"}},[e._v("relevant documentation")]),e._v(":")],1)]),e._v(" "),t("li",[t("p",[e._v("Follow the "),t("a",{attrs:{href:"https://github.com/btcpayserver/btcpayserver-docker#full-installation-for-technical-users",target:"_blank",rel:"noopener noreferrer"}},[e._v("normal setup and install of BTCPay Server"),t("OutboundLink")],1),e._v(", then after this command "),t("code",[e._v("cd btcpayserver-docker")]),e._v(", follow the below instructions instead of those in the link. If you already have a BTCPay Server running, then just follow from the next step.")])]),e._v(" "),t("li",[t("p",[e._v("Set your environment variables:")])])]),e._v(" "),t("div",{staticClass:"language-bash extra-class"},[t("pre",{pre:!0,attrs:{class:"language-bash"}},[t("code",[t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAY_HOST")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"YOURHOST.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("NBITCOIN_NETWORK")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"mainnet"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_CRYPTO1")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"btc"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_REVERSEPROXY")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"nginx"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_LIGHTNING")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"lnd"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LIGHTNING_ALIAS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"MY_LN"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("LETSENCRYPT_EMAIL")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"you@example.com"')]),e._v("\n"),t("span",{pre:!0,attrs:{class:"token builtin class-name"}},[e._v("export")]),e._v(" "),t("span",{pre:!0,attrs:{class:"token assign-left variable"}},[e._v("BTCPAYGEN_ADDITIONAL_FRAGMENTS")]),t("span",{pre:!0,attrs:{class:"token operator"}},[e._v("=")]),t("span",{pre:!0,attrs:{class:"token string"}},[e._v('"opt-add-electrumx;opt-more-memory"')]),e._v("\n")])])]),t("p",[e._v("You can run all of that as one command after you tweak it to your needs. The main part for our purposes in this guide of course is "),t("code",[e._v('BTCPAYGEN_ADDITIONAL_FRAGMENTS="opt-add-electrumx"')]),e._v(". Note: "),t("code",[e._v("opt-more-memory")]),e._v(" can be removed if you like, but I really recommend it if your system has more than 1GB of RAM/memory that you can assign to BTCPay server, it will speed synching your node and the general performance of ElectrumX up drastically.")]),e._v(" "),t("ol",{attrs:{start:"5"}},[t("li",[t("p",[e._v("Set up or reconfigure BTCPay Server with ElectrumX:")]),e._v(" "),t("p",[t("code",[e._v("cd ~/BTCPayServer/btcpayserver-docker && . ./btcpay-setup.sh -i")])]),e._v(" "),t("p",[e._v('This will setup (or re-setup) your server with everything needed including ElectrumX, and it all should "just work". But, it will trigger at least a couple of hours of syncing the '),t("code",[e._v("txindex")]),e._v(", and if it is a new server, could be a couple of days depending on your hardware.")])]),e._v(" "),t("li",[t("p",[e._v("WAIT for your node to fully sync:\nYou can check the status of bitcoin core sync by going to your domain for BTCPay server, and it will show you on the front page. Or, you can check from the command line as well, using these commands:")]),e._v(" "),t("p",[t("code",[e._v("docker logs btcpayserver_bitcoind")]),e._v(" - this will show you the bitcoin core blockchain sync status (and ALL other info about your node, including any errors)")]),e._v(" "),t("p",[t("code",[e._v("docker logs generated_electrumx_1")]),e._v(" - this will show you the ElectrumX sync status. Note: ElectrumX will NOT start syncing until bitcoin full node has finished syncing, you will see errors until that is finished and these can be ignored.")])])]),e._v(" "),t("p",[e._v("Once all syncing for both bitcoin and ElectrumX has finished you can proceed to the next step. (Note: Electrum wallets will not connect to an Electrum server that has not finished synching)")]),e._v(" "),t("h2",{attrs:{id:"section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#section-22-connect-your-electrum-wallet-desktop-or-android-to-your-electrumx-server"}},[e._v("#")]),e._v(" Section 2.2 Connect your Electrum Wallet (Desktop or Android) to your ElectrumX Server")]),e._v(" "),t("h3",{attrs:{id:"connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#connect-to-electrumx-from-electrum-wallet-on-your-macpclinux-machine"}},[e._v("#")]),e._v(" Connect to ElectrumX from Electrum Wallet on your Mac/PC/Linux Machine:")]),e._v(" "),t("p",[e._v('Read all of this first before proceeding. You may wish to do just the "Protip" below instead of the manual steps in the Electrum Wallet GUI.')]),e._v(" "),t("p",[e._v("Open Electrum Wallet. When you click the traffic light at the bottom of your Electrum Wallet:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("p",[e._v("You will see this screen with a list of all the available Electrum servers that your wallet can connect to, normally with "),t("code",[e._v("Select Server Automatically")]),e._v(" already checked:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437521-8a5eb580-01c1-11ea-9ece-0666353a6742.png",alt:"ElectrumWalletServerList",title:"ElectrumWalletServerList"}})]),e._v(" "),t("p",[e._v("Now is the time to UNCHECK that "),t("code",[e._v("Select Server Automatically")]),e._v(" setting, which will enable you to enter the IP address or domain or hostname of your ElectrumX Server. In the case below, the ElectrumX server is on the local network at "),t("code",[e._v("192.168.1.3")]),e._v(" so we enter that manually (leave port as 50002) and press "),t("code",[e._v("close")]),e._v(".")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68496320-4e276580-0252-11ea-8caf-facc8a246d70.png",alt:"EnterElectrumXServerIP",title:"EnterElectrumXServerIP"}})]),e._v(" "),t("p",[e._v("If all of the above worked well, and your node is healthy, you will get a green traffic light down the bottom right of the wallet interface as pictured here - that means success!:")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68437133-5636c500-01c0-11ea-822c-6e72bd6d60ea.png",alt:"ElectrumWalletMainScreenLight",title:"ElectrumWalletMainScreenLight"}})]),e._v(" "),t("h4",{attrs:{id:"protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#protip-optionally-perform-the-above-steps-directly-in-electrum-wallet-config-file-before-even-opening-the-wallet-gui"}},[e._v("#")]),e._v(" Protip - optionally perform the above steps directly in Electrum Wallet config file before even opening the wallet GUI:")]),e._v(" "),t("p",[e._v("If you prefer to avoid connecting to other servers from the outset when you open Electrum Wallet, do the following before you open Electrum Wallet GUI.")]),e._v(" "),t("p",[e._v("In the Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is), open and edit the "),t("code",[e._v("config")]),e._v(" file like this:")]),e._v(" "),t("ol",[t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"auto_connect": true,')]),e._v(" and switch it to: "),t("code",[e._v('"auto_connect": false,')]),e._v(" - this will prevent your Electrum Wallet from auto-connecting to other 3rd party Electrum Servers at launch time (to obtain block headers and transaction information).")])]),e._v(" "),t("li",[t("p",[e._v("Find line: "),t("code",[e._v('"oneserver": false,')]),e._v(" and switch it to: "),t("code",[e._v('"oneserver": true,')]),e._v(" - ensures that all data is obtained from just one server.")])]),e._v(" "),t("li",[t("p",[e._v("Find or add line: "),t("code",[e._v('"server": "SOMEIPADDRESS:50002:s",')]),e._v("and switch it to your own ElectrumX Server's IP address, in the example above this would be: "),t("code",[e._v('"server": "192.168.1.3:50002:s",')]),e._v("- hard code your IP address as the default upon opening the Wallet.")])])]),e._v(" "),t("p",[e._v("These 3 steps optional but recommended for full privacy by locking down Electrum Wallet to one single connection with your private server ("),t("a",{attrs:{href:"https://github.com/chris-belcher/electrum-personal-server#how-to",target:"_blank",rel:"noopener noreferrer"}},[e._v("Reference"),t("OutboundLink")],1),e._v(").")]),e._v(" "),t("h3",{attrs:{id:"reflection-on-what-has-been-achieved"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#reflection-on-what-has-been-achieved"}},[e._v("#")]),e._v(" Reflection on what has been achieved:")]),e._v(" "),t("p",[e._v("You are now running your very "),t("strong",[e._v("own private ElectrumX Server")]),e._v(". All Electrum Wallet related data transfer happens directly between your ElectrumX Server and the bitcoin blockchain, without going over any other 3rd party servers. You have attained full bitcoin transaction privacy (at least from the perspective of your blockchain queries and transactions, payment/receive addresses etc - nobody except you and the blockchain can see what you are doing).")]),e._v(" "),t("h3",{attrs:{id:"troubleshooting"}},[t("a",{staticClass:"header-anchor",attrs:{href:"#troubleshooting"}},[e._v("#")]),e._v(" Troubleshooting:")]),e._v(" "),t("p",[e._v("So there is one thing you may encounter, where even after you did everything correctly, you still get a red traffic light (which means not connected to any server) in the steps above. Any other troubleshooting tips that people encounter can be added, I would suggest to make a PR to this document directly.")]),e._v(" "),t("ul",[t("li",[e._v("If you get a red traffic light, shutdown Electrum Wallet completely, then go to your Electrum Wallet folder ("),t("a",{attrs:{href:"https://electrum.readthedocs.io/en/latest/faq.html#where-is-my-wallet-file-located",target:"_blank",rel:"noopener noreferrer"}},[e._v("see here"),t("OutboundLink")],1),e._v(" if you don't know where that is).")])]),e._v(" "),t("p",[e._v("Inside the Electrum Wallet folder (in this case below, it is what it looks like on a Mac) locate the "),t("code",[e._v("certs")]),e._v(" directory and delete the certificate for the server you are trying to connect to, in this case "),t("code",[e._v("192.168.1.3")]),e._v(", by dragging it to the Trash.")]),e._v(" "),t("figure",[t("img",{attrs:{src:"https://user-images.githubusercontent.com/1388507/68497330-9a73a500-0254-11ea-9349-71bdb3bd9511.png",alt:"Certs",title:"Certs"}})]),e._v(" "),t("p",[e._v("Start up Electrum Wallet again, and connect to your ElectrumX server. If it is fully synched, it will now likely show a green traffic light, and you are good to go.")])])}),[],!1,null,null,null);t.default=o.exports}}]); \ No newline at end of file diff --git a/assets/js/145.0ea355f6.js b/assets/js/145.a69ed524.js similarity index 99% rename from assets/js/145.0ea355f6.js rename to assets/js/145.a69ed524.js index 026c005c54..c1d6d46419 100644 --- a/assets/js/145.0ea355f6.js +++ b/assets/js/145.a69ed524.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[145],{800:function(t,a,e){"use strict";e.r(a);var o=e(10),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],{798:function(t,a,e){"use strict";e.r(a);var o=e(10),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.be7fd625.js b/assets/js/146.cc61c537.js similarity index 99% rename from assets/js/146.be7fd625.js rename to assets/js/146.cc61c537.js index 214bc9b99f..5ae4657662 100644 --- a/assets/js/146.be7fd625.js +++ b/assets/js/146.cc61c537.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[146],{806:function(t,e,o){"use strict";o.r(e);var a=o(10),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],{805:function(t,e,o){"use strict";o.r(e);var a=o(10),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/15.d389c326.js b/assets/js/15.4da95642.js similarity index 80% rename from assets/js/15.d389c326.js rename to assets/js/15.4da95642.js index 464f5f629d..5f1fb487a7 100644 --- a/assets/js/15.d389c326.js +++ b/assets/js/15.4da95642.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{540:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify1.ec985913.png"},541:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify2.fef21751.png"},542:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify3.14ff79a8.png"},543:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify4.4f0a10ba.png"},544:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify5.9c789888.png"},545:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify6.b3df5c96.png"},546:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify7.74cbdef7.png"},547:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify8.03fc6a31.png"},548:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify9.c5dd42ec.png"},549:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify10.d1cd1d3e.png"},550:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify11.e0bbe9e5.png"},551:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify12.1818b41d.png"},552:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify13.d0551bae.png"},553:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify14.eb96845f.png"},554:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify14-2.a9094415.png"},555:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify15.dac5277c.png"},556:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify16.dca8f695.png"},557:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify17.fa8dddec.png"},558:function(e,t,s){e.exports=s.p+"assets/img/btcpayshopify18.102dac6f.png"},841:function(e,t,s){"use strict";s.r(t);var o=s(10),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 760dbce9c4..946faaaaf0 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1 +1 @@ -https://docs.btcpayserver.org/AdvancedForms/dailyhttps://docs.btcpayserver.org/BTCPayServer/LocalDevSetup/dailyhttps://docs.btcpayserver.org/BTCPayServer/Security/dailyhttps://docs.btcpayserver.org/Apps/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/Configurator/dailyhttps://docs.btcpayserver.org/ConnectWallet/dailyhttps://docs.btcpayserver.org/Contribute/Design/dailyhttps://docs.btcpayserver.org/Contribute/Dev/dailyhttps://docs.btcpayserver.org/Contribute/DevCode/dailyhttps://docs.btcpayserver.org/Conference-PoS-guide/dailyhttps://docs.btcpayserver.org/Contribute/DevTest/dailyhttps://docs.btcpayserver.org/Contribute/Misc/dailyhttps://docs.btcpayserver.org/Contribute/dailyhttps://docs.btcpayserver.org/Contribute/Write/dailyhttps://docs.btcpayserver.org/Contribute/Translate/dailyhttps://docs.btcpayserver.org/Contribute/WriteBlog/dailyhttps://docs.btcpayserver.org/Contribute/WriteDocs/dailyhttps://docs.btcpayserver.org/Contribute/WriteSoftware/dailyhttps://docs.btcpayserver.org/CreateWallet/dailyhttps://docs.btcpayserver.org/CustomIntegration/dailyhttps://docs.btcpayserver.org/CreateStore/dailyhttps://docs.btcpayserver.org/Dashboard/dailyhttps://docs.btcpayserver.org/Deployment/Azure/dailyhttps://docs.btcpayserver.org/Deployment/Clovyr/dailyhttps://docs.btcpayserver.org/Deployment/AzurePennyPinching/dailyhttps://docs.btcpayserver.org/Deployment/DynamicDNS/dailyhttps://docs.btcpayserver.org/Deployment/GoogleCloud/dailyhttps://docs.btcpayserver.org/Deployment/Hack0/dailyhttps://docs.btcpayserver.org/Deployment/Hardware/dailyhttps://docs.btcpayserver.org/Deployment/LightningInABox/dailyhttps://docs.btcpayserver.org/Deployment/HardwareAsAService/dailyhttps://docs.btcpayserver.org/Deployment/LunaNode/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeployment/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeploymentExtended/dailyhttps://docs.btcpayserver.org/Deployment/RaspberryPi4/dailyhttps://docs.btcpayserver.org/Deployment/ReverseProxyToTor/dailyhttps://docs.btcpayserver.org/Deployment/dailyhttps://docs.btcpayserver.org/Deployment/ReverseSSHtunnel/dailyhttps://docs.btcpayserver.org/Deployment/ThirdPartyHosting/dailyhttps://docs.btcpayserver.org/Deployment/voltagecloud/dailyhttps://docs.btcpayserver.org/Deployment/webdeployment/dailyhttps://docs.btcpayserver.org/Development/Altcoins/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample-NodeJS/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample/dailyhttps://docs.btcpayserver.org/Development/GreenfieldExample-PHP/dailyhttps://docs.btcpayserver.org/Development/InvoiceMetadata/dailyhttps://docs.btcpayserver.org/Development/LocalDev/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/chatwoot/dailyhttps://docs.btcpayserver.org/Docker/backup-restore/dailyhttps://docs.btcpayserver.org/Docker/cloudflare-tunnel/dailyhttps://docs.btcpayserver.org/Docker/fastsync/dailyhttps://docs.btcpayserver.org/Docker/fireflyiii/dailyhttps://docs.btcpayserver.org/Docker/lightning-terminal/dailyhttps://docs.btcpayserver.org/Docker/joinmarket/dailyhttps://docs.btcpayserver.org/Docker/ndlc/dailyhttps://docs.btcpayserver.org/Docker/pihole/dailyhttps://docs.btcpayserver.org/Docker/tallycoin-connect/dailyhttps://docs.btcpayserver.org/Drupal/dailyhttps://docs.btcpayserver.org/ElectrumPersonalServer/dailyhttps://docs.btcpayserver.org/DynamicReports/dailyhttps://docs.btcpayserver.org/ElectrumWallet/dailyhttps://docs.btcpayserver.org/ElectrumX/dailyhttps://docs.btcpayserver.org/FAQ/Altcoin/dailyhttps://docs.btcpayserver.org/FAQ/Apps/dailyhttps://docs.btcpayserver.org/FAQ/Deployment/dailyhttps://docs.btcpayserver.org/FAQ/General/dailyhttps://docs.btcpayserver.org/FAQ/Integrations/dailyhttps://docs.btcpayserver.org/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/HardwareWalletIntegration/dailyhttps://docs.btcpayserver.org/Guide/dailyhttps://docs.btcpayserver.org/InvoiceNinja/dailyhttps://docs.btcpayserver.org/Invoices/dailyhttps://docs.btcpayserver.org/LedgerWallet/dailyhttps://docs.btcpayserver.org/LNDhubAPI/dailyhttps://docs.btcpayserver.org/LightningNetwork_PaymentChannels/dailyhttps://docs.btcpayserver.org/LightningNetwork/dailyhttps://docs.btcpayserver.org/Magento/dailyhttps://docs.btcpayserver.org/NBXplorer/API/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Schema/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Migration/dailyhttps://docs.btcpayserver.org/NBXplorer/dailyhttps://docs.btcpayserver.org/Nostr/dailyhttps://docs.btcpayserver.org/Nopcommerce/dailyhttps://docs.btcpayserver.org/Notifications/dailyhttps://docs.btcpayserver.org/Odoo/dailyhttps://docs.btcpayserver.org/OpenCart/dailyhttps://docs.btcpayserver.org/Payouts/dailyhttps://docs.btcpayserver.org/PodServer/dailyhttps://docs.btcpayserver.org/PaymentRequests/dailyhttps://docs.btcpayserver.org/PrestaShop/dailyhttps://docs.btcpayserver.org/PullPayments/dailyhttps://docs.btcpayserver.org/Refund/dailyhttps://docs.btcpayserver.org/Payroll/dailyhttps://docs.btcpayserver.org/Reporting/dailyhttps://docs.btcpayserver.org/RegisterAccount/dailyhttps://docs.btcpayserver.org/dailyhttps://docs.btcpayserver.org/Shopify/dailyhttps://docs.btcpayserver.org/Shopware/dailyhttps://docs.btcpayserver.org/Sign-PSBT-with-sparrow-wallet/dailyhttps://docs.btcpayserver.org/SideShift/dailyhttps://docs.btcpayserver.org/Smartstore/dailyhttps://docs.btcpayserver.org/Support/dailyhttps://docs.btcpayserver.org/TicketTailor/dailyhttps://docs.btcpayserver.org/Translations/dailyhttps://docs.btcpayserver.org/Transmuter/DCA/dailyhttps://docs.btcpayserver.org/Transmuter/EmailReceiptsPreset/dailyhttps://docs.btcpayserver.org/Transmuter/dailyhttps://docs.btcpayserver.org/Trocador/dailyhttps://docs.btcpayserver.org/Troubleshooting/dailyhttps://docs.btcpayserver.org/Vault/HowToVerify/dailyhttps://docs.btcpayserver.org/Vault/dailyhttps://docs.btcpayserver.org/TryItOut/dailyhttps://docs.btcpayserver.org/Wabisabi/dailyhttps://docs.btcpayserver.org/UseCase/dailyhttps://docs.btcpayserver.org/VirtueMart/dailyhttps://docs.btcpayserver.org/Walkthrough/dailyhttps://docs.btcpayserver.org/WalletSetup/dailyhttps://docs.btcpayserver.org/Wallet/dailyhttps://docs.btcpayserver.org/WasabiWallet/dailyhttps://docs.btcpayserver.org/Wix/dailyhttps://docs.btcpayserver.org/WhatsNext/dailyhttps://docs.btcpayserver.org/WooCommerce/dailyhttps://docs.btcpayserver.org/Xenforo/dailyhttps://docs.btcpayserver.org/Zapier/dailyhttps://docs.btcpayserver.org/Payjoin/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/ColdCardWallet/dailyhttps://docs.btcpayserver.org/Bringin/dailyhttps://docs.btcpayserver.org/Community/dailyhttps://docs.btcpayserver.org/Conference-PoS-guide/dailyhttps://docs.btcpayserver.org/Configurator/dailyhttps://docs.btcpayserver.org/ConnectWallet/dailyhttps://docs.btcpayserver.org/Contribute/Design/dailyhttps://docs.btcpayserver.org/Contribute/Dev/dailyhttps://docs.btcpayserver.org/Contribute/DevCode/dailyhttps://docs.btcpayserver.org/Contribute/DevTest/dailyhttps://docs.btcpayserver.org/Contribute/Misc/dailyhttps://docs.btcpayserver.org/Contribute/dailyhttps://docs.btcpayserver.org/Contribute/Translate/dailyhttps://docs.btcpayserver.org/Contribute/Write/dailyhttps://docs.btcpayserver.org/Contribute/WriteBlog/dailyhttps://docs.btcpayserver.org/Contribute/WriteDocs/dailyhttps://docs.btcpayserver.org/CreateStore/dailyhttps://docs.btcpayserver.org/Contribute/WriteSoftware/dailyhttps://docs.btcpayserver.org/CreateWallet/dailyhttps://docs.btcpayserver.org/CustomIntegration/dailyhttps://docs.btcpayserver.org/Dashboard/dailyhttps://docs.btcpayserver.org/Deployment/Azure/dailyhttps://docs.btcpayserver.org/Deployment/AzurePennyPinching/dailyhttps://docs.btcpayserver.org/Deployment/DynamicDNS/dailyhttps://docs.btcpayserver.org/Deployment/Clovyr/dailyhttps://docs.btcpayserver.org/Deployment/Hack0/dailyhttps://docs.btcpayserver.org/Deployment/GoogleCloud/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/dailyhttps://docs.btcpayserver.org/Deployment/ManualDeploymentExtended/dailyhttps://docs.btcpayserver.org/Deployment/RaspberryPi4/dailyhttps://docs.btcpayserver.org/Deployment/ReverseSSHtunnel/dailyhttps://docs.btcpayserver.org/Deployment/ThirdPartyHosting/dailyhttps://docs.btcpayserver.org/Deployment/ReverseProxyToTor/dailyhttps://docs.btcpayserver.org/Deployment/voltagecloud/dailyhttps://docs.btcpayserver.org/Deployment/webdeployment/dailyhttps://docs.btcpayserver.org/Development/Altcoins/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample-NodeJS/dailyhttps://docs.btcpayserver.org/Development/GreenFieldExample/dailyhttps://docs.btcpayserver.org/Development/GreenfieldExample-PHP/dailyhttps://docs.btcpayserver.org/Development/LocalDev/dailyhttps://docs.btcpayserver.org/Development/LocalDevelopment/dailyhttps://docs.btcpayserver.org/Development/Plugins/dailyhttps://docs.btcpayserver.org/Development/InvoiceMetadata/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/chatwoot/dailyhttps://docs.btcpayserver.org/Docker/cloudflare-tunnel/dailyhttps://docs.btcpayserver.org/Docker/fireflyiii/dailyhttps://docs.btcpayserver.org/Docker/fastsync/dailyhttps://docs.btcpayserver.org/Docker/lightning-terminal/dailyhttps://docs.btcpayserver.org/Docker/joinmarket/dailyhttps://docs.btcpayserver.org/Docker/ndlc/dailyhttps://docs.btcpayserver.org/Docker/pihole/dailyhttps://docs.btcpayserver.org/Docker/tallycoin-connect/dailyhttps://docs.btcpayserver.org/DynamicReports/dailyhttps://docs.btcpayserver.org/Drupal/dailyhttps://docs.btcpayserver.org/ElectrumPersonalServer/dailyhttps://docs.btcpayserver.org/FAQ/Altcoin/dailyhttps://docs.btcpayserver.org/ElectrumWallet/dailyhttps://docs.btcpayserver.org/ElectrumX/dailyhttps://docs.btcpayserver.org/FAQ/Apps/dailyhttps://docs.btcpayserver.org/FAQ/Deployment/dailyhttps://docs.btcpayserver.org/FAQ/General/dailyhttps://docs.btcpayserver.org/FAQ/Integrations/dailyhttps://docs.btcpayserver.org/FAQ/dailyhttps://docs.btcpayserver.org/FAQ/LightningNetwork/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_PaymentChannels/dailyhttps://docs.btcpayserver.org/LightningNetwork/dailyhttps://docs.btcpayserver.org/NBXplorer/API/dailyhttps://docs.btcpayserver.org/Magento/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Migration/dailyhttps://docs.btcpayserver.org/NBXplorer/dailyhttps://docs.btcpayserver.org/Nopcommerce/dailyhttps://docs.btcpayserver.org/NBXplorer/Postgres-Schema/dailyhttps://docs.btcpayserver.org/Notifications/dailyhttps://docs.btcpayserver.org/Nostr/dailyhttps://docs.btcpayserver.org/Payjoin/dailyhttps://docs.btcpayserver.org/Payouts/dailyhttps://docs.btcpayserver.org/Odoo/dailyhttps://docs.btcpayserver.org/PaymentRequests/dailyhttps://docs.btcpayserver.org/PodServer/dailyhttps://docs.btcpayserver.org/PullPayments/dailyhttps://docs.btcpayserver.org/Payroll/dailyhttps://docs.btcpayserver.org/dailyhttps://docs.btcpayserver.org/PrestaShop/dailyhttps://docs.btcpayserver.org/Refund/dailyhttps://docs.btcpayserver.org/RegisterAccount/dailyhttps://docs.btcpayserver.org/Reporting/dailyhttps://docs.btcpayserver.org/Shopify/dailyhttps://docs.btcpayserver.org/SideShift/dailyhttps://docs.btcpayserver.org/Shopware/dailyhttps://docs.btcpayserver.org/Sign-PSBT-with-sparrow-wallet/dailyhttps://docs.btcpayserver.org/Smartstore/dailyhttps://docs.btcpayserver.org/Support/dailyhttps://docs.btcpayserver.org/TicketTailor/dailyhttps://docs.btcpayserver.org/Transmuter/DCA/dailyhttps://docs.btcpayserver.org/Translations/dailyhttps://docs.btcpayserver.org/Transmuter/EmailReceiptsPreset/dailyhttps://docs.btcpayserver.org/Transmuter/dailyhttps://docs.btcpayserver.org/Trocador/dailyhttps://docs.btcpayserver.org/TryItOut/dailyhttps://docs.btcpayserver.org/UseCase/dailyhttps://docs.btcpayserver.org/Troubleshooting/dailyhttps://docs.btcpayserver.org/Vault/dailyhttps://docs.btcpayserver.org/Vault/HowToVerify/dailyhttps://docs.btcpayserver.org/Wabisabi/dailyhttps://docs.btcpayserver.org/VirtueMart/dailyhttps://docs.btcpayserver.org/Walkthrough/dailyhttps://docs.btcpayserver.org/Wallet/dailyhttps://docs.btcpayserver.org/WalletSetup/dailyhttps://docs.btcpayserver.org/Wix/dailyhttps://docs.btcpayserver.org/WhatsNext/dailyhttps://docs.btcpayserver.org/Xenforo/dailyhttps://docs.btcpayserver.org/WooCommerce/dailyhttps://docs.btcpayserver.org/WasabiWallet/dailyhttps://docs.btcpayserver.org/Zapier/dailyhttps://docs.btcpayserver.org/OpenCart/daily \ No newline at end of file