Skip to content

Commit 66cf028

Browse files
Leo Weesegitbook-bot
Leo Weese
authored andcommitted
GITBOOK-405: change request with no subject merged in GitBook
1 parent 7eddea8 commit 66cf028

7 files changed

+19
-288
lines changed

SUMMARY.md

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
* [Pathfinding](lightning-network-tools/lnd/pathfinding.md)
6161
* [Key Import](docs/lnd/key\_import.md)
6262
* [Secure Your Lightning Network Node](lightning-network-tools/lnd/secure-your-lightning-network-node.md)
63-
* [Operational Safety](lightning-network-tools/lnd/safety.md)
6463
* [Configuration of a Routing Node](lightning-network-tools/lnd/optimal-configuration-of-a-routing-node.md)
6564
* [Quick Tor Setup](lightning-network-tools/lnd/quick-tor-setup.md)
6665
* [Configuring Tor](lightning-network-tools/lnd/configuring\_tor.md)

lightning-network-tools/lnd/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ LND's API documentation
6666
[secure-your-lightning-network-node.md](secure-your-lightning-network-node.md)
6767
{% endcontent-ref %}
6868

69-
{% content-ref url="safety.md" %}
70-
[safety.md](safety.md)
69+
{% content-ref url="broken-reference" %}
70+
[Broken link](broken-reference)
7171
{% endcontent-ref %}
7272

7373
{% content-ref url="quick-tor-setup.md" %}

lightning-network-tools/lnd/disaster-recovery.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Once invoked, your node will ask your peers to send you their latest commitment
2424

2525
* The most recent channel database
2626

27-
The `channel.db` file can be found in `.lnd/data/graph/mainnet` and contains all information about your channels, including your latest commitment transaction. Invoking this file as part of your recovery process can be risky if the channel.db is not up to date. Only use this file if you were able to recover it directly from your [crashed node](safety.md).
27+
The `channel.db` file can be found in `.lnd/data/graph/mainnet` and contains all information about your channels, including your latest commitment transaction. Invoking this file as part of your recovery process can be risky if the channel.db is not up to date. Only use this file if you were able to recover it directly from your crashed node.
2828

2929
* Information about your channels from third parties
3030

