Build your own Lightning Node on a RaspberryPi with a nice Display.
Version 1.6 with lnd 0.10.4 and bitcoin 0.20.0 (or litecoin 0.18.1)
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.
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 or as a weekend project yourself.
This is a quick look at the SSH main menu (once RaspiBlitz is SetUp):
As an alternative to the SSH menu the "Ride the Lightning" (RTL) WebUI is available:
There are further Services that can be switched on:
- Tor (Run as Hidden Service) details
- ElectRS (Electrum Server in Rust) details
- BTCPayServer (Cryptocurrency Payment Processor) details
- BTC-RPC-Explorer (Bitcoin Blockchain Explorer) details
- LNbits (Lightning wallet/accounts System) details
- SpecterDesktop (Multisig Trezor, Ledger, COLDCARDwallet & Specter-DIY) details
- LNDmanage (Advanced Channel Management CLI) details
- Loop (Submarine Swaps Service) details
- JoinMarket (CoinJoin Service) details
- ThunderHub (Lightning Node Manager WebUI) details
- Faraday (Channel Analysis & Recommendations CLI) details
- Balance Of Satoshis (Commands for working with LND balances) details
- Kindle Display (Bitcoin Status Display made with a jailbroken Kindle) details
- Stacking Sats Kraken (Auto-DCA script) details
You can connect the following Wallet-Apps to your RaspiBlitz:
- Zap (Android, iOS & Desktop) details
- Zeus (Android & iOS-TestFlight) details
- Shango (Android & iOS-TestFlight) details
- Fully Noded (iOS) details
- SendMany (Android) details
Also much more features like Touchscreen, Autopilot, DynDNS, SSH-Tunneling, UPS Support, ...
--watch--> https://www.youtube.com/watch?v=QXUGg45CWLoThe RaspiBlitz is optimized for being setup during a workshop at a hackday or conference (see detailed workshop tutorial). 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.
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.
All parts together are at around 180-250 USD - based on shops and location.
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
Find a list of other shops selling a Ready-2-Go RaspiBlitz in your area on raspiblitz.org.
The cheapest way is to buy and assemble the single parts yourself. There are two packages.
Please try to use the exact hardware models that are recommended in the shopping lists, because we have multiple reports were 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.
The "Standard Package" is most tested and recommended if you can afford 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.
- RaspberryPi 4 4GB (or 8GB) amazon referral link
- Power Supply - USB-C, 5V, >=3A amazon referral link
- 1TB SSD - SanDisk SSD Plus 1TB 2.5" : amazon referral link other 1TB SSD models might cause power issues
- SSD-case - UGREEN 2.5" External USB 3.0 Hard Disk Case with UASP support : amazon referral link
- MicroSDCard 32GB - Samsung PRO Endurance 32 GB microSDHC UHS-I U1: amazon referral link
- LCD - 3.5" RPi Display, GPIO connection, XPT2046 Touch Controller: amazon referral link
- Heatsink Case for RPi4 : amazon referral link
You can even pay your RaspiBlitz Amazon Shopping with Bitcoin & Lightning through Bitrefill.
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
- Micro SD-Card 16GB: amazon referral link
- LCD - 3.5" RPi Display, GPIO connection, XPT2046 Touch Controller: amazon referral link
When RaspberryPi 3 --> add following parts:
- RaspperryPi 3B+ : amazon referral link
- Heatsink-Case for RPi3: amazon referral link
- Powersupply microUSB, 5V, >=3A: amazon referral link
When RaspberryPi 4 2GB --> add following parts:
- RaspberryPi 4 2GB amazon referral link
- Power Supply - USB-C, 5V, >=3A amazon referral link
- Heatsink Case for RPi4: amazon referral link
What other case options do I have?
When you have all parts you need to:
- 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.
In the end your RaspiBlitz should look like this:
Your SD-card needs to contain the RaspiBlitz software. You can take the long road by building the SD-card image yourself or use the already prepared SD-Card image:
Download SD-Card image - Version 1.6:
Browser: https://raspiblitz.org/raspiblitz-v1.6-2020-08-04.img.gz
Torrent: assets/raspiblitz-v1.6-20200802.img.gz.torrent
SHA-256: bf8f70cf3a6d87d1b786936306ae092b6350be22f0c19c3a06171450178594ca or SIGNATURE
- Whats new in Version 1.6 of RaspiBlitz?
- How to update my RaspiBlitz?
- How to verify the sd card image after download?
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.
Insert the SD card and connect the power plug.
- 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.
Troubleshoot:
- I don't have a LAN port on my Laptop - how to connect to my RaspiBlitz?
- Is it possible to connect the Blitz over Wifi instead of using a LAN cable?
- Can I directly connect the RaspiBlitz with my laptop?
- 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.
Now open up a terminal (OSX/Win10) and connect through SSH with the command displayed by the RaspiBlitz:
ssh admin@[YOURIP]
→ use password: raspiblitz
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.
If you run into a problem or you have still a question, follow the steps below to get support. Also check the setup documentation for details.
-
Lookup the FAQ if you can find an answer to this question/problem.
-
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.
-
There is a Telegram Group of RaspiBlitz users helping each other: https://t.me/raspiblitz
-
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
-
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.
-
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 how to generate) and/or add some screenshots/photos so the community gets more insight into your problem.
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.
If you are looking for a tutorial on how to organize a workshop to build the RaspiBlitz, see here.
Automatically after login per SSH as admin to the RaspiBlitz, it will run a hardware test.
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 :)
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. The default is here to choose Bitcoin.
First thing to setup is giving your RaspiBlitz a name:
This name is given to the RaspiBlitz as an public alias of the lightning node for everybody to see.
Then the user gets requested to think of and write down 4 passwords:
You can use this RaspiBlitz Password Sheet (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 - check out for more background.
Then the user is asked to enter the Password A:
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.
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.
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:
The other passwords C & D will be needed later on. They will be used during the lightning wallet setup.
On setup you can now decide if you want to run your RaspiBlitz behind Tor or make your IP public to the lightning network.
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.
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.
After this the setup process will need some time and the user will see a lot of console outputs - just wait until its finished:
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. If you started with an empty HDD - you will see the following screens:
If you connected a fresh Hard Drive or SSD to the RaspiBlitz it might now ask you if it's OK to format it.
Your HDD/SSD will get formatted with the linux standard file system EXT4. If you want to try out the experimental new BTRFS 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.
After formatting you need to get a copy of the blockchain, the RaspiBlitz offers the following options:
The options - and when to choose which - will be explained here shortly:
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.
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 - thats why for a RP3 you should choose the COPY option .
First you need to download & validate the blockchain on your own computer/laptop. Todo so install bitcoin-core (0.18.1 or higher) from bitcoin.org and keep it running until blockchain is synced (will need around 300 GB).
Then you can use the COPY option to copy the blockchain over to the RaspiBlitz. This will be done over the local network by SCP (SSH file transfer) - follow the instructions given during the dialog.
Its advised to keep the bitcoin-core & the blockchain data as a backup on the laptop incase you need to re-setup the RaspiBlitz.
More details: I have the full blockchain on another computer. How do I copy it to the RaspiBlitz?
Lightning is installed and waiting for your setup if you see this screen.
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.
This is the default if you setup a RaspiBlitz the first time.
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.
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) for this.
Choose this option if you had an old RaspiBlitz you want to recover. You have three options to do that:
The RaspiBlitz calling the LND wallet creation command for you:
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.
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.
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.
It will now make sure your wallet is initialized correctly and may ask you to unlock it with your just set PASSWORD C.
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:
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.
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.
After terminal login LND will ask you (like on every start/reboot) to unlock the wallet again - use PASSWORD C:
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.
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:
- Blockchain Sync
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.
- Lightning Scanning
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.
Once all is done you should see this status screen on the RaspiBlitz LCD/display like this:
If you now login by SSH in your RaspiBlitz (or you are still logged in) you will the the Main Menu:
And if you scroll down .. you see even more options. All options of the main menu will be explained below in the feature documentation.
OK .. so from here on your RaspiBlitz is ready to play with.
If you need an idea what the most basic next steps to experience Lightning would be:
- 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 you will see a new RTL
option in the SSH main menu - it will give you all the information so that you can now open the RTL Webinterface in your browser.
Have fun riding the lightning :D
*BTW always love seeing photos of new RaspBlitzes added to the network on twitter @rootzoll - also there is a RaspiBlitz Donation Page, why not try to send some satoshis there with your new RaspiBlitz :D *
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 - because you have a full Bitcoin- and Lightning-Node on the RaspiBlitz.
So lets take a look at the SSH main in detail:
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.
It's not automatically updating. It's just for one-time info.
- Why is my bitcoin IP on the display red?
- Why is my node address on the display red?
- Why is my node address on the display yellow (not green)?
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 losing 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 before sending them to any Lightning Network wallet.
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.
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 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.
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 or join the RaspiBlitz NodeManager telegram group to meet people to open channels with: https://t.me/raspiblitz
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.
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.
Pay an invoice 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.
If you are looking for something to test pay with Lightning ... why not [donate some satoshis to the RaspiBlitz development[(https://tallyco.in/s/r5lx23/)? Thanks :)
Create an invoice to send to someone or a service to be payed through lightnig.
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.
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.
Use if the want to remove all funds from the RaspiBlitz.
If you connected your node well within the Lightning Network you can become a "Routing Node" other users select your Node as part of a Lightnig Payment and will pay you the fee you set on those channels. This menu point gives you a detailed report over the amount of days you set.
Beware - earning fees as a routing node does not come automatic. Its a bit of hard work of building the right channels to be attractive for other people to route thru. Check the interet for tutorials or use tools like "lndmanage" (see under RaspiBlitz SERVICES) to help you analyse and optimize your channel management.
Here you find basic settings for your RaspiBlitz:
Activate/Deactivate settings with the space bar and then select OK to activate changes. Here you find more details about those options (top to down):
You can run your Bitcoin- & Lightning-Node and also additional Apps as a Tor hidden service - replacing your IP with an .onion-address
This has some benefits:
- 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.
- 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.
But this also comes with the following side effects:
- 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)
To try it out just switch on the service - you can deactivate later on if it's not working for you.
Your RaspiBlitz has an LCD that is touchscreen capable. You can switch on this new feature that is still in development.
It will give you 4 buttons on the right side.
- 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 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.
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.
Keysend is a feature of LND that allows your node to accept payments without creating an invoice first. This is needs to be activated for example if you want to use your nodes for experimental messaging over the Lightning Network (see RaspiBlitz MOBILE apps like SendMany).
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.
The RaspiBlitz will automatically unlock the LND wallet on every start.
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.
The below on this README for your Backup options to secure your funds against loss. Storing the encrypted Static Channel Backup file to your Dropbox account is an easy and secure way todo this.
You can connect a small extra USB drive to your RaspiBlitz (choose a small one up to 32GB - dont use second HDD or SSD here, that would drain too much power from the RaspiBlitz). On that USB drive your latest StaticChannelBackup will be stored - just in case your HDD gets an error.
With ZeroTier you can add your RaspiBlitz to a software defined network - see for details: https://en.wikipedia.org/wiki/ZeroTier
The RaspiBlitz offers further Services, Apps and configuration (scroll down in the to see all in the RaspiBlitz):
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):
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 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.
After install you will see a new LOOP
option in the SSH main menu - it will give you all the information so that you can start using it.
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.
YouTube: CHANNEL MANAGEMENT and RTL interface in RaspiBlitz
Read an Intro-Tutorial to RTL: https://medium.com/@suheb.khan/how-to-ride-the-lightning-447af999dcd2
Feedback is welcome by the RTL programmer: https://github.com/ShahanaFarooqui/RTL
After install you will see a new RTL
option in the SSH main menu - it will give you all the information so that you can start using it.
BTC-RPC-Explorer is a blockchain explorer webseite you can run on your own RaspiBlitz. See an example running on: https://btc-explorer.com
After install you will see a new EXPLORE
option in the SSH main menu - it will give you all the information so that you can start using it.
Bitcoin Core that you have running on the RaspiBlitz has a very powerful command line interface and a wonderful daemon. Using PSBT and HWI it can also work with hardware wallets, but at the moment it is too linux-way. The same applies to multisignature setups.
The goal of SpecterDesktop is to make a convenient and user-friendly GUI around Bitcoin Core with a focus on multisignature setup with airgapped hardware wallets like Trezor, Ledger, COLDCARD or the Specter-DIY.
After install you will see a new SPECTER
option in the SSH main menu - it will give you all the information so that you can start using it.
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.
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.
YouTube: TOR and Electrum Server on Raspiblitz More Details on Service
After install you will see a new ELECTRS
option in the SSH main menu - it will give you all the information so that you can start using it.
BTCPay Server is a self-hosted, open-source cryptocurrency payment processor. It's secure, private, censorship-resistant and free.
At the moment the RaspiBlitz can just make the BTCPayServer publicly available to the outside over the Tor network (Hidden Service).
After install you will see a new BTCPAY
option in the SSH main menu - it will give you all the information so that you can start using it.
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 rebalancinglistchannels forwardings
: list forwarding statistics for each channellistchannels hygiene
: information for closing of active channelslistchannels 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
After install you will see a new LNDMANAGE
option in the SSH main menu - it will give you all the information so that you can start using it.
Faraday is a Channel Analysis & Recommendations CLI that can help you on your channel management.
After install you will see a new FARADAY
option in the SSH main menu - it will give you all the information so that you can start using it.
Balance of Satoshi gives you enhanced commands for working with LND balances.
After install you will see a new BOS
option in the SSH main menu - it will give you all the information so that you can start using it.
Is a Lightning Node Manager WebUI - similar to RTL.
After install you will see a new THUB
option in the SSH main menu - it will give you all the information so that you can start using it.
LNbits is a very simple server that sits on top of your Lightning Wallet
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.
After install you will see a new LNBITS
option in the SSH main menu - it will give you all the information so that you can start using it.
JoinMarket is software to create a special kind of bitcoin transaction called a CoinJoin transaction. It's aim is to improve the confidentiality and privacy of bitcoin transactions.
A CoinJoin transaction requires other people to take part. The right resources (coins) have to be in the right place, at the right time, in the right quantity. This isn't a software or tech problem, its an economic problem. JoinMarket works by creating a new kind of market that would allocate these resources in the best way.
Fore more details see here.
After install you will see a new JMARKET
option in the SSH main menu - it will give you all the information so that you can start using it.
The RaspiBlitz offers now also SubScriptions .. those are free or paid third-party services
Under LIST my Subscriptions
you will always find the list of all your running subscriptions to get more details or to CANCEL
them.
At the moment the following subscription services are available:
IP2TOR is a tunnel service where you can run your RaspiBlitz anon behind TOR but you rent a port on a clearnet IP thru which you can make services of your RaspiBlitz easy reachable for everybody on the internet. You dont need to care about your local router or firewall settings. You can pay this service also anon directly thru Lightning from your RaspiBlitz as subscription.
At first you select what service of your RaspiBlitz you like to tunnel thru a IP2TOR brigde.
Then you choose the store that provides the IP2TOR bridges that you are interested in. This address can be changed or you just go with the default store that is presented to you.
Then you get a list of available IP2TOR bridge offerings. By selection OK
on a IP2TOR bridge offering you can get more details on it and you will also see how many satoshis the subscription will cost you - your node should be funded and you should have channels open at this point.
If you choose AGREE
on the details of a IP2TOR bridge offering the RaspiBlitz tries for you to setup the IP2TOR bridge. If everything worked you will find now the subscription under MAINMENU
> SUBSCRIBE
> LIST My Subscriptions
where you can cancel it again.
To try out the IP2TOR tunnel choose in MAINMENU
the extra menu point of the Service you choose the bridge for and it should give you now an updated URL or try calloing the API on the IP and Port that is displayed under the details of the subscription in the LIST My Subscriptions
section.
If you want a Webservice like BTCPay Server or LNbits available to the outside internet (like with IP2TOR) people expect you to offer HTTPS address so that the communication between the client and your RaspiBlitz is encrypted. You could use the self-signed HTTPS certificate that RaspiBlitzis offering you, but this will give users Security Warnings in their browser and is not very user friendly. Thats were you can use a LetsEncrypt Subscription to get a free valid HTTPS certificate that is excepted without warning from almost all common browsers.
Because you also need a domain name for that - you will need to open a free account on DuckDNS.org ... further options might be added in the future.
If you create a new LetsEncrypt subscription you will be asked for your subdomain on DuckDNS and the Auth-Token of your DuckDNS account. Then RaspiBlitz tries to setup everything for you. If everything worked you will find now the subscription under MAINMENU
> SUBSCRIBE
> LIST My Subscriptions
where you can cancel it again.
To try out the IP2TOR tunnel choose in MAINMENU
the extra menu point of the Service you choose the bridge for and it should give you now an updated URL to call your service.
This feature should support you in connecting your RaspiBlitz to a mobile wallet on your smartphone.
At the moment the following mobile wallets are supported:
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).
If you want to access your LND APIs (to connect apps and additional services) you need credential files that grant to access (Macaroons & the TLS cert).
Macaroons: Access Tokens that allow certain command executions on the LND node. TLS: Certificate to secure/encrypt the communication with the LND node.
In this menu you can reset and re-sync those or export them as a file or string so that you can import them to the apps and additional services. The following export options are available:
Offers the following options to get the Macaroon and TLS files to be used in other apps and wallets.
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:
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.
This method is recommended to export to:
Opens an ad-hoc webserver so that you can download the files in your local network through the browser.
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.
Change the name of your node.
Change you passwords for security.
The REPAIR
menu gives you options to check and reset your RaspiBlitz
The options are explained in detail:
This will start the hardware test and identify if your RaspiBlitz is in good shape and can provide a stable service.
Use this option is you see under-voltage reports on your LCD display or you think your RaspiBlitz gets very hot.
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.
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.
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.
NOTICE: If you start your RaspiBlitz after exporting the migration file again it is outdated and using it can risk loosing your channel funds.
Basically you can connect another RaspiBlitz and copy over your blockchain to it for quicker setup. Your RaspiBlitz will be offline
during that process that can take between 4 to 6 hours.
Make sure both RaspiBlitzes are connected to the same local network. During setup the new RaspiBlitz should choose the COPY
option to get the blockchain and then choose as source computer RASPIBLITZ
. Now you activate the COPY-SOURCE
option and enter the given IP of the new RaspiBlitz and that ones Password A (not yours) .. then the process should start.
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.
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.
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.
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.
If you had Electrum installed you can use this option to make sure also the space consuming electrum index gets deleted to free up space.
If you had the Bitcoin Transaction Index activated you can use this option to make sure also tthis extra space consuming index gets deleted to free up space.
The UPDATE
menu gives you options to upadte your RaspiBlitz
The options are explained in detail:
Please note that the RaspiBlitz does not support an Auto-Update to ensure that there is no remote control of your node possible from a central server.
This is common way to update your RaspiBlitz. Choose this option to prepeare your raspiBlitz for a new sd card image containing the new version release.
Sometimes there is a new LND release that has some breaking changes that once you updated the LND databse that 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 garantees and verification checks - this is for people that run nodes to test new releases and how they work with existing RaspiBlitz apps.
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 that wnat to develolp on the RaspiBlitz and sync code between their IDE, forked GitHub and their RaspiBlitz.
A safe way to restart the RaspiBlitz ... have you tried to turn it off and on again?
A safe way to shutdown the RaspiBlitz.
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.
With the command raspiblitz
it's possible to return to the main menu.
As mentioned above you can export a Migration File from your Raspiblitz with MAINMENU > REPAIR > MIGRATION and store it on your laptop.
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.
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).
If you start MIGRATION you will need in the next step to format your HDD/SSD.
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.
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.
Here you have the two options SYNC and COPY as mentioned in the normal setup.
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.
To develop your own scripts/apps and to connect other services/apps to your RaspiBlitz you have multiple interfaces/APIs available:
bitcoin-cli
command line interface on the terminalbitcoind
running on port 8333 (public)JSON-RPC
running on port 8332 (local) DOC
lncli
command line interface on the terminal DOClnd
running on port 9735 (public)gRPC
running on port 10009 (public) DOCREST
running on port 8080 (public) DOC
If you activate Tor then your LND gRPC & REST APIs are also reachable publicly as a Hidden Service.
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.
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.
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/
.
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):
Acticate the StaticChannelBackup to DropBox in the SERVICES
menu of your RaspiBlitz. It will ask you for the Dropbox-Authtoken - this is how you can get this token:
Go to your web browser, do the following:
-
Go to https://www.dropbox.com/developers/apps/create and sign in
-
Choose Dropbox Api
-
Choose App Folder
-
Name your app and click Create App to proceed
-
On the settings page for your new app, scroll down to OAuth 2 and click Generate
-
You will now see a string of letters and numbers appear. This is your Dropbox-Authtoken.
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
You can also backup the SCB to your own server, but this needs manual setup:
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.
The script /home/admin/config.scripts/internet.sshpubkey.sh
helps on init, show and transfer ssh-pubkey to a remote server.
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
You can also backup the SCB to another local drive, e.g. an USB stick:
You can use a small USB thumb drive (everything over 120MB is fine). Please dont use a second HDD/SSD for this because that might drain too much power and could hurt the security of your data more then it helps.
To activate this feature go to MAINMENU > SETTINGS > 'StaticChannelBackup on USB Drive' and follow the instructions.
To test it - open or close a channel and check if you find a copy of channel.backup
in the specified location. You can check the background-script logs to see details on errors: sudo journalctl -f -u background
If you have a RaspiBlitz v1.2 or higher - just follow the UPDATE
option from the main menu (choose RELEASE
if asked) and follow the instructions.
If you have a RaspiBlitz older then version v1.0 please see here.
If you have a RaspiBlitz v1.0 or v1.1 or newer do the following:
- Main menu > OFF
- Remove power
- Remove SD card
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.
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.
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.
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:
- Get a fresh Rasbian RASPBIAN BUSTER WITH DESKTOP card image: DOWNLOAD
- Write image to a SD card: TUTORIAL
- 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 israspberry
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:
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/master/build_sdcard.sh && sudo bash build_sdcard.sh
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.
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.
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.
- Can I run RaspiBlitz on other computers than RaspberryPi?
- How can I build an SD card other then the master branch?
- How can I build an SD card from my forked GitHub Repo?
Here is a just a short selection of the very frequently asked questions:
- How to backup my Lightning Node?
- How can I recover my coins from a failing RaspiBlitz?
- Are those "Under-Voltage detected" warnings a problem?
- Can I run RaspiBlitz on other computer boards than RaspberryPi?
You have still more questions? Check the RaspiBlitz-FAQ-Archive.
Everybody is welcome to join, improve and extend the RaspiBlitz - it's a work in progress. Check the 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
.
To start your Deep Dive into the RaspiBlitz project, the following YouTube video (July 2020)is recommended: https://www.youtube.com/watch?v=QXUGg45CWLo
Also get inspired for a deep-dive with the original "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 :)
Join me on twitter @rootzoll, visit us at a upcoming #lightninghackday 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 :)