Browse Source

LND Seed Backup (#234)

* Preparing for testing of LND Seed Backup

* Adding variable with path to walletunlock file

* Recreating Bitcoin LND container

* Bumping btcpayserver reference to next version 1.0.3.138

* Fixing text per suggestion
dcg-latest
Rockstar Developer 5 years ago
committed by Nicolas Dorier
parent
commit
f608a237bd
  1. 26
      Tools/recreate_bitcoin_lnd.sh
  2. 4
      docker-compose-generator/docker-fragments/bitcoin-lnd.yml
  3. 2
      docker-compose-generator/docker-fragments/btcpayserver.yml
  4. 4
      docker-compose-generator/docker-fragments/litecoin-lnd.yml

26
Tools/recreate_bitcoin_lnd.sh

@ -0,0 +1,26 @@
#!/bin/bash
set -e
read -p "This script will delete and recreate your LND Bitcoin container. YOU CAN'T UNDO THIS OPERATION, ALL FUNDS THAT YOU CURRENTLY HAVE ON THIS LND WILL BE LOST! Type 'yes' to proceed only after you've transfered all your funds from this LND instance `echo $'\n> '`" yn
if [ $yn != "yes" ]; then
exit 0
fi
read -p "Only proceed if you've removed all the funds from LND Bitcoin container! This LND instance will be completely deleted and all data from it unrecoverable. Type 'yes' to proceed only if you are 100% sure `echo $'\n> '`" yn
if [ $yn != "yes" ]; then
exit 0
fi
read -p "OK, last chance to abort. Type 'yes' to continue! `echo $'\n> '`" yn
if [ $yn != "yes" ]; then
exit 0
fi
../btcpay-down.sh
docker volume rm --force generated_lnd_bitcoin_datadir
../btcpay-up.sh
echo "LND container recreated"

4
docker-compose-generator/docker-fragments/bitcoin-lnd.yml

@ -2,7 +2,7 @@ version: "3"
services:
lnd_bitcoin:
image: btcpayserver/lnd:v0.7.1-beta
image: btcpayserver/lnd:v0.7.1-beta-withseed
container_name: btcpayserver_lnd_bitcoin
restart: unless-stopped
environment:
@ -25,7 +25,6 @@ services:
adminmacaroonpath=/data/admin.macaroon
invoicemacaroonpath=/data/invoice.macaroon
readonlymacaroonpath=/data/readonly.macaroon
noseedbackup=1
notls=1
ports:
- "9735:9735"
@ -64,6 +63,7 @@ services:
BTCPAY_BTCEXTERNALRTL: "server=/rtl/api/authenticate/cookie;cookiefile=/etc/lnd_bitcoin_rtl/.cookie"
BTCPAY_BTCEXTERNALLNDGRPC: "server=/;macaroonfilepath=/etc/lnd_bitcoin/admin.macaroon;macaroondirectorypath=/etc/lnd_bitcoin"
BTCPAY_BTCEXTERNALLNDREST: "server=/lnd-rest/btc/;macaroonfilepath=/etc/lnd_bitcoin/admin.macaroon;macaroondirectorypath=/etc/lnd_bitcoin"
BTCPAY_BTCEXTERNALLNDSEEDBACKUP: "/etc/lnd_bitcoin/data/chain/bitcoin/${NBITCOIN_NETWORK:-regtest}/walletunlock.json"
volumes:
- "lnd_bitcoin_datadir:/etc/lnd_bitcoin"
- "lnd_bitcoin_rtl_datadir:/etc/lnd_bitcoin_rtl"

2
docker-compose-generator/docker-fragments/btcpayserver.yml

@ -4,7 +4,7 @@ services:
btcpayserver:
restart: unless-stopped
image: ${BTCPAY_IMAGE:-btcpayserver/btcpayserver:1.0.3.137}
image: ${BTCPAY_IMAGE:-btcpayserver/btcpayserver:1.0.3.138}
expose:
- "49392"
environment:

4
docker-compose-generator/docker-fragments/litecoin-lnd.yml

@ -2,7 +2,7 @@ version: "3"
services:
lnd_litecoin:
image: btcpayserver/lnd:v0.7.1-beta
image: btcpayserver/lnd:v0.7.1-beta-withseed
container_name: btcpayserver_lnd_litecoin
restart: unless-stopped
environment:
@ -23,7 +23,6 @@ services:
adminmacaroonpath=/data/admin.macaroon
invoicemacaroonpath=/data/invoice.macaroon
readonlymacaroonpath=/data/readonly.macaroon
noseedbackup=1
notls=1
ports:
- "9736:9736"
@ -40,6 +39,7 @@ services:
btcpayserver:
environment:
BTCPAY_LTCLIGHTNING: "type=lnd-rest;server=http://lnd_litecoin:8080/;macaroonfilepath=/etc/lnd_litecoin/admin.macaroon;allowinsecure=true"
BTCPAY_LTCEXTERNALLNDSEEDBACKUP: "/etc/lnd_litecoin/data/chain/litecoin/${NBITCOIN_NETWORK:-regtest}/walletunlock.json"
volumes:
- "lnd_litecoin_datadir:/etc/lnd_litecoin"
links:

Loading…
Cancel
Save