raspiblitz/README.md

969 lines
57 KiB
Markdown
Raw Normal View History

2019-06-30 18:41:40 +02:00
![RaspiBlitz](pictures/raspilogo_400px.png)
2019-06-30 18:42:46 +02:00
2019-02-05 18:24:33 +01:00
*Build your own Lightning Node on a RaspberryPi with a nice Display.*
2018-07-14 13:58:12 +02:00
2020-03-18 20:26:55 +01:00
`Version 1.5 with lnd 0.9.2-beta and bitcoin 0.19.1 or litecoin 0.17.1.`
2018-08-28 19:19:29 +02:00
2018-07-18 00:55:08 +02:00
![RaspiBlitz](pictures/raspiblitz.jpg)
2018-07-14 13:58:12 +02:00
2020-02-18 12:29:05 +01:00
**The RaspiBlitz is a do-it-yourself Lightning Node based on LND running together with a Bitcoin-Fullnode on a RaspberryPi 3/4 - with a HDD/SSD and an nice display for easy setup & monitoring.**
2019-02-12 01:02:12 +01:00
2020-02-18 12:29:05 +01:00
RaspiBlitz is mainly targeted for learning how to run your own node decentralized from home - because: Not you Node, Not your Rules. 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.
2018-07-14 13:58:12 +02:00
2019-02-11 19:39:12 +01:00
## Feature Overview
2019-02-12 00:19:45 +01:00
This is a quick look at the SSH main menu (once RaspiBlitz is SetUp):
2019-02-11 19:39:12 +01:00
2019-02-12 00:18:03 +01:00
![MainMenu-A](pictures/mainmenu.png)
2019-02-11 19:39:12 +01:00
2020-02-18 12:29:05 +01:00
As an alternative to the SSH menu the "Ride the Lightning" (RTL) WebUI is available:
2019-02-11 19:39:12 +01:00
2019-02-11 19:46:22 +01:00
![RTL-preview](pictures/RTL-dashboard.png)
2019-02-11 19:39:12 +01:00
2020-02-18 12:29:05 +01:00
There are further Services that can be switched on:
2020-02-18 12:14:02 +01:00
* **TOR** (Run as Hidden Service) [details](https://en.wikipedia.org/wiki/Tor_(anonymity_network)#Onion_services)
2020-02-18 12:55:29 +01:00
* **ElectRS** (Electrum Server in Rust) [details](https://github.com/romanz/electrs)
* **BTCPayServer** (Cryptocurrency Payment Processor) [details](https://btcpayserver.org)
* **BTC-RPC-Explorer** (Bitcoin Blockchain Explorer) [details](https://github.com/janoside/btc-rpc-explorer)
* **LNBits** (Lightning wallet/accounts System) [details](https://github.com/arcbtc/lnbits)
* **SpecterDesktop** (Multisig Trezor, Ledger, COLDCARDwallet & Specter-DIY) [details](https://twitter.com/CryptoAdvance/status/1233833767283941376?s=20)
2020-02-18 12:55:29 +01:00
* **LNDmanage** (Advanced Channel Management CLI) [details](https://github.com/bitromortac/lndmanage)
* **Loop** (Submarine Swaps Service) [details](https://github.com/lightninglabs/loop)
2020-02-18 14:00:14 +01:00
You can connect the following Wallet-Apps to your RaspiBlitz:
* **Zap** (Android, iOS & Desktop) [details](https://zap.jackmallers.com/)
* **Zeus** (Android & iOS-TestFlight) [details](https://zeusln.app)
* **Shango** (Android & iOS-TestFlight) [details](https://github.com/neogeno/shango-lightning-wallet)
* **Fully Noded** (iOS) [details](https://apps.apple.com/us/app/fully-noded/id1436425586)
Also much more features like Touchscreen, Autopilot, DynDNS, SSH-Tunneling, UPS Support, ...
2019-02-11 19:39:12 +01:00
2019-02-05 18:24:33 +01:00
## Time Estimate to Setup a RaspiBlitz
2018-07-14 13:58:12 +02:00
The RaspiBlitz is optimized for being setup during a workshop at a hackday or conference (see [detailed workshop tutorial](WORKSHOP.md)). When it comes ready assembled together with a up-to-date synced blockchain it's possible to have it ready in about 2 to 3 hours - most is waiting time.
2018-07-14 13:58:12 +02:00
If you start at home ordering the parts from Amazon (see shopping list below) then it's a weekend project with a lot of download and syncing time where you can do other stuff while checking on the progress from time to time.
2018-07-14 13:58:12 +02:00
2019-02-05 18:24:33 +01:00
## Hardware Needed
2018-07-20 14:16:41 +02:00
2019-06-30 18:50:37 +02:00
The RaspiBlitz is build from the following minimal parts:
2018-09-14 05:25:33 +02:00
2019-06-30 18:50:37 +02:00
* RaspBerryPi 3B/4B
2019-09-02 21:57:49 +02:00
* 500GB USB HDD or SSD
2019-06-30 18:50:37 +02:00
* LCD-Display HAT
* 16GB Micro SD-Card
* Power supply >=3A (stable output is important)
2018-10-18 16:45:00 +02:00
2019-09-02 21:57:49 +02:00
**All parts together are at around 150-200 USD - based on shops and location.**
2018-10-18 16:45:00 +02:00
2019-05-07 16:56:31 +02:00
### Buy a ready-2-go RaspiBlitz (Germany, EU and International)
2018-10-18 16:45:00 +02:00
2020-02-18 12:14:02 +01:00
If you like to support the RaspiBlitz project you can order a ready-2-go RaspiBlitz or a all-you-need-hardware set for yourself or for your RaspiBlitz workshop from [raspiblitz.com](https://raspiblitz.com)
2019-05-07 16:56:31 +02:00
2020-02-17 00:13:14 +01:00
### Amazon Shopping List (buy parts & build it yourself)
2019-05-07 16:56:31 +02:00
2020-02-17 00:13:14 +01:00
The cheapest way is to buy and assemble the single parts yourself. The new shopping list comes in three different packages: Minimal, Standard & Maximal:
2018-10-18 16:48:55 +02:00
2020-02-17 00:13:14 +01:00
#### Package: Standard (around 250 USD)
*The "Standard Package" is most tested and recommended if you can effort it. It aims to give you the best economic value to run all the RaspiBlitz features at a good performance and even allows you to self-validate your blockchain in under 3 days.*
* RaspBerry Pi 4 2GB + Power: [amazon](https://geni.us/raspiblitz-2gb-power)
* Heatsink-Case RP4: [amazon](https://geni.us/heatsink-raspi4)
2020-02-17 00:13:14 +01:00
* 500GB SSD: [amazon](https://geni.us/raspiblitz-500gb-ssd)
* SSD-Case: [amazon](https://geni.us/raspiblitz-ssd-case)
* Micro SD-Card 32GB: [amazon](https://geni.us/raspiblitz-sc-card)
* LCD-Display: [amazon](https://geni.us/raspiblitz-touchscreen)
#### Package: Minimal (around 180 USD)
*The minimal package aims for the cheapest price and allows you to use old hardware. It will always be possible to run all the basic features of a Bitcoin- & Lightning-Fullnode, but the system might be too slow to validate the blockchain history by itself and run some resource intensive extended services.*
Basic Parts for all minimal variants:
* 1TB Hard Drive: [amazon](https://geni.us/raspiblitz-hdd)
* Micro SD-Card 16GB: [amazon](https://geni.us/raspiblitz-sd-card16gb)
* LCD-Display: [amazon](https://geni.us/raspiblitz-touchscreen)
If you have already a used RaspberryPi 3 B+ you can reuse with the following parts:
* RaspBerry Pi 3: [amazon](https://geni.us/raspiblitz-rpi3)
* Heatsink-Case RP3: [amazon](https://geni.us/raspiblitz-heatsink)
2020-02-17 00:13:14 +01:00
* Power >=3A: [amazon](https://geni.us/raspiblitz-3A-power)
Or if you order new go with the RaspberryPi 4 2GB and the following parts:
* RaspBerry Pi 4 2GB + Power: [amazon](https://geni.us/raspiblitz-2gb-power)
* Heatsink-Case RP4: [amazon](https://geni.us/heatsink-raspi4)
2020-02-17 00:13:14 +01:00
#### Package: Maximal
*The maximal package is still in the works ... if you want to prepare for it, take the standard package as a base and choose the RaspberryPi4 with 4GB and a high quality 1TB SSD instead of 500GB.*
* RaspBerry Pi 4 4GB: [amazon](https://geni.us/raspiblitz-4-4gb-power)
* Heatsink-Case RP4: [amazon](https://geni.us/heatsink-raspi4)
2020-02-17 00:13:14 +01:00
* LCD-Display: [amazon](https://geni.us/raspiblitz-touchscreen)
* Micro SD-Card 32GB: [amazon](https://geni.us/raspiblitz-sc-card)
* 1000GB SSD: [amazon](https://geni.us/raspiblitz-1000gb-san)
* SSD-Case: [amazon](https://geni.us/raspiblitz-ssd-case)
2018-07-14 13:58:12 +02:00
*You can even pay your RaspiBlitz Amazon Shopping with Bitcoin & Lightning through [Bitrefill](https://blog.bitrefill.com/its-here-buy-amazon-vouchers-with-bitcoin-on-bitrefill-bb2a4449724a).*
2018-07-14 13:58:12 +02:00
2019-02-12 00:55:42 +01:00
* [What other case options do I have?](FAQ.md#what-other-case-options-do-i-have)
2019-01-02 18:02:06 +01:00
## Assemble your RaspiBlitz
When you have all parts you need to:
2019-01-02 18:02:06 +01:00
- Assemble the Heatsink-Case on the RaspberryPi (follow the intructions in package).
- Put the SSD/Hdd into the Case and connect it per USB to the RaspberryPi
- Add the display on top with the pins like in picture below.
- PlugIn the network cable.
2019-09-02 21:57:49 +02:00
In the end your RaspiBlitz should look like this:
2019-01-02 18:02:06 +01:00
![HardwareSetup](pictures/hardwaresetup.jpg)
## Installing the Software
2018-07-14 13:58:12 +02:00
Your SD-card needs to contain the RaspiBlitz software. You can take the long road by [building the SD-card image yourself](#build-the-sd-card-image) or use the already prepared SD-Card image:
2018-07-14 13:58:12 +02:00
2020-03-18 20:26:55 +01:00
**Download SD-Card image - Version 1.5:**
2019-02-18 20:52:32 +01:00
2020-03-30 17:38:38 +02:00
*IMPORTANT: This is just a Release Candidate - not the final release. Please just use if you feel reckless and like to help on testing. If you have serious funds on your node please wait for the final release before updating.*
2019-02-18 21:32:42 +01:00
2020-03-31 00:28:08 +02:00
Browser: https://raspiblitz.com/raspiblitz-v1.5RC1-2020-03-31.img.gz
2019-12-25 14:38:18 +01:00
2020-03-30 17:38:38 +02:00
Torrent: TODO just for final release
2020-03-31 00:29:02 +02:00
SHA-256: 0463dbad63b25ec3f2565fe555fd97e64cbe1c981a16dab07f1c9074c4dae5c2 or [SIGNATURE](TODO just for final release)
2019-09-04 20:18:18 +02:00
2019-03-19 00:17:08 +01:00
**Write the SD-Card image to your SD Card**
You need to write the downloaded sd card image (the img.gz-file) to your sd card (16GB minimum) - you can use the very easy tool Balena Etcher for this:
https://www.balena.io/etcher/ .. it's available for Win, Mac & Linux.
2018-07-14 13:58:12 +02:00
* [How to update my RaspiBlitz?](README.md#updating-raspiblitz-to-new-version)
* [Whats new in Version 1.4 of RaspiBlitz?](FAQ.md#whats-new-in-version-14-of-raspiblitz)
2019-09-04 20:23:02 +02:00
* [How to verify the sd card image after download?](FAQ.md#how-to-verify-the-sd-card-image-after-download)
2018-07-14 13:58:12 +02:00
2018-07-23 23:38:42 +02:00
## Boot your RaspiBlitz
2018-07-14 13:58:12 +02:00
2019-01-02 18:02:06 +01:00
Insert the SD card and connect the power plug.
2018-07-14 13:58:12 +02:00
* Make sure to connect the raspberry with a LAN cable to the internet at this point.
* Make sure that your laptop and the raspberry are on the same local network.
2019-02-12 22:37:14 +01:00
**Troubleshoot:**
* [I don't have a LAN port on my Laptop - how to connect to my RaspiBlitz?](FAQ.md#i-dont-have-a-lan-port-on-my-laptop---how-to-connect-to-my-raspiblitz)
2019-02-12 22:54:27 +01:00
* [Is it possible to connect the Blitz over Wifi instead of using a LAN cable?](FAQ.md#is-it-possible-to-connect-the-blitz-over-wifi-instead-of-using-a-lan-cable)
* [Can I directly connect the RaspiBlitz with my laptop?](FAQ.md#can-i-directly-connect-the-raspiblitz-with-my-laptop)
2019-02-12 22:37:14 +01:00
* [I connected my HDD but it still says 'Connect HDD' on the display?](FAQ.md#i-connected-my-hdd-but-it-still-says-connect-hdd-on-the-display)
When everything boots up correctly, you should see the local IP address of your RaspiBlitz on the LCD panel.
2018-07-14 13:58:12 +02:00
2018-07-18 00:55:08 +02:00
![LCD0](pictures/lcd0-welcome.png)
Now open up a terminal ([OSX](https://www.youtube.com/watch?v=5XgBd6rjuDQ)/[Win10](https://www.youtube.com/watch?v=xIfzZXHaCzQ)) and connect through SSH with the command displayed by the RaspiBlitz:
2018-07-17 20:45:49 +02:00
2018-07-17 21:38:47 +02:00
`ssh admin@[YOURIP]` → use password: `raspiblitz`
2018-07-14 13:58:12 +02:00
**Now follow the dialogue in your terminal. This can take some time (prepare some coffee) - but in the end you should have a running Lightning node on your RaspberryPi that you can start to learn and hack on.**
2018-07-14 13:58:12 +02:00
2019-03-19 15:28:15 +01:00
* [I cannot connect per SSH to my RaspiBlitz. What to do?](FAQ.md#i-cannot-connect-per-ssh-to-my-raspiblitz-what-to-do)
2019-03-19 15:26:42 +01:00
2019-02-06 17:08:41 +01:00
## Support
2019-02-12 00:34:49 +01:00
If you run into a problem or you have still a question, follow the steps below to get support. Also check the [setup documentation](#setup-process-detailed-documentation) for details.
2019-02-06 17:08:41 +01:00
1. Lookup the [FAQ](FAQ.md) if you can find an answer to this question/problem.
2019-02-06 17:08:41 +01:00
2. If you have a hardware problem, please check that your hardware parts are exactly the parts recommended in the shopping list above. Different screens or even SSD-casings can cause problems.
2019-02-06 17:08:41 +01:00
3. There is a Telegram Group of RaspiBlitz users helping each other: https://t.me/raspiblitz
2019-02-06 17:08:41 +01:00
4. Please determine if your problem/question is about RaspiBlitz or for example with LND. For example if you cant route a payment or get an error when opening a channel that is an LND question/problem an is best answered by the LND dev community: https://dev.lightning.community
5. Go to the GitHub issues of the RaspiBlitz: https://github.com/rootzoll/raspiblitz/issues Do a search there. Also check closed issues by removing 'is:open' from the filter/search-box.
2019-09-03 15:23:02 +02:00
6. If you haven't found an answer yet, open a new issue on the RaspiBlitz GitHub. You may have to register an account with GitHub for this. If it's a bug with the RaspiBlitz, please add (copy+paste) a Debug Report to your issue (see [FAQ](FAQ.md) how to generate) and/or add some screenshots/photos so the community gets more insight into your problem.
2019-02-06 17:08:41 +01:00
2019-02-10 17:52:12 +01:00
## Setup Process (Detailed Documentation)
2018-07-14 13:58:12 +02:00
2019-05-03 12:20:29 +02:00
*The goal is, that all information needed during setup is provided from the interaction with the RaspiBlitz itself during the setup. Documentation in this chapter is for background, comments for educators and to mention edge cases.*
2018-07-14 13:58:12 +02:00
If you are looking for a tutorial on how to organize a workshop to build the RaspiBlitz, [see here](WORKSHOP.md).
2019-04-03 22:33:01 +02:00
2019-02-10 17:52:12 +01:00
### Init
2018-07-18 00:55:08 +02:00
Automatically after login per SSH as admin to the RaspiBlitz, it will run a hardware test.
2019-04-28 21:57:54 +02:00
2019-09-05 14:44:17 +02:00
![HardwareTest](pictures/hardwaretest.png)
2018-07-18 00:55:08 +02:00
If you see a warning there, please read carefully, because a lot of things that go wrong later (errors and even loss of funds) relate of problems with the hardware. If you get an OK here ... you are good to go :)
2018-07-18 00:55:08 +02:00
2020-02-20 02:44:23 +01:00
In the beginning you can choose how to setup your RaspiBlitz, by running on Bitcoin or Litecoin with Lightning. This is also the point where you can import a Migration file from an older RaspiBlitz - read about Migration [further down](README.md#import-a-migration-file). The default is here to choose Bitcoin.
2018-07-18 00:55:08 +02:00
2019-09-05 14:44:17 +02:00
![SSH0](pictures/ssh0-welcome2.png)
2018-07-18 00:55:08 +02:00
2019-02-09 19:48:17 +01:00
First thing to setup is giving your RaspiBlitz a name:
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
![SSH1](pictures/ssh1-name.png)
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
This name is given to the RaspiBlitz as an public alias of the lightning node for everybody to see.
2018-07-18 00:55:08 +02:00
2019-02-09 19:48:17 +01:00
Then the user gets requested to think of and write down 4 passwords:
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
![SSH2](pictures/ssh2-passwords.png)
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
You can use this [RaspiBlitz Password Sheet (PDF)](https://github.com/rootzoll/raspiblitz/raw/v1.4/home.admin/assets/RaspiBlitzRecoverySheet.pdf) to write those passwords down for save storage. And also use it later on for your Seed Words.
*The password A,B,C & D idea is directly based in the [RaspiBolt Guide Preperations](https://stadicus.github.io/RaspiBolt/raspibolt_10_preparations.html#write-down-your-passwords) - check out for more background.*
2018-07-18 00:55:08 +02:00
Then the user is asked to enter the Password A:
![SSH3a](pictures/ssh3a-password.png)
2020-02-20 02:06:58 +01:00
This is the new password has to be used for every SSH login after this screen with the user admin. It's also set for the other user existing user: root, bitcoin & pi.
2018-07-18 00:55:08 +02:00
2019-02-09 19:48:17 +01:00
*The bitcoin and lightning services will later run in the background (as daemon) and use the separate user “bitcoin” for security reasons. This user does not have admin rights and cannot change the system configuration.*
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
Then the user is asked to enter the Password B - this is internally used for the bitcoin RPC interface. But also as login for additional Apps like the RTL-WebGUI or the Blockexplorer:
2018-07-18 00:55:08 +02:00
![SSH3b](pictures/ssh3b-password.png)
2019-02-09 19:48:17 +01:00
*The other passwords C & D will be needed later on. They will be used during the lightning wallet setup.*
2018-07-18 00:55:08 +02:00
2019-09-05 14:44:17 +02:00
### Running behind TOR
On setup you can now decide if you want to run your RaspiBlitz behind TOR or make your IP public to the lightning network.
2019-09-05 14:44:17 +02:00
![TOR](pictures/chooseTOR.png)
Your IP can reveal your location (at least to a certain radius) to everyone and your internet provider has a record of your personal identity tied to your IP. When you choose to run behind the TOR network this personal data is much better protected. But running behind TOR reduces speed and might makes it more difficult to connect to you for other nodes or pairing other devices and apps to it.
2019-09-05 14:44:17 +02:00
You can switch TOR off later on. Also you can switch TOR on also after the setup, but keep in mind that once running your node with your public IP leaves records on the internet connecting your lightning node id to your public IP.
2020-02-20 02:06:58 +01:00
After this the setup process will need some time and the user will see a lot of console outputs - just wait until its finished:
2018-07-18 00:55:08 +02:00
![SSH4](pictures/ssh4-scripts.png)
2019-02-10 17:52:12 +01:00
### Getting the Blockchain
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
*If you have a HDD/SSD with a prepared blockchain (e.g. a ready2go-set or you are at a workshop) you have the option to trust that data and skip to the [next chapter](#setup-lightning). If you started with an empty HDD - you will see the following screens:*
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
If you connected a fresh Hard Drive or SSD to the RaspiBlitz it might now ask you if it's OK to format it.
2019-05-03 15:18:21 +02:00
<img src="pictures/ssh4-formatHDD.png" alt="format-HDD" width="366">
2018-07-18 00:55:08 +02:00
2020-02-20 02:47:13 +01:00
*Your HDD/SSD will get formatted with the linux standard file system EXT4. If you want to try out the experimental new [BTRFS](FAQ.md#why-use-btrfs-on-raspiblitz) that RaspiBlitz supports since v1.4 - you need to start the setup with an additional 32GB USB thumb drive connected to the second USB3 port of the RaspberryPi. Then you will unlock this new secret feature.*
2020-02-20 02:06:58 +01:00
After formatting you need to get a copy of the blockchain, the RaspiBlitz offers the following options:
2019-05-03 12:20:29 +02:00
<img src="pictures/ssh5-blockchain2.png" alt="blockchain-options" width="551">
2018-07-18 00:55:08 +02:00
2019-02-10 11:53:49 +01:00
The options - and when to choose which - will be explained here shortly:
2018-10-19 01:46:57 +02:00
2020-02-20 02:06:58 +01:00
#### 1. SYNC - Selfvalidate all Blocks
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
With the new RaspberryPi 4 (with SSD & min 2GB RAM) this is the best way to go. It will take around 2-3 days to sync & validate directly with the bitcoin network and then you have done it completely the original `don't trust, verify` way.
2019-09-05 14:44:17 +02:00
2020-02-20 02:06:58 +01:00
*For the old RaspberryPi 3 this is not recommended. A RaspberryPi 3 has a very low power CPU and syncing+validating the blockchain directly with the peer2peer network can take multiple weeks - that's why the other options above where invented.*
2019-02-10 17:38:18 +01:00
2020-02-20 02:06:58 +01:00
#### 2. COPY - Copy from Laptop or another RaspiBlitz over Local Network
2019-02-10 17:38:18 +01:00
2020-02-20 02:06:58 +01:00
If you have another computer available (laptop, desktop or another RaspiBlitz) that already runs a working blockchain you can use this option to copy it over to the RaspiBlitz. This will be done over the local network by SCP (SSH file transfer). Choose this option and follow the given instructions.
2019-02-10 17:38:18 +01:00
2020-02-20 02:06:58 +01:00
This is also the best option if you don't like to run your RaspberryPi 3 with a prepared blockchain by a third party. Then install bitcoin-core (0.18.1 or higher) on a more powerful computer, sync+validate the blockchain there by yourself and copy it over after that through the local network.
2019-02-10 17:38:18 +01:00
2020-02-20 02:06:58 +01:00
More details: [I have the full blockchain on another computer. How do I copy it to the RaspiBlitz?](FAQ.md#i-have-the-full-blockchain-on-another-computer-how-do-i-copy-it-to-the-raspiblitz)
2019-02-10 17:48:32 +01:00
2020-02-20 02:06:58 +01:00
#### 3. Torrent Fallback
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
*This is recommended for old RaspberryPi 3s - for the newer RaspberryPi 4 you might consider the `SYNC` option.*
2018-07-14 13:58:12 +02:00
2020-02-20 02:06:58 +01:00
If you choose `TORRENT` it will show you the following screen:
2018-07-14 13:58:12 +02:00
2020-02-20 02:06:58 +01:00
![DOWNLOAD1](pictures/download-torrent.png)
2019-02-10 17:48:32 +01:00
2020-02-20 02:06:58 +01:00
*This can take a while - normally it should be done if you keep it running over night, but some users reported that it took up to 3 days. If it takes longer than that or you cannot see any progress (downloading starting) for over an hour after you started this option consider to cancel the download and go with the COPY option or retry fresh.*
2018-07-14 13:58:12 +02:00
2020-02-20 02:06:58 +01:00
It is safe to close the terminal window (and shutting down your laptop) while the RaspiBlitz is doing the torrent download. To check on progress and to continue the setup you need to ssh back in again.
2018-07-14 13:58:12 +02:00
2020-02-20 02:06:58 +01:00
You can cancel the torrent download by keeping the key `x` pressed. Then the download will stop and you will be asked if you want to keep the progress so far. This makes sense if you need to shutdown the RaspiBlitz and you want to continue later or when you want to try another download option but want to keep the option to continue on torrent if the other option is slower or not working.
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
* [I don't trust a torrent blockchain, how can I validate myself?](FAQ.md#how-can-i-avoid-using-a-prepared-blockchain-and-validate-myself)
* [Why is taking my torrent download of the blockchain so long?](FAQ.md#why-is-taking-my-torrent-download-of-the-blockchain-so-long)
2019-02-10 11:53:49 +01:00
2020-02-20 02:06:58 +01:00
#### 4. Cloning from a 2nd HDD (just offered on old RaspberryPi3)
2019-09-05 14:44:17 +02:00
2020-02-20 02:06:58 +01:00
*This feature is deprecated because its hard to setup and handle. It will just be offered on old RaspberryPi 3. And de removed in future version.*
This is a backup way to transfer a blockchain from another computer if copying over the network is not working. More details on the setup can be found [here](FAQ.md#how-do-i-clone-the-blockchain-from-a-2nd-hdd).
2018-07-18 00:55:08 +02:00
2019-02-10 17:52:12 +01:00
### Setup Lightning
2018-07-18 00:55:08 +02:00
2019-02-11 17:13:59 +01:00
Lightning is installed and waiting for your setup if you see this screen.
2018-07-18 00:55:08 +02:00
2018-07-18 02:41:02 +02:00
![SSH7](pictures/ssh7-lndinit.png)
2018-07-18 00:55:08 +02:00
You now decide if you want to setup a fresh new wallet or if you want to recover an old wallet from a RaspiBlitz you had before.
2019-05-03 12:20:29 +02:00
#### Setup a NEW Wallet
This is the default if you setup a RaspiBlitz the first time.
2018-07-18 00:55:08 +02:00
2018-07-18 02:41:02 +02:00
![SSH8](pictures/ssh8-wallet.png)
2018-07-18 00:55:08 +02:00
RaspiBlitz will ask you to set your wallet unlock password - use your chosen PASSWORD C here and confirm it by inputting it a second time.
LND will now generate a fresh cipher seed (word list) for you.
![SSH8](pictures/ssh8-walletb.png)
2020-02-20 02:06:58 +01:00
WRITE YOUR PERSONAL WORDS DOWN before you continue - without it you limit your chances to recover funds in case of failing hardware etc. If you just want to try/experiment with the RaspiBlitz at least take a photo with your smartphone just in case. If you might plan to keep your RaspiBlitz running store this word list offline or in a password safe. You can use the [RaspiBlitz Password Sheet (PDF)](https://github.com/rootzoll/raspiblitz/raw/v1.4/home.admin/assets/RaspiBlitzRecoverySheet.pdf) for this.
#### Recover a OLD Wallet
Choose this option if you had an old RaspiBlitz you want to recover. You have three options to do that:
![SSH7](pictures/ssh7-lndrecover.png)
The RaspiBlitz calling the LND wallet creation command for you:
##### LNDRESCUE LND tar.gz-Backupfile (BEST)
2020-02-20 02:06:58 +01:00
Choose this option if you have made a complete backup of the LND data and have a tar.gz file starting withthe word 'lnd-rescue' available. It will recover all your on-chain funds and open channels you had. But you have to be sure, that the LND backup you have is really the latest version - otherwise you might loose channel funds.
*If you have tar.gz file that starts with 'raspiblitz' than thats a migration file. That also includes your old LND wallet, but you import it earlier in the setup process .. see further below for details.*
##### SEED+SCB Words Seed & channel.backup file (OK)
2018-07-18 00:55:08 +02:00
Next best option is, if you have the channel.backup file and the word seed. This is the best chance to recover your on-chain funds and funds you had in open channels. But all channels you had open before will be closed in this procedure.
2018-07-18 02:41:02 +02:00
##### ONLY SEED Only Seed Word List (Fallback)
2018-07-18 00:55:08 +02:00
If you just have the word list (RaspiBlitz 1.1 and older) you can at least try to recover your on-chain funds. Recover of channel funds is not very likely in this scenario.
2019-02-11 17:13:59 +01:00
### Final LND Setup
2019-02-11 17:13:59 +01:00
It will now make sure your wallet is initialized correctly and may ask you to unlock it with your just set PASSWORD C.
![SSH9c](pictures/ssh9c-unlock.png)
*The LND wallet needs to get unlocked on every new start/reboot of the RaspiBlitz.*
The RaspiBlitz will now do final setup configuration like installing tools, moving the SWAP file to the HDD or activating the firewall. You will see some text moving across the screen until this screen:
2018-07-18 00:55:08 +02:00
2018-07-18 04:41:44 +02:00
![SSH9b](pictures/ssh9b-reboot.png)
2018-07-18 00:55:08 +02:00
2019-05-03 12:20:29 +02:00
The basic setup is done - hooray ... but it can now take still some time before everything is ready and you can play around with your new RaspiBlitz. Press OK to make a reboot. Your terminal session will get disconnected and the raspberry pi restarts.
2019-02-11 17:31:59 +01:00
### First Start: Syncing & Scanning
2019-02-11 17:13:59 +01:00
After the reboot is done it takes a while for all services to start up - wait until you see on the LCD/display that LND wallet needs to get unlocked. Then SSH in again with the same command like in the beginning (check LCD/display) but this time (and every following login) use your PASSWORD A.
2019-02-11 17:13:59 +01:00
After terminal login LND will ask you (like on every start/reboot) to unlock the wallet again - use PASSWORD C:
2018-07-18 00:55:08 +02:00
2018-07-18 04:41:44 +02:00
![SSH9c](pictures/ssh9c-unlock.png)
2018-07-18 00:55:08 +02:00
2020-02-20 02:06:58 +01:00
Now on first start you will have a longer waiting time (between 10 minutes and 2-3 days, depending on your initial setup) ... but that's OK, just leave the RaspiBlitz running until it's done.
2019-02-11 17:13:59 +01:00
2019-04-28 20:19:44 +02:00
![SSH9d1](pictures/ssh9d-sync.png)
2019-02-11 17:13:59 +01:00
2020-02-20 02:06:58 +01:00
*You can even close your terminal now and shutdown your laptop and ssh back in later on. You will see on the Blitz LCD/display that it is ready, when the blue background screen is gone and you see a status screen.*
To understand what is taking so long .. it's two things:
2019-04-28 20:19:44 +02:00
1. Blockchain Sync
2019-02-11 17:13:59 +01:00
The blockchain on your HDD is not absolutely up-to-date. Depending how you got it transferred to your RaspiBlitz it will be some hours, days or even weeks behind. Now the RaspiBlitz needs to catch-up the rest by directly syncing with the peer-2-peer network until it reaches almost 100%. But even if you see in the beginning a 99.8% this can take time - gaining 1% can be up to 4 hours (depending on network speed). So be patient here.
2019-02-11 17:13:59 +01:00
2019-04-28 20:19:44 +02:00
2. Lightning Scanning
2018-07-18 00:55:08 +02:00
2019-04-28 20:19:44 +02:00
Automatically if the Blockchain Sync is progressing LND will start to scan the blockchain and collect information. The Lightning scanning alone normally just take around 1 hour until the waiting time is over. Can take much longer if you recover on old wallet from seed.
2018-07-18 00:55:08 +02:00
2019-05-03 12:20:29 +02:00
* [Why is my "final sync" taking so long?](FAQ.md#why-is-my-final-sync-taking-so-long)
2019-09-05 14:44:17 +02:00
Once all is done you should see this status screen on the RaspiBlitz LCD/display like this:
2018-07-18 00:55:08 +02:00
2019-02-11 19:39:12 +01:00
![SSH9dz](pictures/ssh9z-ready.png)
2019-02-11 17:31:59 +01:00
### Main Menu
If you now login by SSH in your RaspiBlitz (or you are still logged in) you will the the Main Menu:
2020-02-20 02:06:58 +01:00
![SSH9e1](pictures/mainmenu.png)
2018-08-09 17:34:55 +02:00
And if you scroll down .. you see even more options. All options of the main menu will be explained below in the feature documentation.
2018-08-09 17:34:55 +02:00
2019-02-11 19:39:12 +01:00
*OK .. so from here on your RaspiBlitz is ready to play with.*
2018-07-18 00:55:08 +02:00
2019-02-11 19:39:12 +01:00
If you need an idea what the most basic next steps to experience Lightning would be:
2019-02-11 17:31:59 +01:00
* Fund on-chain Wallet
* Open a channel
* Make a payment
If you like to do this all from a web browser with a dashboard UI instead from an SSH terminal, go to `SERVICES`, activate the `RTL Webinterface` and after the reboot open in your web browser: http://[LOCAL-IP-OF-YOU-NODE]:3000 (PASSWORD B is your RPC password).
2019-02-11 19:39:12 +01:00
2019-05-03 12:20:29 +02:00
Have fun riding the lightning :D
2019-02-11 17:31:59 +01:00
2020-02-20 02:06:58 +01:00
*BTW always love seeing photos of new RaspBlitzes added to the network on twitter @rootzoll - also there is a [RaspiBlitz Donation Page](https://tallyco.in/s/r5lx23/), why not try to send some satoshis there with your new RaspiBlitz :D *
2019-02-11 17:31:59 +01:00
2019-02-11 20:28:50 +01:00
* [How can I get further help/support?](#support)
2018-07-14 13:58:12 +02:00
2019-02-11 19:39:12 +01:00
### Feature Documentation
2020-02-20 02:06:58 +01:00
These are the features available through the RaspiBlitz SSH menus. They have the goal to offer some basic/fallback functionality & configurations. More complex or user-friendly tasks are best to be done with wallets, apps and scripts you connect to your Lightning Node via [APIs](#interface--apis) - because you have a full Bitcoin- and Lightning-Node on the RaspiBlitz.
2019-02-11 19:39:12 +01:00
2020-02-20 02:06:58 +01:00
So lets take a look at the SSH main menu (from top to bottom):
2019-02-11 21:46:03 +01:00
2019-02-11 19:39:12 +01:00
![MainMenu-A](pictures/mainmenu1.png)
2019-02-11 21:46:03 +01:00
#### INFO: Raspiblitz Status Screen
2018-07-17 13:47:45 +02:00
This is the screen that gets displayed on the LCD/display. It's useful to call in a remote situation from SSH if you don't have your RaspiBlitz next to you. But also if you want to copy+paste your nodeID or make a screenshot.
2019-02-11 22:42:41 +01:00
![SSH9dz](pictures/ssh9z-ready.png)
*It's not automatically updating. It's just for one-time info.*
2019-02-10 17:53:33 +01:00
2019-02-12 22:37:14 +01:00
* [Why is my bitcoin IP on the display red?](FAQ.md#why-is-my-bitcoin-ip-on-the-display-red)
* [Why is my node address on the display red?](FAQ.md#why-is-my-node-address-on-the-display-red)
* [Why is my node address on the display yellow (not green)?](FAQ.md#why-is-my-node-address-on-the-display-yellow-not-green)
2019-02-11 21:46:03 +01:00
#### FUNDING: Fund your on-chain Wallet
2018-07-18 01:18:33 +02:00
2019-02-11 22:36:08 +01:00
Before you can open channels with other nodes you need to put some coins onto your LND on-chain wallet. Use this option to generate an address to send funds to.
*Reminder: RaspiBlitz & LND is still experimental software. With funding your LND node you accept the risk of loosing funds. So just play with small amounts - something in then area of 20 EUR/USD should be enough to make your first experiences. Also, it's a good privacy practice to [coinjoin your coins](https://bitcoin-only.com/#privacy) before sending them to any Lightning Network wallet.*
2019-02-11 22:36:08 +01:00
2019-05-03 12:20:29 +02:00
You can make multiple fundings - so you can start with small amounts first to test. LND will generate always a different address, but all funds you send will get into the same LND on-chain wallet.
2019-02-11 21:46:03 +01:00
#### CONNECT: Connect to a Peer
2018-07-18 00:55:08 +02:00
Before you can open a channel with another node on the network you need to connect this node as a peer to your node.
2019-02-11 22:36:08 +01:00
Opening a channel with a peer is just optional. Having another node a peer helps your node to receive information about the network through the gossip protocol. It will help your node to find better routes through the network.
2019-02-11 22:36:08 +01:00
2019-02-11 21:46:03 +01:00
#### CHANNEL: Open a Channel with Peer
2018-07-27 12:07:00 +02:00
2019-02-11 22:36:08 +01:00
To open a payment channel with another node you can use this option.
Find interesting nodes to open channels with on online directories like [1ML.com](https://1ml.com/) or join the RaspiBlitz NodeManager telegram group to meet people to open channels with: https://t.me/raspiblitz
2019-02-11 22:36:08 +01:00
2020-02-20 02:06:58 +01:00
Bear in mind that this option will open a public channel that can be seen by everyone in the network. This is good if you want to route payments. If your intention is to use it privately only, you will need to go to the command line and open the channel with the -private option.
2019-02-11 22:36:08 +01:00
*This is just a very basic shell script. For more usability try the RTL Webinterface (under Services) or connect a (mobile) wallet with your RaspiBlitz.*
2019-02-11 21:46:03 +01:00
#### SEND: Pay an Invoice/PaymentRequest
2018-07-17 21:38:47 +02:00
Pay an invoice through lightning.
2019-02-11 22:36:08 +01:00
*This is just a very basic shell script. For more usability try the RTL Webinterface (under Services) or connect a (mobile) wallet with your RaspiBlitz.*
2019-02-11 21:46:03 +01:00
#### RECEIVE: Create Invoice/PaymentRequest
2018-07-17 13:47:45 +02:00
Create an invoice to send to someone or a service to be payed through lightnig.
2019-02-11 22:36:08 +01:00
*This is just a very basic shell script. For more usability try the RTL Webinterface (under Services) or connect a (mobile) wallet with your RaspiBlitz.*
2020-02-20 02:06:58 +01:00
#### CHASHOUT: Remove Funds fro, on-chain Wallet
Use if the want to remove all funds from the RaspiBlitz.
#### lnbalance: Detailed Wallet Balances
<img src="pictures/bonus-lnbalance.png" alt="bonus-lnbalance" width="600">
#### lnchannels: Lightning Channel List
<img src="pictures/bonus-lnchannels.png" alt="bonus-lnchannels" width="600">
#### CLOSE ALL: Closing all open Channels
*This option is just available if you have channels open.*
With this feature you can close down all open channels and get funds locked up in those channels back to your on-chain wallet.
It might even offer you to force close some channels where the channel-partner is no longer reachable. Keep in mind that those force closings can take a much longer time until your funds are available again on your on-chain wallet.
2019-02-12 00:27:45 +01:00
2019-02-11 21:46:03 +01:00
#### SERVICES: Activate/Deactivate Services
2018-07-27 12:07:00 +02:00
2020-02-20 02:06:58 +01:00
The RaspiBlitz offers further Services, Apps and configuration (scroll down in the to see all in the RaspiBlitz):
2019-09-05 14:44:17 +02:00
2019-02-11 21:46:03 +01:00
![MainMenu-Services](pictures/mainmenu-services.png)
2018-07-27 16:44:15 +02:00
2020-02-20 02:06:58 +01:00
Activate/Deactivate service selection with the space bar and then select OK to trigger Install/Uninstall. Here you find more details about those options (top to down):
2019-09-05 14:44:17 +02:00
2019-02-11 21:46:03 +01:00
##### Channel Autopilot
2019-02-11 22:36:08 +01:00
The autopilot is a feature of LND that you can switch on. It automatically uses around half of your your on-chain funds (if available) to open channels with other lightning nodes the autopilot thinks can be useful to improve your payment routes.
2020-02-20 02:06:58 +01:00
##### Loop
A Submarine Swaps Service by lighting labs. You call it from the RaspiBlitz terminal with the command 'loop'. You can use it for example to send satoshies from one of your channel to a on-chain bitcoin address without closing the channel for a fee. This can be use full to send earned satoshies to your hardware wallet while freeing up your inbound liquidity on your channels again.
[Details on Service](https://github.com/lightninglabs/loop)
2019-02-11 21:46:03 +01:00
##### Testnet
2019-02-11 22:36:08 +01:00
You can switch from mainnet to testnet of your blockchain if you want to try things out and play with free test coins.
Please beware that to might take some time to sync the test blockchain and you need to setup a new lnd testnet wallet during the process.
2019-02-11 21:46:03 +01:00
##### DynamicDNS
2019-02-11 22:36:08 +01:00
This is a way to make your RaspiBlitz publicly reachable from the internet so that other nodes can open channels with you and you can connect with your mobile wallet from outside your local network.
To do so you can register at an DynamicDomain service like freedns.afraid.org and forward the TCP ports ...
2019-02-11 21:46:03 +01:00
2019-02-11 22:36:08 +01:00
* 8333 (Bitcoin/mainnet)
* 9735 (LND Node)
* 10009 (LND RPC)
2019-04-03 14:07:25 +02:00
* 8080 (LND REST API)
2019-02-11 22:36:08 +01:00
... from your internet router to the local IP of your RaspiBlitz and then activate under "Services" the "DynamicDNS" option.
2019-02-11 21:46:03 +01:00
You will be asked for your dynamic domain name such like "mynode.crabdance.org" and you can also optionally set an URL that will be called regularly to update your routers IP with the dynamic domain service. At freedns.afraid.org this URL is called "Direct URL" under the menu "Dynamic DNS" once you added one.
2018-07-27 12:07:00 +02:00
2019-04-03 14:07:25 +02:00
*NOTE: DynamicDNS just works if you can forward ports on your router and you have a temporary public IP address (your ISP is not running you behind a NAT - like on most mobile connections). Another solution to make your ports reachable from the public internet is to use reverse ssh tunneling - see FAQ on ['How to setup port-forwarding with a SSH tunnel?'](FAQ.md#how-to-setup-port-forwarding-with-a-ssh-tunnel)*
2019-02-11 21:46:03 +01:00
##### Run behind TOR
2018-08-28 19:32:49 +02:00
2020-02-20 02:06:58 +01:00
You can run your Bitcoin- & Lightning-Node and also additional Apps as a TOR hidden service - replacing your IP with an .onion-address
2018-08-28 19:32:49 +02:00
2018-08-29 16:41:26 +02:00
![tor1](pictures/tor1.png)
2019-02-11 21:46:03 +01:00
This has some benefits:
2018-08-28 19:32:49 +02:00
* You don't publish your IP running a node so it's much harder to resolve your real name and location.
* You tunnel through the NAT of your router and make Bitcoin and Lightning reachable to all other TOR nodes.
2019-02-12 18:14:33 +01:00
* By using a TOR address it's possible to move the node to a different IPv4 address and keep the existing (=preciously open and funded) channels functional.
2018-08-28 19:32:49 +02:00
2019-02-11 21:46:03 +01:00
But this also comes with the following side effects:
2018-08-28 19:32:49 +02:00
2020-02-20 02:06:58 +01:00
* Some Mobile wallets don't support connecting to RaspiBlitz over TOR yet
* Lightning nodes that don't run TOR cannot reach you (like behind NAT)
2018-08-29 16:41:26 +02:00
To try it out just switch on the service - you can deactivate later on if it's not working for you.
2018-12-20 23:42:45 +01:00
2019-02-11 21:46:03 +01:00
##### RTL Webinterface
2018-12-20 23:42:45 +01:00
The RTL Webinterface is a LND Control Dashboard you can run in your browser with a nice GUI - it offers much more control over your Lightning node than the RaspiBlitz SSH menus. It's recommended to give it a try.
2019-02-11 21:46:03 +01:00
![RTL](pictures/RTL-dashboard.png)
2018-12-20 23:42:45 +01:00
2019-05-19 02:25:06 +02:00
Read an Intro-Tutorial to RTL: https://medium.com/@suheb.khan/how-to-ride-the-lightning-447af999dcd2
2019-02-11 21:46:03 +01:00
Feedback is welcome by the RTL programmer: https://github.com/ShahanaFarooqui/RTL
2020-02-20 02:06:58 +01:00
##### BTC-RPC-Explorer
BTC-RPC-Explorer is a blockchain explorer webseite you can run on your own RaspiBlitz. See an example running on: https://btc-explorer.com
![EXPLORER](pictures/blockexplorer.png)
[Details on Service](https://github.com/janoside/btc-rpc-explorer)
2019-02-11 21:46:03 +01:00
##### LND Auto-Unlock
2018-12-22 15:35:27 +01:00
2019-05-03 12:20:29 +02:00
The RaspiBlitz will automatically unlock the LND wallet on every start.
2018-12-22 15:35:27 +01:00
This feature is based on https://github.com/Stadicus/guides/blob/master/raspibolt/raspibolt_6A_auto-unlock.md
It can be activated under "Services" -> "Auto-unlock LND". It's recommended to be turned on, when DynamicDNS is used. Because on a public IP change of your router, LND gets restarted automatically and without Auto-Unlock it will stay inactive/unreachable until you manually unlock it.
2018-12-22 15:35:27 +01:00
2019-02-12 22:37:14 +01:00
* [When using Auto-Unlock, how much security do I lose?](FAQ.md#when-using-auto-unlock-how-much-security-do-i-lose)
2019-02-11 21:46:03 +01:00
2019-09-05 14:44:17 +02:00
##### BTC UPnP (AutoNAT)
Normally in a home setup your RaspiBlitz runs behind your internet router that is providing a NAT. That means that only your router is reachable from the outside with a public IP and all your other devices (like the RaspiBlitz) have just a local network IP and cannot be directly contacted from the open internet. That's the reason why your [bitcoin address on the LCD might be displayed in red](FAQ.md#why-is-my-bitcoin-ip-on-the-display-red).
2019-09-05 14:44:17 +02:00
Some routers support a feature called UPnP where devices can automatically request a forwarding to be publicly reachable. By turning on `BTC UPnP` in the main menu `SERVICES` section, you can try if your router supports this feature.
2019-09-05 14:44:17 +02:00
##### LND UPnP (AutoNAT)
Normally in a home setup your RaspiBlitz runs behind your internet router that is providing a NAT. That means that only your router is reachable from the outside with a public IP and all your other devices (like the RaspiBlitz) have just a local network IP and cannot be directly contacted from the open internet. That's the reason why your [Lightning address on the LCD might be displayed in red](FAQ.md#why-is-my-node-address-on-the-display-red).
2019-09-05 14:44:17 +02:00
Some routers support a feature called UPnP where devices can automatically request a forwarding to be publicly reachable. By turning on `LND UPnP` in the main menu `SERVICES` section, you can try if your router supports this feature.
2019-09-05 14:44:17 +02:00
##### Touchscreen (experimental)
2020-02-20 02:06:58 +01:00
Your RaspiBlitz has an LCD that is touchscreen capable. You can switch on this new feature that is still in development.
2019-05-03 12:20:29 +02:00
2019-09-05 14:44:17 +02:00
![RTL](pictures/touchscreen.png)
2019-05-03 12:20:29 +02:00
2020-02-20 02:06:58 +01:00
It will give you 4 buttons on the right side.
2019-05-03 12:20:29 +02:00
2020-02-20 02:06:58 +01:00
- Info - to defined later
- Node - shows the nodeid/uri as QR code (use to open channels from mobile wallets)
- Invoice - creates an Invoice-QRcode that can be used for donations
- Off - Shutdown or Restart the RaspiBlitz
*If this feature works for everybody in the v1.4 release, touchscreen will be default and further developed for future releases.*
2019-09-05 14:44:17 +02:00
##### LCD Rotate
If you switch this on you can rotate the LCD of your RaspiBlitz 180 degrees. This can make sense if you want to use it in a special case or wall mount.
2019-05-03 12:20:29 +02:00
2020-02-20 02:06:58 +01:00
##### Electrum Rust Server
Enable a user to run his own Electrum server on the RaspiBlitz. The server indexes the entire Bitcoin blockchain, and the resulting index enables fast queries for any given user wallet, allowing the user to keep real-time track of his balances and his transaction history using the [Electrum wallet](https://electrum.org).
Since Electrum Rust Server runs on the user's own machine, there is no need for the wallet to communicate with external Electrum servers, thus preserving the privacy of the user's addresses and balances.
For example if you use your Trezor Hardware Wallet with the trezor.io wallet it will tell a third party your public keys - connecting it with your IP. Now you can use your Trezor with the Electrum Wallet just talking to your own Electrum Server preserving your privacy.
[Details on Service](https://github.com/romanz/electrs)
##### BTCPayServer
BTCPay Server is a self-hosted, open-source cryptocurrency payment processor. It's secure, private, censorship-resistant and free.
![BTCPAY](pictures/btcpay.png)
*At the moment the RaspiBlitz can just make the BTCPayServer publicly available to the outside over the TOR network (Hidden Service).*
[Details on Service](https://btcpayserver.org/)
##### LNDmanage
lndmanage is a command line tool for advanced channel management of an node.
*You need at least one open channel to use this tool.*
To run it change to the RaspiBlitz terminal and type 'manage'. This starts the LNDManage interactive mode and you can use the following commands:
* __Activity reports ```report```__
* __Display the node summary ```status```__
* __Advanced channel listings ```listchannels```__
* ```listchannels rebalance```: list channels for rebalancing
* ```listchannels forwardings```: list forwarding statistics for each channel
* ```listchannels hygiene```: information for closing of active channels
* ```listchannels inactive```: information on inactive channels
* __Rebalancing command ```rebalance```__
* different rebalancing strategies can be chosen
* a target 'balancedness' can be specified (e.g. to empty the channel)
* __Circular self-payments ```circle```__
* __Recommendation of good nodes ```recommend-nodes```__
[Details on Service](https://github.com/bitromortac/lndmanage/blob/master/README.md)
##### LNBits
LNbits is a very simple server that sits on top of your Lightning Wallet
![LNBITS](pictures/lnbits.png)
It can be used as:
- Accounts system to mitigate the risk of exposing applications to your full balance, via unique API keys for each wallet
- Fallback wallet for the LNURL scheme
- Instant wallet for LN demonstrations
You can also develop extensions on it.
2020-02-23 10:47:34 +01:00
[Details on Service](https://github.com/arcbtc/lnbits/blob/master/README.md)
2020-02-20 02:06:58 +01:00
2019-02-11 21:46:03 +01:00
#### MOBILE: Connect Mobile Wallet
This feature should support you in connecting your RaspiBlitz to a mobile wallet on your smartphone.
2019-02-12 22:56:47 +01:00
<img src="pictures/mobile.png" alt="mobile-wallets">
2019-02-11 21:46:03 +01:00
At the moment the following mobile wallets are supported:
2019-09-05 14:44:17 +02:00
* [ZAP (iOS/Android)](https://github.com/LN-Zap/zap-iOS)
* [Shango (iOS/Android)](https://github.com/neogeno/shango-lightning-wallet)
* [Zeus (iOS/Android)](https://github.com/ZeusLN/zeus)
2020-02-20 02:06:58 +01:00
* [Fully Noded (iOS over TOR)](https://apps.apple.com/us/app/fully-noded/id1436425586)
2019-02-11 21:46:03 +01:00
Please keep in mind that if you also want to connect to your smartphone also from the outside (when you are outside of your local network) with your RaspiBlitz you might need to open/forward ports on your router and should look into the DynamicDNS features to handle changing IP of our Home-DSL.
2019-02-11 21:46:03 +01:00
2019-05-19 02:25:06 +02:00
This youtube video explains the "port forwarding" on your router in more detail: https://www.youtube.com/watch?v=KESo7hHXQtg
2020-02-20 02:06:58 +01:00
When you have TOR activated you can also try to connect mobile wallets that support this. The Fully Noded Wallet can only connect over TOR.
2019-09-05 14:44:17 +02:00
Basically those mobile wallets work as a remote control app for your RaspiBlitz. First you need to install the apps on your phone - a QR code with the links to the app stores are displayed. And then you need to `pair` them with your RaspiBlitz - also with a QR code displayed on the LCD. If you run your RaspiBlitz without a LCD there is the fallback option to display that QR code on the terminal as ASCII code (might involve lowering your terminal font size).
2019-02-12 22:37:14 +01:00
2019-02-11 21:46:03 +01:00
#### EXPORT: Macaroons and TLS.cert
Offers the following options to get the Macaroon and TLS files to be used in other apps and wallets.
*Macaroons: Access Tokens that allow certain command executions on the LND node.*
*TLS: Certificate to secure/encrypt the communication with the LND node.*
2019-02-12 22:56:47 +01:00
<img src="pictures/export.png" alt="export">
2019-02-11 21:46:03 +01:00
##### Hex-String
The Macaroons and TLS.cert files can be copy+pasted as Hex-Strings from RaspiBlitz to any other app that supports that. If you choose this option RaspiBlitz will all files print for you as Hex-String to do so.
This method is recommended to export to:
* [Joule Browser Wallet](https://lightningjoule.com)
##### SSH Download
SCP is a SSH like command to transfer files. If were able to SSH into the RaspiBlitz also the SCP to transfer the files should work. If you choose these option, RaspiBlitz will print prepared SCP commands you can copy+paste to run in a second terminal.
2019-02-11 21:46:03 +01:00
This method is recommended to export to:
* [Zap Desktop Wallet](https://github.com/LN-Zap/zap-desktop)
##### Browser download
2019-02-11 21:46:03 +01:00
Opens an ad-hoc webserver so that you can download the files in your local network through the browser.
2019-02-11 21:46:03 +01:00
*This is a least secure way to transfer those file - everybody in your local network has access to those file during download. Remember with the Admin-Macaroon somebody could takeover your node and spend all your funds. Just use as last fallback.*
2019-02-11 21:46:03 +01:00
##### Renew Macaroons & TLS
Use if you want to invalidate earlier exported Macaroons & TLS files - e.g. lost mobile wallet.
#### NAME: Change Name/Alias of Node
Change the name of your node.
#### PASSWORD: Change Passwords
Change you passwords for security.
2019-09-05 14:44:17 +02:00
#### REPAIR: Options to test, repair and reset your RaspiBlitz
2019-05-03 12:20:29 +02:00
2019-09-05 14:44:17 +02:00
The `REPAIR` menu gives you options to check and reset your RaspiBlitz
![RepairMenu](pictures/repairmenu.png)
The options are explained in detail:
##### HARDWARE: Run Hardware Test
2019-05-03 12:20:29 +02:00
This will start the hardware test and identify if your RaspiBlitz is in good shape and can provide a stable service.
2019-05-03 12:20:29 +02:00
Use this option is you see under-voltage reports on your LCD display or you think your RaspiBlitz gets very hot.
2019-09-05 14:44:17 +02:00
##### SOFTWARE: Run Software Tests (DebugReport)
2019-05-03 12:20:29 +02:00
This will print out a lot of information that can be used to find software problems.
Use this if you want to report a software problem with your RaspiBlitz so that others can have a look at the details and help you better.
2020-02-20 02:06:58 +01:00
##### BACKUP-LND: Backup your LND data (Rescue-File)
This stops your RaspiBlitz and creates a LND-Rescue ZIP file you can download per SCP to your laptop. This can be used to move your LND id, wallet & channels to another RaspiBlitz.
*NOTICE: If you start your RaspiBlitz after this backup again the backup is outdated and using it can risk loosing your channel funds.*
##### MIGRATION: Migrate Bitz Date to new Hardware
2020-02-20 02:44:23 +01:00
This stops your RaspiBlitz and creates a Migration ZIP file you can download/export per SCP to your laptop. This contains all important data of your RaspiBlitz including LND, your Blitz configuration and also data from your installed apps. Can be used to migrate your RaspiBlitz to a new hardware - for example if your want to replace the HDD with a SSD. How to import a Migration File [see here](README.md#import-a-migration-file).
2020-02-20 02:06:58 +01:00
*NOTICE: If you start your RaspiBlitz after exporting the migration file again it is outdated and using it can risk loosing your channel funds.*
2019-09-05 14:44:17 +02:00
##### RESET-CHAIN: Delete Blockchain and Re-Download
Use this if your blockchain data got corrupted. It will keep your LND data. You can even keep your channels open. Just keep in mind that your node will be offline to the network until you re-downloaded the blockchain.
2019-09-05 14:44:17 +02:00
##### RESET-LND: Delete LND data & start new node/wallet
*THIS WILL DELETE ALL YOUR LND DATA WITH FUND AND CHANNELS.
Use this if you have closed all channels and removed all funds.*
Use this if you want to start with a fresh LND nodeid & wallet.
##### RESET-HDD: Delete HDD data but keep blockchain
*THIS WILL DELETE ALL YOUR LND DATA WITH FUND AND CHANNELS.
Use this if you have closed all channels and removed all funds.*
Use this if you want to setup a fresh RaspiBlitz but don't want to re-download the blockchain on setup.
2019-09-05 14:44:17 +02:00
##### RESET-ALL: Delete HDD completely & start fresh
2019-09-05 14:44:17 +02:00
*THIS WILL DELETE ALL YOUR LND DATA WITH FUND AND CHANNELS.
Use this if you have closed all channels and removed all funds.*
Use this if you want to setup a fresh RaspiBlitz with an empty HDD.
2019-05-03 12:20:29 +02:00
#### UPDATE: Check/Prepare RaspiBlitz Update
You can test if a update for RaspiBlitz is available. If so you can follow the instructions to make the update.
2019-02-11 21:46:03 +01:00
#### OFF: PowerOff RaspiBlitz
A safe way to shutdown the RaspiBlitz. If then a reboot/restart is needed - unplug/re-plug the power.
2019-02-11 21:46:03 +01:00
#### X: Console Terminal
Closes the SSH main menu and exits to the terminal - where the user can make use of the CLI clients `bitcoin-cli` & `lncli` directly to make use of the Bitcoin - and Lightning node.
2019-02-11 21:46:03 +01:00
2019-02-14 22:08:16 +01:00
With the command `raspiblitz` it's possible to return to the main menu.
2018-12-22 15:35:27 +01:00
2020-02-20 02:06:58 +01:00
## Import a Migration File
As mentioned above you can export a Migration File from your Raspiblitz with MAINMENU > REPAIR > MIGRATION and store it on your laptop.
2020-02-20 02:44:23 +01:00
A Migration file contains all the important data of your RaspiBlitz like your LND data, Bitcoin Wallet, raspiblitz.config, TOR/SSH keys .. and also the data of installed apps. You can use this to migrate your RaspiBlitz to a new hardware.
2020-02-20 02:06:58 +01:00
If you want to it to import it again to a new RaspiBlitz (for example with an updated HDD/SSD) you can choose the MIGRATION option on the first setup dialog after the Hardwaretest (where you normally choose between Bitcoin & Litecoin).
![SSH0](pictures/ssh0-welcome2.png)
If you start MIGRATION you will need in the next step to format your HDD/SSD.
![MIGRATION1](pictures/migration1.png)
2020-02-20 02:47:13 +01:00
Normally you choose here the EXT4 format. But you have also have the option to choose the BTRFS format which is an expiremental feature under RaspiBlitz - see [FAQ for details on BTRFS](FAQ.md#why-use-btrfs-on-raspiblitz).
2020-02-20 02:06:58 +01:00
Then you wil be asked to upload the Migration Zip file to the RaspiBlitz. Follow the instructions shown to you.
Finally you need to decide how to get a copy of the blockchain data again for your RaspiBlitz.
![MIGRATION2](pictures/migration2.png)
2020-02-20 02:44:23 +01:00
Here you have the two options [SYNC](README.md#1-sync---selfvalidate-all-blocks) and [COPY](README.md#2-copy---copy-from-laptop-or-another-raspiblitz-over-local-network) as mentioned in the normal setup.
2020-02-20 02:06:58 +01:00
Then RaspiBlitz will reboot and start the normal recovery process to install all the services that are defined by the raspiblitz.config from your Migration File.
Then the blockhain needs to sync up and you should be back to normal.
2019-02-11 19:39:12 +01:00
## Interface / APIs
To develop your own scripts/apps and to connect other services/apps to your RaspiBlitz you have multiple interfaces/APIs available:
2019-02-11 22:36:08 +01:00
### Bitcoin
* `bitcoin-cli` command line interface on the terminal
* `bitcoind` running on port 8333 (public)
* `JSON-RPC` running on port 8332 (local) [DOC](https://en.bitcoin.it/wiki/API_reference_%28JSON-RPC%29)
### LND-Lightning
* `lncli` command line interface on the terminal [DOC](https://api.lightning.community/)
* `lnd` running on port 9735 (public)
* `gRPC` running on port 10009 (public) [DOC](https://api.lightning.community/)
* `REST` running on port 8080 (public) [DOC](https://api.lightning.community/rest/index.html)
2019-02-11 19:39:12 +01:00
2020-02-20 02:44:23 +01:00
If you activate TOR then your LND gRPC & REST APIs are also reachable publicly as a Hidden Service.
2019-04-28 14:40:23 +02:00
### Backup for On-Chain- & Channel-Funds
2019-02-06 17:08:41 +01:00
2019-09-05 14:44:17 +02:00
Since LND v0.6 (and RaspiBlitz v1.2) a feature called Static-Channel-Backups is available. Within RaspiBlitz this is used when a `channel.backup` file is mentioned.
2019-02-06 17:08:41 +01:00
It's the best backup to protect the funds you put on your RaspiBlitz and into channel available yet - so it's recommended to make use of it.
2019-04-28 14:40:23 +02:00
To recover your funds you need two things:
- the 24 words seed
- the latest `channel.backup` file
The word seed you got during wallet setup, to write it down and to keep it at a safe (offline) location. The `channel.backup` is stored on the HDD and updated by LND every time a new channel is opened or closed. The latest version of this file is needed to recover all your funds (if possible). In case your HDD gets damaged, RaspiBlitz always keeps a copy of the latest version of the `channel.backup` file on the SD card within the sub-directories of: `/home/admin/.lnd/data/chain/`.
2019-04-28 14:40:23 +02:00
If you want to get one step further in securing your funds against total fall-out of the RaspiBlitz (gets completely damaged, stolen or lost) then you can additional setup an off-location or cloud backup of the `channel.backup` file. The file itself is encrypted by your word seed - so it's OK to store the file to untrusted third parties for backup (if you want). The feature is still new ... here is how you can set it up -a t the moment the following two off-location options are available (and/or):
2019-04-28 14:40:23 +02:00
*For the v1.2 Release this Off-Site Backup options you need to manually edit the raspiblitz config: `nano mnt/hdd/raspiblitz.conf` (CTRL+o = save & CTRL+x = exit) So this is more for expert users at the moment. If this feature is validated as OK by expert users - in the following versions it should be more easy to set these Offsite-Backups by menu. Open to more Off-Site Backup options by PR in the future - but they should work without adding more dependencies on other libraries (that are not part of standard debian).*
2019-04-28 16:47:42 +02:00
2019-04-28 14:40:23 +02:00
#### A) SCP Backup Target
2019-04-28 16:47:42 +02:00
In the `/mnt/hdd/raspiblitz.conf` the parameter `scpBackupTarget='[USER]@[SERVER]:[DIRPATH-WITHOUT-ENDING-/]'` can be set to activate this feature. On that remote server the publickey of the RaspiBlitz root user needs to be part of the authorized keys - so that no password is needed for the background script to make the backup.
2019-04-28 14:40:23 +02:00
2019-04-28 16:41:25 +02:00
The script `/home/admin/config.scripts/internet.sshpubkey.sh` helps on init, show and transfer ssh-pubkey to a remote server.
2019-04-28 14:40:23 +02:00
2019-04-28 16:47:42 +02:00
To test it - open or close a channel and check if you find a copy of `channel.backup` on your remote server. You can check the background-script logs to see details on errors: `sudo journalctl -f -u background`
2019-04-28 14:40:23 +02:00
2019-04-28 16:47:42 +02:00
#### B) DropBox Backup Target
2019-04-28 14:40:23 +02:00
In the `/mnt/hdd/raspiblitz.conf` the parameter `dropboxBackupTarget='YOUR-DROPBOX-AUTHTOKEN'` can be set to your personal a Dropbox-Authtoken.
2019-04-28 16:50:33 +02:00
2019-04-28 16:53:09 +02:00
Go get your Dropbox-Authtoken, go to your web browser, do the following:
2019-04-28 16:50:33 +02:00
1. Go to https://www.dropbox.com/developers/apps/create and sign in
1. Choose **Dropbox Api**
![Dropbox API 1](https://raw.githubusercontent.com/vindard/lnd-backup/master/images/dropbox-1.png)
1. Choose **App Folder**
![Dropbox API 2](https://raw.githubusercontent.com/vindard/lnd-backup/master/images/dropbox-2.png)
1. Name your app and click **Create App** to proceed
![Dropbox API 3](https://raw.githubusercontent.com/vindard/lnd-backup/master/images/dropbox-3.png)
1. On the settings page for your new app, scroll down to **OAuth 2** and click **Generate**
![Dropbox API 4](https://raw.githubusercontent.com/vindard/lnd-backup/master/images/dropbox-4.png)
2019-04-28 16:53:09 +02:00
1. You will now see a string of letters and numbers appear. This is your **Dropbox-Authtoken**.
2019-04-28 14:40:23 +02:00
2019-04-28 16:47:42 +02:00
To test it - open or close a channel and check if you find a copy of `channel.backup` in your dropbox. You can check the background-script logs to see details on errors: `sudo journalctl -f -u background`
2019-04-28 14:40:23 +02:00
## Updating RaspiBlitz to new Version
If you have a RaspiBlitz v1.2 or higher - just follow the `UPDATE Check/Prepare RaspiBlitz Update` option from the main menu.
If you have a RaspiBlitz older then version v1.0 please [see here](FAQ.md).
2019-04-28 14:40:23 +02:00
If you have a RaspiBlitz v1.0 or v1.1 or newer do the following:
2019-02-06 17:08:41 +01:00
* Main menu > OFF
* Remove power
* Remove SD card
2018-11-26 16:34:44 +01:00
2019-02-11 20:28:50 +01:00
Now download the new RaspiBlitz SD card image and write it to your SD card .. yes you simply overwrite the old one, it's OK, the RaspiBlitz stores all your personal data on the HDD. See details about latest SD card image [here](#installing-the-software).
2019-02-06 18:19:35 +01:00
*If you have done manual changes to the system (installed packages, added scripts, etc) you might need to do some preparations before overwriting your sd card - see [FAQ](FAQ.md#why-do-i-need-to-re-burn-my-sd-card-for-an-update).*
2018-11-26 16:34:44 +01:00
If done successfully, simply put the SD card into the RaspiBlitz and power on again. Then follow the instructions on the display ... and don't worry, you don't need to re-download the blockchain again.
2018-11-26 16:34:44 +01:00
2019-02-06 17:46:40 +01:00
* [Why do I need to re-burn my SD card for an update?](FAQ.md#why-do-i-need-to-re-burn-my-sd-card-for-an-update)
2018-11-26 16:34:44 +01:00
2018-08-06 12:40:42 +02:00
## Build the SD Card Image
2019-02-06 17:08:41 +01:00
A ready to use SD card image of the RaspiBlitz for your RaspberryPi is provided as download by us to get everybody started quickly (see above). But if you want to build that image yourself - here is a quick guide:
2018-08-06 12:40:42 +02:00
2020-01-19 14:20:49 +01:00
* Get a fresh Rasbian RASPBIAN BUSTER WITH DESKTOP card image: [DOWNLOAD](https://www.raspberrypi.org/downloads/raspbian/)
* Write image to a SD card: [TUTORIAL](https://www.raspberrypi.org/documentation/installation/installing-images/README.md)
2018-08-06 12:40:42 +02:00
* Add a file called `ssh` to the root of the SD card when mounted to enable SSH login
* Start card in Raspi and login per SSH with `ssh pi@[IP-OF-YOUR-RASPI]` password is `raspberry`
2019-07-03 00:40:09 +02:00
Now you are ready to start the SD card build script (check the code if every installs and config is OK for you) - copy the following command into your terminal and execute:
2018-08-06 12:40:42 +02:00
2019-02-09 15:58:11 +01:00
`wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/build_sdcard.sh && sudo bash build_sdcard.sh`
2018-08-06 12:40:42 +02:00
2019-02-09 15:58:11 +01:00
As you can see from the URL you find the build script in this Git repo under `build_sdcard.sh` - there you can check what gets installed and configured in detail. Feel free to post improvements as pull requests.
2018-08-06 12:40:42 +02:00
The whole build process takes a while. At the end the LCD drivers get installed and a reboot is needed. A user `admin` is created during the process. Remember the default password is now `raspiblitz`. You can login per SSH again - this time use admin: `ssh admin@[IP-OF-YOUR-RASPI]`. An installer of the SD card image should automatically launch. If you do not want to continue with the installation at this moment and use this sd card as a template for setting up multiple RaspiBlitze, click `Cancel` and run `/home/admin/XXprepareRelease.sh`. Once you see the LCD going white and the activity LED of the pi starts going dark, you can unplug power and remove the SD card. You have now built your own RaspiBlitz SD card image.
2018-08-06 12:40:42 +02:00
*Note: If you plan to use your self build sd card as a MASTER copy to backup image and distribute it. Use a smaller 8GB card for that. This way it's ensured that it will fit on every 16 GB card recommended for RaspiBlitz later on.*
2019-02-06 17:45:48 +01:00
2019-02-10 23:49:10 +01:00
* [Can I run RaspiBlitz on other computers than RaspberryPi?](FAQ.md#can-i-run-raspiblitz-on-other-computers-than-raspberrypi)
2019-02-06 17:46:40 +01:00
* [How can I build an SD card other then the master branch?](FAQ.md#how-can-i-build-an-sd-card-other-then-the-master-branch)
* [How can I build an SD card from my forked GitHub Repo?](FAQ.md#how-can-i-build-an-sd-card-from-my-forked-github-repo)
2018-08-28 19:03:24 +02:00
2019-02-12 22:37:14 +01:00
## FAQ
Here is a just a short selection of the very frequently asked questions:
* [How to backup my Lightning Node?](FAQ.md#how-to-backup-my-lightning-node)
* [How can I recover my coins from a failing RaspiBlitz?](FAQ.md#how-can-i-recover-my-coins-from-a-failing-raspiblitz)
2019-02-12 22:54:27 +01:00
* [Are those "Under-Voltage detected" warnings a problem?](FAQ.md#are-those-under-voltage-detected-warnings-a-problem)
2019-02-12 22:59:37 +01:00
* [Can I run RaspiBlitz on other computer boards than RaspberryPi?](FAQ.md#can-i-run-raspiblitz-on-other-computers-than-raspberrypi)
2019-02-12 22:54:27 +01:00
You have still more questions? Check the [RaspiBlitz-FAQ-Archive](FAQ.md).
2019-02-12 22:37:14 +01:00
2019-02-07 12:45:04 +01:00
## Community Development
2018-07-17 13:47:45 +02:00
Everybody is welcome to join, improve and extend the RaspiBlitz - it's a work in progress. [Check the issues](https://github.com/rootzoll/raspiblitz/issues) if you wanna help out or add new ideas. You find the scripts used for RaspiBlitz interactions on the device at `/home/admin` or in this git repo in the subfolder `home.admin`.
2018-07-14 13:58:12 +02:00
2019-07-22 15:42:35 +02:00
To start your Deep Dive into the RaspiBlitz project, the following YouTube video from the London Bitcoin Dev Meetup (July 2019) is recommended: [https://youtu.be/R_ggGj7Hk1w](https://youtu.be/R_ggGj7Hk1w)
2019-07-22 15:38:12 +02:00
2019-07-22 15:41:39 +02:00
[![Watch the RaspiBlitz DeepDive](pictures/raspiblitz-deepdive.png)](https://youtu.be/R_ggGj7Hk1w)
Also get inspired for a deep-dive with the original "[RaspiBolt](https://stadicus.github.io/RaspiBolt/)" tutorial on how to build a lightning node on the RaspberryPi which was the base work the RaspiBlitz was developed on - so much thx to Stadicus :)
2019-02-18 17:57:33 +01:00
Join me on twitter [@rootzoll](https://twitter.com/rootzoll), visit us at a upcoming [#lightninghackday](https://twitter.com/hashtag/LightningHackday?src=hash) or check by on of our bitcoin meetups in Berlin ... every 1st Thursday evening a month at the room77 bar - feel free to buy me a beer with lightning there :)
2018-07-24 00:10:30 +02:00
2019-02-12 00:30:03 +01:00
* [How can I get further help/support?](#support)