lightning-network-tools/lnd/macaroons.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Examples:
180180
181181
## Actions and RPC permissions
182182
183-
Macaroons in LND may refer to one of seven actions: `onchain`, `address`, `message`, `peers`, `offchain`, `info`, `invoices` and `macaroon`. These actions encompass the following RPC services:
183+
Macaroons in LND may refer to one of seven actions: `onchain`, `address`, `message`, `peers`, `offchain`, `info`, `invoices` and `macaroon`. These [actions encompass](https://github.com/lightningnetwork/lnd/blob/master/rpcserver.go#L263) the following RPC services:
184184
185185
### Onchain
186186

lightning-network-tools/lnd/recovery-planning-for-failure.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: '"That''s planning for failure, Morty. Even dumber than regular planning."'
33
---
44

5-
# Recovery: Planning for failure
5+
# Recovery: Planning for Failure
66

77
In order to achieve near-instant and cheap Bitcoin payments, the Lightning Network makes some tradeoffs in comparison to the Bitcoin base layer. One of those tradeoffs is that its security model is more complex. 
88

@@ -24,7 +24,7 @@ If you decide to deploy your Lightning node in the cloud, choose a reputable pro
2424

2525
**If your Lightning node is going to run on a device you physically control, invest in a high-quality SSD and consider setting up RAID.**
2626

27-
\[[Also read: Operational safety](safety.md)]
27+
[Also read: Secure Your Lightning Network Node](secure-your-lightning-network-node.md)
2828

2929
## aezeed
3030

lightning-network-tools/lnd/safety.md

-273
This file was deleted.

lightning-network-tools/lnd/secure-your-lightning-network-node.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,27 @@ How you update your LND will depend on how you installed it. You may for example
3636

3737
## Your wallet <a href="#docs-internal-guid-4d50a2e2-7fff-6a56-4160-813804306ee7" id="docs-internal-guid-4d50a2e2-7fff-6a56-4160-813804306ee7"></a>
3838

39-
When creating your wallet with `lncli create`, you are given a 24 word long seed phrase. This seed phrase can be used to recover your on-chain Bitcoin, meaning that if it falls into the wrong hands your bitcoin are at risk of being taken. Similarly, if you are not in possession of this seed phrase yourself, you may not be able to regain control over your funds in the event of an error.
39+
When creating your wallet with `lncli create`, you are given a 24 word long "aezeed" seed phrase. Similar to a BIP39 seed phrase, it can be used to recover your on-chain Bitcoin, meaning that if it falls into the wrong hands your bitcoin are at risk of being taken. Similarly, if you are not in possession of this seed phrase yourself, you may not be able to regain control over your funds in the event of an error.
4040

4141
You may write your seed phrase, in its correct order, on a piece of paper and store it somewhere securely. Alternatively, you may store it in encrypted storage elsewhere, such as your password manager.
4242

43+
Never run two separate LND nodes with the same seed!
44+
45+
Your private key is contained in your node's `wallet.db`. This wallet database and the macaroon database are encrypted with the password chosen when initializing the wallet using `lncli create`. If you lose your wallet password, you may recreate the wallet and macaroon database using the seed.
46+
47+
## Your macaroons
48+
49+
Your node uses macaroons to authenticate API calls, including from `lncli`. Make sure your macaroons can only be accessed by authorized applications. To invalidate a macaroon, it is not enough to delete it. Instead, the `macaroons.db` has to be deleted in its entirety. A specific macaroon can be invalidated using `lncli deletemacaroonid` and its macaroon ID.
50+
4351
## Your channels <a href="#docs-internal-guid-8725c728-7fff-9b34-f746-fcdc7a49c5e5" id="docs-internal-guid-8725c728-7fff-9b34-f746-fcdc7a49c5e5"></a>
4452

4553
In the event that your hard drive becomes corrupted or the entire device destroyed or deleted, you may recover your on-chain funds using the seed phrase above. Your channels however can’t be backed up directly, though a mechanism exists to recover them separately from your on-chain funds.
4654

47-
You can find your channel backups in the file `<lnddir>/data/chain/bitcoin/mainnet/channel.backup`
55+
You can typically find your channel backups in the file `~/.lnd/data/chain/bitcoin/mainnet/channel.backup`
4856

49-
This file is changed every time a channel is opened or closed. You may set up a script that [backs up this file whenever it is changed](https://gist.github.com/alexbosworth/2c5e185aedbdac45a03655b709e255a3), or copy it manually. It is necessary to back up this file whenever a new channel has been opened.\
50-
For backup purposes the channel.db file is not suitable for such backups. Keeping an up-to-date backup of this file is close to impossible, and you may lose your funds when recovering from an outdated `channel.db` file. This file can only be used when migrating your node, not when restoring.
57+
This file is changed every time a channel is opened or closed. You may set up a script that [backs up this file whenever it is changed](https://gist.github.com/alexbosworth/2c5e185aedbdac45a03655b709e255a3), or copy it manually. It is necessary to back up this file whenever a new channel has been opened. Invoking the `channel.backup` initiates a force close by your remote peers.
58+
59+
The `channel.db` file is not suitable for backups. Keeping an up-to-date backup of this file is close to impossible, and you may lose your funds when recovering from an outdated `channel.db` file. This file can only be used when migrating your node, not when restoring.
5160

5261
## Operational safety <a href="#docs-internal-guid-f7878f4c-7fff-d8de-f925-4704b4d0790e" id="docs-internal-guid-f7878f4c-7fff-d8de-f925-4704b4d0790e"></a>
5362

@@ -62,14 +71,10 @@ When operating your node, it is important to note that you not interrupt lncli c
6271

6372
To safely shut down your Lightning Node, use the command `lncli stop`
6473

65-
It is not recommended to prune your Bitcoin node, especially not for transactions occurring after the activation of Segwit, August 2017.&#x20;
66-
6774
## Your external applications <a href="#docs-internal-guid-fb6b5911-7fff-e340-f874-86a51944a08c" id="docs-internal-guid-fb6b5911-7fff-e340-f874-86a51944a08c"></a>
6875

6976
LND uses macaroons to authenticate external applications. These may be applications running on the same machine as LND or externally.
7077

7178
By default you will see the `admin.macaroon`, `invoice.macaroon`, `readonly.macaroon` and `router.macaroon` files in your `<lnddir>/data/chain/bitcoin/mainnet/` directory. They each have their own permissions, and you may create your own macaroons with specific purposes. Only share these macaroons with applications on devices you trust.
7279

7380
To recreate macaroons you may delete all of the macaroon files and restart LND. However, this will NOT invalidate old macaroons. To invalidate old macaroons, you will have to delete the `macaroon.db` file as well before restarting LND.
74-
75-
[See also our guide on Operational Safety.](safety.md)

0 commit comments

Comments
 (0)