diff --git a/FAQ.md b/FAQ.md index 6bc4f9d9..26e8f540 100644 --- a/FAQ.md +++ b/FAQ.md @@ -73,6 +73,7 @@ - [Let's Encrypt - eMail Address](#lets-encrypt---email-address) - [Let's Encrypt - Installation details](#lets-encrypt---installation-details) - [How can I customize my RaspiBlitz or add other software?](#how-can-i-customize-my-raspiblitz-or-add-other-software) +- [How do I find the IP address when running without a display?](#how-do-i-find-the-ip-address-when-running-without-a-display) --- @@ -931,3 +932,12 @@ The RaspiBlitz is your computer to experiment with. Feel free to add your own sc - Hot fixes & new features for minor verisons will be created as single branches from the release branch, and once ready will be merged back into that release branch as a Pull Request using 'Squash-Merge' AND then, this 'Squash-Merge' (one single commit) will get cherry-picked into the 'dev' branch ('git cherry-pick COMMITHASH' - may call 'git fetch' & 'git pull' before to make a clean cherry-pick into dev). +# How do I find the IP address when running without a display? + +If you can login into your local internet router it should show you the IP address assigned to the RaspberryPi. + +Another way is to use [Angry IP Scanner](https://angryip.org/) to find the IP address. + +You can also put an empty file just called `hdmi` (without any ending) onto the sd card when connected to your laptop and then start it up on the RaspberryPi. This will activate the HDMI port and if you connect a HDMI monitor to the RaspberryPi it will show you the RaspiBlitz status screen containing the local IP address. + + diff --git a/README.md b/README.md index fb395a23..0a86fce6 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,17 @@ -![RaspiBlitz](pictures/raspilogo_400px.png) +![RaspiBlitz](pictures/raspilogo_tile_400px.png) *Build your own Lightning Node on a RaspberryPi with a nice Display.* -`Version 1.7.0RC2 with lnd 0.12.1 and bitcoin 0.21.0 (or litecoin 0.18.1)` +`Version 1.7.0 with lnd 0.12.1 and bitcoin 0.21.0 (or litecoin 0.18.1)` ![RaspiBlitz](pictures/raspiblitz.jpg) -**The RaspiBlitz is a do-it-yourself Lightning Node based on LND running together with a Bitcoin-Fullnode on a RaspberryPi 3/4 - with an HDD/SSD and a nice display for easy setup & monitoring.** +**The RaspiBlitz is a do-it-yourself Lightning Node based on LND running together with a Bitcoin-Fullnode on a RaspberryPi (1TB SSD) and a nice display for easy setup & monitoring.** RaspiBlitz is mainly targeted for learning how to run your own node decentralized from home - because: Not your 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. ## Feature Overview -This is a quick look at the SSH main menu (once RaspiBlitz is SetUp): - -![MainMenu-A](pictures/mainmenu.png) - -As an alternative to the SSH menu, the "Ride the Lightning" (RTL) WebUI is available: - -![RTL-preview](pictures/RTL-dashboard.png) - There are further Services that can be switched on: * **Tor** (Run as Hidden Service) [details](https://en.wikipedia.org/wiki/Tor_(anonymity_network)#Onion_services) @@ -28,29 +20,26 @@ There are further Services that can be switched on: * **BTC-RPC-Explorer** (Bitcoin Blockchain Explorer) [details](https://github.com/janoside/btc-rpc-explorer) * **LNbits** (Lightning wallet/accounts System) [details](https://twitter.com/lnbits/status/1253700293440741377?s=20) * **SpecterDesktop** (Multisig Trezor, Ledger, COLDCARDwallet & Specter-DIY) [details](https://github.com/cryptoadvance/specter-desktop) [app connection guide](https://d11n.net/connect-specter-desktor-with-raspiblitz.html) -* **LNDmanage** (Advanced Channel Management CLI) [details](https://github.com/bitromortac/lndmanage) -* **Loop** (Submarine Swaps Service) [details](https://github.com/lightninglabs/loop/blob/master/README.md) -* **Pool** (Inbound Liquidity Marketplace) [details](https://github.com/lightninglabs/pool/blob/master/README.md) +* **Lightning Terminal (Loop, Pool & Faraday)** (Manage Channel Liquidity) [details](https://github.com/lightninglabs/lightning-terminal#lightning-terminal-lit) * **JoinMarket** (CoinJoin Service) [details](https://github.com/JoinMarket-Org/joinmarket-clientserver) * **ThunderHub** (Lightning Node Manager WebUI) [details](https://www.thunderhub.io/) -* **Faraday** (Channel Analysis & Recommendations CLI) [details](https://github.com/lightninglabs/faraday/blob/master/README.md) * **Balance Of Satoshis** (Commands for working with LND balances) [details](https://github.com/alexbosworth/balanceofsatoshis/blob/master/README.md) * **Kindle Display** (Bitcoin Status Display made with a jailbroken Kindle) [details](https://github.com/dennisreimann/kindle-display) * **Stacking Sats Kraken** (Auto-DCA script) [details](https://github.com/dennisreimann/stacking-sats-kraken) * **Circuit Breaker** (Lighthing Channel Firewall) [details](https://github.com/lightningequipment/circuitbreaker/blob/master/README.md) * **PyBlock** (Python Util & Fun Scripts) [details](https://github.com/curly60e/pyblock/blob/master/README.md) * **Mempool Explorer** [details](https://github.com/mempool/mempool) -* **Sphinx Relay Server** [details](https://github.com/stakwork/sphinx-relay/blob/master/README.md) +* **Sphinx Chat Relay Server** [details](https://github.com/stakwork/sphinx-relay/blob/master/README.md) +* **Telegraf metrics** [details](https://github.com/rootzoll/raspiblitz/issues/1369) +* **Chantools** (Fund Rescue) [details](https://github.com/guggero/chantools/blob/master/README.md) 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) * **Fully Noded** (iOS) [details](https://apps.apple.com/us/app/fully-noded/id1436425586) * **SendMany** (Android) [details](https://github.com/fusion44/sendmany/blob/master/README.md) * **Sphinx Chat App** (Android & iOS) [details](https://sphinx.chat) - Also many more features like Touchscreen, Channels Autopilot, DynDNS, SSH-Tunneling, UPS Support, ... ## DeepDive Video (July 2020) @@ -63,6 +52,8 @@ The RaspiBlitz is optimized for being setup during a workshop at a hackday or co If you start at home ordering the parts from Amazon (see shopping list below) then it's a weekend project with a lot of downloading and syncing time where you can do other stuff while checking on the progress from time to time. +If you already run a Umbrel or myNode you have basically all the hardware needed and you can make the [Migration to RaspiBlitz from Umbrel/myNode](#make-a-raspiblitz-out-of-your-umbrel-or-mynode) under one hour. + ## Hardware Needed All parts together cost around 180-250 USD - based on shops and location. @@ -79,10 +70,6 @@ The cheapest way is to buy and assemble the single parts yourself. There are two *Please try to use the exact hardware models that are recommended in the shopping lists. We have had multiple reports where, for example, other SSD or SSD cases/controllers lead to problems. The idea of the shopping lists is to provide you the best tested hardware components that work together - improvement recommendations are always welcome.* -#### Package: Standard (around 250 USD) - -*The "Standard Package" is the most tested and recommended option if you can afford it. It aims to give you the best economic value to run all the RaspiBlitz features with good performance and even allows you to self-validate your blockchain in under 3 days.* - * RaspberryPi 4 4GB (or 8GB) [amazon referral link](https://geni.us/raspiblitz-4gb-new) * Power Supply - USB-C, 5V, >=3A [amazon referral link](https://geni.us/raspiblitz-ps) * 1TB SSD - SanDisk SSD Plus 1TB 2.5" : [amazon referral link](https://geni.us/raspiblitz-1000gb-san) *other 1TB SSD models might cause power issues* @@ -93,25 +80,6 @@ The cheapest way is to buy and assemble the single parts yourself. There are two *You can even pay for your RaspiBlitz Amazon Shopping with Bitcoin & Lightning through [Bitrefill](https://blog.bitrefill.com/its-here-buy-amazon-vouchers-with-bitcoin-on-bitrefill-bb2a4449724a).* -#### 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: -* 1TB Hard Drive: [amazon referral link](https://geni.us/raspiblitz-hdd) -* Micro SD-Card 16GB: [amazon referral link](https://geni.us/raspiblitz-sd-card16gb) -* LCD - 3.5" RPi Display, GPIO connection, XPT2046 Touch Controller: [amazon referral link](https://geni.us/raspiblitz-touchscreen) - -When RaspberryPi 3 --> add following parts: -* RaspberryPi 3B+ : [amazon referral link](https://geni.us/raspiblitz-rpi3) -* Heatsink-Case for RPi3: [amazon referral link](https://geni.us/raspiblitz-heatsink) -* Powersupply microUSB, 5V, >=3A: [amazon referral link](https://geni.us/raspiblitz-3A-power) - -When RaspberryPi 4 2GB --> add following parts: -* RaspberryPi 4 2GB [amazon referral link](https://geni.us/raspiblitz-4-2gb) -* Power Supply - USB-C, 5V, >=3A [amazon referral link](https://geni.us/raspiblitz-ps) -* Heatsink Case for RPi4: [amazon referral link](https://geni.us/heatsink-raspi4) - [What other case options do I have?](FAQ.md#what-other-case-options-do-i-have) ## Assemble your RaspiBlitz @@ -119,7 +87,7 @@ When RaspberryPi 4 2GB --> add following parts: When you have all parts you need to: - Assemble the Heatsink-Case on the RaspberryPi (follow the instructions in package). -- Put the SSD/HDD into the Case and connect it per USB to the RaspberryPi +- Put the SSD/HDD into the Case and connect it per USB to the RaspberryPi (blue ports). - Add the display on top with the pins like in picture below. - Plug in the network cable. @@ -129,14 +97,14 @@ In the end your RaspiBlitz should look like this: ## Downloading the Software -|Method|Build the sd card|Install the image| +|Method|Install the image|Build the sd card| |------|-----------------|-----------------| -|Philosophy|Sovereignty|Trust| -|Difficulty level|Medium|Easy| -|Pros|You don't need to trust us, build from your own forked repository|Make Blitz accessible to everyone| -|Cons|You need to read the build_sdcard.sh parameters in order for the customization to suit your needs|You have to trust the mantainer image binaries| -|Instructions|[Build your own sd card image](https://github.com/rootzoll/raspiblitz/tree/master#build-the-sd-card-image)|[Download image](https://raspiblitz.fulmo.org/images/raspiblitz-v1.7RC3-2021-04-19.img.gz) and [Flash the sd card](https://github.com/rootzoll/raspiblitz/tree/master#write-the-sd-card-image-to-your-sd-card)| -|Verify what?|All of the code, don't trust, verify|SHA-256 (below) and/or [Signature](https://github.com/rootzoll/raspiblitz/blob/v1.6/FAQ.md#how-to-verify-the-sd-card-image-after-download)| +|Philosophy|Trust|Sovereignty| +|Difficulty level|Easy|Medium| +|Pros|Make Blitz accessible to everyone|You don't need to trust us, build from your own forked repository| +|Cons|You have to trust the mantainer image binaries|You need to read the build_sdcard.sh parameters in order for the customization to suit your needs| +|Instructions|[Download image](https://raspiblitz.fulmo.org/images/raspiblitz-v1.7RC3-2021-04-19.img.gz) and [Flash the sd card](https://github.com/rootzoll/raspiblitz/tree/master#write-the-sd-card-image-to-your-sd-card)|[Build your own sd card image](#build-the-sd-card-image)| +|Verify what?|SHA-256 (below) and/or [Signature](https://github.com/rootzoll/raspiblitz/blob/v1.6/FAQ.md#how-to-verify-the-sd-card-image-after-download)|All of the code, don't trust, verify| If downloading the mantainer image, the shasum is: * SHA-256: 83384b2efe8d93e8bee4130e11770a6c4c1be676df9f9150e78ea42b9d252ed6 @@ -166,6 +134,8 @@ Insert the SD card and connect the power plug. When everything boots up correctly, you should see the local IP address of your RaspiBlitz on the LCD panel. +- [How do I find the IP address when running without a display?](FAQ.md#how-do-i-find-the-ip-address-when-running-without-a-display) + ![LCD0](pictures/lcd0-welcome.png) Now open up a terminal ([OSX](https://www.youtube.com/watch?v=5XgBd6rjuDQ)/[Win10](https://www.howtogeek.com/336775/how-to-enable-and-use-windows-10s-built-in-ssh-commands/)) and connect through SSH with the command displayed by the RaspiBlitz: @@ -200,12 +170,6 @@ If you are looking for a tutorial on how to organize a workshop to build the Ras ### Init -Automatically after login via SSH as admin to the RaspiBlitz, it will run a hardware test. - -![HardwareTest](pictures/hardwaretest.png) - -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 to problems with the hardware. If you get an OK here ... you are good to go :) - 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 choice here is Bitcoin. ![SSH0](pictures/ssh0-welcome2.png) @@ -238,16 +202,6 @@ Then the user is asked to enter the Password B - this is internally used for the *The other passwords C & D will be needed later on. They will be used during the lightning wallet setup.* -### 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. - -![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 make it more difficult to connect to you for other nodes or pairing other devices and apps to it. - -You can switch Tor off later on. You can also switch Tor on after the setup, but keep in mind that once your node is running, your lightning node id can be connected to your public IP. - After this the setup process will need some time and the user will see a lot of console outputs - just wait until it's finished: ![SSH4](pictures/ssh4-scripts.png) @@ -378,7 +332,7 @@ If you now login by SSH in your RaspiBlitz (or you are still logged in) you will ![SSH9e1](pictures/mainmenu.png) -And if you scroll down .. you see even more options. All options on the main menu will be explained below in the feature documentation. +All options on the main menu will be explained below in the feature documentation. *OK .. so from here on out, your RaspiBlitz is ready to play with.* @@ -414,7 +368,11 @@ This is the screen that gets displayed on the LCD/display. It's useful to call i * [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) -#### FUNDING: Fund your on-chain Wallet +#### LIGHTNING (Basic Node Management) + +Under `LIGHTNING` you find some basic steps to manage your Lightning node. Those are very simplyfied in the RaspiBlitz SSH menu for the reason of learning. For more advanced management of your Lightning node see addtional apps under 'SERVICES'. + +##### FUNDING: Fund your on-chain Wallet Before you can open channels with other nodes you need to put some coins in your LND on-chain wallet. Use this option to generate an address to send funds to. @@ -422,13 +380,13 @@ Before you can open channels with other nodes you need to put some coins in your You can fund it multiple times - starting with small amounts first to test. LND will always generate a different address, but all funds you send will get into the same LND on-chain wallet. -#### CONNECT: Connect to a Peer +##### CONNECT: Connect to a Peer Before you can open a channel with another node on the network, you need to connect this node as a peer to your node. Opening a channel with a peer is just optional. Having another node as 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. -#### CHANNEL: Open a Channel with Peer +##### CHANNEL: Open a Channel with Peer To open a payment channel with another node, you can use this option. @@ -438,7 +396,7 @@ Bear in mind that this option will open a public channel that can be seen by eve *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.* -#### SEND: Pay an Invoice/PaymentRequest +##### SEND: Pay an Invoice/PaymentRequest Pay an invoice through lightning. @@ -446,24 +404,12 @@ Pay an invoice through lightning. If you are looking for something to test payments with Lightning ... why not [donate some satoshis to RaspiBlitz development](https://tallyco.in/s/r5lx23/)? Thanks :) -#### RECEIVE: Create Invoice/PaymentRequest +##### RECEIVE: Create Invoice/PaymentRequest Create an invoice to send to someone for a service to be paid through lightning. *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.* -#### 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 the funds locked up in those channels back to your on-chain wallet. - -You may choose to force-close some channels where the channel partner is no longer reachable. Keep in mind that when you force-close a channel, it can take a much longer time until your funds are available again through your on-chain wallet. - -#### CASHOUT: Remove Funds from on-chain Wallet - -Use if you want to remove all funds from the RaspiBlitz. - #### lnbalance: Detailed Wallet Balances bonus-lnbalance @@ -478,6 +424,22 @@ If you connected your node well within the Lightning Network you can become a "R Beware - earning fees as a routing node does not come automatic. It's a bit of hard work of building the right channels to be attractive for other people to route thru. Check the internet for tutorials or use tools like "lndmanage" (see under RaspiBlitz SERVICES) to help you analyse and optimize your channel management. +##### NAME: Change name of your Node + +Here you can change the alias name of your node as it is shown as part of the Lightning network. + +##### 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 the funds locked up in those channels back to your on-chain wallet. + +You may choose to force-close some channels where the channel partner is no longer reachable. Keep in mind that when you force-close a channel, it can take a much longer time until your funds are available again through your on-chain wallet. + +##### CASHOUT: Remove Funds from on-chain Wallet + +Use if you want to remove all funds from the RaspiBlitz. + #### SETTINGS: Basic Settings of RaspiBlitz Here you will find basic settings for your RaspiBlitz: @@ -555,6 +517,10 @@ Have fun. IMPORTANT: Presently BTCPay Server service is NOT supported on TESTNET (RPC connection error messages). Until this [issue #1724](https://github.com/rootzoll/raspiblitz/issues/1724) is resolved you can [play around with BTCPay Server on TESTNET](https://testnet.demo.btcpayserver.org) +##### Circuitbreaker (LND Firewall) + +Not everybody is acting friendly in the Lightning network. Circuitbreaker is a background service you cann activate that acts similar to a firewall to protect your now better. For details see: https://github.com/lightningequipment/circuitbreaker/blob/master/README.md + ##### LND Auto-Unlock The RaspiBlitz will automatically unlock the LND wallet upon every start. @@ -585,21 +551,21 @@ The RaspiBlitz offers further Services, Apps and configuration (scroll down to s Activate/Deactivate service selection with the space bar and then select 'OK' to trigger Install/Uninstall. You can find more details about those options below (top to bottom): -##### Lightning Loop +##### Electrum Rust Server -A Submarine Swaps Service by lighting labs. You call it from the RaspiBlitz terminal with the command 'loop' - if you have the RTL service installed (see below), then loop will also be available as part of the RTL web interface. You can use Loop for example to send satoshies from one of your channels to an 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. +Enables a user to run his own Electrum server on the RaspiBlitz. The server indexes the entire Bitcoin blockchain saved locally on your HDD/SSD, 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). -[Details on Service](https://github.com/lightninglabs/loop) +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 addresses and balances. -After install, you will see a new `LOOP` option in the SSH main menu - it will give you all the information you need to start using it. +By contrast, if you use your Trezor Hardware Wallet with the trezor.io wallet, it will tell their third party server 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. -##### Lightning Pool +Learn how you can use Electrum with your own Server over Tor: -Lightning Pool is a non-custodial, peer-to-peer marketplace that allows node operators that need inbound liquidity to pay node operators with available capital to open channels in their direction while retaining full custody of their funds. Pool’s first product is a Lightning Channel Lease - an inbound channel with a pre-agreed duration. +Video Tutorial
--watch--> https://www.youtube.com/watch?v=AiosKK_TA7w -[Details on Service](https://github.com/lightninglabs/pool) +[More Details on Service](https://github.com/romanz/electrs) -After install, you will see a new `POOL` option in the SSH main menu - it will give you all the information you need to start using it. +After install, you will see a new `ELECTRS` option in the SSH main menu - it will give you all the information you need to start using it. ##### RTL Webinterface @@ -617,6 +583,52 @@ Feedback is welcome by the RTL programmer: https://github.com/ShahanaFarooqui/RT After install, you will see a new `RTL` option in the SSH main menu - it will give you all the information you need to start using it. +##### ThunderHub + +A Lightning Node Manager WebUI - similar to RTL. + +[Details on Service](https://www.thunderhub.io) + +After install, you will see a new `THUB` option in the SSH main menu - it will give you all the information you need to start using it. + +##### Lightning Terminal (LIT) with loop, pool & faraday + +Lightning Terminal (LiT) is a browser-based interface for managing channel liquidity. It bundles the former single tools called loop, pool & faraday with an easy to use browser interface. + +![LIT](pictures/lit.png) + +[Details on Service](https://github.com/lightninglabs/lightning-terminal#lightning-terminal-lit) + +After install, you will see a new `LIT` option in the SSH main menu - it will give you all the information you need to start using it. + +##### BTCPayServer + +[BTCPay Server](https://github.com/btcpayserver) is a self-hosted, open-source cryptocurrency payment processor. It's secure, private, censorship-resistant and free. + +![BTCPAY](pictures/btcpay.png) + +Find all details on how to use the BTCPay Server on your RaspiBlitz in this great tutorial: https://coincharge.io/en/raspiblitz-btcpay-server/ + +After install, you will see a new `BTCPAY` option in the SSH main menu - it will give you all the information you need to start using it. + +##### LNbits + +LNbits is a very simple server that sits on top of your Lightning Wallet. + +![LNBITS](pictures/lnbits.png) + +It can be used together with IP2Tor to provide: +- Lightning Paper Vouchers (Plugin: LNURLw) +- Merchant Onboarding (Plugin: TPOS) + +Video Tutorial
--watch--> https://www.youtube.com/watch?v=0Bt3tHULAnw + +You can also develop your own extensions on it. + +[Details on Service](https://github.com/arcbtc/lnbits/blob/master/README.md) + +After install, you will see a new `LNBITS` option in the SSH main menu - it will give you all the information you need to start using it. + ##### BTC-RPC-Explorer BTC-RPC-Explorer is a blockchain explorer website you can run on your own RaspiBlitz. See an example running on: https://btc-explorer.com @@ -637,98 +649,15 @@ The goal of SpecterDesktop is to make a convenient and user-friendly GUI around After install, you will see a new `SPECTER` option in the SSH main menu - it will give you all the information you need to start using it. -##### Electrum Rust Server +##### Mempool Explorer -Enables a user to run his own Electrum server on the RaspiBlitz. The server indexes the entire Bitcoin blockchain saved locally on your HDD/SSD, 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). +![MEMPOOL](pictures/mempool.png) -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 addresses and balances. +Mempool is the fully featured visualizer, explorer, and API service running on mempool.space -By contrast, if you use your Trezor Hardware Wallet with the trezor.io wallet, it will tell their third party server 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/mempool/mempool) -Learn how you can use Electrum with your own Server over Tor: - -Video Tutorial
--watch--> https://www.youtube.com/watch?v=AiosKK_TA7w - -[More Details on Service](https://github.com/romanz/electrs) - -After install, you will see a new `ELECTRS` option in the SSH main menu - it will give you all the information you need to start using it. - -##### BTCPayServer - -[BTCPay Server](https://github.com/btcpayserver) is a self-hosted, open-source cryptocurrency payment processor. It's secure, private, censorship-resistant and free. - -![BTCPAY](pictures/btcpay.png) - -Find all details on how to use the BTCPay Server on your RaspiBlitz in this great tutorial: https://coincharge.io/en/raspiblitz-btcpay-server/ - -After install, you will see a new `BTCPAY` option in the SSH main menu - it will give you all the information you need to start using it. - -##### LNDmanage - -lndmanage is a command line tool for advanced channel management of a 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 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) - -After install, you will see a new `LNDMANAGE` option in the SSH main menu - it will give you all the information you need to start using it. - -##### Faraday - -Faraday is a Channel Analysis & Recommendations CLI that can help you with channel management. - -[Details on Service](https://github.com/lightninglabs/faraday/blob/master/README.md) - -After install, you will see a new `FARADAY` option in the SSH main menu - it will give you all the information you need to start using it. - -##### Balance of Satoshi - -Balance of Satoshi gives you enhanced commands for working with LND balances. - -[Details on Service](https://github.com/alexbosworth/balanceofsatoshis/blob/master/README.md) - -After install, you will see a new `BOS` option in the SSH main menu - it will give you all the information you need to start using it. - -##### ThunderHub - -A Lightning Node Manager WebUI - similar to RTL. - -[Details on Service](https://www.thunderhub.io) - -After install, you will see a new `THUB` option in the SSH main menu - it will give you all the information you need to start using it. - -##### LNbits - -LNbits is a very simple server that sits on top of your Lightning Wallet. - -![LNBITS](pictures/lnbits.png) - -It can be used together with IP2Tor to provide: -- Lightning Paper Vouchers (Plugin: LNURLw) -- Merchant Onboarding (Plugin: TPOS) - -Video Tutorial
--watch--> https://www.youtube.com/watch?v=0Bt3tHULAnw - -You can also develop your own extensions on it. - -[Details on Service](https://github.com/arcbtc/lnbits/blob/master/README.md) - -After install, you will see a new `LNBITS` option in the SSH main menu - it will give you all the information you need to start using it. +After install, you will see a new `MEMPOOL` option in the SSH main menu - it will give you all the information you need to start using it. ##### JoinMarket @@ -742,17 +671,13 @@ For more details see [here](https://github.com/JoinMarket-Org/joinmarket-clients After install, you will see a new `JMARKET` option in the SSH main menu - it will give you all the information you need to start using it. -##### Circuit Breaker +##### Balance of Satoshi -https://github.com/lightningequipment/circuitbreaker/blob/master/README.md +Balance of Satoshi gives you enhanced commands for working with LND balances. -##### PyBlock +[Details on Service](https://github.com/alexbosworth/balanceofsatoshis/blob/master/README.md) -https://github.com/curly60e/pyblock/blob/master/README.md - -##### Mempool Explorer - -https://github.com/mempool/mempool +After install, you will see a new `BOS` option in the SSH main menu - it will give you all the information you need to start using it. ##### Sphinx Relay Server @@ -762,6 +687,86 @@ The Sphinx App allows chat over the Lightning Network and ties into the idea of After install, you will see a new `SPHINX` option in the SSH main menu - it will give you all the information you need to start using it. +##### PyBlock + +![PYBLOCK](pictures/pyblock.png) + +https://github.com/curly60e/pyblock/blob/master/README.md + +##### Channel Tools (chantools) + +This tool provides helper functions that can be used to rescue funds locked in lnd channels in case lnd itself cannot run properly anymore. + +https://github.com/curly60e/pyblock/blob/master/README.md + +##### Download Bitcoin Whitepaper + +Extract the original Bitcoin Whitepaper as PDF directly from the blockchain of your node. + +#### SYSTEM: Monitoring & Configuration + +![SYSTEM](pictures/system.png) + +#### CONNECT: Connect Apps & Credentials + +This feature should support connecting your RaspiBlitz to a mobile wallets or other apps. + +![CONNECT](pictures/connect.png) + +##### MOBILE: Mobile Wallet Apps (Smartphone) + +At the moment, the following mobile wallets are supported: + +* [Zeus (iOS/Android)](https://github.com/ZeusLN/zeus) +* [Fully Noded (iOS over Tor)](https://apps.apple.com/us/app/fully-noded/id1436425586) +* [SendMany (Android)](https://github.com/fusion44/sendmany/blob/master/README.md) +* [Sphinx Chat App (iOS/Android)](https://sphinx.chat/) + +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. Then you need to `pair` them with your RaspiBlitz - also via a QR code displayed on the LCD. If you run your RaspiBlitz without an LCD, there is the fallback option to display that QR code on the terminal as ASCII code (which might involve lowering your terminal's font size). + +##### BTCPAY: Get the connection string for the BTCPay Server + +To connect the payment processing BTCPay server to your Lightning node you find here the needed Connection string. + +##### bitcoinRPC + +If apps need access to the Bitcoin RPC service you can find this here. + +##### BISQ: Use your node with BISQ + +Here you can activate a hidden service for your bitcoin node so that it can be used for the decentral exchange called BISQ. + +##### EXPORT: Macaroons and TLS.cert + +If you want to access your LND APIs (to connect apps and additional services) you need credential files that grant access (Macaroons & the TLS cert). + +*Macaroons: Access Tokens that allow certain command executions on the LND node.* +*TLS: Certificate to secure/encrypt communication with the LND node.* + +In this menu, you can reset, re-sync, or export them as a file or string so that you can import them to apps and additional services. + +Here are the following export options to get the Macaroon and TLS files to be used in other apps and wallets: + +###### SSH Download + +SCP is a SSH like command to transfer files. If we're able to SSH into the RaspiBlitz, also the SCP to transfer the files should work. If you choose this option, RaspiBlitz will print prepared SCP commands you can copy+paste to run in a second terminal. + +This method is recommended to export to: +* [Zap Desktop Wallet](https://github.com/LN-Zap/zap-desktop) + +###### Browser download + +Opens an ad-hoc webserver so that you can download the files in your local network through the browser. + +*This is the least secure way to transfer those files - 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.* + +####### Hex-String + +The Macaroons and TLS.cert files can be copy+pasted as Hex-Strings from RaspiBlitz to any other app that supports that format. If you choose this option, RaspiBlitz will print all the files for you as Hex-String to do so. + +This method is recommended to export to: +* [Joule Browser Wallet](https://lightningjoule.com) + #### SUBSCRIBE: Subscription Services The RaspiBlitz offers now also Subscriptions .. those are free or paid third-party services. @@ -796,62 +801,6 @@ When you create a new LetsEncrypt subscription, you will be asked for your subdo To try out the IP2TOR tunnel, go into `MAINMENU` and the extra menu point of the Service you want to use the bridge for. It should give you an updated URL to call your service. -#### MOBILE: Connect Mobile Wallet - -This feature should support connecting your RaspiBlitz to a mobile wallet on your smartphone. - -mobile-wallets - -At the moment, the following mobile wallets are supported: - -* [ZAP (iOS/Android)](https://github.com/LN-Zap/zap-iOS) -* [Zeus (iOS/Android)](https://github.com/ZeusLN/zeus) -* [Fully Noded (iOS over Tor)](https://apps.apple.com/us/app/fully-noded/id1436425586) -* [SendMany (Android)](https://github.com/fusion44/sendmany/blob/master/README.md) -* [Sphinx Chat App (iOS/Android)](https://sphinx.chat/) - -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. Then you need to `pair` them with your RaspiBlitz - also via a QR code displayed on the LCD. If you run your RaspiBlitz without an LCD, there is the fallback option to display that QR code on the terminal as ASCII code (which might involve lowering your terminal's font size). - -There is a special video on how to connect the Zeus app thru Tor: - -Video Tutorial
--watch--> https://www.youtube.com/watch?v=XStiTJosklY - - -#### LNDCREDS: Macaroons and TLS.cert - -If you want to access your LND APIs (to connect apps and additional services) you need credential files that grant access (Macaroons & the TLS cert). - -*Macaroons: Access Tokens that allow certain command executions on the LND node.* -*TLS: Certificate to secure/encrypt communication with the LND node.* - -In this menu, you can reset, re-sync, or export them as a file or string so that you can import them to apps and additional services. - -Here are the following export options to get the Macaroon and TLS files to be used in other apps and wallets: - -##### Hex-String - -The Macaroons and TLS.cert files can be copy+pasted as Hex-Strings from RaspiBlitz to any other app that supports that format. If you choose this option, RaspiBlitz will print all the files 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 we're able to SSH into the RaspiBlitz, also the SCP to transfer the files should work. If you choose this option, RaspiBlitz will print prepared SCP commands you can copy+paste to run in a second terminal. - -This method is recommended to export to: -* [Zap Desktop Wallet](https://github.com/LN-Zap/zap-desktop) - -##### Browser download - -Opens an ad-hoc webserver so that you can download the files in your local network through the browser. - -*This is the least secure way to transfer those files - 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.* - -#### NAME: Change Name/Alias of Node - -Change the name of your node. - #### PASSWORD: Change Passwords Change your passwords for security. @@ -931,25 +880,29 @@ If you had the Bitcoin Transaction Index activated you can use this option to ma The `UPDATE` menu gives you options to update your RaspiBlitz -![UpdateMenu](pictures/updatemenu.png) +![UpdateMenu](pictures/update.png) The options are explained in detail: *Please note that the RaspiBlitz does not support Auto-Update, to ensure that there is no remote control of your node from a central server.* -#### RELEASE: Update RaspiBlitz to a new Version +##### RELEASE: Update RaspiBlitz to a new Version This is common way to update your RaspiBlitz. Choose this option to prepare your RaspiBlitz for a new SD card image containing the new version release. -#### LND: Interim LND Update +##### PATCH: Patch RaspiBlitz code + +With Patching you have now an easy way to sync your RaspiBlitz code/scripts with the official RaspiBlitz GitHub Repo or even your own forked GitHub Repo. This is an option for people that report bugs and we like to offer them a quick script update (patch) between RaspiBlitz releases or for people who want to develolp on the RaspiBlitz and sync code between their IDE, forked GitHub and their RaspiBlitz. + +##### LND: Interim LND Update Sometimes there is a new LND release that has some breaking changes that once you updated the LND database cannot be reversed (like the update from 0.9.2 to 0.10.0). Then RaspiBlitz offers you an optional update ... this is where you then can update LND. If you choose this you get the option to do this `VERIFIED` that means it offers you the optional LND update we tested the RaspiBlitz with or `RECKLESS` which will just grab the latest LND release from the GitHub releases page (also Release Candidates) and install it with no further guarantees and verification checks - this is for people that run nodes to test new releases and how they work with existing RaspiBlitz apps. -#### PATCH: Patch RaspiBlitz code +##### BITCOIN: Interim Bitcoin Update -With Patching you have now an easy way to sync your RaspiBlitz code/scripts with the official RaspiBlitz GitHub Repo or even your own forked GitHub Repo. This is an option for people that report bugs and we like to offer them a quick script update (patch) between RaspiBlitz releases or for people who want to develolp on the RaspiBlitz and sync code between their IDE, forked GitHub and their RaspiBlitz. +Like with LND you have the possiblity to upadte the bitcoin core version here. #### REBOOT: Reboot RaspiBlitz @@ -993,6 +946,34 @@ RaspiBlitz will reboot and start the normal recovery process to install all the Then the blockchain needs to sync up and you should be back to normal. +## Make a RaspiBlitz out of your Umbrel or MyNode + +Another kind of migration is when you already run an full node with the Umbrel or myNode software and you like to change it to RaspiBlitz without closing channels. You basically have all the hardware needed and just need to change software. You dont need the [LCD from the shopping list](#amazon-shopping-list-buy-parts--build-it-yourself) - RaspiBlitz can also run without an LCD. + +*NOTE: This migration is still expirimental. You will still use the terminal to setup & manage your RaspiBlitz. If that is too technical for you please wait for the RaspiBlitz v1.8, which will introduce a WebUI for your browser that make the migration to RaspiBlitz familiar like with your old node user experiences.* + +Before you start migration: +* if you have on-chain funds on your old node - make sure to have the backup seed words +* if you have lightning channels open on your old node - make sure to have downloaded the latest Static Channel Backup file to your laptop + +Also be aware that at the moment RaspiBlitz can only transfere your blockchain and LND wallet data (including channels) over to RaspiBlitz. Any data/pairing of additional apps cannot be transfered and may get lost. + +Instructions for Migration: +* shutdown your old node +* remove the sd card +* [download the latest Raspiblitz sd card image & flash it to your sd card](#downloading-the-software) +* if you like to use a HDMI monitor for status & progress, create a empty file called `hdmi` (withot any ending) on the sd card while connected to your laptop +* [insert sd card, boot up & login per SSH](#boot-your-raspiblitz) + +Now RaspiBlitz should show you that old data from your node was detected and offer you todo the migration. + +* If you continue it will prepare the data & reboot. +* The RaspiBlitz recover/update modus is starting - that will take a while and finally reboot. +* Login per SSH as before and reset the passwords (`FINAL RECOVERY LOGIN` on LCD). Then a final reboot will happen. +* Login per SSH with your new password A & unlock LND wallet with password C. Now blockchain needs to catch up and then your RaspiBlitz should be ready and show you (under INFO) your on-chain & channel balance. + +If you dont have an LCD or HDMI monitor connectec it might be a bit difficult to see what state your RaspiBlitz is in. Just (re-)try to login per SSH again after the reboots (might always take some time until it reacts). + ## Interface / APIs To develop your own scripts/apps and connect other services/apps to your RaspiBlitz, you have multiple interfaces/APIs available: @@ -1106,7 +1087,7 @@ If done successfully, simply put the SD card into the RaspiBlitz and power on ag A ready-to-use SD card image of RaspiBlitz is provided by us for download, to get everybody started quickly (see above). But if you want to build that image yourself - here is a quick guide: -* Get a fresh RaspiOS 64-bit: [DOWNLOAD](https://downloads.raspberrypi.org/raspios_arm64/images). +* Get a latest RaspiOS 64-bit: [DOWNLOAD](https://downloads.raspberrypi.org/raspios_arm64/images). * Write the image to an SD card: [TUTORIAL](https://www.raspberrypi.org/documentation/installation/installing-images/README.md). * Add a file called `ssh` to the root of the SD card when mounted on your laptop to enable SSH login. * Start the card on a Raspi and login via SSH with `ssh pi@[IP-OF-YOUR-RASPI]`. Password is `raspberry`. diff --git a/SECURITY.md b/SECURITY.md index bba6f56d..c30f8cc5 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,10 +1,20 @@ # Security Policy +*NOTE: This document is just a first draft and still under contruction.* + +Only use this software with funds you could afford to lose. Especially a lightning wallet is a hot wallet that has a constant connection to the internet and can be target of exploitation. + +Just because the software is OpenSource does not mean its free of errors. Especially if you run additional apps the RaspiBlitz team cannot review all the code of those external projects. + +The software is provided "AS IS", without warrenty of any kind. In no event shall the +authors or copyright holders be liable for any claim, damages or other +liability. [details on legal license](LICENSE.md) + ## Supported Versions Updates are made only for the latest version. -Security patches can be done with `Menu > Patch` for the current branch in the case of a high risk issue before next release. +Security patches can be done with `MAINMENU > UPDATE > PATCH` for the current branch in the case of a high risk issue before next release. The latest version always have the `latest` tag. To make sure you are using the lastest version, run: ``` @@ -30,11 +40,34 @@ curl https://keybase.io/oms/pgp_keys.asc | gpg --import Ensure that you put quotes around fingerprints containing spaces if importing with other methods. # Online Security + * Wi-fi and Bluetooth is disabled by default in the build script. * UFW is active and only specific ports are open, closing ports and removing hidden services when services are uninstalled. +* Fail-2-Ban is protecting the SSH login against brute-force-attacks. * Admin (and Joinmarket [optional]) users have passwordless sudo access to be able to perform installations and read password without much user interaction. # Physical Security -* All wallets and user interfaces are password protected so this has more privacy implications (in the case of physical theft) than security. + +* The lightning wallet and user interfaces are password protected by default so this has more privacy implications (in the case of physical theft) than security. * Optional log in through SSH using a hardware wallet. * LUKS encryption would be welcome in the future. + +# On-chain Funds + +Please keep in mind that there can be two different on-chain wallets on the RaspiBlitz. + +## Lightning Wallet (default) + +The default is the on-chain lightning wallet - thats the wallet where you normally send your funds before opening a channel & where your funds return to when you close a channel. With the initial word seed you get during RaspiBlitz setup you can get access again to this on-chain wallet. Keep the seed words secure in a off-line location. + +## Bitcoin Core Wallet (deactivated by default) + +Beside lightning you have a bitcoin core installed. Normally bitcoin core acts just as a blockchain informational service to the lightning wallet and its internal seperate on-chain wallet is deactivated. + +Some apps (like Fully Noded or JoinMarket) activate the bitcoin core wallet and use it for their own needs. This on-chain balance will not be reflected in the rest of the RaspiBlitz software and is NOT backuped by the seed words from the RaspiBlitz setup. If you make use of the bitcoin core wallet please take care of these funds. + +# Off-chain Funds (Lightning Channels) + +Please note that there is no perfect backup concept for the funds in your lightning channels yet. We recommend strongly to use the `Static Channel Backup` provided by LND and consider off-loctaion backup of that file to have the best chances to recover Lightning funds in a case desaster recovery. + +For more practical information on this topic see: [Backup Channel Funds](README.md#backup-for-on-chain---channel-funds) \ No newline at end of file diff --git a/pictures/connect.png b/pictures/connect.png new file mode 100644 index 00000000..2e655c40 Binary files /dev/null and b/pictures/connect.png differ diff --git a/pictures/lit.png b/pictures/lit.png new file mode 100644 index 00000000..66ae3b9d Binary files /dev/null and b/pictures/lit.png differ diff --git a/pictures/mainmenu.png b/pictures/mainmenu.png index 4f533440..176c9666 100644 Binary files a/pictures/mainmenu.png and b/pictures/mainmenu.png differ diff --git a/pictures/mempool.png b/pictures/mempool.png new file mode 100644 index 00000000..768d9991 Binary files /dev/null and b/pictures/mempool.png differ diff --git a/pictures/raspilogo_tile.png b/pictures/raspilogo_tile.png new file mode 100644 index 00000000..57d25beb Binary files /dev/null and b/pictures/raspilogo_tile.png differ diff --git a/pictures/raspilogo_tile_400px.png b/pictures/raspilogo_tile_400px.png new file mode 100644 index 00000000..5b5228b1 Binary files /dev/null and b/pictures/raspilogo_tile_400px.png differ diff --git a/pictures/services.png b/pictures/services.png index 339e35e4..69b6a62e 100644 Binary files a/pictures/services.png and b/pictures/services.png differ diff --git a/pictures/settings.png b/pictures/settings.png index 201ba895..b0a07e74 100644 Binary files a/pictures/settings.png and b/pictures/settings.png differ diff --git a/pictures/system.png b/pictures/system.png new file mode 100644 index 00000000..4fd873d5 Binary files /dev/null and b/pictures/system.png differ diff --git a/pictures/update.png b/pictures/update.png new file mode 100644 index 00000000..ebf3a5c0 Binary files /dev/null and b/pictures/update.png differ