diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..a765d82 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,42 @@ +--- +name: Bug report +about: Create a report to help us improve +title: +labels: +assignees: +--- + + + + +**Describe the bug** + + + +**To Reproduce** + + + +**Expected behavior** + + + +**Screenshots** + + + +**DAppNode version:** + + + +- Package version: +- OS: +- Browser + +**Additional context** + + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..11bbebf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,26 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: "" +labels: "" +assignees: "" +--- + + + + +**Is your feature request related to a problem? Please describe.** + + + +**Describe the solution you'd like** + + + +**Describe alternatives you've considered** + + + +**Additional context** + + diff --git a/.github/workflows/CODEOWNERS b/.github/workflows/CODEOWNERS new file mode 100644 index 0000000..3d8973b --- /dev/null +++ b/.github/workflows/CODEOWNERS @@ -0,0 +1,7 @@ +# These owners will be the default owners for everything in the repo. Unless a later match takes precedence, +# They will be requested for review when someone opens a pull request. +* @dapplion @eduadiez @pablomendezroyo + +# Order is important; the last matching pattern takes the most precedence. When someone opens a pull request that only +# modifies md files, only md owners and not the global owner(s) will be requested for a review. +*.md @Pol-Lanski @dapplion @eduadiez @pablomendezroyo \ No newline at end of file diff --git a/.gitignore b/.gitignore index cc73833..874d8d1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.tar.xz -build_* \ No newline at end of file +build_* +build \ No newline at end of file diff --git a/README.md b/README.md index e086964..4631391 100644 --- a/README.md +++ b/README.md @@ -18,74 +18,22 @@ For many reasons we don't save any seed to restore the wallet, and having an up # Backup LND data LND data is stored permanently in a docker volume, but it is recommended to save it apart in case of an update or migration. -Follow this steps: -``` -docker run --rm --volumes-from DAppNodePackage-lightning-network.dnp.dappnode.eth -v $(pwd):/backup alpine tar cvzf /backup/backup_lnd.tar.gz /root/.lnd -``` -A file named `backup_lnd.tar.gz` will be created in your current path. - -To restore it, proceed as follows: -``` -docker run --rm --volumes-from DAppNodePackage-lightning-network.dnp.dappnode.eth -v $(pwd):/backup alpine sh -c "cd /root/.lnd && tar xvzf /backup/backup_lnd.tar.gz --strip 2" - -``` -then restart the package from the admin interface. - - -# Prerequisites - -- git - - Install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) commandline tool. - -- docker - - Install [docker](https://docs.docker.com/engine/installation). The community edition (docker-ce) will work. In Linux make sure you grant permissions to the current user to use docker by adding current user to docker group, `sudo usermod -aG docker $USER`. Once you update the users group, exit from the current terminal and open a new one to make effect. - -- docker-compose - - Install [docker-compose](https://docs.docker.com/compose/install) - -**Note**: Make sure you can run `git`, `docker ps`, `docker-compose` without any issue and without sudo command. - - -## Building - -`docker-compose build` - -## Running - -### Start - -`docker-compose up -d` - -### View logs - -`docker-compose logs -f` - -### Stop +When you enter the LN package (under Packages/ My Packages) you will see a Backup tab -`docker-compose down` +
-## Environment variables +Hit the "Backup now" button and select where do you want to keep your backup file safe. A tar.xz file will be downloaded to the selected path. -You can edit the `docker-compose.yml` and add extra options, such a: +# Restore LND data -| name | default | -| ---- | ------- | -| RPCUSER | dappnode | -| RPCPASS | dappnode | -| BITCOIND_HOST | my.bitcoin.dnp.dappnode.eth | -| NETWORK | mainnet | -| ALIAS | | -| COLOR | | -| EXT_IP | | +If anything happens with your LN node and you have your backup you can always restore it from the ADMIN UI. Just go to Packages / My Packages and select the LN package and the backup tab. Aside the backup button you will see a "Restore" button. -## License +Just hit that sweet restore button, select your tar.xz backup file and confirm. -This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details + +After the backup file is uploaded your LN node is restored. # Using the LN package @@ -97,7 +45,7 @@ This project is licensed under the GNU General Public License v3.0 - see the [LI * You need to have the Bitcoin node package (without pruning) installed and fully synced for the package to work properly. You don't need to wait for the Bitcoin Core node to be fully synced to install the LN package, but it won't be functional until the node is synced. -* The private keys of your LN wallet are stored in your LN node data volume. **Please follow the guide about backups below in this document to prevent loss of funds. We don't offer a seed backup mechanism so this is the only way to recover your funds in case something goes wrong**. +* The private keys of your LN wallet are stored in your LN node data volume. **Please follow the guide about backups in this document to prevent loss of funds. We don't offer a seed backup mechanism so this is the only way to recover your funds in case something goes wrong**. * When installing LN in DAppNode there will be two sets of username/password: * One to connect to the Bitcoin node, RPCUSER and RPCPASS (make sure they are the same as the Bitcoin package) and @@ -106,7 +54,7 @@ This project is licensed under the GNU General Public License v3.0 - see the [LI * You can connect your favourite LN mobile wallet by opening a private channel with your node. -* When updating this package, volumes will not be affected. You can access an updated version of your LN node witbout risk of losing any funds. Do not remove the volume though, or you will lose the funds on your node if you have not followed ths instructions for backup. +* When updating this package, volumes will not be affected. You can access an updated version of your LN node witbout risk of losing any funds. Do not remove the volume though, or you will lose the funds on your node if you have not followed the backup instructions. ## Accessing the ADMIN UI @@ -118,7 +66,7 @@ Usually Lightning Network applications require files called *macaroons* for auth To download the admin macaroon, you should go to the Admin panel of DAppnode: -Packages -> lightning-network -> File manager +Packages -> My packages -> Lightning-Network -> File manager Then input in the "Download from DNP" field: @@ -149,5 +97,56 @@ Joule is an extension available for many browsers which lets you use your node t +# Prerequisites + +- git + + Install [git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) commandline tool. + +- docker + + Install [docker](https://docs.docker.com/engine/installation). The community edition (docker-ce) will work. In Linux make sure you grant permissions to the current user to use docker by adding current user to docker group, `sudo usermod -aG docker $USER`. Once you update the users group, exit from the current terminal and open a new one to make effect. + +- docker-compose + + Install [docker-compose](https://docs.docker.com/compose/install) + +**Note**: Make sure you can run `git`, `docker ps`, `docker-compose` without any issue and without sudo command. + + +## Building + +`docker-compose build` + +## Running + +### Start + +`docker-compose up -d` + +### View logs + +`docker-compose logs -f` + +### Stop + +`docker-compose down` + +## Environment variables + +You can edit the `docker-compose.yml` and add extra options, such a: + +| name | default | +| ---- | ------- | +| RPCUSER | dappnode | +| RPCPASS | dappnode | +| BITCOIND_HOST | my.bitcoin.dnp.dappnode.eth | +| NETWORK | mainnet | +| ALIAS | | +| COLOR | | +| EXT_IP | | +## License + +This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details diff --git a/avatar-lightning-network.png b/avatar-lightning-network.png new file mode 100644 index 0000000..a277ca3 Binary files /dev/null and b/avatar-lightning-network.png differ diff --git a/build/src/scripts/start-rtl.sh b/build/src/scripts/start-rtl.sh deleted file mode 100755 index b47bdae..0000000 --- a/build/src/scripts/start-rtl.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -set -e - -# Configure settings from env vars -envsubst < "source_RTL.conf" > "RTL.conf" - -node rtl \ No newline at end of file diff --git a/dappnode_package.json b/dappnode_package.json index 4553f12..d372366 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,43 +1,54 @@ { "name": "lightning-network.dnp.dappnode.eth", - "version": "0.0.2", - "description": "The Lightning Network DAppNodePackage (lnd + RTL). The Lightning Network is a decentralized system for instant, high-volume micropayments that removes the risk of delegating custody of funds to trusted third parties.", - "avatar": "/ipfs/QmVrjV1ANxjYVqRJzycYKcCUAH8nU337UsMVir1CnZYNa8", + "version": "0.4.4", + "upstreamVersion": "v0.14.1-beta", + "shortDescription": "Scalable, instant Bitcoin transactions", + "description": "The Lightning Network DAppNodePackage (lnd + RTL). The Lightning Network is a decentralized system for instant, high-volume micropayments that remove the risk of delegating custody of funds to trusted third parties. \n\n\n **Getting started** \n\n Go to the [Lightning Network DAppNode Package readme](https://github.com/dappnode/DAppNodePackage-LightningNetwork#readme) to learn how to get started and safely backup your data.", "type": "service", - "image": { - "path": "", - "hash": "", - "size": "", - "ports": [ - "9735:9735" - ], - "volumes": [ - "lndconfig_data:/root/.lnd/" - ], - "restart": "always", - "environment": [ - "RTL_PASSWORD=changeme", - "RPCUSER=dappnode", - "RPCPASS=dappnode", - "BITCOIND_HOST=my.bitcoin.dnp.dappnode.eth", - "NETWORK=mainnet", - "ALIAS=", - "COLOR=#5ACDC5", - "EXT_IP=" - ] + "dependencies": { + "bitcoin.dnp.dappnode.eth": "latest" + }, + "backup": [ + { + "name": "rtl-channel", + "path": "/rtl/backup/" + }, + { + "name": "lnd-channel", + "path": "/root/.lnd/data/chain/bitcoin/mainnet/channel.backup" + }, + { + "name": "wallet", + "path": "/root/.lnd/data/chain/bitcoin/mainnet/wallet.db" + } + ], + "style": { + "featuredBackground": "linear-gradient(67deg, #090909, #2f1354)", + "featuredColor": "#eee" }, "author": "DAppNode Association