This commit is contained in:
rootzoll 2022-02-10 22:26:28 +01:00
commit 1b0beb6a42
4 changed files with 301 additions and 138 deletions

190
FAQ.cl.md
View File

@ -1,49 +1,51 @@
<!-- omit in toc -->
# C-lightning on the RaspiBlitz FAQ
- [Common questions about the different Lightning Network implementations](#common-questions-about-the-different-lightning-network-implementations)
- [Can LND and C-lightning nodes open channels to each other and route payments?](#can-lnd-and-c-lightning-nodes-open-channels-to-each-other-and-route-payments)
- [Can I run LND and C-lightning connected to the same node?](#can-i-run-lnd-and-c-lightning-connected-to-the-same-node)
- [Can I convert an LND node to C-lightning (or the opposite)?](#can-i-convert-an-lnd-node-to-c-lightning-or-the-opposite)
- [Is there a table to quickly compare LND and C-Lightning?](#is-there-a-table-to-quickly-compare-lnd-and-c-lightning)
- [C-lightning official documentation](#c-lightning-official-documentation)
- [Commands and aliases](#commands-and-aliases)
- [Directories](#directories)
- [Config file](#config-file)
- [Default values](#default-values)
- [All possible config settings](#all-possible-config-settings)
- [Plug-ins](#plug-ins)
- [General info](#general-info)
- [Directories](#directories-1)
- [Implemented plugins](#implemented-plugins)
- [Add a custom plugin](#add-a-custom-plugin)
- [CLBOSS](#clboss)
- [Feeadjuster](#feeadjuster)
- [Dual funded channels](#dual-funded-channels)
- [Reading](#reading)
- [Setting up](#setting-up)
- [Open a dual funded channel](#open-a-dual-funded-channel)
- [Fundchannel syntax](#fundchannel-syntax)
- [Offers](#offers)
- [About the feature bits](#about-the-feature-bits)
- [Testnets](#testnets)
- [Backups](#backups)
- [Seed](#seed)
- [How to display the hsm_secret in a human-readable format?](#how-to-display-the-hsm_secret-in-a-human-readable-format)
- [How to test the seedwords?](#how-to-test-the-seedwords)
- [How to restore the hsm_secret from text?](#how-to-restore-the-hsm_secret-from-text)
- [Channel database](#channel-database)
- [Recovery](#recovery)
- [Recover from a cl-rescue file](#recover-from-a-cl-rescue-file)
- [Recover from a seed](#recover-from-a-seed)
- [Rescan the chain after restoring a used c-lightning wallet](#rescan-the-chain-after-restoring-a-used-c-lightning-wallet)
- [Guesstoremote to recover funds from force-closed channels](#guesstoremote-to-recover-funds-from-force-closed-channels)
- [Update](#update)
- [Update to a new C-lightning release](#update-to-a-new-c-lightning-release)
- [Experimental update to the latest master](#experimental-update-to-the-latest-master)
- [sqlite3 queries](#sqlite3-queries)
- [Script file help list](#script-file-help-list)
---
Table of Contents
---
- [Common questions about the different Lightning Network implementations](#common-questions-about-the-different-lightning-network-implementations)
- [Can LND and C-lightning nodes open channels to each other and route payments?](#can-lnd-and-c-lightning-nodes-open-channels-to-each-other-and-route-payments)
- [Can I run LND and C-lightning connected to the same node?](#can-i-run-lnd-and-c-lightning-connected-to-the-same-node)
- [Can I convert an LND node to C-lightning (or the opposite)?](#can-i-convert-an-lnd-node-to-c-lightning-or-the-opposite)
- [Is there a table to quickly compare LND and C-Lightning?](#is-there-a-table-to-quickly-compare-lnd-and-c-lightning)
- [C-lightning official documentation](#c-lightning-official-documentation)
- [Commands and aliases](#commands-and-aliases)
- [Directories](#directories)
- [Config file](#config-file)
- [Default values](#default-values)
- [All possible config settings](#all-possible-config-settings)
- [Plug-ins](#plug-ins)
- [General info](#general-info)
- [Directories](#directories-1)
- [Implemented plugins](#implemented-plugins)
- [Add a custom plugin](#add-a-custom-plugin)
- [CLBOSS](#clboss)
- [Feeadjuster](#feeadjuster)
- [Dual funded channels](#dual-funded-channels)
- [Reading](#reading)
- [Setting up](#setting-up)
- [Open a dual funded channel](#open-a-dual-funded-channel)
- [Fundchannel syntax](#fundchannel-syntax)
- [Offers](#offers)
- [About the feature bits](#about-the-feature-bits)
- [Testnets](#testnets)
- [Backups](#backups)
- [Seed](#seed)
- [How to display the hsm_secret in a human-readable format?](#how-to-display-the-hsm_secret-in-a-human-readable-format)
- [How to test the seedwords?](#how-to-test-the-seedwords)
- [How to restore the hsm_secret from text?](#how-to-restore-the-hsm_secret-from-text)
- [Channel database](#channel-database)
- [Recovery](#recovery)
- [Recover from a cl-rescue file](#recover-from-a-cl-rescue-file)
- [Recover from a seed](#recover-from-a-seed)
- [Rescan the chain after restoring a used c-lightning wallet](#rescan-the-chain-after-restoring-a-used-c-lightning-wallet)
- [Guesstoremote to recover funds from force-closed channels](#guesstoremote-to-recover-funds-from-force-closed-channels)
- [Update](#update)
- [Update to a new C-lightning release](#update-to-a-new-c-lightning-release)
- [Experimental update to the latest master](#experimental-update-to-the-latest-master)
- [sqlite3 queries](#sqlite3-queries)
- [Script file help list](#script-file-help-list)
---
## Common questions about the different Lightning Network implementations
@ -54,7 +56,7 @@
* Yes, both can run parallel on a RaspiBlitz and even have channels witch each other.
### Can I convert an LND node to C-lightning (or the opposite)?
* No, currently there are no tools available to convert between the databases storing the channel states.
* No, currently there are no tools available to convert between the databases storing the channel states.
The channels would need to be closed to use the same funds in an other node.
### Is there a table to quickly compare LND and C-Lightning?
@ -84,9 +86,9 @@ or with the alias: `cllog`
```
## Directories
* All data is stored on the disk in:
`/mnt/hdd/app-data/.lightningd`
* and symlinked to:
* All data is stored on the disk in:
`/mnt/hdd/app-data/.lightningd`
* and symlinked to:
`/home/bitcoin/.lightningd`
## Config file
@ -106,11 +108,11 @@ or with the alias: `cllog`
always-use-proxy=true
```
### All possible config settings
* can be shown by running:
`lightningd --help`
* can be shown by running:
`lightningd --help`
* To persist the setings place the options in the config file without the `--` and restart lightningd
```
Usage: lightningd
Usage: lightningd
A bitcoin lightning daemon (default values shown for network: bitcoin).
--conf=<file> Specify configuration file
--lightning-dir=<dir> Set base directory: network-specific subdirectory is
@ -257,9 +259,9 @@ or with the alias: `cllog`
* https://github.com/lightningd/plugins/
### Directories
* The plugins are installed to:
* The plugins are installed to:
`/home/bitcoin/cl-plugins-available`
* and symlinked to:
* and symlinked to:
`/home/bitcoin/cl-plugins-enabled`
* All plugins in the `/home/bitcoin/cl-plugins-enabled` directory are loaded automatically as set in the config file: `/home/bitcoin/.lightningd/config`
@ -270,7 +272,7 @@ or with the alias: `cllog`
* [feeadjuster](#feeadjuster)
### Add a custom plugin
* Place the plugin in the `/home/bitcoin/cl-plugins-enabled` directory
* Place the plugin in the `/home/bitcoin/cl-plugins-enabled` directory
* Make sure it is owned by the `bitcoin` user and is executable:
```
sudo chown bitcoin:bitcoin /home/bitcoin/cl-plugins-enabled/PLUGIN_NAME
@ -285,11 +287,11 @@ or with the alias: `cllog`
sudo systemctl restart lightningd
```
From the directory `/home/bitcoin/cl-plugins-enabled` it will load auomatically after restarts.
* To just load it run it once store in (and start from):
* To just load it run it once store in (and start from):
`/home/bitcoin/cl-plugins-available/`
### CLBOSS
A plugin for automatic LN node management.
A plugin for automatic LN node management.
CLBOSS only requires to have funds deposited to the onchain wallet of C-lightning.
The recommended amount to start is ~ 10 million satoshis (0.1 BTC).
@ -309,7 +311,7 @@ Neither the CLBOSS nor the RaspiBlitz developers can take resposibility for lost
* Activate it in the menu - `SETTINGS` - `-CL CLBOSS`
* Discussion: https://github.com/rootzoll/raspiblitz/issues/2490
* Advanced usage
https://github.com/ZmnSCPxj/clboss#clboss-status
https://github.com/ZmnSCPxj/clboss#clboss-status
* Stopping CLBOSS will leave the node in the last state. No channels will be closed or funds removed when CLBOSS is uninstalled.
### Feeadjuster
@ -322,7 +324,7 @@ https://github.com/ZmnSCPxj/clboss#clboss-status
fee-base=BASEFEE_IN_MILLISATS
fee-per-satoshi=PPM_FEE_IN_SATS
```
* more options for the feeadjuster to be set in the c-lightning config can be seen in the [code](https://github.com/lightningd/plugins/blob/c16c564c2c5549b8f7236815490260c49e9e9bf4/feeadjuster/feeadjuster.py#L318):
* more options for the feeadjuster to be set in the c-lightning config can be seen in the [code](https://github.com/lightningd/plugins/blob/c16c564c2c5549b8f7236815490260c49e9e9bf4/feeadjuster/feeadjuster.py#L318):
```
plugin.add_option(
"feeadjuster-deactivate-fuzz",
@ -408,18 +410,18 @@ https://github.com/ZmnSCPxj/clboss#clboss-status
### Dual funded channels
#### Reading
* https://medium.com/blockstream/c-lightning-opens-first-dual-funded-mainnet-lightning-channel-ada6b32a527c
* https://medium.com/blockstream/setting-up-liquidity-ads-in-c-lightning-54e4c59c091d
* https://twitter.com/niftynei/status/1389328732377255938
* https://medium.com/blockstream/c-lightning-opens-first-dual-funded-mainnet-lightning-channel-ada6b32a527c
* https://medium.com/blockstream/setting-up-liquidity-ads-in-c-lightning-54e4c59c091d
* https://twitter.com/niftynei/status/1389328732377255938
* lightning-rfc PR: https://github.com/lightningnetwork/lightning-rfc/pull/851/files
* represented by the feature bits 28/29
#### Setting up
* activate the feature on your node:
Type: `clconf` or use the menu `SYSTEM` - `CLCONF`.
* activate the feature on your node:
Type: `clconf` or use the menu `SYSTEM` - `CLCONF`.
Add the line:
```
experimental-dual-fund
experimental-dual-fund
```
Save and restart C-lightning.
@ -454,7 +456,7 @@ Add the line:
```
Example:
```
```
lightning-cli listnodes 02cca6c5c966fcf61d121e3a70e03a1cd9eeeea024b26ea666ce974d43b242e636
```
* list all nodes known in the graph with active offers:
@ -468,16 +470,16 @@ Add the line:
lightning-cli connect nodeID@IP_or.onion
```
#### Fundchannel syntax
* the amount is the own funds in the wallet contributed
use equal amounts to have a balanced channel from start
* the amount is the own funds in the wallet contributed
use equal amounts to have a balanced channel from start
the amounts can be specified in `sat` or `btc`
```
lightning-cli fundchannel -k id=NODE_ID amount=OWN_AMOUNTsat request_amt=PEER_CONTRIBUTION_AMOUNTsat compact_lease=COMPACT_LEASE
```
```
It can fail if the offer changed or there are not enough funds available on either side.
* open a dual funded channel with a chosen utxo and miner feerate
list the utxo-s with `lightning-cli listfunds`, can list multiple
* open a dual funded channel with a chosen utxo and miner feerate
list the utxo-s with `lightning-cli listfunds`, can list multiple
the feerate is in `perkb` by default, e.g. use 1000 for 1 sat/byte
```
lightning-cli fundchannel feerate=PERKB_FEERATE utxos='["TRANSACTION_ID:INDDEX_NUMBER"]' -k id=NODE_ID amount=OWN_AMOUNTsat request_amt=PEER_CONTRIBUTION_AMOUNTsat compact_lease=COMPACT_LEASE
@ -485,33 +487,33 @@ the feerate is in `perkb` by default, e.g. use 1000 for 1 sat/byte
### Offers
* Details at bolt12.org
* Create an offer to receive payments:
* Create an offer to receive payments:
https://lightning.readthedocs.io/lightning-offer.7.html
```
lightning-cli offer amount description [vendor] [label] [quantity_min] [quantity_max] [absolute_expiry] [recurrence] [recurrence_base] [recurrence_paywindow] [recurrence_limit] [single_use]
```
* Example:
* Example:
Create a reusable offer which can be paid with any amount for LN tips using a fixed string.
```
lightning-cli offer any tip
```
* Create an offer to send payments:
https://lightning.readthedocs.io/lightning-offerout.7.html
* Create an offer to send payments:
https://lightning.readthedocs.io/lightning-offerout.7.html
```
lightning-cli offerout amount description [vendor] [label] [absolute_expiry] [refund_for]
```
* Fetch an invoice to pay an offer:
https://lightning.readthedocs.io/lightning-fetchinvoice.7.html
* Fetch an invoice to pay an offer:
https://lightning.readthedocs.io/lightning-fetchinvoice.7.html
Will need at least one peer which supports onion the messages. For example:
```
lightning-cli connect 024b9a1fa8e006f1e3937f65f66c408e6da8e1ca728ea43222a7381df1cc449605@128.199.202.168:9735
```
* Then use the command to fetch the BOLT12 invoice:
* Then use the command to fetch the BOLT12 invoice:
```
lightning-cli fetchinvoice offer [msatoshi] [quantity] [recurrence_counter] [recurrence_start] [recurrence_label] [timeout] [payer_note]
```
* decode a BOLT12 invoice:
* decode a BOLT12 invoice:
```
lightning-cli decode bolt12_invoice
```
@ -534,15 +536,15 @@ Will need to pay through a peer which supports the onion messages which means yo
* for testnet and signet there are prefixes `t` and `s` used for the aliases, daemons and their own plugin directory names.
* Testnet
```
# alias:
# alias:
tcl | tclconf | tcllog
# daemon service name:
# daemon service name:
tlightningd
# config file:
/home/bitcoin/.lightningd/testnet/config
# plugin directory:
/home/bitcoin/tcl-plugins-enabled
```
@ -551,7 +553,7 @@ Will need to pay through a peer which supports the onion messages which means yo
# aliases:
scl | sclconf | scllog
# daemon service name:
# daemon service name:
slightningd
# config file:
@ -567,10 +569,10 @@ Will need to pay through a peer which supports the onion messages which means yo
### Seed
* By default a BIP39 wordlist compatible, 24 words seed is used to generate the `hsm_secret`
* If the wallet was generated or restored from seed on a RaspiBlitz the seed is stored in the disk with the option to encrypt
* If the wallet was generated or restored from seed on a RaspiBlitz the seed is stored in the disk with the option to encrypt
* Display the seed from the menu - `CL` - `SEED`
* The file where the seed is stored (until encrypted) is on the disk: `/home/bitcoin/.lightning/bitcoin/seedwords.info`
* Show manually with:
* Show manually with:
`sudo cat /home/bitcoin/.lightning/bitcoin/seedwords.info`
* If there is no such file and you have not funded the C-lightning wallet yet can reset the wallet and the next wallet will be created with a seed.
@ -595,7 +597,7 @@ Will need to pay through a peer which supports the onion messages which means yo
# delete temp file
srm /dev/shm/test_hsm_secret
```
### How to restore the hsm_secret from text?
* example from https://lightning.readthedocs.io/BACKUP.html#backing-up-your-c-lightning-node:
```
@ -619,7 +621,7 @@ Will need to pay through a peer which supports the onion messages which means yo
### Recovery
* https://lightning.readthedocs.io/FAQ.html#database-corruption-channel-state-lost
* https://lightning.readthedocs.io/FAQ.html#loss
#### Recover from a cl-rescue file
* use the `REPAIR-CL` - `FILERESTORE` option in the menu for instructions to upload
@ -629,15 +631,15 @@ Will need to pay through a peer which supports the onion messages which means yo
#### Rescan the chain after restoring a used c-lightning wallet
* can use the `menu` -> `REPAIR` -> `REPAIR-CL` -> `RESCAN` option
* or follow the manual process:
* or follow the manual process:
<https://lightning.readthedocs.io/FAQ.html#rescanning-the-block-chain-for-lost-utxos>
```
```
# stop `lightningd`:
sudo systemctl stop lightningd
# the ungraceful method:
sudo killall ligthningd
# Rescan from the block 700000
sudo -u bitcoin lightningd --rescan -700000 --log-level debug
@ -675,8 +677,8 @@ Will need to pay through a peer which supports the onion messages which means yo
```
bech32 : bc1q......................................
pubkey hash : 0123456789abcdef0123456789abcdef01234567
pubkey : 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01
privkey : 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
pubkey : 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01
privkey : 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
```
* To import the private key of the address in Electrum Wallet will need to convert to base58
```
@ -697,7 +699,7 @@ Will need to pay through a peer which supports the onion messages which means yo
```
KwFvTne98E1t3mTNAr8pKx67eUzFJWdSNPqPSfxMEtrueW7PcQzL
```
* To import to teh Electrum Wallet use the `p2wpkh:` prefix:
* To import to teh Electrum Wallet use the `p2wpkh:` prefix:
<https://bitcoinelectrum.com/importing-your-private-keys-into-electrum/>
```
p2wpkh:KxacygL6usxP8T9cFSM2SRW5QsEg66bUQUEn997UWwCZANEe7NLT
@ -711,7 +713,7 @@ Will need to pay through a peer which supports the onion messages which means yo
* Since downgrading the lightning database is not allowed the updated version will persist if the SDcard is reflashed.
### Experimental update to the latest master
* this won't persist in case the SDcard is reflashed so will need to manually update again.
* this won't persist in case the SDcard is reflashed so will need to manually update again.
* the commadn to use the built-in script to update to the lates commit in the default branch is:
```
config.scripts/cl.install.sh update
@ -890,7 +892,7 @@ cl.setname.sh [mainnet|testnet|signet] [?newName]
Install, remove or get info about the Spark Wallet for C-lightning
version: v0.3.0rc
Usage:
cl.spark.sh [on|off|menu] <testnet|mainnet|signet>
cl.spark.sh [on|off|menu] <testnet|mainnet|signet>
+ ./cl.update.sh -h

57
FAQ.md
View File

@ -1,31 +1,10 @@
<!-- omit in toc -->
# FAQ - Frequently Asked Questions
---
Table of Contents
---
- [Upgrade](#upgrade)
- [Is using the prepared SD card image secure?](#is-using-the-prepared-sd-card-image-secure)
- [How to verify the SD card image after download?](#how-to-verify-the-sd-card-image-after-download)
- [What changed on every upgrade?](#what-changed-on-every-upgrade)
- [How do I upgrade my RaspiBlitz?](#how-do-i-upgrade-my-raspiblitz)
- [Why do I need to re-burn my SD card for an update?](#why-do-i-need-to-re-burn-my-sd-card-for-an-update)
- [How can I update LND or bitcoind even before the next RaspiBlitz update?](#how-can-i-update-lnd-or-bitcoind-even-before-the-next-raspiblitz-update)
- [SSH](#ssh)
- [What to do when on SSH I see "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"](#what-to-do-when-on-ssh-i-see-warning-remote-host-identification-has-changed)
- [How do I unplug/shutdown safely without SSH](#how-do-i-unplugshutdown-safely-without-ssh)
- [I cannot connect via SSH to my RaspiBlitz. What do I do?](#i-cannot-connect-via-ssh-to-my-raspiblitz-what-do-i-do)
- [How to SSH over Tor?](#how-to-ssh-over-tor)
- [How to setup port-forwarding with a SSH tunnel?](#how-to-setup-port-forwarding-with-a-ssh-tunnel)
- [How do I setup just a port-forwarding user on my public server?](#how-do-i-setup-just-a-port-forwarding-user-on-my-public-server)
- [How can I repair my SSH login?](#how-can-i-repair-my-ssh-login)
- [Display](#display)
- [Can I flip the screen?](#can-i-flip-the-screen)
- [How to fix my upside down LCD after update?](#how-to-fix-my-upside-down-lcd-after-update)
- [Can I run the RaspiBlitz without a display/LCD?](#can-i-run-the-raspiblitz-without-a-displaylcd)
- [How do I find the IP address when running without a display?](#how-do-i-find-the-ip-address-when-running-without-a-display)
- [Upgrade](#upgrade)
- [Is using the prepared SD card image secure?](#is-using-the-prepared-sd-card-image-secure)
- [How to verify the SD card image after download?](#how-to-verify-the-sd-card-image-after-download)
- [What changed on every upgrade?](#what-changed-on-every-upgrade)
- [How do I upgrade my RaspiBlitz?](#how-do-i-upgrade-my-raspiblitz)
@ -34,7 +13,7 @@
- [SSH](#ssh)
- [What to do when on SSH I see "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"](#what-to-do-when-on-ssh-i-see-warning-remote-host-identification-has-changed)
- [How do I unplug/shutdown safely without SSH](#how-do-i-unplugshutdown-safely-without-ssh)
- [I cannot connect via SSH to my RaspiBlitz. What do I do?](#i-cannot-connect-via-ssh-to-my-raspiblitz-what-do-i-do)
- [I cannot connect via SSH to my RaspiBlitz. What do I do?](#i-cannot-connect-via-ssh-to-my-raspiblitz.-what-do-i-do)
- [How to SSH over Tor?](#how-to-ssh-over-tor)
- [How to setup port-forwarding with a SSH tunnel?](#how-to-setup-port-forwarding-with-a-ssh-tunnel)
- [How do I setup just a port-forwarding user on my public server?](#how-do-i-setup-just-a-port-forwarding-user-on-my-public-server)
@ -44,11 +23,11 @@
- [Can I run the RaspiBlitz without a display/LCD?](#can-i-run-the-raspiblitz-without-a-displaylcd)
- [How do I find the IP address when running without a display?](#how-do-i-find-the-ip-address-when-running-without-a-display)
- [Debug](#debug)
- [I have the full blockchain on another storage. How do I copy it to the RaspiBlitz?](#i-have-the-full-blockchain-on-another-storage-how-do-i-copy-it-to-the-raspiblitz)
- [I have the full blockchain on another storage. How do I copy it to the RaspiBlitz?](#i-have-the-full-blockchain-on-another-storage.-how-do-i-copy-it-to-the-raspiblitz)
- [How do I generate a Debug Report?](#how-do-i-generate-a-debug-report)
- [Why is my "final sync" taking so long?](#why-is-my-final-sync-taking-so-long)
- [How do I backup my Lightning Node?](#how-do-i-backup-my-lightning-node)
- [1) Securing your On-Chain- and Channel-Funds during Operation](#1-securing-your-on-chain--and-channel-funds-during-operation)
- [1) Securing your On-Chain- and Channel-Funds during Operation](#and-channel-funds-during-operation)
- [2) Making a complete LND data backup](#2-making-a-complete-lnd-data-backup)
- [How can I recover my coins from a failing RaspiBlitz?](#how-can-i-recover-my-coins-from-a-failing-raspiblitz)
- [1) Recover LND data](#1-recover-lnd-data)
@ -66,7 +45,7 @@
- [Why is my node address on the display yellow (not green)?](#why-is-my-node-address-on-the-display-yellow-not-green)
- [How do I fix a displayed Error in my Config?](#how-do-i-fix-a-displayed-error-in-my-config)
- [Can I run the RaspiBlitz as Backend for BTCPayServer?](#can-i-run-the-raspiblitz-as-backend-for-btcpayserver)
- [I don't have a LAN port on my Laptop - how do I connect to my RaspiBlitz?](#i-dont-have-a-lan-port-on-my-laptop---how-do-i-connect-to-my-raspiblitz)
- [I don't have a LAN port on my Laptop - how do I connect to my RaspiBlitz?](#how-do-i-connect-to-my-raspiblitz)
- [Is it possible to connect the Blitz over Wifi instead of using a LAN cable?](#is-it-possible-to-connect-the-blitz-over-wifi-instead-of-using-a-lan-cable)
- [Can I directly connect the RaspiBlitz to my laptop?](#can-i-directly-connect-the-raspiblitz-to-my-laptop)
- [How to attach the RaspberryPi to the HDD?](#how-to-attach-the-raspberrypi-to-the-hdd)
@ -74,10 +53,9 @@
- [Are those "Under-Voltage detected" warnings a problem?](#are-those-under-voltage-detected-warnings-a-problem)
- [How do I return to the menu after exiting to the command line](#how-do-i-return-to-the-menu-after-exiting-to-the-command-line)
- [How do I setup fresh/clean/reset and without going into recovery mode?](#how-do-i-setup-freshcleanreset-and-without-going-into-recovery-mode)
- [My blockchain data is corrupted - what can I do?](#my-blockchain-data-is-corrupted---what-can-i-do)
- [I have two RaspiBlitz in my network - can they both be public?](#i-have-two-raspiblitz-in-my-network---can-they-both-be-public)
- [My blockchain data is corrupted - what can I do?](#what-can-i-do)
- [I have two RaspiBlitz in my network - can they both be public?](#can-they-both-be-public)
- [How can I enforce UASP mode for my SSD controller?](#how-can-i-enforce-uasp-mode-for-my-ssd-controller)
- [Development](#development)
- [What is the process of creating a new SD card image release?](#what-is-the-process-of-creating-a-new-sd-card-image-release)
- [How can I customize my RaspiBlitz or add other software?](#how-can-i-customize-my-raspiblitz-or-add-other-software)
@ -90,15 +68,14 @@
- [How can I sync a branch of my forked GitHub with my local RaspiBlitz?](#how-can-i-sync-a-branch-of-my-forked-github-with-my-local-raspiblitz)
- [How contribute a feature/change from my forked branch back to the RaspiBlitz repo?](#how-contribute-a-featurechange-from-my-forked-branch-back-to-the-raspiblitz-repo)
- [How can I help testing a Pull Request?](#how-can-i-help-testing-a-pull-request)
- [Extras](#extras)
- [How do I connect a UPS to the RaspiBlitz?](#how-do-i-connect-a-ups-to-the-raspiblitz)
- [Can I run my RaspiBlitz on Solar Energy?](#can-i-run-my-raspiblitz-on-solar-energy)
- [How to use the Let's Encrypt client](#how-to-use-the-lets-encrypt-client)
- [Let's Encrypt - HTTP-01](#lets-encrypt---http-01)
- [Let's Encrypt - DNS-01](#lets-encrypt---dns-01)
- [Let's Encrypt - eMail Address](#lets-encrypt---email-address)
- [Let's Encrypt - Installation details](#lets-encrypt---installation-details)
- [Let's Encrypt - HTTP-01](#http-01)
- [Let's Encrypt - DNS-01](#dns-01)
- [Let's Encrypt - eMail Address](#email-address)
- [Let's Encrypt - Installation details](#installation-details)
- [What is this mnemonic seed word list?](#what-is-this-mnemonic-seed-word-list)
- [How do I set up VNC?](#how-do-i-set-up-vnc)
- [Why use BTRFS on RaspiBlitz?](#why-use-btrfs-on-raspiblitz)
@ -363,14 +340,6 @@ If your RaspiBlitz is not working correctly and you like to get help from the co
*PLEASE NOTICE: It's possible that these logs can contain private information (like IPs, node IDs, ...) - just share publicly what you feel OK with.*
### Can I run my RaspiBlitz on Solar Energy?
Yes - take a look at the project of [Chimezie Chuta](https://twitter.com/mezie16/status/1264513274080636928?s=20)
![RaspiSolar](pictures/raspisolar.jpg)
More details in his book ["A-Z of Building your own Full Bitcoin Lightning Node: A hand Book for Enthusiasts"](https://blockspace.shop/products/a-z-of-building-your-own-full-bitcoin-lightning-node-a-hand-book-for-enthusiasts)
### Why is my "final sync" taking so long?
First of all if you see a final sync over 90% and you can see from time to time small increase - you should be OK ... this can take a looong time to catch up with the network. Only in the case that you actively choose the `SYNC` option in the `Getting the Blockchain` is a final sync under 90% OK. If you did a torrent or a copy from another computer and you are seeing under 90% something went wrong, and the setup process is ignoring your prepared Blockchain and doing a full sync - which can almost take forever on a raspberryPi.

122
README.md
View File

@ -12,6 +12,128 @@ RaspiBlitz is mainly targeted for learning how to run your own node decentralize
Discover & develop the growing ecosystem of the Lightning Network by becoming a full part of it.
Build it as part of a [workshop](WORKSHOP.md) or as a weekend project yourself.
---
Table of Contents
---
- [Feature Overview](#feature-overview)
- [DeepDive Video (July 2020)](#deepdive-video-july-2020)
- [Time Estimate to Set Up a RaspiBlitz](#time-estimate-to-set-up-a-raspiblitz)
- [Hardware Needed](#hardware-needed)
- [Buy a ready-2-go RaspiBlitz (Germany, EU and International)](#buy-a-ready-2-go-raspiblitz-germany-eu-and-international)
- [Amazon Shopping List (buy parts & build it yourself)](#amazon-shopping-list-buy-parts--build-it-yourself)
- [Assemble your RaspiBlitz](#assemble-your-raspiblitz)
- [Downloading the Software](#downloading-the-software)
- [Write the SD-Card image to your SD Card](#write-the-sd-card-image-to-your-sd-card)
- [Boot your RaspiBlitz](#boot-your-raspiblitz)
- [Support](#support)
- [Documentation](#documentation)
- [Groups](#groups)
- [Setup Process (Detailed Documentation)](#setup-process-detailed-documentation)
- [Basic Setup](#basic-setup)
- [LNDRESCUE LND tar.gz-Backupfile (BEST)](#lndrescue-lnd-tar.gz-backupfile-best)
- [SEED+SCB Words Seed & channel.backup file (OK)](#seedscb-words-seed--channel.backup-file-ok)
- [ONLY SEED Only Seed Word List (Fallback)](#only-seed-only-seed-word-list-fallback)
- [Final Setup](#final-setup)
- [1. SYNC - Self validate all Blocks](#self-validate-all-blocks)
- [2. COPY - Copy from Laptop or another RaspiBlitz over Local Network](#copy-from-laptop-or-another-raspiblitz-over-local-network)
- [Main Menu](#main-menu)
- [Feature Documentation](#feature-documentation)
- [INFO: Raspiblitz Status Screen](#info-raspiblitz-status-screen)
- [LIGHTNING (Basic Node Management)](#lightning-basic-node-management)
- [FUNDING: Fund your on-chain Wallet](#funding-fund-your-on-chain-wallet)
- [CONNECT: Connect to a Peer](#connect-connect-to-a-peer)
- [CHANNEL: Open a Channel with Peer](#channel-open-a-channel-with-peer)
- [SEND: Pay an Invoice/PaymentRequest](#send-pay-an-invoicepaymentrequest)
- [RECEIVE: Create Invoice/PaymentRequest](#receive-create-invoicepaymentrequest)
- [NAME: Change name of your Node](#name-change-name-of-your-node)
- [CLOSE ALL: Closing all open Channels](#close-all-closing-all-open-channels)
- [CASHOUT: Remove Funds from on-chain Wallet](#cashout-remove-funds-from-on-chain-wallet)
- [SETTINGS: Basic Settings of RaspiBlitz](#settings-basic-settings-of-raspiblitz)
- [Touchscreen (experimental)](#touchscreen-experimental)
- [LCD Rotate](#lcd-rotate)
- [Run behind Tor](#run-behind-tor)
- [Parallel Testnet/Signet](#parallel-testnetsignet)
- [ZeroTier](#zerotier)
- [LND LIGHTNING LABS NODE](#lnd-lightning-labs-node)
- [LND Channel Autopilot](#lnd-channel-autopilot)
- [LND Accept Keysend](#lnd-accept-keysend)
- [LND Circuitbreaker (Firewall for LND)](#lnd-circuitbreaker-firewall-for-lnd)
- [LND Auto-Unlock](#lnd-auto-unlock)
- [LND StaticChannelBackup on Nextcloud](#lnd-staticchannelbackup-on-nextcloud)
- [StaticChannelBackup on USB Drive](#staticchannelbackup-on-usb-drive)
- [StaticChannelBackup per SCP/SSH to other server](#staticchannelbackup-per-scpssh-to-other-server)
- [C-LIGHTNING NODE](#c-lightning-node)
- [CL CLBOSS Automatic Node Manager](#cl-clboss-automatic-node-manager)
- [CL Wallet Encryption](#cl-wallet-encryption)
- [SERVICES: Activate/Deactivate Services](#services-activatedeactivate-services)
- [Electrum Rust Server](#electrum-rust-server)
- [BTCPayServer](#btcpayserver)
- [BTC-RPC-Explorer](#btc-rpc-explorer)
- [Specter Desktop](#specter-desktop)
- [Mempool Space](#mempool-space)
- [JoinMarket](#joinmarket)
- [Download Bitcoin Whitepaper](#download-bitcoin-whitepaper)
- [RTL Webinterface](#rtl-webinterface)
- [ThunderHub](#thunderhub)
- [Lightning Terminal (LIT) with loop, pool & faraday](#lightning-terminal-lit-with-loop-pool--faraday)
- [LNbits](#lnbits)
- [Balance of Satoshi](#balance-of-satoshi)
- [PyBlock](#pyblock)
- [Channel Tools (chantools)](#channel-tools-chantools)
- [Sphinx Relay Server](#sphinx-relay-server)
- [C-Lightning RTL Webinterface](#c-lightning-rtl-webinterface)
- [C-Lightning Sparko Webwallet](#c-lightning-sparko-webwallet)
- [C-Lightning Spark Webwallet](#c-lightning-spark-webwallet)
- [SYSTEM: Monitoring & Configuration](#system-monitoring--configuration)
- [CONNECT: Connect Apps & Credentials](#connect-connect-apps--credentials)
- [MOBILE: Mobile Wallet Apps (Smartphone)](#mobile-mobile-wallet-apps-smartphone)
- [Electrum Rust Server](#electrum-rust-server-1)
- [BTCPAY: Get the connection string for the BTCPay Server](#btcpay-get-the-connection-string-for-the-btcpay-server)
- [bitcoinRPC](#bitcoinrpc)
- [BISQ: Use your node with BISQ](#bisq-use-your-node-with-bisq)
- [EXPORT: Macaroons and TLS.cert](#export-macaroons-and-tls.cert)
- [SSH Download](#ssh-download)
- [Browser download](#browser-download)
- [Hex-String](#hex-string)
- [SUBSCRIBE: Subscription Services](#subscribe-subscription-services)
- [IP2TOR (paid)](#ip2tor-paid)
- [HTTPS with LetsEncrypt (free)](#https-with-letsencrypt-free)
- [PASSWORD: Change Passwords](#password-change-passwords)
- [REPAIR: Options to test, repair and reset your RaspiBlitz](#repair-options-to-test-repair-and-reset-your-raspiblitz)
- [SOFTWARE: Run Software Tests (DebugReport)](#software-run-software-tests-debugreport)
- [BACKUP-LND: Backup your LND data (Rescue-File)](#backup-lnd-backup-your-lnd-data-rescue-file)
- [RESET-LND: Delete LND & start a node/wallet](#reset-lnd-delete-lnd--start-a-nodewallet)
- [REPAIR-CL: Repair/Backup C-Lightning](#repair-cl-repairbackup-c-lightning)
- [MIGRATION: Migrate Blitz Data to new Hardware](#migration-migrate-blitz-data-to-new-hardware)
- [COPY-SOURCE: Offer your Blockchain to another RaspiBlitz for Setup](#copy-source-offer-your-blockchain-to-another-raspiblitz-for-setup)
- [RESET-CHAIN: Delete Blockchain and Re-Download](#reset-chain-delete-blockchain-and-re-download)
- [RESET-HDD: Delete HDD data but keep blockchain](#reset-hdd-delete-hdd-data-but-keep-blockchain)
- [RESET-ALL: Delete HDD completely & start fresh](#reset-all-delete-hdd-completely--start-fresh)
- [DELETE-ELEC: Delete Electrum Index](#delete-elec-delete-electrum-index)
- [DELETE-INDEX: Delete Bitcoin TX-Index](#delete-index-delete-bitcoin-tx-index)
- [UPDATE: Check/Prepare RaspiBlitz Update](#update-checkprepare-raspiblitz-update)
- [RELEASE: Update RaspiBlitz to a new Version](#release-update-raspiblitz-to-a-new-version)
- [PATCH: Patch RaspiBlitz code](#patch-patch-raspiblitz-code)
- [LND: Interim LND Update](#lnd-interim-lnd-update)
- [BITCOIN: Interim Bitcoin Update](#bitcoin-interim-bitcoin-update)
- [REBOOT: Reboot RaspiBlitz](#reboot-reboot-raspiblitz)
- [OFF: PowerOff RaspiBlitz](#off-poweroff-raspiblitz)
- [EXIT: Console Terminal](#exit-console-terminal)
- [Import a Migration File](#import-a-migration-file)
- [Make a RaspiBlitz out of your Umbrel or MyNode](#make-a-raspiblitz-out-of-your-umbrel-or-mynode)
- [Interface / APIs](#interface--apis)
- [Bitcoin](#bitcoin)
- [LND-Lightning](#lnd-lightning)
- [Backup for On-Chain- & Channel-Funds](#-channel-funds)
- [A) Nextcloud](#a-nextcloud)
- [B) SCP Backup Target](#b-scp-backup-target)
- [C) Local Backup Target (USB Thumbdrive)](#c-local-backup-target-usb-thumbdrive)
- [Updating RaspiBlitz to new Version](#updating-raspiblitz-to-new-version)
- [Build the SD Card Image](#build-the-sd-card-image)
- [FAQ](#faq)
- [Community Development](#community-development)
---
## Feature Overview
There are further Services that can be switched on:

70
toc.sh Executable file
View File

@ -0,0 +1,70 @@
#!/usr/bin/env sh
## Updated version maintained on https://github.com/nyxnor/scripts/blob/master/toc.sh
## Produces Table of Contents (ToC) for simple markdown files
## Requirement: header is set by hashtag '#'
## $1 = FILE.md
red="\033[31m"
#nocolor="\033[0m"
error_msg(){ printf %s"${red}ERROR: ${1}\n" >&2; exit 1; }
test -f "${1}" || error_msg "file '${1}' doesn't exist"
trap 'rm -f toc.tmp' EXIT INT
line_count=0
while IFS="$(printf '\n')" read -r line; do
line_count=$((line_count+1))
## extract code blocks
code="${code:-0}"
[ "${code}" -eq 0 ] && printf '%s\n' "${line_count}:${line}" | grep "^${line_count}:.*# "
case "${line}" in
*\`\`\`*)
case "${code}" in
1) code=0;;
0|*) code=1;;
esac
;;
esac
done < "${1}" > toc.tmp
while IFS="$(printf '\n')" read -r line; do
## get line number
line_number="$(printf '%s\n' "${line}" | cut -d ":" -f1)"
## remove hashtag from line to be compared later if it is repeated
line_clean="$(printf '%s\n' "${line}" | sed "s/.*\# //")"
## save header to cache to check later if it was already printed
# shellcheck disable=SC2030
line_cache="$(printf '%s\n%s\n' "${line_cache}" "${line}")"
## check if header was already printed before and if positive, save all repeated headers
## if positive, insert link index
line_repeated="$(printf '%s\n' "${line_cache}" | grep -c -- ".*# ${line_clean}$")"
line_repeated_index=""
## first line does not have '-n', just the first repeated line (second occurence), starting with '-1'. So we consider the occurrence-1.
[ "${line_repeated}" -ge 2 ] && line_repeated_index="-$((line_repeated-1))"
## if it is the second time line has repeated, save first and second occurrence
if [ "${line_repeated}" -eq 2 ]; then
line_first_occurrence="$(printf '%s\n' "${line_cache}" | grep -- ".*# ${line_clean}$" | head -n 1)"
line_repeated_cache="$(printf '%s\n%s\n' "${line_first_occurrence}" "${line}")"
## if it is the third or greater time line has repeated, save lines from before (1st and 2nd occurrence) plus add current lines
elif [ "${line_repeated}" -gt 2 ]; then
line_repeated_cache="$(printf '%s\n%s\n' "${line_repeated_cache}" "${line}")"
fi
## clean header that have link reference
line_md="$(printf '%s\n' "${line}" | sed "s/${line_number}://;s|](.*||;s|\[||;s/\]//g")"
## set header indentation
line_md="$(printf '%s\n' "${line_md}" | sed "s|######| -|;s|#####| -|;s|####| -|;s|###| -|;s|##| -|;s|#|-|")"
## set link content
line_content="$(printf '%s\n' "${line_md}" | sed "s/.*- /#/;s| |-|g;s|'||g;s|]||g;s/|/-/g" | tr "[:upper:]" "[:lower:]" | tr -cd "[:alnum:]-._")"
## set link reference
line_md="$(printf '%s\n' "${line_md}" | sed "s|- |- [|;s|$|](#${line_content}${line_repeated_index})|")"
## print header
printf '%s\n' "${line_md}"
done < toc.tmp
[ -n "${line_repeated_cache}" ] &&
printf %s"\n\nWARN: Some headers are repeated, the hiperlinks are correctly indexed. If you think this is an error, review these lines:headers:\n${line_repeated_cache}\n"