Merge branch 'v1.6' into service-updates
168
CHANGES.md
Normal file
@ -0,0 +1,168 @@
|
||||
# CHANGES between Releases
|
||||
|
||||
## Whats new in Version 1.6 of RaspiBlitz?
|
||||
|
||||
- Update: Raspberry Pi OS Base Image (May 2020)
|
||||
- Update: bitcoin-core version 0.20.0-beta [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/)
|
||||
- Update: litecoin version 0.18.1-beta [details](https://blog.litecoin.org/litecoin-core-v0-18-1-release-233cabc26440)
|
||||
- Update: LND version 0.10.4-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.10.4-beta)
|
||||
- Update: Specter Desktop 0.5.5 [details](https://github.com/cryptoadvance/specter-desktop/blob/master/README.md)
|
||||
- Update: Loop 0.6.5 [details](https://lightning.engineering/posts/2020-05-13-loop-mpp/)
|
||||
- Update: BTCPayServer v1.0.5.2 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.0.5.2)
|
||||
- Update: RTL 0.8.1 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.7.1)
|
||||
- Update: ElectRS 0.8.5 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#085-1-july-2020)
|
||||
- Update: JoinMarket v0.6.3.1 [details](https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.6.3.1)
|
||||
- New: Nginx Web Server
|
||||
- New: Subscriptions Management
|
||||
- New: IP2Tor Bridge (optional subscription service)
|
||||
- New: Balance of Satoshis v5.41.0 (with update option) [details](https://github.com/alexbosworth/balanceofsatoshis)
|
||||
- New: Faraday [details](https://github.com/lightninglabs/faraday)
|
||||
- New: Let's Encrypt client [details](FAQ.md#how-to-use-the-lets-encrypt-client)
|
||||
- New: ThunderHub v0.8.12 (with update option) [details](https://www.thunderhub.io)
|
||||
- New: JoininBox (terminal based GUI for JoinMarket) [details](https://github.com/openoms/joininbox)
|
||||
- New: ZeroTier [details](https://zerotier.com/manual/)
|
||||
- New: Kindle Display (on a jailbroken Kindle) [details](https://github.com/dennisreimann/kindle-display)
|
||||
- New: Static Channel Backup on USB Thumbdrive [details](https://github.com/rootzoll/raspiblitz/tree/v1.6#c-local-backup-target-usb-thumbdrive)
|
||||
- New: Keep WIFI config over wpa_supplicant.conf for next update
|
||||
- Fix: DropBox StaticChannelBackup
|
||||
- Removed: Shango from the list of Mobile Wallets
|
||||
- Removed: Torrent Download of Blockchain (Copy over LAN now default for RP3)
|
||||
- Shoppinglist: 4GB RaspberryPi 4 is now default for Standard Package (will still run with less)
|
||||
|
||||
## Whats new in Version 1.5.1 of RaspiBlitz?
|
||||
|
||||
- Bugfix: DropBox Backup of Static-Channel-Backup
|
||||
- Bugfix: Torrentfiles with active tracker
|
||||
|
||||
## Whats new in Version 1.5 of RaspiBlitz?
|
||||
|
||||
Beside many small improvements and changes, these are most important changes:
|
||||
|
||||
- Update: LND version 0.9.2-beta (optional update to 0.10.0-beta)
|
||||
- Update: bitcoin-core version 0.19.1-beta [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.19.1.md)
|
||||
- Update: Loop 0.5.1 or 0.6.0 (based on LND version) [details](https://github.com/lightninglabs/loop/releases)
|
||||
- Update: RTL 0.7.0 (Loop In and Out integration) [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.7.0)
|
||||
- Update: BTCPayServer v1.0.4.2 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.0.4.2)
|
||||
- Update: LNbits v0.1 [details](https://twitter.com/lnbits/status/1253700293440741377?s=20)
|
||||
- Update: BTC-RPC-Explorer v2.0.0 [details](https://github.com/janoside/btc-rpc-explorer/blob/master/CHANGELOG.md#v200)
|
||||
- Update: lndmanage 0.10.0 [details](https://github.com/bitromortac/lndmanage/releases/tag/v0.10.0)
|
||||
- Shoppinglist: Replace Shimfan with passive RP4-Heatcase
|
||||
- Shoppinglist: 1TB SSD is now default [details about migration to bigger SSD](README.md#import-a-migration-file)
|
||||
- Fix: (Control-D) Give root password for maintenance [details](https://github.com/rootzoll/raspiblitz/issues/1053)
|
||||
- Fix: Screen Rotate on update from v1.3
|
||||
- New: Specter Desktop (connect DIY Specter-Wallet or ColdCard) [details](https://github.com/cryptoadvance/specter-desktop/blob/master/README.md)
|
||||
- New: JoinMarket [details](https://github.com/JoinMarket-Org/joinmarket-clientserver)
|
||||
- New: Activate 'Keysend' on LND by Service Menu [details](https://github.com/rootzoll/raspiblitz/issues/1000)
|
||||
- New: SendMany App (wallet & chat over keysend) [details](https://github.com/fusion44/sendmany/blob/master/README.md)
|
||||
- New: Reset SSH cert if SSH login not working [details](FAQ.md#how-can-i-repair-my-ssh-login)
|
||||
- New: Make it easier to Copy The Blockchain over Network from running Blitz
|
||||
- New: Forwarding Fee Report on Main Menu
|
||||
- New: Easy Setup of Auto-Backup of SCB to Dropbox
|
||||
- New: LND Interims Updates (verified & reckless) [details](https://github.com/rootzoll/raspiblitz/issues/1116#issuecomment-619467148)
|
||||
- New: Sync RaspiBlitz with your forked GitHub repo thru menu [details](FAQ.md#how-can-i-sync-a-branch-of-my-forked-github-with-my-local-raspiblitz)
|
||||
- Removed: Clone Blockchain from second HDD (use CopyStation script)
|
||||
|
||||
DOWNLOAD the new RaspiBlitz v1.5 image [here](README.md#installing-the-software).
|
||||
|
||||
## Whats new in Version 1.4 of RaspiBlitz?
|
||||
|
||||
Beside many small improvements and changes, these are most important changes:
|
||||
|
||||
- Update: LND version 0.9.0-beta
|
||||
- Update: bitcoin-core version 19.0.1-beta
|
||||
- Update: litecoin version 0.17.1-beta
|
||||
- Update: RTL (Ride the Lightning) Web UI version 0.6.7-beta (redesign)
|
||||
- Update: Touchscreen UI (Node Info & Donate)
|
||||
- Update: Fee Report on LCD
|
||||
- Update: TORv2 -> TORv3
|
||||
- Update: New Torrent files
|
||||
- New: ElectRS (Electrum Server in Rust) [details](https://github.com/romanz/electrs)
|
||||
- New: BTCPayServer (Cryptocurrency Payment Processor) [details](https://btcpayserver.org)
|
||||
- New: LNDmanage (Advanced Channel Management CLI) [details](https://github.com/bitromortac/lndmanage)
|
||||
- New: BTC-RPC-Explorer (Bitcoin Blockchain Explorer) [details](https://github.com/janoside/btc-rpc-explorer)
|
||||
- New: Loop (Submarine Swaps Service) [details](https://github.com/lightninglabs/loop)
|
||||
- New: LNbits (Lightning wallet/accounts System) [details](https://github.com/arcbtc/lnbits)
|
||||
- New: Fully Noded (iOS) [details](https://apps.apple.com/us/app/fully-noded/id1436425586)
|
||||
- New: Tor Support to connect mobile Apps
|
||||
- New: Migration Export/Import (e.g. HDD -> SSD) [details](README.md#import-a-migration-file)
|
||||
- New: Start without LCD (switch to HDMI) [details](FAQ.md#can-i-run-the-raspiblitz-without-a-displaylcd)
|
||||
- New: Recovery Sheet (PDF) [details](https://github.com/rootzoll/raspiblitz/raw/v1.4/home.admin/assets/RaspiBlitzRecoverySheet.pdf)
|
||||
- Experimental: BTRFS [details](FAQ.md#why-use-btrfs-on-raspiblitz)
|
||||
|
||||
For full details see issue list of [Release 1.4 Milestone](https://github.com/rootzoll/raspiblitz/milestone/7?closed=1).
|
||||
|
||||
Find the full Tutorial how to build a RaspiBlitz in the [README](README.md) or follow the [instructions to update to the latest version](README.md#updating-raspiblitz-to-new-version).
|
||||
|
||||
## Whats new in Version 1.3 of RaspiBlitz?
|
||||
|
||||
Version 1.3 is using the new Raspbian Buster that is ready to use with the RaspberryPi 4 (also still works with RaspberryPi 3).
|
||||
|
||||
- update: New Shopping Lists with RaspberryPi 4
|
||||
- Update: LND version 0.7.1-beta (fix for CVE-2019-12999)
|
||||
- Update: bitcoin-core version 0.18.1-beta
|
||||
- Update: RTL (Ride the Lightning) Web UI version 0.4.2 -beta
|
||||
- Update: Blockchain Index not needed anymore
|
||||
- Update: New Torrent files
|
||||
- New: Logo (see folder raspiblitz/logos)
|
||||
- New: Sync/Validate Blockchain as default for RP4
|
||||
- New: Switch on Tor during setup
|
||||
- New: Support Zap Mobile for Android
|
||||
- New: Repair Options in main menu
|
||||
- New: UPNP (AutoNAT) support in services menu
|
||||
- New: LCD rotate 180 degrees in services menu
|
||||
- Fix: Tor switch on/off
|
||||
- Fix: Zap iOS Mobile Wallet connect
|
||||
- Fix: Shango Mobile Wallet connect
|
||||
- Experimental: LCD Touchscreen Support
|
||||
- Experimental: UPS support (APC) [details](FAQ.md#how-to-connect-a-ups-to-the-raspiblitz)
|
||||
|
||||
For full details see issue list of [Release 1.3 Milestone](https://github.com/rootzoll/raspiblitz/milestone/6?closed=1).
|
||||
|
||||
## Whats new in Version 1.2 of RaspiBlitz?
|
||||
|
||||
Version 1.2 packs some more fixes and enhancements to make the RaspiBlitz more stable, protect HDD data better and support you better in case of data corruption of the blockchain data.
|
||||
|
||||
- Update: LND version 0.6-beta
|
||||
- Update: RTL (Ride the Lightning) Web UI version 0.2.16-beta
|
||||
- Update: Shopping Lists (new Heatsink Case lowers 10°)
|
||||
- Update: New Torrent Update file (reducing blockchain sync time)
|
||||
- Fix: LND scanning stuck on ? (better error handling)
|
||||
- Fix: Cash out all funds
|
||||
- Fix: Keep TLS certs stable on update
|
||||
- New: Support Zeus Mobile Wallet
|
||||
- New: Show QR codes on LCD
|
||||
- New: Support LND Static Channel Backup
|
||||
- New: Remote-Backup of channel.backup file (SCP & Dropbox)
|
||||
- New: Recover Node from LND rescue backup file
|
||||
- New: Run Hardware Test on setup and main menu
|
||||
- New: Run Software Test (DebugLogs) from main menu
|
||||
- New: SSH-Forward Tunneling (commandline)
|
||||
- New: Set fixed IP/domain for RaspiBlitz (commandline)
|
||||
- New: Set DNS server (commandline)
|
||||
- New: Run LND on different port (commandline)
|
||||
- New: Ask before formatting HDD
|
||||
- New: Better Update support (from main menu)
|
||||
- New: Temp in Fahrenheit on the LCD
|
||||
- Experimental: Backup Torrent Seeding (Service)
|
||||
|
||||
For full details see issue list of [Release 1.2 Milestone](https://github.com/rootzoll/raspiblitz/milestone/5?closed=1).
|
||||
|
||||
## Whats new in Version 1.1 of RaspiBlitz?
|
||||
|
||||
Version 1.1 packs some first fixes and enhancements to make the RaspiBlitz more stable, protect HDD data better and support you better in case of data corruption of the blockchain data.
|
||||
|
||||
- Update: RTL (Ride the Lightning) Web UI version 0.2.15-beta
|
||||
- Fix: Preventing logs from filling up the sd card
|
||||
- Fix: Pairing for latest Zap iOS Mobile Wallet
|
||||
- Fix: Pairing for latest Shango Mobile Wallet
|
||||
- Fix: Open LND port check when custom port
|
||||
- New: Undervoltage Reports on LCD
|
||||
- New: fsk (file system consistency check) of HDD on every boot
|
||||
- New: Repair Help Menu in case if blockchain data corruption
|
||||
- New: /config.scripts/lnd.setport.sh (set custom LND port)
|
||||
- New: /config.scripts/lnd.rescue.sh (backup/replay LND data)
|
||||
- New: Bootscreen with logo
|
||||
- Removed: FTP download option for blockchain
|
||||
|
||||
For full details see issue list of [Release 1.1 Milestone](https://github.com/rootzoll/raspiblitz/milestone/3?closed=1).
|
||||
|
296
FAQ.md
@ -1,167 +1,8 @@
|
||||
# FAQ - Frequently Asked Questions
|
||||
|
||||
## Whats new in Version 1.6 of RaspiBlitz?
|
||||
## What changed on the single RaspiBlitz updates?
|
||||
|
||||
- Update: Raspberry Pi OS Base Image (May 2020)
|
||||
- Update: bitcoin-core version 0.20.0-beta [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/)
|
||||
- Update: litecoin version 0.18.1-beta [details](https://blog.litecoin.org/litecoin-core-v0-18-1-release-233cabc26440)
|
||||
- Update: LND version 0.10.4-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.10.4-beta)
|
||||
- Update: Specter Desktop 0.5.5 [details](https://github.com/cryptoadvance/specter-desktop/blob/master/README.md)
|
||||
- Update: Loop 0.6.5 [details](https://lightning.engineering/posts/2020-05-13-loop-mpp/)
|
||||
- Update: BTCPayServer v1.0.5.2 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.0.5.2)
|
||||
- Update: RTL 0.8.1 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.7.1)
|
||||
- Update: ElectRS 0.8.5 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#085-1-july-2020)
|
||||
- Update: JoinMarket v0.6.3.1 [details](https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.6.3.1)
|
||||
- New: Nginx Web Server
|
||||
- New: Subscriptions Management
|
||||
- New: IP2Tor Bridge (optional subscription service)
|
||||
- New: Balance of Satoshis v5.41.0 (with update option) [details](https://github.com/alexbosworth/balanceofsatoshis)
|
||||
- New: Faraday [details](https://github.com/lightninglabs/faraday)
|
||||
- New: Let's Encrypt client [details](FAQ.md#how-to-use-the-lets-encrypt-client)
|
||||
- New: ThunderHub v0.8.12 (with update option) [details](https://www.thunderhub.io)
|
||||
- New: JoininBox (terminal based GUI for JoinMarket) [details](https://github.com/openoms/joininbox)
|
||||
- New: ZeroTier [details](https://zerotier.com/manual/)
|
||||
- New: Kindle Display (on a jailbroken Kindle) [details](https://github.com/dennisreimann/kindle-display)
|
||||
- New: Static Channel Backup on USB Thumbdrive [details](https://github.com/rootzoll/raspiblitz/tree/v1.6#c-local-backup-target-usb-thumbdrive)
|
||||
- Fix: DropBox StaticChannelBackup
|
||||
- Shoppinglist: 4GB RaspberryPi 4 is now default for Standard Package (will still run with less)
|
||||
|
||||
## Whats new in Version 1.5.1 of RaspiBlitz?
|
||||
|
||||
- Bugfix: DropBox Backup of Static-Channel-Backup
|
||||
- Bugfix: Torrentfiles with active tracker
|
||||
|
||||
## Whats new in Version 1.5 of RaspiBlitz?
|
||||
|
||||
Beside many small improvements and changes, these are most important changes:
|
||||
|
||||
- Update: LND version 0.9.2-beta (optional update to 0.10.0-beta)
|
||||
- Update: bitcoin-core version 0.19.1-beta [details](https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-0.19.1.md)
|
||||
- Update: Loop 0.5.1 or 0.6.0 (based on LND version) [details](https://github.com/lightninglabs/loop/releases)
|
||||
- Update: RTL 0.7.0 (Loop In and Out integration) [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.7.0)
|
||||
- Update: BTCPayServer v1.0.4.2 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.0.4.2)
|
||||
- Update: LNbits v0.1 [details](https://twitter.com/lnbits/status/1253700293440741377?s=20)
|
||||
- Update: BTC-RPC-Explorer v2.0.0 [details](https://github.com/janoside/btc-rpc-explorer/blob/master/CHANGELOG.md#v200)
|
||||
- Update: lndmanage 0.10.0 [details](https://github.com/bitromortac/lndmanage/releases/tag/v0.10.0)
|
||||
- Shoppinglist: Replace Shimfan with passive RP4-Heatcase
|
||||
- Shoppinglist: 1TB SSD is now default [details about migration to bigger SSD](README.md#import-a-migration-file)
|
||||
- Fix: (Control-D) Give root password for maintenance [details](https://github.com/rootzoll/raspiblitz/issues/1053)
|
||||
- Fix: Screen Rotate on update from v1.3
|
||||
- New: Specter Desktop (connect DIY Specter-Wallet or ColdCard) [details](https://github.com/cryptoadvance/specter-desktop/blob/master/README.md)
|
||||
- New: JoinMarket [details](https://github.com/JoinMarket-Org/joinmarket-clientserver)
|
||||
- New: Activate 'Keysend' on LND by Service Menu [details](https://github.com/rootzoll/raspiblitz/issues/1000)
|
||||
- New: SendMany App (wallet & chat over keysend) [details](https://github.com/fusion44/sendmany/blob/master/README.md)
|
||||
- New: Reset SSH cert if SSH login not working [details](FAQ.md#how-can-i-repair-my-ssh-login)
|
||||
- New: Make it easier to Copy The Blockchain over Network from running Blitz
|
||||
- New: Forwarding Fee Report on Main Menu
|
||||
- New: Easy Setup of Auto-Backup of SCB to Dropbox
|
||||
- New: LND Interims Updates (verified & reckless) [details](https://github.com/rootzoll/raspiblitz/issues/1116#issuecomment-619467148)
|
||||
- New: Sync RaspiBlitz with your forked GitHub repo thru menu [details](FAQ.md#how-can-i-sync-a-branch-of-my-forked-github-with-my-local-raspiblitz)
|
||||
- Removed: Clone Blockchain from second HDD (use CopyStation script)
|
||||
|
||||
DOWNLOAD the new RaspiBlitz v1.5 image [here](README.md#installing-the-software).
|
||||
|
||||
## Whats new in Version 1.4 of RaspiBlitz?
|
||||
|
||||
Beside many small improvements and changes, these are most important changes:
|
||||
|
||||
- Update: LND version 0.9.0-beta
|
||||
- Update: bitcoin-core version 19.0.1-beta
|
||||
- Update: litecoin version 0.17.1-beta
|
||||
- Update: RTL (Ride the Lightning) Web UI version 0.6.7-beta (redesign)
|
||||
- Update: Touchscreen UI (Node Info & Donate)
|
||||
- Update: Fee Report on LCD
|
||||
- Update: TORv2 -> TORv3
|
||||
- Update: New Torrent files
|
||||
- New: ElectRS (Electrum Server in Rust) [details](https://github.com/romanz/electrs)
|
||||
- New: BTCPayServer (Cryptocurrency Payment Processor) [details](https://btcpayserver.org)
|
||||
- New: LNDmanage (Advanced Channel Management CLI) [details](https://github.com/bitromortac/lndmanage)
|
||||
- New: BTC-RPC-Explorer (Bitcoin Blockchain Explorer) [details](https://github.com/janoside/btc-rpc-explorer)
|
||||
- New: Loop (Submarine Swaps Service) [details](https://github.com/lightninglabs/loop)
|
||||
- New: LNbits (Lightning wallet/accounts System) [details](https://github.com/arcbtc/lnbits)
|
||||
- New: Fully Noded (iOS) [details](https://apps.apple.com/us/app/fully-noded/id1436425586)
|
||||
- New: Tor Support to connect mobile Apps
|
||||
- New: Migration Export/Import (e.g. HDD -> SSD) [details](README.md#import-a-migration-file)
|
||||
- New: Start without LCD (switch to HDMI) [details](FAQ.md#can-i-run-the-raspiblitz-without-a-displaylcd)
|
||||
- New: Recovery Sheet (PDF) [details](https://github.com/rootzoll/raspiblitz/raw/v1.4/home.admin/assets/RaspiBlitzRecoverySheet.pdf)
|
||||
- Experimental: BTRFS [details](FAQ.md#why-use-btrfs-on-raspiblitz)
|
||||
|
||||
For full details see issue list of [Release 1.4 Milestone](https://github.com/rootzoll/raspiblitz/milestone/7?closed=1).
|
||||
|
||||
Find the full Tutorial how to build a RaspiBlitz in the [README](README.md) or follow the [instructions to update to the latest version](README.md#updating-raspiblitz-to-new-version).
|
||||
|
||||
## Whats new in Version 1.3 of RaspiBlitz?
|
||||
|
||||
Version 1.3 is using the new Raspbian Buster that is ready to use with the RaspberryPi 4 (also still works with RaspberryPi 3).
|
||||
|
||||
- update: New Shopping Lists with RaspberryPi 4
|
||||
- Update: LND version 0.7.1-beta (fix for CVE-2019-12999)
|
||||
- Update: bitcoin-core version 0.18.1-beta
|
||||
- Update: RTL (Ride the Lightning) Web UI version 0.4.2 -beta
|
||||
- Update: Blockchain Index not needed anymore
|
||||
- Update: New Torrent files
|
||||
- New: Logo (see folder raspiblitz/logos)
|
||||
- New: Sync/Validate Blockchain as default for RP4
|
||||
- New: Switch on Tor during setup
|
||||
- New: Support Zap Mobile for Android
|
||||
- New: Repair Options in main menu
|
||||
- New: UPNP (AutoNAT) support in services menu
|
||||
- New: LCD rotate 180 degrees in services menu
|
||||
- Fix: Tor switch on/off
|
||||
- Fix: Zap iOS Mobile Wallet connect
|
||||
- Fix: Shango Mobile Wallet connect
|
||||
- Experimental: LCD Touchscreen Support
|
||||
- Experimental: UPS support (APC) [details](FAQ.md#how-to-connect-a-ups-to-the-raspiblitz)
|
||||
|
||||
For full details see issue list of [Release 1.3 Milestone](https://github.com/rootzoll/raspiblitz/milestone/6?closed=1).
|
||||
|
||||
## Whats new in Version 1.2 of RaspiBlitz?
|
||||
|
||||
Version 1.2 packs some more fixes and enhancements to make the RaspiBlitz more stable, protect HDD data better and support you better in case of data corruption of the blockchain data.
|
||||
|
||||
- Update: LND version 0.6-beta
|
||||
- Update: RTL (Ride the Lightning) Web UI version 0.2.16-beta
|
||||
- Update: Shopping Lists (new Heatsink Case lowers 10°)
|
||||
- Update: New Torrent Update file (reducing blockchain sync time)
|
||||
- Fix: LND scanning stuck on ? (better error handling)
|
||||
- Fix: Cash out all funds
|
||||
- Fix: Keep TLS certs stable on update
|
||||
- New: Support Zeus Mobile Wallet
|
||||
- New: Show QR codes on LCD
|
||||
- New: Support LND Static Channel Backup
|
||||
- New: Remote-Backup of channel.backup file (SCP & Dropbox)
|
||||
- New: Recover Node from LND rescue backup file
|
||||
- New: Run Hardware Test on setup and main menu
|
||||
- New: Run Software Test (DebugLogs) from main menu
|
||||
- New: SSH-Forward Tunneling (commandline)
|
||||
- New: Set fixed IP/domain for RaspiBlitz (commandline)
|
||||
- New: Set DNS server (commandline)
|
||||
- New: Run LND on different port (commandline)
|
||||
- New: Ask before formatting HDD
|
||||
- New: Better Update support (from main menu)
|
||||
- New: Temp in Fahrenheit on the LCD
|
||||
- Experimental: Backup Torrent Seeding (Service)
|
||||
|
||||
For full details see issue list of [Release 1.2 Milestone](https://github.com/rootzoll/raspiblitz/milestone/5?closed=1).
|
||||
|
||||
## Whats new in Version 1.1 of RaspiBlitz?
|
||||
|
||||
Version 1.1 packs some first fixes and enhancements to make the RaspiBlitz more stable, protect HDD data better and support you better in case of data corruption of the blockchain data.
|
||||
|
||||
- Update: RTL (Ride the Lightning) Web UI version 0.2.15-beta
|
||||
- Fix: Preventing logs from filling up the sd card
|
||||
- Fix: Pairing for latest Zap iOS Mobile Wallet
|
||||
- Fix: Pairing for latest Shango Mobile Wallet
|
||||
- Fix: Open LND port check when custom port
|
||||
- New: Undervoltage Reports on LCD
|
||||
- New: fsk (file system consistency check) of HDD on every boot
|
||||
- New: Repair Help Menu in case if blockchain data corruption
|
||||
- New: /config.scripts/lnd.setport.sh (set custom LND port)
|
||||
- New: /config.scripts/lnd.rescue.sh (backup/replay LND data)
|
||||
- New: Bootscreen with logo
|
||||
- Removed: FTP download option for blockchain
|
||||
|
||||
For full details see issue list of [Release 1.1 Milestone](https://github.com/rootzoll/raspiblitz/milestone/3?closed=1).
|
||||
See the [CHANGES.md](CHANGES.md) file for detailes.
|
||||
|
||||
## How to update my RaspiBlitz (since 1.2)?
|
||||
|
||||
@ -219,24 +60,6 @@ gpg --verify [SIGNATURE-FILE] [IMAGE-FILE]
|
||||
|
||||
As a result you should see a "correct signature" message with a main fingerprint the same as you can find on the [keybase.io/rootzoll](https://keybase.io/rootzoll) that is ending on `1C73 060C 7C17 6461`. If that fingerprint is correct, the sd card image you downloaded is a original release RaspiBlitz.
|
||||
|
||||
## Can I still get version 1.2 of RaspiBlitz?
|
||||
|
||||
HTTP: http://wiki.fulmo.org/downloads/raspiblitz-v1.2-2019-05-02.img.gz
|
||||
|
||||
Torrent: https://github.com/rootzoll/raspiblitz/raw/v1.2/raspiblitz-v1.2-2019-05-02.torrent
|
||||
|
||||
SHA-256: ae9910bb99b7a992d14e920696183b6e494cc9b52db7b9c03dd02fd739d47659
|
||||
|
||||
Code: https://github.com/rootzoll/raspiblitz/tree/v1.2
|
||||
|
||||
## Can I still get version 1.1 of RaspiBlitz?
|
||||
|
||||
Torrent: https://github.com/rootzoll/raspiblitz/raw/v1.1/raspiblitz-v1.1-2019-03-18.torrent
|
||||
|
||||
SHA-256: b7a449ce6444f9e7e9fd05156ff09c70a6e200be0b5e580d3317049eefc4f3b7
|
||||
|
||||
Code: https://github.com/rootzoll/raspiblitz/tree/v1.1
|
||||
|
||||
## How to update a old RaspiBlitz BEFORE v1.0? (LEGACY)
|
||||
|
||||
If your old RaspiBlitz if version 0.98 or higher, just follow the update instructions in the README.
|
||||
@ -263,16 +86,10 @@ Of course, people should modify the system, add own scripts, etc ... but if you
|
||||
|
||||
1. Contribute your changes back to the main project as pull requests so that they become part of the next update - the next SD card release.
|
||||
|
||||
2. Make your changes so that they survive an SD card update easily - put all your scripts and extra data onto the HDD AND document for yourself how to activate them again after an update .. maybe even write a small shell script (stored on your HDD) that installs & configures all your additional packages, software and scripts.
|
||||
2. Make your changes so that they survive an SD card update easily - put all your scripts and extra data onto the HDD AND document for yourself how to activate them again after an update. The file `/mnt/hdd/app-data/custom-installs.sh` runs with sudo rights after an update/recovery from a fresh sd card. This is the place to put all the install commands, cronjobs or editing of system configs for your personal modifications of RaspiBlitz.
|
||||
|
||||
*BTW there is a beneficial side effect when updating with a new SD card: You also get rid of any malware or system bloat that happened in the past. You start with a fresh system :)*
|
||||
|
||||
## How can I avoid using a prepared blockchain and validate myself?
|
||||
|
||||
Since v1.3 if you use a RaspberryPi 4 syncing and validation the full blockchain yourself is the new default.
|
||||
|
||||
The torrent download use a prepared blockchain to kick start the RaspiBlitz. If you want to self validate you could do this on another more powerful computer and then transfer your own validated blockchain over to the RaspiBlitz. Check the options `Copying from another Computer` & `Cloning from a 2nd HDD` described in the [README](README.md) for more details.
|
||||
|
||||
## I have the full blockchain on another computer. How do I copy it to the RaspiBlitz?
|
||||
|
||||
Copying a already synced blockchain from another computer (for example your Laptop) can be a quick way to get the RaspiBlitz started or replacing a corrupted blockchain with a fresh one. Also that way you synced and verified the blockchain yourself and not trusting the RaspiBlitz Torrent downloads (don't trust, verify).
|
||||
@ -382,11 +199,6 @@ With the 24 word list given you by LND on wallet creation you can recover your p
|
||||
|
||||
For more background on the LND mnemonic seed [read this article](https://github.com/lightningnetwork/lnd/blob/master/docs/recovery.md#recovering-funds-from-lnd-funds-are-safu).
|
||||
|
||||
## How does PASSWORD D effects the word seed?
|
||||
|
||||
On wallet creation you get asked if you want to protect your word seed list with an additional password. If you choose so, RaspiBlitz recommends you to use your PASSWORD D at this point.
|
||||
|
||||
To use a an additional password for your seed words is optional. If you choose so, you will need the password to recover your private key from your your seed words later on. Without this password your private key cannot be recovered from your seed words. So the password adds an additional layer of security, if someone finds your written down word list.
|
||||
|
||||
## How to move funds & channels from RaspiBlitz to LND Lightning Desktop App?
|
||||
|
||||
@ -617,110 +429,12 @@ https://diynodes.com (delivery from UK)
|
||||
|
||||
When your USB power adapter for the RaspiBlitz delivers too low power those messages with "Under-Voltage detected" (under-voltage) are shortly seen on the display. This can lead to data loss/corruption on the HDD. If you see those just one or two times that's not OK, but can be in a tolerant window. Nevertheless it make sure your USB power adapter can deliver at least 3A (big and stable is good). If you still see those warnings maybe get a second USB Power adapter just for the HDD and power the HDD through a Y-Cable - see https://en.wikipedia.org/wiki/Y-cable#USB or put a USB Hub with extra power between the raspberry and the HDD.
|
||||
|
||||
## Why do we need to download the blockchain and not syncing it?
|
||||
|
||||
*For RaspberryPi 3:* The RaspiBlitz is powered by the RaspberryPi. The processing power of this SingleBoardComputer is too low to make a fast sync of the blockchain from the bitcoin peer to peer network during setup process (validation). To sync and index the complete blockchain could take weeks or even longer. That's why the RaspiBlitz needs to download a prepared blockchain from another source.
|
||||
|
||||
*For RaspberryPi 4 and above:* The RaspberryPi is now fast enough and with 2GB RAM and a SSD self syncing and validation is the new default.
|
||||
|
||||
## Is using the prepared SD card image secure?
|
||||
|
||||
Using pre-built software almost always shifts trust to the one who made the binary. But at least you can check with the SHA checksum after download if the image downloaded is really the one offered by the GitHub Repo. To do so make a quick check if your browser is really in the correct GiutHub page and that your HTTPS of the GitHub page is signed by 'DigiCert'. Then compare the SHA-256 string (always next to the download link of the image on the README) with the result of the command `shasum -a 256 [DOWNLOADED-FILE-TO-CHECK]` (Mac/Linux). Still this is not optimal and if at least some people from the community request it, I will consider signing the download as an author for the future.
|
||||
|
||||
The best way would be to build the sd card yourself. You use the script `build_sdcard.sh` for it. Take some minutes to check if you see anything suspicious in that build script and then follow the [README](README.md#build-the-sd-card-image) on this.
|
||||
|
||||
## Is downloading the blockchain from a third party secure?
|
||||
|
||||
To download a blockchain from a third party (torrent) is not optimal and for the future with more cheap & powerfull SingleBoardComputers we could get rid of this 'patch'.
|
||||
|
||||
The downloaded blockchain is pre-indexed and pre-validated. That should be practically secure enough, because if the user gets a "manipulated" blockchain it would not work after setup. The beginning of the downloaded blockchain needs to fit the genesis block (in bitcoind software) and the end of the downloaded blockchain needs not match with the rest of the bitcoin network state - hashes of new block distributed within the peer-2-peer network need to match the downloaded blockchain head. So if you downloaded a manipulated blockchain it simply wouldn't work in practice. As long as you are not in a totally hostile environment where someone would be able to fake a whole network of peers and miners around you - this is secure enough for running a small funded full node to try out the lightning network.
|
||||
|
||||
If you don't trust the download or you want to run the RaspiBlitz in a more production like setup (on your own risk) then don't use the torrent download and choose the option to COPY the blockchain data from a more powerful computer (laptop or desktop) where you synced, verified and indexed the blockchain all by your yourself - see [README](README.md#4-copying-from-another-computer) for more details.
|
||||
|
||||
## Why is taking my torrent download of the blockchain so long?
|
||||
|
||||
Other users reported that opening up and forwarding the following port from their router to the RaspiBlitz helped speed up and getting started the torrent download: 49200-49250
|
||||
|
||||
On details how to set port forwarding on your router model see: https://portforward.com
|
||||
|
||||
## What is the "Base Torrent File"?
|
||||
|
||||
Inspired by the website getbitcoinblockchain.com we use one of their base torrent files to have a basic set of blocks - those blocks will not change for the future. This torrent contains most of the data (the big file) and we dont need to change the torrent for a long time. This way the torrent can get establish a wide spread seeding and the torrent network can take the heavy load.
|
||||
|
||||
At the moment (Baseiteration=2) this is just the bitcoin blk and rev files up to the number:
|
||||
blockchain/blocks/blk00000.dat - blk01357.dat
|
||||
blockchain/blocks/rev00000.dat - rev01357.dat
|
||||
(no testnet data)
|
||||
|
||||
For litecoin (Baseiteration=2) it's blk and rev files up to the number:
|
||||
blockchain/blocks/blk00000.dat - blk00150.dat
|
||||
blockchain/blocks/rev00000.dat - rev00150.dat
|
||||
|
||||
The base torrent file should always have the following naming scheme:
|
||||
|
||||
`raspiblitz-[CHAINNETWORK][BASEITERATIONNUMBER]-[YEAR]-[MONTH]-[DAY]-base.torrent`
|
||||
|
||||
So for example the second version of the base torrent for litecoin created on 2018-10-31 would have this name: raspiblitz-litecoin2-2018-10-31-base.torrent
|
||||
|
||||
## What is the "Update Torrent File" and how to create it?
|
||||
|
||||
All the rest of the blocks and needed files get packaged into a second torrent file. This file will be updated much more often. The seeding is expected to be not that good and download may be slower, but that's OK because it's a much smaller file.
|
||||
|
||||
This way a good balance between good seeding and up-to-date blockchain can be reached.
|
||||
|
||||
To create the Update Torrent file, follow the following step ...
|
||||
|
||||
Have a almost 100% synced bitcoind MAINNET on a RaspiBlitz
|
||||
(if you have funds in there, make a backup first and calculate for about 1 day of off-time to repair the blockchain after this)
|
||||
|
||||
Stop bitcoind with:
|
||||
```
|
||||
sudo systemctl stop bitcoind
|
||||
```
|
||||
|
||||
Delete base torrent files:
|
||||
```
|
||||
sudo rm /mnt/hdd/bitcoin/blocks/blk00*.dat
|
||||
sudo rm /mnt/hdd/bitcoin/blocks/blk0{1000..1357}.dat
|
||||
sudo rm /mnt/hdd/bitcoin/blocks/rev00*.dat
|
||||
sudo rm /mnt/hdd/bitcoin/blocks/rev0{1000..1357}.dat
|
||||
```
|
||||
|
||||
Now change to your computer where you package the torrent files and transfer the two directories into your torrent base directory (should be your current working directory):
|
||||
```
|
||||
mkdir ./blockchain
|
||||
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/blocks ./blockchain/blocks
|
||||
scp -r bitcoin@[RaspiBlitzIP]:/mnt/hdd/bitcoin/chainstate ./blockchain/chainstate
|
||||
```
|
||||
|
||||
(Re-)name the "torrent base directory" to the same name as the torrent UPDATE file itself later (without the .torrent ending). The updated torrent file should always have the following naming schema:
|
||||
|
||||
`raspiblitz-[CHAINNETWORK][BASEITERATIONNUMBER]-[YEAR]-[MONTH]-[DAY]-update.torrent`
|
||||
|
||||
*So for example an update torrent created on 2018-12-24 for litecoin that is an update to the second base torrent version would have this name: raspiblitz-litecoin2-2018-12-24-update.torrent*
|
||||
|
||||
Now open your torrent client (e.g. qTorrent for OSX) and create a new torrent-file with the freshly renamed "torrent base directory" as source directory.
|
||||
|
||||
Add this list of trackers to your torrent and start seeding (keep a free/empty line between the three single trackers):
|
||||
```
|
||||
udp://tracker.justseed.it:1337
|
||||
|
||||
udp://tracker.coppersurfer.tk:6969/announce
|
||||
|
||||
udp://open.demonii.si:1337/announce
|
||||
|
||||
udp://denis.stalker.upeer.me:6969/announce
|
||||
```
|
||||
|
||||
After successful creation of the torrent file - edit the RaspiBlitz code:
|
||||
* copy to torrent file to `/home.admin/assets`
|
||||
* push to git
|
||||
* change in `50torrentHDD.sh script`
|
||||
* add to Torrent-[RSS](https://github.com/rootzoll/raspiblitz/blob/master/home.admin/assets/raspiblitz-torrents-rss.xml)
|
||||
* seed at home and at services like justseed.it
|
||||
* update [issue](https://github.com/rootzoll/raspiblitz/issues/285#issuecomment-457796120) and ask on twitter for help on seeding
|
||||
|
||||
Now to repair your RaspiBlitz Blockchain start mainmenu `./00mainMenu.sh` and choose `REPAIR` > `RESET-CHAIN`.
|
||||
|
||||
## What is the process of creating a new sd card image release?
|
||||
|
||||
@ -785,7 +499,7 @@ There is an experimental section in this GitHub that tries to build for other Si
|
||||
|
||||
## Can I flip the screen?
|
||||
|
||||
There is now an option under `SERVICES to rotate the screen.
|
||||
There is now an option under `SETTINGS` to rotate the screen.
|
||||
|
||||
To do it manually: For the default 3.5" LCD you need to edit the /boot/config.txt. Run `sudo nano /boot/config.txt`
|
||||
look for the line `dtoverlay=tft35a:rotate=270` towards the end. To flip the screen with 180 degrees change the line to `dtoverlay=tft35a:rotate=90` and reboot with `sudo reboot`. Reference: https://github.com/goodtft/LCD-show/issues/34
|
||||
@ -1088,4 +802,4 @@ external hard disk in `/mnt/hdd/app-data/letsencrypt`.
|
||||
The RaspiBlitz is your computer to experiment with. Feel free to add your own scripts, edit the system or install further software from the command line. Just keep in mind that after an update/recovery the RaspiBlitz starts with a fresh and clean operating system again. So all your editings and installs might be gone. To prevent this you should do the following:
|
||||
|
||||
- place own scripts and data that should survive an update/recovery into the `/mnt/hdd/app-data` directory
|
||||
- put all install commands & modification of the system into the script `/mnt/hdd/app-data/custom-installs.sh` that will be started automatically on a recovery/update.
|
||||
- put all install commands & modification of the system into the script `/mnt/hdd/app-data/custom-installs.sh` that will be started automatically on a recovery/update.
|
||||
|
423
README.md
@ -6,7 +6,7 @@
|
||||
|
||||

|
||||
|
||||
**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.**
|
||||
**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.**
|
||||
|
||||
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.
|
||||
|
||||
@ -35,6 +35,7 @@ There are further Services that can be switched on:
|
||||
* **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)
|
||||
|
||||
You can connect the following Wallet-Apps to your RaspiBlitz:
|
||||
|
||||
@ -44,21 +45,28 @@ You can connect the following Wallet-Apps to your RaspiBlitz:
|
||||
* **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)
|
||||
|
||||
Also much more features like Touchscreen, Autopilot, DynDNS, SSH-Tunneling, UPS Support, ...
|
||||
Also many more features like Touchscreen, Autopilot, DynDNS, SSH-Tunneling, UPS Support, ...
|
||||
|
||||
## Time Estimate to Setup a RaspiBlitz
|
||||
## DeepDive Video (July 2020)
|
||||
|
||||
The RaspiBlitz is optimized for being setup during a workshop at a hackday or conference (see [detailed workshop tutorial](WORKSHOP.md)). When it comes ready assembled together with a up-to-date synced blockchain it's possible to have it ready in about 2 to 3 hours - most is waiting time.
|
||||
<img src="pictures/raspiblitz-deepdive.png" alt="DeepDive Video" width="400">
|
||||
--watch--> https://www.youtube.com/watch?v=QXUGg45CWLo
|
||||
|
||||
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.
|
||||
## Time Estimate to Set Up a RaspiBlitz
|
||||
|
||||
The RaspiBlitz is optimized for being setup during a workshop at a hackday or conference (see [detailed workshop tutorial](WORKSHOP.md)). When it comes fully assembled with an up-to-date synced blockchain, it's possible to have it ready in about 2 to 3 hours - most of it 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 downloading and syncing time where you can do other stuff while checking on the progress from time to time.
|
||||
|
||||
## Hardware Needed
|
||||
|
||||
All parts together are at around 150-250 USD - based on shops and location.
|
||||
All parts together are at around 180-250 USD - based on shops and location.
|
||||
|
||||
### Buy a ready-2-go RaspiBlitz (Germany, EU and International)
|
||||
|
||||
If you like to support the RaspiBlitz project you can order a ready-2-go RaspiBlitz or a all-you-need-hardware set for yourself or for your RaspiBlitz workshop from [raspiblitz.com](https://raspiblitz.com)
|
||||
If you like to support the RaspiBlitz project you can order a ready-2-go RaspiBlitz or an all-you-need-hardware set for yourself or for your RaspiBlitz workshop from [raspiblitz.com](https://raspiblitz.com)
|
||||
|
||||
Find a list of other shops selling a Ready-2-Go RaspiBlitz in your area on [raspiblitz.org](https://raspiblitz.org/).
|
||||
|
||||
### Amazon Shopping List (buy parts & build it yourself)
|
||||
|
||||
@ -68,7 +76,7 @@ The cheapest way is to buy and assemble the single parts yourself. There are two
|
||||
|
||||
#### Package: Standard (around 250 USD)
|
||||
|
||||
*The "Standard Package" is most tested and recommended if you can effort it. It aims to give you the best economic value to run all the RaspiBlitz features at a good performance and even allows you to self-validate your blockchain in under 3 days.*
|
||||
*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](https://geni.us/raspiblitz-4gb-new)
|
||||
* Power Supply - USB-C, 5V, >=3A [amazon referral link](https://geni.us/raspiblitz-ps)
|
||||
@ -90,7 +98,7 @@ Basic Parts:
|
||||
* LCD - 3.5" RPi Display, GPIO connection, XPT2046 Touch Controller: [amazon referral link](https://geni.us/raspiblitz-touchscreen)
|
||||
|
||||
When RaspberryPi 3 --> add following parts:
|
||||
* RaspperryPi 3B+ : [amazon referral link](https://geni.us/raspiblitz-rpi3)
|
||||
* 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)
|
||||
|
||||
@ -105,10 +113,10 @@ When RaspberryPi 4 2GB --> add following parts:
|
||||
|
||||
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
|
||||
- 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
|
||||
- Add the display on top with the pins like in picture below.
|
||||
- PlugIn the network cable.
|
||||
- Plug in the network cable.
|
||||
|
||||
In the end your RaspiBlitz should look like this:
|
||||
|
||||
@ -120,23 +128,19 @@ Your SD-card needs to contain the RaspiBlitz software. You can take the long roa
|
||||
|
||||
**Download SD-Card image - Version 1.6:**
|
||||
|
||||
THIS IS A RELEASE CANDIDATE - NOT THE FINAL VERSION - DONT USE FOR A PRODUCTION NODE!
|
||||
Browser: https://raspiblitz.org/raspiblitz-v1.6-2020-08-04.img.gz
|
||||
|
||||
Browser: https://raspiblitz.org/raspiblitz-v1.6rc3-2020-07-20.img.gz
|
||||
Torrent: [assets/raspiblitz-v1.6-20200802.img.gz.torrent](https://github.com/rootzoll/raspiblitz/raw/v1.6/home.admin/assets/raspiblitz-v1.6-2020-08-04.img.gz.torrent)
|
||||
|
||||
Torrent: [TODO]
|
||||
SHA-256: bf8f70cf3a6d87d1b786936306ae092b6350be22f0c19c3a06171450178594ca or [SIGNATURE](https://raspiblitz.org/raspiblitz-v1.6-2020-08-04.img.gz.sig)
|
||||
|
||||
SHA-256: 13de2dbfd5d92e8daab8e814dc8c4a575da962a505ea5014904d89df042236ce or [SIGNATURE](https://todo)
|
||||
|
||||
* [Whats new in Version 1.6 of RaspiBlitz?](FAQ.md#whats-new-in-version-16-of-raspiblitz)
|
||||
* [What's new in Version 1.6 of RaspiBlitz?](CHANGES.md#whats-new-in-version-16-of-raspiblitz)
|
||||
* [How to update my RaspiBlitz?](README.md#updating-raspiblitz-to-new-version)
|
||||
* [How to verify the sd card image after download?](FAQ.md#how-to-verify-the-sd-card-image-after-download)
|
||||
|
||||
## Write the SD-Card image to your SD Card
|
||||
|
||||
You need to write the downloaded sd card image (the img.gz-file) to your sd card (16GB minimum) - you can use the very easy tool Balena Etcher for this:
|
||||
https://www.balena.io/etcher/ .. it's available for Win, Mac & Linux.
|
||||
|
||||
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.
|
||||
|
||||
## Boot your RaspiBlitz
|
||||
|
||||
@ -150,7 +154,7 @@ Insert the SD card and connect the power plug.
|
||||
* [I don't have a LAN port on my Laptop - how to connect to my RaspiBlitz?](FAQ.md#i-dont-have-a-lan-port-on-my-laptop---how-to-connect-to-my-raspiblitz)
|
||||
* [Is it possible to connect the Blitz over Wifi instead of using a LAN cable?](FAQ.md#is-it-possible-to-connect-the-blitz-over-wifi-instead-of-using-a-lan-cable)
|
||||
* [Can I directly connect the RaspiBlitz with my laptop?](FAQ.md#can-i-directly-connect-the-raspiblitz-with-my-laptop)
|
||||
* [I connected my HDD but it still says 'Connect HDD' on the display?](FAQ.md#i-connected-my-hdd-but-it-still-says-connect-hdd-on-the-display)
|
||||
* [I connected my HDD, but it still says 'Connect HDD' on the display?](FAQ.md#i-connected-my-hdd-but-it-still-says-connect-hdd-on-the-display)
|
||||
|
||||
When everything boots up correctly, you should see the local IP address of your RaspiBlitz on the LCD panel.
|
||||
|
||||
@ -174,7 +178,7 @@ If you run into a problem or you have still a question, follow the steps below t
|
||||
|
||||
3. There is a Telegram Group of RaspiBlitz users helping each other: https://t.me/raspiblitz
|
||||
|
||||
4. Please determine if your problem/question is about RaspiBlitz or for example with LND. For example if you cant route a payment or get an error when opening a channel that is an LND question/problem an is best answered by the LND dev community: https://dev.lightning.community
|
||||
4. Please determine if your problem/question is about RaspiBlitz or for example with LND. For example if you can't route a payment or get an error when opening a channel that is an LND question/problem and is best answered by the LND dev community: https://dev.lightning.community
|
||||
|
||||
5. Go to the GitHub issues of the RaspiBlitz: https://github.com/rootzoll/raspiblitz/issues Do a search there. Also check closed issues by removing 'is:open' from the filter/search-box.
|
||||
|
||||
@ -202,13 +206,13 @@ 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.
|
||||
This name is given to the RaspiBlitz as a 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)](https://github.com/rootzoll/raspiblitz/raw/v1.4/home.admin/assets/RaspiBlitzRecoverySheet.pdf) to write those passwords down for save storage. And also use it later on for your Seed Words.
|
||||
You can use this [RaspiBlitz Password Sheet (PDF)](https://github.com/rootzoll/raspiblitz/raw/v1.4/home.admin/assets/RaspiBlitzRecoverySheet.pdf) to write those passwords down for safe storage. You can also use it later on for your Seed Words.
|
||||
|
||||
*The password A,B,C & D idea is directly based in the [RaspiBolt Guide Preperations](https://stadicus.github.io/RaspiBolt/raspibolt_10_preparations.html#write-down-your-passwords) - check out for more background.*
|
||||
|
||||
@ -260,34 +264,18 @@ 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 - that's why the other options above where invented.*
|
||||
|
||||
*For the old RaspberryPi 3 this is not recommended. A RaspberryPi 3 has a very low power CPU and syncing+validating the blockchain directly with the peer2peer network can take multiple weeks - that's why for a RP3 you should choose the COPY option .*
|
||||
|
||||
#### 2. COPY - Copy from Laptop or another RaspiBlitz over Local Network
|
||||
|
||||
If you have another computer available (laptop, desktop or another RaspiBlitz) that already runs a working blockchain you can use this option to copy it over to the RaspiBlitz. This will be done over the local network by SCP (SSH file transfer). Choose this option and follow the given instructions.
|
||||
First you need to download & validate the blockchain on your own computer/laptop. Install bitcoin-core (0.18.1 or higher) from [bitcoin.org](https://bitcoin.org/en/download) and keep it running until blockchain is synced (will need around 300 GB).
|
||||
|
||||
This is also the best option if you don't like to run your RaspberryPi 3 with a prepared blockchain by a third party. Then install bitcoin-core (0.18.1 or higher) on a more powerful computer, sync+validate the blockchain there by yourself and copy it over after that through the local network.
|
||||
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.
|
||||
|
||||
It's advised to keep the bitcoin-core & the blockchain data as a backup on the laptop in case 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?](FAQ.md#i-have-the-full-blockchain-on-another-computer-how-do-i-copy-it-to-the-raspiblitz)
|
||||
|
||||
#### 3. Torrent Fallback (NOTE: to-be-deprecated in 1.6)
|
||||
|
||||
*This is recommended for old RaspberryPi 3s - for the newer RaspberryPi 4 you might consider the `SYNC` option.*
|
||||
|
||||
If you choose `TORRENT` it will show you the following screen:
|
||||
|
||||

|
||||
|
||||
*This can take a while - normally it should be done if you keep it running over night, but some users reported that it took up to 3 days. If it takes longer than that or you cannot see any progress (downloading starting) for over an hour after you started this option consider to cancel the download and go with the COPY option or retry fresh.*
|
||||
|
||||
It is safe to close the terminal window (and shutting down your laptop) while the RaspiBlitz is doing the torrent download. To check on progress and to continue the setup you need to ssh back in again.
|
||||
|
||||
You can cancel the torrent download by keeping the key `x` pressed. Then the download will stop and you will be asked if you want to keep the progress so far. This makes sense if you need to shutdown the RaspiBlitz and you want to continue later or when you want to try another download option but want to keep the option to continue on torrent if the other option is slower or not working.
|
||||
|
||||
* [I don't trust a torrent blockchain, how can I validate myself?](FAQ.md#how-can-i-avoid-using-a-prepared-blockchain-and-validate-myself)
|
||||
* [Why is taking my torrent download of the blockchain so long?](FAQ.md#why-is-taking-my-torrent-download-of-the-blockchain-so-long)
|
||||
|
||||
### Setup Lightning
|
||||
|
||||
Lightning is installed and waiting for your setup if you see this screen.
|
||||
@ -320,9 +308,9 @@ The RaspiBlitz calling the LND wallet creation command for you:
|
||||
|
||||
##### LNDRESCUE LND tar.gz-Backupfile (BEST)
|
||||
|
||||
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.
|
||||
Choose this option if you have made a complete backup of the LND data and have a tar.gz file starting with the word 'lnd-rescue' available. It will recover all your on-chain funds and open channels you had. You must be sure that the LND backup you have is really the latest version - otherwise you might lose 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.*
|
||||
*If you have tar.gz file that starts with 'raspiblitz', that's a migration file. That also includes your old LND wallet, but you import it earlier in the setup process .. see further below for details.*
|
||||
|
||||
##### SEED+SCB Words Seed & channel.backup file (OK)
|
||||
|
||||
@ -358,7 +346,7 @@ Now on first start you will have a longer waiting time (between 10 minutes and 2
|
||||
|
||||

|
||||
|
||||
*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.*
|
||||
*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:
|
||||
|
||||
@ -378,7 +366,7 @@ Once all is done you should see this status screen on the RaspiBlitz LCD/display
|
||||
|
||||
### Main Menu
|
||||
|
||||
If you now login by SSH in your RaspiBlitz (or you are still logged in) you will the the Main Menu:
|
||||
If you now login by SSH in your RaspiBlitz (or you are still logged in) you will see the Main Menu:
|
||||
|
||||

|
||||
|
||||
@ -392,7 +380,7 @@ If you need an idea what the most basic next steps to experience Lightning would
|
||||
* Open a channel
|
||||
* Make a payment
|
||||
|
||||
If you like to do this all from a web browser with a dashboard UI instead from an SSH terminal, go to `SERVICES`, activate the `RTL Webinterface` and after the reboot open in your web browser: http://[LOCAL-IP-OF-YOU-NODE]:3000 (PASSWORD B is your RPC password).
|
||||
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
|
||||
|
||||
@ -404,7 +392,7 @@ Have fun riding the lightning :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](#interface--apis) - because you have a full Bitcoin- and Lightning-Node on the RaspiBlitz.
|
||||
|
||||
So lets take a look at the SSH main in detail:
|
||||
So let's take a look at the SSH main in detail:
|
||||
|
||||
#### INFO: Raspiblitz Status Screen
|
||||
|
||||
@ -422,7 +410,7 @@ This is the screen that gets displayed on the LCD/display. It's useful to call i
|
||||
|
||||
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](https://bitcoin-only.com/#privacy) before sending them to any Lightning Network wallet.*
|
||||
*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 the area of 20 EUR/USD should be enough to make your first experiences. Also, it's a good privacy practice to [coinjoin your coins](https://bitcoin-only.com/#privacy) before sending them to any Lightning Network wallet.*
|
||||
|
||||
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.
|
||||
|
||||
@ -452,7 +440,7 @@ If you are looking for something to test pay with Lightning ... why not [donate
|
||||
|
||||
#### RECEIVE: Create Invoice/PaymentRequest
|
||||
|
||||
Create an invoice to send to someone or a service to be payed through lightnig.
|
||||
Create an invoice to send to someone or a service to be payed 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.*
|
||||
|
||||
@ -464,9 +452,9 @@ With this feature you can close down all open channels and get funds locked up i
|
||||
|
||||
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.
|
||||
|
||||
#### CASHOUT: Remove Funds fro, on-chain Wallet
|
||||
#### CASHOUT: Remove Funds from on-chain Wallet
|
||||
|
||||
Use if the want to remove all funds from the RaspiBlitz.
|
||||
Use if you want to remove all funds from the RaspiBlitz.
|
||||
|
||||
#### lnbalance: Detailed Wallet Balances
|
||||
|
||||
@ -476,57 +464,19 @@ Use if the want to remove all funds from the RaspiBlitz.
|
||||
|
||||
<img src="pictures/bonus-lnchannels.png" alt="bonus-lnchannels" width="600">
|
||||
|
||||
|
||||
#### lnfwdreport: Report on your earned fees for Forwarding Payments
|
||||
|
||||
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.
|
||||
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 Lightning 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.
|
||||
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.
|
||||
|
||||
#### SERVICES: Activate/Deactivate Services
|
||||
#### SETTINGS: Basic Settings of RaspiBlitz
|
||||
|
||||
The RaspiBlitz offers further Services, Apps and configuration (scroll down in the to see all in the RaspiBlitz):
|
||||
Here you find basic settings for your 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):
|
||||
|
||||
##### Channel Autopilot
|
||||
|
||||
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.
|
||||
|
||||
##### Accept Keysend
|
||||
|
||||
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).
|
||||
|
||||
##### Loop
|
||||
|
||||
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.
|
||||
|
||||
[Details on Service](https://github.com/lightninglabs/loop)
|
||||
|
||||
##### Testnet
|
||||
|
||||
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.
|
||||
|
||||
##### DynamicDNS
|
||||
|
||||
This is a way to make your RaspiBlitz publicly reachable from the internet so that other nodes can open channels with you and you can connect with your mobile wallet from outside your local network.
|
||||
|
||||
To do so you can register at an DynamicDomain service like freedns.afraid.org and forward the TCP ports ...
|
||||
|
||||
* 8333 (Bitcoin/mainnet)
|
||||
* 9735 (LND Node)
|
||||
* 10009 (LND RPC)
|
||||
* 8080 (LND REST API)
|
||||
|
||||
... from your internet router to the local IP of your RaspiBlitz and then activate under "Services" the "DynamicDNS" option.
|
||||
|
||||
You will be asked for your dynamic domain name such like "mynode.crabdance.org" and you can also optionally set an URL that will be called regularly to update your routers IP with the dynamic domain service. At freedns.afraid.org this URL is called "Direct URL" under the menu "Dynamic DNS" once you added one.
|
||||
|
||||
*NOTE: DynamicDNS just works if you can forward ports on your router and you have a temporary public IP address (your ISP is not running you behind a NAT - like on most mobile connections). Another solution to make your ports reachable from the public internet is to use reverse ssh tunneling - see FAQ on ['How to setup port-forwarding with a SSH tunnel?'](FAQ.md#how-to-setup-port-forwarding-with-a-ssh-tunnel)*
|
||||
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):
|
||||
|
||||
##### Run behind Tor
|
||||
|
||||
@ -547,42 +497,6 @@ But this also comes with the following side effects:
|
||||
|
||||
To try it out just switch on the service - you can deactivate later on if it's not working for you.
|
||||
|
||||
##### RTL Webinterface
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
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
|
||||
|
||||
##### BTC-RPC-Explorer
|
||||
|
||||
BTC-RPC-Explorer is a blockchain explorer webseite you can run on your own RaspiBlitz. See an example running on: https://btc-explorer.com
|
||||
|
||||

|
||||
|
||||
[Details on Service](https://github.com/janoside/btc-rpc-explorer)
|
||||
|
||||
##### Cryptoadvance Specter
|
||||
|
||||
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.
|
||||
|
||||

|
||||
|
||||
##### LND Auto-Unlock
|
||||
|
||||
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.
|
||||
|
||||
* [When using Auto-Unlock, how much security do I lose?](FAQ.md#when-using-auto-unlock-how-much-security-do-i-lose)
|
||||
|
||||
##### Touchscreen (experimental)
|
||||
|
||||
Your RaspiBlitz has an LCD that is touchscreen capable. You can switch on this new feature that is still in development.
|
||||
@ -600,6 +514,92 @@ It will give you 4 buttons on the right side.
|
||||
|
||||
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.
|
||||
|
||||
##### Channel Autopilot
|
||||
|
||||
The autopilot is a feature of LND that you can switch on. It automatically uses around half of your on-chain funds (if available) to open channels with other lightning nodes the autopilot thinks can be useful to improve your payment routes.
|
||||
|
||||
##### Accept Keysend
|
||||
|
||||
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).
|
||||
|
||||
##### Testnet
|
||||
|
||||
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.
|
||||
|
||||
##### LND Auto-Unlock
|
||||
|
||||
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.
|
||||
|
||||
* [When using Auto-Unlock, how much security do I lose?](FAQ.md#when-using-auto-unlock-how-much-security-do-i-lose)
|
||||
|
||||
##### StaticChannelBackup on DropBox
|
||||
|
||||
The [below on this README](README.md#backup-for-on-chain---channel-funds) 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 to do this.
|
||||
|
||||
##### StaticChannelBackup on USB Drive
|
||||
|
||||
You can connect a small extra USB drive to your RaspiBlitz (choose a small one up to 32GB - don't 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.
|
||||
|
||||
##### ZeroTier
|
||||
|
||||
With ZeroTier you can add your RaspiBlitz to a software defined network - see for details: https://en.wikipedia.org/wiki/ZeroTier
|
||||
|
||||
#### SERVICES: Activate/Deactivate Services
|
||||
|
||||
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):
|
||||
|
||||
##### Lightning Loop
|
||||
|
||||
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.
|
||||
|
||||
[Details on Service](https://github.com/lightninglabs/loop)
|
||||
|
||||
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.
|
||||
|
||||
##### RTL Webinterface
|
||||
|
||||
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](https://www.youtube.com/watch?v=pESO_Pm0v10)
|
||||
|
||||
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
|
||||
|
||||
BTC-RPC-Explorer is a blockchain explorer website you can run on your own RaspiBlitz. See an example running on: https://btc-explorer.com
|
||||
|
||||

|
||||
|
||||
[Details on Service](https://github.com/janoside/btc-rpc-explorer)
|
||||
|
||||
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.
|
||||
|
||||
##### Cryptoadvance Specter
|
||||
|
||||
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.
|
||||
|
||||
##### Electrum Rust Server
|
||||
|
||||
Enable a user to run his own Electrum server on the RaspiBlitz. The server indexes the entire Bitcoin blockchain, and the resulting index enables fast queries for any given user wallet, allowing the user to keep real-time track of his balances and his transaction history using the [Electrum wallet](https://electrum.org).
|
||||
@ -608,7 +608,10 @@ Since Electrum Rust Server runs on the user's own machine, there is no need for
|
||||
|
||||
For example if you use your Trezor Hardware Wallet with the trezor.io wallet it will tell a third party your public keys - connecting it with your IP. Now you can use your Trezor with the Electrum Wallet just talking to your own Electrum Server preserving your privacy.
|
||||
|
||||
[Details on Service](https://github.com/romanz/electrs)
|
||||
[YouTube: TOR and Electrum Server on Raspiblitz](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 so that you can start using it.
|
||||
|
||||
##### BTCPayServer
|
||||
|
||||
@ -620,9 +623,11 @@ BTCPay Server is a self-hosted, open-source cryptocurrency payment processor. It
|
||||
|
||||
[Details on Service](https://btcpayserver.org/)
|
||||
|
||||
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
|
||||
|
||||
lndmanage is a command line tool for advanced channel management of an node.
|
||||
lndmanage is a command line tool for advanced channel management of a node.
|
||||
|
||||
*You need at least one open channel to use this tool.*
|
||||
|
||||
@ -643,6 +648,32 @@ To run it change to the RaspiBlitz terminal and type 'manage'. This starts the L
|
||||
|
||||
[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 so that you can start using it.
|
||||
|
||||
##### Faraday
|
||||
|
||||
Faraday is a Channel Analysis & Recommendations CLI that can help you on your 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 so that you can 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 so that you can start using it.
|
||||
|
||||
##### ThunderHub
|
||||
|
||||
Is 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 so that you can start using it.
|
||||
|
||||
##### LNbits
|
||||
|
||||
LNbits is a very simple server that sits on top of your Lightning Wallet
|
||||
@ -658,17 +689,51 @@ You can also develop extensions on it.
|
||||
|
||||
[Details on Service](https://github.com/arcbtc/lnbits/blob/master/README.md)
|
||||
|
||||
##### StaticChannelBackup on DropBox
|
||||
|
||||
The [below on this README](README.md#backup-for-on-chain---channel-funds) 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.
|
||||
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
|
||||
|
||||
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.
|
||||
JoinMarket is software to create a special kind of bitcoin transaction called a CoinJoin transaction. Its 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.
|
||||
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, it's 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](https://github.com/JoinMarket-Org/joinmarket-clientserver).
|
||||
For more details see [here](https://github.com/JoinMarket-Org/joinmarket-clientserver).
|
||||
|
||||
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.
|
||||
|
||||
#### SUBSCRIBE: Subscription Services
|
||||
|
||||
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 (paid)
|
||||
|
||||
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 don't 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 bridge.
|
||||
|
||||
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 calling the API on the IP and Port that is displayed under the details of the subscription in the `LIST My Subscriptions` section.
|
||||
|
||||
##### HTTPS with LetsEncrypt (free)
|
||||
|
||||
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. That's where 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](https://www.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.
|
||||
|
||||
#### MOBILE: Connect Mobile Wallet
|
||||
|
||||
@ -679,19 +744,10 @@ This feature should support you in connecting your RaspiBlitz to a mobile wallet
|
||||
At the moment the following mobile wallets are supported:
|
||||
|
||||
* [ZAP (iOS/Android)](https://github.com/LN-Zap/zap-iOS)
|
||||
* [Shango (iOS/Android)](https://github.com/neogeno/shango-lightning-wallet)
|
||||
* [Zeus (iOS/Android)](https://github.com/ZeusLN/zeus)
|
||||
* [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)
|
||||
|
||||
Please keep in mind that if you also want to connect to your smartphone also from the outside (when you are outside of your local network) with your RaspiBlitz you might need to open/forward ports on your router and should look into the DynamicDNS features to handle changing IP of our Home-DSL.
|
||||
|
||||
This youtube video explains the "port forwarding" on your router in more detail: https://www.youtube.com/watch?v=KESo7hHXQtg
|
||||
|
||||
When you have Tor activated you can also try to connect mobile wallets that support this. The Fully Noded Wallet can only connect over Tor.
|
||||
|
||||
If you run your node behind Tor the SendMany App will just offer to connect when your in the same local network ... for connection over Tor there is no support yet.
|
||||
|
||||
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).
|
||||
|
||||
#### LNDCREDS: Macaroons and TLS.cert
|
||||
@ -699,7 +755,6 @@ Basically those mobile wallets work as a remote control app for your RaspiBlitz.
|
||||
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:
|
||||
@ -715,7 +770,7 @@ This method is recommended to export to:
|
||||
|
||||
##### SSH Download
|
||||
|
||||
SCP is a SSH like command to transfer files. If were able to SSH into the RaspiBlitz also the SCP to transfer the files should work. If you choose these option, RaspiBlitz will print prepared SCP commands you can copy+paste to run in a second terminal.
|
||||
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)
|
||||
@ -724,11 +779,7 @@ 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.*
|
||||
|
||||
##### Renew Macaroons & TLS
|
||||
|
||||
Use if you want to invalidate earlier exported Macaroons & TLS files - e.g. lost mobile wallet.
|
||||
*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
|
||||
|
||||
@ -736,7 +787,7 @@ Change the name of your node.
|
||||
|
||||
#### PASSWORD: Change Passwords
|
||||
|
||||
Change you passwords for security.
|
||||
Change your passwords for security.
|
||||
|
||||
#### REPAIR: Options to test, repair and reset your RaspiBlitz
|
||||
|
||||
@ -750,7 +801,7 @@ 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.
|
||||
Use this option if you see under-voltage reports on your LCD display or you think your RaspiBlitz gets very hot.
|
||||
|
||||
##### SOFTWARE: Run Software Tests (DebugReport)
|
||||
|
||||
@ -762,13 +813,19 @@ Use this if you want to report a software problem with your RaspiBlitz so that o
|
||||
|
||||
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.*
|
||||
*NOTICE: If you start your RaspiBlitz after this backup again the backup is outdated and using it can risk losing your channel funds.*
|
||||
|
||||
##### MIGRATION: Migrate Blitz Data to new Hardware
|
||||
|
||||
This stops your RaspiBlitz and creates a Migration ZIP file you can download/export per SCP to your laptop. This contains all important data of your RaspiBlitz including LND, your Blitz configuration and also data from your installed apps. Can be used to migrate your RaspiBlitz to a new hardware - for example if your want to replace the HDD with a SSD. How to import a Migration File [see here](README.md#import-a-migration-file).
|
||||
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 you want to replace the HDD with a SSD. How to import a Migration File [see here](README.md#import-a-migration-file).
|
||||
|
||||
*NOTICE: If you start your RaspiBlitz after exporting the migration file again it is outdated and using it can risk loosing your channel funds.*
|
||||
*NOTICE: If you start your RaspiBlitz after exporting the migration file again it is outdated and using it can risk losing your channel funds.*
|
||||
|
||||
##### COPY-SOURCE: Offer your Blockchain to another RaspiBlitz for Setup
|
||||
|
||||
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.
|
||||
|
||||
##### RESET-CHAIN: Delete Blockchain and Re-Download
|
||||
|
||||
@ -797,15 +854,15 @@ Use this if you want to setup a fresh RaspiBlitz with an empty HDD.
|
||||
|
||||
##### DELETE-ELEC: Delete Electrum Index
|
||||
|
||||
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 Electrum installed, you can use this option to make sure also the space consuming electrum index gets deleted to free up space.
|
||||
|
||||
##### DELETE-INDEX: Delete Bitcoin TX-Index
|
||||
|
||||
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.
|
||||
If you had the Bitcoin Transaction Index activated, you can use this option to make sure also this extra space consuming index gets deleted to free up space.
|
||||
|
||||
#### UPDATE: Check/Prepare RaspiBlitz Update
|
||||
|
||||
The `UPDATE` menu gives you options to upadte your RaspiBlitz
|
||||
The `UPDATE` menu gives you options to update your RaspiBlitz
|
||||
|
||||

|
||||
|
||||
@ -815,17 +872,17 @@ The options are explained in detail:
|
||||
|
||||
#### RELEASE: Update RaspiBlitz to a new Version
|
||||
|
||||
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.
|
||||
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
|
||||
|
||||
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.
|
||||
Sometimes there is a new LND release that has some breaking changes that once you updated the LND database 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.
|
||||
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
|
||||
|
||||
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.
|
||||
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 want to develop on the RaspiBlitz and sync code between their IDE, forked GitHub and their RaspiBlitz.
|
||||
|
||||
#### REBOOT: Reboot RaspiBlitz
|
||||
|
||||
@ -855,9 +912,9 @@ 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](FAQ.md#why-use-btrfs-on-raspiblitz).
|
||||
Normally you choose here the EXT4 format. But you also have the option to choose the BTRFS format which is an experimental feature under RaspiBlitz - see [FAQ for details on BTRFS](FAQ.md#why-use-btrfs-on-raspiblitz).
|
||||
|
||||
Then you wil be asked to upload the Migration Zip file to the RaspiBlitz. Follow the instructions shown to you.
|
||||
Then you will 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.
|
||||
|
||||
@ -867,7 +924,7 @@ Here you have the two options [SYNC](README.md#1-sync---selfvalidate-all-blocks)
|
||||
|
||||
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.
|
||||
Then the blockchain needs to sync up and you should be back to normal.
|
||||
|
||||
## Interface / APIs
|
||||
|
||||
@ -904,7 +961,7 @@ If you want to get one step further in securing your funds against total fall-ou
|
||||
|
||||
#### A) DropBox Backup Target
|
||||
|
||||
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:
|
||||
Activate 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:
|
||||
|
||||
@ -944,7 +1001,7 @@ To test it - open or close a channel and check if you find a copy of `channel.ba
|
||||
|
||||
*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.
|
||||
You can use a small USB thumb drive (everything over 120MB is fine). Please don't 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.
|
||||
|
||||
@ -985,12 +1042,12 @@ Now you are ready to start the SD card build script (check the code if every ins
|
||||
|
||||
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.
|
||||
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 RaspiBlitzes, 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.*
|
||||
*Note: If you plan to use your self-built 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?](FAQ.md#can-i-run-raspiblitz-on-other-computers-than-raspberrypi)
|
||||
* [How can I build an SD card other then the master branch?](FAQ.md#how-can-i-build-an-sd-card-other-then-the-master-branch)
|
||||
* [How can I build an SD card other than the master branch?](FAQ.md#how-can-i-build-an-sd-card-other-then-the-master-branch)
|
||||
* [How can I build an SD card from my forked GitHub Repo?](FAQ.md#how-can-i-build-an-sd-card-from-my-forked-github-repo)
|
||||
|
||||
## FAQ
|
||||
@ -1008,12 +1065,12 @@ You have still more questions? Check the [RaspiBlitz-FAQ-Archive](FAQ.md).
|
||||
|
||||
Everybody is welcome to join, improve and extend the RaspiBlitz - it's a work in progress. [Check the issues](https://github.com/rootzoll/raspiblitz/issues) if you wanna help out or add new ideas. You find the scripts used for RaspiBlitz interactions on the device at `/home/admin` or in this git repo in the subfolder `home.admin`.
|
||||
|
||||
To start your Deep Dive into the RaspiBlitz project, the following YouTube video from the London Bitcoin Dev Meetup (July 2019) is recommended: [https://youtu.be/R_ggGj7Hk1w](https://youtu.be/R_ggGj7Hk1w)
|
||||
To start your Deep Dive into the RaspiBlitz project, the following YouTube video (July 2020)is recommended: [https://www.youtube.com/watch?v=QXUGg45CWLo](https://www.youtube.com/watch?v=QXUGg45CWLo)
|
||||
|
||||
[](https://youtu.be/R_ggGj7Hk1w)
|
||||
[](https://www.youtube.com/watch?v=QXUGg45CWLo)
|
||||
|
||||
Also get inspired for a deep-dive with the original "[RaspiBolt](https://stadicus.github.io/RaspiBolt/)" tutorial on how to build a lightning node on the RaspberryPi which was the base work the RaspiBlitz was developed on - so much thx to Stadicus :)
|
||||
|
||||
Join me on twitter [@rootzoll](https://twitter.com/rootzoll), visit us at a upcoming [#lightninghackday](https://twitter.com/hashtag/LightningHackday?src=hash) or check by on of our bitcoin meetups in Berlin ... every 1st Thursday evening a month at the room77 bar - feel free to buy me a beer with lightning there :)
|
||||
Join me on twitter [@rootzoll](https://twitter.com/rootzoll), visit us at an upcoming [#lightninghackday](https://twitter.com/hashtag/LightningHackday?src=hash) or check by one 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 :)
|
||||
|
||||
* [How can I get further help/support?](#support)
|
||||
|
@ -443,6 +443,11 @@ echo "*** ADDING GROUPS FOR CREDENTIALS STORE ***"
|
||||
sudo /usr/sbin/groupadd --force --gid 9700 lndadmin
|
||||
sudo /usr/sbin/groupadd --force --gid 9701 lndinvoice
|
||||
sudo /usr/sbin/groupadd --force --gid 9702 lndreadonly
|
||||
sudo /usr/sbin/groupadd --force --gid 9703 lndinvoices
|
||||
sudo /usr/sbin/groupadd --force --gid 9704 lndchainnotifier
|
||||
sudo /usr/sbin/groupadd --force --gid 9705 lndsigner
|
||||
sudo /usr/sbin/groupadd --force --gid 9706 lndwalletkit
|
||||
sudo /usr/sbin/groupadd --force --gid 9707 lndrouter
|
||||
|
||||
echo ""
|
||||
echo "*** SWAP FILE ***"
|
||||
|
@ -148,7 +148,8 @@ fi
|
||||
|
||||
# get IP address & port
|
||||
networkInfo=$(${network}-cli -datadir=${bitcoin_dir} getnetworkinfo 2>/dev/null)
|
||||
local_ip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
source <(sudo /home/admin/config.scripts/internet.sh status)
|
||||
local_ip="${localip}"
|
||||
public_ip="${publicIP}"
|
||||
public_port="$(echo ${networkInfo} | jq -r '.localaddresses [0] .port')"
|
||||
if [ "${public_port}" = "null" ]; then
|
||||
@ -268,15 +269,7 @@ else
|
||||
if [ ${#ln_getInfo} -eq 0 ]; then
|
||||
ln_baseInfo="${color_red} Not Started | Not Ready Yet"
|
||||
else
|
||||
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2> /dev/null | grep "Filtering block" | tail -n1 | awk '{print $7}')
|
||||
if [ ${#item} -eq 0 ]; then
|
||||
item=$(sudo -u bitcoin tail -n 100 /mnt/hdd/lnd/logs/${network}/${chain}net/lnd.log 2> /dev/null | grep "(height" | tail -n1 | awk '{print $10} {print $11} {print $12}' | tr -dc '0-9')
|
||||
fi
|
||||
total=$(sudo -u bitcoin ${network}-cli -datadir=/home/bitcoin/.${network} getblockchaininfo 2>/dev/null | jq -r '.blocks')
|
||||
ln_baseInfo="${color_red} waiting for chain sync"
|
||||
if [ ${#item} -gt 0 ]; then
|
||||
ln_channelInfo="scanning ${item}/${total}"
|
||||
fi
|
||||
ln_baseInfo="${color_amber} Waiting for Chain Sync"
|
||||
fi
|
||||
else
|
||||
ln_walletbalance="$(sudo -u bitcoin /usr/local/bin/lncli --macaroonpath=${lnd_macaroon_dir}/readonly.macaroon --tlscertpath=${lnd_dir}/tls.cert walletbalance | jq -r '.confirmed_balance')" 2>/dev/null
|
||||
@ -410,7 +403,7 @@ if [ "${EUID}" = "$(id -u pi)" ]; then
|
||||
EOF
|
||||
|
||||
# use Jinja2 and apply json data to template to produce static html file
|
||||
templateExists=$(sudo ls /var/cache/raspiblitz/info.html 2>/dev/null | grep -c 'info.html')
|
||||
templateExists=$(sudo ls /var/cache/raspiblitz/info.json 2>/dev/null | grep -c 'info.json')
|
||||
if [ ${templateExists} -gt 0 ]; then
|
||||
res=$(/usr/local/bin/j2 /var/www/blitzweb/info/info.j2 /var/cache/raspiblitz/info.json -o /var/cache/raspiblitz/info.html)
|
||||
if ! [ $? -eq 0 ]; then
|
||||
|
@ -83,18 +83,28 @@ while :
|
||||
###########################
|
||||
|
||||
# get the local network IP to be displayed on the lCD
|
||||
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
source <(sudo /home/admin/config.scripts/internet.sh status)
|
||||
|
||||
# waiting for IP in general
|
||||
if [ ${#localip} -eq 0 ]; then
|
||||
l1="Waiting for Network ...\n"
|
||||
l2="Not able to get local IP.\n"
|
||||
l3="Is LAN cable connected?\n"
|
||||
l3="LAN cable connected? WIFI lost?\n"
|
||||
dialog --backtitle "RaspiBlitz ${codeVersion}" --infobox "$l1$l2$l3" 5 40
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
|
||||
# waiting for Internet connection
|
||||
if [ ${online} -eq 0 ]; then
|
||||
l1="Waiting for Internet ...\n"
|
||||
l2="Local Network seems OK but no Internet.\n"
|
||||
l3="Is router still online?\n"
|
||||
dialog --backtitle "RaspiBlitz ${codeVersion} ${localip}" --infobox "$l1$l2$l3" 5 45
|
||||
sleep 3
|
||||
continue
|
||||
fi
|
||||
|
||||
# get config info if already available (with state value)
|
||||
source ${infoFile}
|
||||
configExists=$(ls ${configFile} 2>/dev/null | grep -c '.conf')
|
||||
|
@ -1,4 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Starting the main menu ..."
|
||||
|
||||
# CONFIGFILE - configuration of RaspiBlitz
|
||||
@ -11,6 +12,31 @@ infoFile="/home/admin/raspiblitz.info"
|
||||
source ${infoFile}
|
||||
source ${configFile}
|
||||
|
||||
# FUNCTIONS
|
||||
|
||||
confirmation()
|
||||
{
|
||||
local text=$1
|
||||
local yesButtonText=$2
|
||||
local noButtonText=$3
|
||||
local defaultno=$4
|
||||
local height=$5
|
||||
local width=$6
|
||||
local answer=-100
|
||||
|
||||
if [ $defaultno ]; then
|
||||
whiptail --title " Confirmation " --defaultno --yes-button "$yesButtonText" --no-button "$noButtonText" --yesno " $text
|
||||
|
||||
" $height $width
|
||||
else
|
||||
whiptail --title " Confirmation " --yes-button "$yesButtonText" --no-button "$noButtonText" --yesno " $text
|
||||
|
||||
" $height $width
|
||||
fi
|
||||
answer=$?
|
||||
return $answer
|
||||
}
|
||||
|
||||
# get the local network IP to be displayed on the lCD
|
||||
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
|
||||
@ -279,16 +305,26 @@ case $CHOICE in
|
||||
/home/admin/99updateMenu.sh
|
||||
;;
|
||||
REBOOT)
|
||||
clear
|
||||
echo ""
|
||||
sudo /home/admin/XXshutdown.sh reboot
|
||||
exit 0
|
||||
clear
|
||||
confirmation "Are you sure?" "Reboot" "Cancel" true 7 40
|
||||
confirmationReboot=$?
|
||||
if [ $confirmationReboot -eq 0 ]; then
|
||||
clear
|
||||
echo ""
|
||||
sudo /home/admin/XXshutdown.sh reboot
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
OFF)
|
||||
clear
|
||||
echo ""
|
||||
sudo /home/admin/XXshutdown.sh
|
||||
exit 0
|
||||
clear
|
||||
confirmation "Are you sure?" "PowerOff" "Cancel" true 7 40
|
||||
confirmationShutdown=$?
|
||||
if [ $confirmationShutdown -eq 0 ]; then
|
||||
clear
|
||||
echo ""
|
||||
sudo /home/admin/XXshutdown.sh
|
||||
exit 0
|
||||
fi
|
||||
;;
|
||||
DELETE)
|
||||
sudo /home/admin/XXcleanHDD.sh
|
||||
|
@ -279,7 +279,7 @@ else
|
||||
|
||||
# check if LND needs re-setup
|
||||
source <(sudo /home/admin/config.scripts/lnd.check.sh basic-setup)
|
||||
if [ ${wallet} -eq 0 ] || [ ${macaroon} -eq 0 ] || [ ${config} -eq 0 ] || [ ${tls} -eq 0 ]; then
|
||||
if [ "${wallet}" == "0" ] || [ "${macaroon}" == "0" ] || [ "${config}" == "0" ] || [ "${tls}" == "0" ]; then
|
||||
echo "WARN: LND needs re-setup"
|
||||
/home/admin/70initLND.sh
|
||||
exit 0
|
||||
|
@ -342,7 +342,7 @@ if [ "${DropboxBackup}" != "${choice}" ]; then
|
||||
if [ "${choice}" = "on" ]; then
|
||||
# doing initial upload so that user can see result
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
sudo /home/admin/config.scripts/dropbox.upload.sh upload ${dropboxBackupTarget} /home/admin/.lnd/data/chain/${network}/${chain}net/channel.backup
|
||||
sudo /home/admin/config.scripts/dropbox.upload.sh upload ${dropboxBackupTarget} /mnt/hdd/lnd/data/chain/${network}/${chain}net/channel.backup
|
||||
fi
|
||||
else
|
||||
echo "Dropbox backup setting unchanged."
|
||||
|
@ -66,6 +66,8 @@ if [ "${loop}" != "${choice}" ]; then
|
||||
errorOnInstall=$?
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
# check macaroons and fix missing
|
||||
/home/admin/config.scripts/lnd.credential.sh check
|
||||
sudo systemctl start loopd
|
||||
/home/admin/config.scripts/bonus.loop.sh menu
|
||||
else
|
||||
|
@ -250,12 +250,14 @@ if [ ${setupStep} -eq 20 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# the HDD is already ext4 formated and called blockchain
|
||||
# the HDD is already ext4 formated and cointains blockchain data
|
||||
if [ "${hddFormat}" = "ext4" ] || [ "${hddFormat}" = "btrfs" ]; then
|
||||
echo "HDD was already initialized/prepared"
|
||||
echo "Now needs to be mounted"
|
||||
/home/admin/40addHDD.sh
|
||||
exit 1
|
||||
if [ ${hddGotBlockchain} -eq 1 ]; then
|
||||
echo "HDD was already initialized/prepared"
|
||||
echo "Now needs to be mounted"
|
||||
/home/admin/40addHDD.sh
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# the HDD had no init yet
|
||||
|
@ -57,10 +57,10 @@ to deactivate the Auto-Unlock feature.
|
||||
" 10 52
|
||||
echo "Activating Auto-Unlock (please wait) .."
|
||||
sudo /home/admin/config.scripts/lnd.autounlock.sh on
|
||||
dialog --backtitle "RaspiBlitz" --msgbox "FINAL REBOOT IS NEEDED." 6 52
|
||||
dialog --backtitle "RaspiBlitz" --pause " FINAL REBOOT IS NEEDED." 8 52 5
|
||||
|
||||
else
|
||||
dialog --backtitle "RaspiBlitz" --msgbox "OK - SSH password A set.\nFINAL REBOOT IS NEEDED." 6 52
|
||||
dialog --backtitle "RaspiBlitz" --pause " OK - SSH password A set.\n FINAL REBOOT IS NEEDED." 9 52 5
|
||||
fi
|
||||
|
||||
sudo /home/admin/XXshutdown.sh reboot
|
@ -34,7 +34,7 @@ fi
|
||||
# check if there is a HDD connectecd to use as data drive
|
||||
echo "hddCandidate=${hddCandidate}"
|
||||
if [ ${#hddCandidate} -eq 0 ]; then
|
||||
echo "# FAIL please cnnect a HDD and call ./30initHDD.sh again"
|
||||
echo "# FAIL please connect a HDD and call ./30initHDD.sh again"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK"
|
||||
@ -72,11 +72,12 @@ echo "# hddGotBlockchain=${hddGotBlockchain}"
|
||||
raidSizeGB=$(echo "${raidCandidate[0]}" | cut -d " " -f 2)
|
||||
echo "# raidCandidates=${raidCandidates}"
|
||||
echo "# raidSizeGB=${raidSizeGB}"
|
||||
if [ ${hddGotBlockchain} -eq 0 ]; then
|
||||
if [ "${hddGotBlockchain}" == "" ] || [ ${hddGotBlockchain} -eq 0 ]; then
|
||||
|
||||
format="ext4"
|
||||
|
||||
# test feature: if there is a USB stick as a raid connected, then format in BTRFS an not in EXT4
|
||||
format="ext4"
|
||||
if [ ${raidCandidates} -eq 1 ]; then
|
||||
if [ ${raidCandidates} -eq 1 ] && [ ${raidSizeGB} -gt 14 ]; then
|
||||
|
||||
echo
|
||||
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
|
@ -82,15 +82,13 @@ else
|
||||
# create file and use init values from raspiblitz.info
|
||||
echo "# CREATING new ${configFile}"
|
||||
source /home/admin/_version.info
|
||||
sudo touch $configFile
|
||||
sudo chmod 777 ${configFile}
|
||||
echo "# RASPIBLITZ CONFIG FILE" > $configFile
|
||||
echo "raspiBlitzVersion='${codeVersion}'" >> $configFile
|
||||
echo "network=${network}" >> $configFile
|
||||
echo "chain=${chain}" >> $configFile
|
||||
echo "hostname=${hostname}" >> $configFile
|
||||
echo "lcd2hdmi=${lcd2hdmi}" >> $configFile
|
||||
echo "lcdrotate=1" >> $configFile
|
||||
echo "# RASPIBLITZ CONFIG FILE" > /home/admin/raspiblitz.conf
|
||||
echo "raspiBlitzVersion='${codeVersion}'" >> /home/admin/raspiblitz.conf
|
||||
echo "network=${network}" >> /home/admin/raspiblitz.conf
|
||||
echo "chain=${chain}" >> /home/admin/raspiblitz.conf
|
||||
echo "hostname=${hostname}" >> /home/admin/raspiblitz.conf
|
||||
echo "lcd2hdmi=${lcd2hdmi}" >> /home/admin/raspiblitz.conf
|
||||
echo "lcdrotate=1" >> /home/admin/raspiblitz.conf
|
||||
|
||||
# try to determine publicIP and if not possible use localIP as placeholder
|
||||
# https://github.com/rootzoll/raspiblitz/issues/312#issuecomment-462675101
|
||||
@ -112,7 +110,12 @@ else
|
||||
echo "# WARNING: No publicIP information at all yet - working with placeholder : ${localIP}"
|
||||
freshPublicIP="${localIP}"
|
||||
fi
|
||||
echo "publicIP='${freshPublicIP}'" >> $configFile
|
||||
echo "publicIP='${freshPublicIP}'" >> /home/admin/raspiblitz.conf
|
||||
|
||||
sudo mv /home/admin/raspiblitz.conf $configFile
|
||||
sudo chown root:root ${configFile}
|
||||
sudo chmod 777 ${configFile}
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
# link ssh directory from SD catd to HDD
|
||||
|
@ -231,7 +231,7 @@ if [ ${quickCheckOK} -eq 0 ]; then
|
||||
|
||||
echo "Wait 5 secs ..."
|
||||
sleep 5
|
||||
dialog --title " INVALID TRANSFER - DELETE DATA?" --yesno "Quickcheck shows the data you transferred is invalid/incomplete. This can lead further RaspiBlitz setup to get stuck in error state.\nDo you want to reset/delete data data?" 8 60
|
||||
dialog --title " INVALID TRANSFER - DELETE DATA?" --yesno "Quickcheck shows the data you transferred is invalid/incomplete. This can lead further RaspiBlitz setup to get stuck in error state.\nDo you want to reset/delete data?" 8 60
|
||||
response=$?
|
||||
echo "response(${response})"
|
||||
case $response in
|
||||
|
@ -69,12 +69,12 @@ bitcoinRunning=0
|
||||
loopcount=0
|
||||
while [ ${bitcoinRunning} -eq 0 ]
|
||||
do
|
||||
>&2 echo "# (${loopcount}/100) checking if ${network}d is running ... "
|
||||
>&2 echo "# (${loopcount}/200) checking if ${network}d is running ... "
|
||||
bitcoinRunning=$(${network}-cli getblockchaininfo 2>/dev/null | grep "initialblockdownload" -c)
|
||||
sleep 2
|
||||
sync
|
||||
loopcount=$(($loopcount +1))
|
||||
if [ ${loopcount} -gt 100 ]; then
|
||||
if [ ${loopcount} -gt 200 ]; then
|
||||
/home/admin/XXdebugLogs.sh
|
||||
echo "***********************************"
|
||||
echo "FAIL: ${network} failed to start :("
|
||||
|
@ -6,6 +6,7 @@ source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# all system/service info gets detected by blitz.statusscan.sh
|
||||
source <(sudo /home/admin/config.scripts/blitz.statusscan.sh)
|
||||
source <(sudo /home/admin/config.scripts/internet.sh status)
|
||||
|
||||
# when admin and no other error found run LND setup check
|
||||
if [ "$USER" == "admin" ] && [ ${#lndErrorFull} -eq 0 ]; then
|
||||
@ -13,7 +14,7 @@ if [ "$USER" == "admin" ] && [ ${#lndErrorFull} -eq 0 ]; then
|
||||
fi
|
||||
|
||||
# set follow up info different for LCD and ADMIN
|
||||
adminStr="ssh admin@${localIP} ->Password A"
|
||||
adminStr="ssh admin@${localip} ->Password A"
|
||||
if [ "$USER" == "admin" ]; then
|
||||
adminStr="Use CTRL+c to EXIT to Terminal"
|
||||
fi
|
||||
@ -49,8 +50,12 @@ if [ ${bitcoinActive} -eq 0 ] || [ ${#bitcoinErrorFull} -gt 0 ] || [ "${1}" == "
|
||||
|
||||
if [ "$USER" != "admin" ]; then
|
||||
|
||||
if [ ${uptime} -gt 600 ] || [ ${#bitcoinErrorFull} -gt 0 ] || [ "${1}" == "blockchain-error" ]; then
|
||||
infoStr=" The ${network}d service is NOT RUNNING!\n\n Login for more details & options:"
|
||||
if [ ${uptime} -gt 600 ]; then
|
||||
if [ ${uptime} -gt 800 ] || [ ${#bitcoinErrorFull} -gt 0 ] || [ "${1}" == "blockchain-error" ]; then
|
||||
infoStr=" The ${network}d service is NOT RUNNING!\n ${bitcoinErrorShort}\n Login for more details & options:"
|
||||
else
|
||||
infoStr=" The ${network}d service is running:\n ${bitcoinErrorShort}\n Login with SSH for more details:"
|
||||
fi
|
||||
else
|
||||
infoStr=" The ${network}d service is starting:\n ${bitcoinErrorShort}\n Login with SSH for more details:"
|
||||
fi
|
||||
@ -79,31 +84,16 @@ if [ ${bitcoinActive} -eq 0 ] || [ ${#bitcoinErrorFull} -gt 0 ] || [ "${1}" == "
|
||||
echo
|
||||
fi
|
||||
|
||||
# check if maybe problems with txindex
|
||||
echo "POSSIBLE OPTIONS:"
|
||||
source <(/home/admin/config.scripts/network.txindex.sh status)
|
||||
if [ "${txindex}" == "1" ]; then
|
||||
if [ "${indexFinished}" == "0" ]; then
|
||||
# bitcoind is not starting while still building index - recommend turning off index and restart
|
||||
whiptail --title "Problems with Bitcoin Index" --yes-button "TurnOff TxIndex" --no-button "Do Nothing" --yesno "It looks like ${network}d has problems building the txindex. Turning Off the txindex and restart is recommended." 10 60
|
||||
if [ $? -eq 0 ]; then
|
||||
# delete txindex, turn off and deactivate apps needed index
|
||||
sudo /home/admin/config.scripts/network.txindex.sh delete
|
||||
whiptail --msgbox "OK txindex was turned off.\n\nTo be able to build a valid txindex in the future you might need to reset/redownload the blockchain." 10 56 "" --title " TXINDEX OFF "
|
||||
/home/admin/XXshutdown.sh reboot
|
||||
fi
|
||||
else
|
||||
# bitcoind is not starting but index was build in the past - recommend repair with turning off index
|
||||
echo "-> Use command 'repair' and then choose 'DELETE-INDEX' to try rebuilding transaction index."
|
||||
fi
|
||||
echo "-> Use command 'repair' and then choose 'DELETE-INDEX' to try rebuilding transaction index."
|
||||
fi
|
||||
|
||||
echo "-> Use command 'repair' and then choose 'RESET-CHAIN' to try downloading new blockchain."
|
||||
echo "-> Use command 'debug' for more log output you can use for getting support."
|
||||
echo "-> Use command 'menu' to open main menu."
|
||||
echo "-> Have you tried to turn it off and on again? Use command 'restart'"
|
||||
echo ""
|
||||
echo "Use CTRL+c to EXIT to Terminal"
|
||||
sleep 10
|
||||
exit 1
|
||||
|
||||
else
|
||||
@ -188,7 +178,7 @@ elif [ ${walletLocked} -gt 0 ]; then
|
||||
infoStr=" LND WALLET IS LOCKED !!!\n"
|
||||
if [ "${rtlWebinterface}" = "on" ]; then
|
||||
height=6
|
||||
infoStr="${infoStr} Browser: http://${localIP}:3000\n PasswordB=login / PasswordC=unlock"
|
||||
infoStr="${infoStr} Browser: http://${localip}:3000\n PasswordB=login / PasswordC=unlock"
|
||||
else
|
||||
infoStr="${infoStr} Please use SSH to unlock:"
|
||||
fi
|
||||
|
@ -121,20 +121,18 @@ checkIP2TOR()
|
||||
# Options
|
||||
OPTIONS=(ZAP_IOS "Zap Wallet (iOS)" \
|
||||
ZAP_ANDROID "Zap Wallet (Android)" \
|
||||
SHANGO_IOS "Shango Wallet (iOS)" \
|
||||
SHANGO_ANDROID "Shango Wallet (Android)" \
|
||||
ZEUS_IOS "Zeus Wallet (iOS)" \
|
||||
ZEUS_ANDROID "Zeus Wallet (Android)"
|
||||
)
|
||||
|
||||
# add SEND MANY APP
|
||||
OPTIONS+=(SENDMANY_ANDROID "SendMany (Android)")
|
||||
|
||||
# Additinal Options with TOR
|
||||
if [ "${runBehindTor}" = "on" ]; then
|
||||
OPTIONS+=(FULLY_NODED "Fully Noded (IOS+TOR)")
|
||||
fi
|
||||
|
||||
# add SEND MANY APP
|
||||
OPTIONS+=(SENDMANY_ANDROID "SendMany (Android)")
|
||||
|
||||
CHOICE=$(whiptail --clear --title "Choose Mobile Wallet" --menu "" 14 50 8 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
|
||||
/home/admin/config.scripts/blitz.lcd.sh hide
|
||||
@ -255,7 +253,7 @@ Please go to MAINMENU > SERVICES and activate KEYSEND first.
|
||||
exit 1;
|
||||
;;
|
||||
ZEUS_ANDROID)
|
||||
appstoreLink="https://play.google.com/store/apps/details?id=com.zeusln.zeus"
|
||||
appstoreLink="https://play.google.com/store/apps/details?id=app.zeusln.zeus"
|
||||
/home/admin/config.scripts/blitz.lcd.sh qr ${appstoreLink}
|
||||
whiptail --title "Install Zeus on your Android Phone" \
|
||||
--yes-button "continue" \
|
||||
@ -286,4 +284,4 @@ Please go to MAINMENU > SERVICES and activate KEYSEND first.
|
||||
/home/admin/config.scripts/bonus.fullynoded.sh
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
@ -68,15 +68,17 @@ copyHost()
|
||||
whiptail --msgbox "Was not able to contact/ping: ${targetIP}\n\n- check if IP of target RaspiBlitz is correct.\n- check to be on the same local network.\n- try again ..." 11 58 "" --title " Testing Target IP " --backtitle "RaspiBlitz - Copy Blockchain"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "# install dependencies ..."
|
||||
sudo apt-get install -y sshpass
|
||||
|
||||
echo "# get Password of RaspiBlitz to copy to ..."
|
||||
targetPassword=$(whiptail --passwordbox "\nPlease enter the PASSWORD A of the\nRaspiBlitz to copy Blockchain to:" 10 38 "" --title "Target Password" --backtitle "RaspiBlitz - Copy Blockchain" 3>&1 1>&2 2>&3)
|
||||
if [ ${#targetPassword} -eq 0 ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "# install dependencies ..."
|
||||
sudo apt-get install -y sshpass
|
||||
|
||||
sudo rm /root/.ssh/known_hosts
|
||||
canLogin=$(sudo sshpass -p "${targetPassword}" ssh -t -o StrictHostKeyChecking=no bitcoin@${targetIP} "echo 'working'" 2>/dev/null | grep -c 'working')
|
||||
if [ ${canLogin} -eq 0 ]; then
|
||||
whiptail --msgbox "Password was not working for IP: ${targetIP}\n\n- check thats the correct IP for correct RaspiBlitz\n- check that you used PASSWORD A and had no typo\n- If you tried too often, wait 1h try again" 11 58 "" --title " Testing Target Password " --backtitle "RaspiBlitz - Copy Blockchain"
|
||||
|
@ -55,7 +55,7 @@ Do you want to download LND Data Backup now?
|
||||
sleep 2
|
||||
/home/admin/config.scripts/lnd.rescue.sh backup
|
||||
echo
|
||||
echo "PRESS ENTER to continue once your done downloading."
|
||||
echo "PRESS ENTER to continue once you're done downloading."
|
||||
read key
|
||||
else
|
||||
clear
|
||||
@ -278,4 +278,4 @@ case $CHOICE in
|
||||
THUB)
|
||||
/home/admin/config.scripts/bonus.thunderhub.sh update
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
@ -70,7 +70,7 @@ echo "Sweep all possible Funds"
|
||||
echo "******************************"
|
||||
|
||||
# execute command
|
||||
command="lncli --chain=${network} --network=${chain}net sendcoins --sweepall --addr=${address} --conf_target=6"
|
||||
command="lncli --chain=${network} --network=${chain}net sendcoins --sweepall --addr=${address} --conf_target=36"
|
||||
echo "$command"
|
||||
result=$($command 2>$_error)
|
||||
error=`cat ${_error}`
|
||||
|
@ -166,6 +166,11 @@ echo "*** MOUNTED DRIVES ***"
|
||||
df -T
|
||||
echo ""
|
||||
|
||||
echo ""
|
||||
echo "*** WIFI Info ***"
|
||||
sudo /home/admin/config.scripts/internet.wifi.sh status
|
||||
echo ""
|
||||
|
||||
echo "*** HARDWARE TEST RESULTS ***"
|
||||
showImproveInfo=0
|
||||
if [ ${#undervoltageReports} -gt 0 ]; then
|
||||
|
@ -15,6 +15,12 @@ echo "deleting local DNS confs ..."
|
||||
sudo rm /etc/resolv.conf
|
||||
echo "OK"
|
||||
|
||||
# https://github.com/rootzoll/raspiblitz/issues/1371
|
||||
echo ""
|
||||
echo "deleting local WIFI conf ..."
|
||||
sudo rm /boot/wpa_supplicant.conf 2>/dev/null
|
||||
echo "OK"
|
||||
|
||||
echo " "
|
||||
echo "Will shutdown now."
|
||||
echo "Wait until Raspberry LEDs show no activity anymore."
|
||||
|
@ -87,8 +87,8 @@ def ext(cmd=None, message=None, debug=False):
|
||||
|
||||
|
||||
# e-Mail
|
||||
def mail(recipient=None, message=None, subject=None, cert=None, encrypt=False,
|
||||
from_name=None, from_address=None, debug=False):
|
||||
def mail(recipient: str = None, message: str = None, subject: str = None, cert: str = None,
|
||||
encrypt: bool = False, from_name: str = None, from_address: str = None, debug: bool = False):
|
||||
if debug:
|
||||
print("send mail")
|
||||
print("msg: {}".format(message))
|
||||
@ -107,7 +107,7 @@ def mail(recipient=None, message=None, subject=None, cert=None, encrypt=False,
|
||||
'From: {} <{}>'.format(from_name, from_address),
|
||||
"Subject: {}".format(subject),
|
||||
"",
|
||||
"{}".format(message.encode('utf8'))
|
||||
"{}".format(message)
|
||||
]
|
||||
|
||||
with open(cert, 'rb') as pem:
|
||||
@ -122,7 +122,7 @@ def mail(recipient=None, message=None, subject=None, cert=None, encrypt=False,
|
||||
msg['From'] = '{} <{}>'.format(from_name, from_address),
|
||||
msg['To'] = recipient
|
||||
|
||||
msg.set_payload(message.encode('utf8'))
|
||||
msg.set_payload(message)
|
||||
msg_to_send = msg.as_bytes()
|
||||
|
||||
# send message via e-Mail
|
||||
@ -139,7 +139,7 @@ def mail(recipient=None, message=None, subject=None, cert=None, encrypt=False,
|
||||
raise Exception(err)
|
||||
|
||||
|
||||
def slack(message=None, debug=False):
|
||||
def slack(message: str = None, debug: bool = False):
|
||||
if debug:
|
||||
print("send slack")
|
||||
print("msg: {}".format(message))
|
||||
@ -148,4 +148,3 @@ def slack(message=None, debug=False):
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
@ -214,7 +214,7 @@ do
|
||||
if [ ${scbExists} -eq 1 ]; then
|
||||
# timestamp backup filename
|
||||
timestampedFileName=channel-$(date "+%Y%m%d-%H%M%S").backup
|
||||
localBackupDir=/home/admin/backups/scb/
|
||||
localBackupDir=/home/admin/backups/scb
|
||||
localBackupPath=${localBackupDir}/channel.backup
|
||||
localTimestampedPath=${localBackupDir}/${timestampedFileName}
|
||||
|
||||
|
@ -72,7 +72,7 @@ fi
|
||||
sudo chmod 777 ${configFile}
|
||||
source ${configFile}
|
||||
|
||||
# check if the system was configured for HDMI and needs switch
|
||||
# check if the system was configured for HDMI and needs switch
|
||||
# keep as one of the first so that user can see video output
|
||||
if [ "${lcd2hdmi}" == "on" ]; then
|
||||
echo "RaspiBlitz has config to run with HDMI video outout." >> ${logFile}
|
||||
@ -462,6 +462,15 @@ else
|
||||
echo "Provisioning kindle-display - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# stacking-sats-kraken
|
||||
if [ "${stackingSatsKraken}" = "on" ]; then
|
||||
echo "Provisioning Stacking Sats Kraken - run config script" >> ${logFile}
|
||||
sudo sed -i "s/^message=.*/message='Setup Stacking Sats Kraken'/g" ${infoFile}
|
||||
sudo -u admin /home/admin/config.scripts/bonus.stacking-sats-kraken.sh on >> ${logFile} 2>&1
|
||||
else
|
||||
echo "Provisioning Stacking Sats Kraken - keep default" >> ${logFile}
|
||||
fi
|
||||
|
||||
# custom install script from user
|
||||
customInstallAvailable=$(sudo ls /mnt/hdd/app-data/custom-installs.sh 2>/dev/null | grep -c "custom-installs.sh")
|
||||
if [ ${customInstallAvailable} -gt 0 ]; then
|
||||
|
@ -27,6 +27,60 @@ logFile="/home/admin/raspiblitz.log"
|
||||
# used by display and later setup steps
|
||||
infoFile="/home/admin/raspiblitz.info"
|
||||
|
||||
|
||||
# FUNCTIONS to be used later on in the script
|
||||
|
||||
# wait until raspberry pi gets a local IP
|
||||
function wait_for_local_network() {
|
||||
gotLocalIP=0
|
||||
until [ ${gotLocalIP} -eq 1 ]
|
||||
do
|
||||
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '(*[eth|ens|enp|eno|wlan|wlp][0-9]$)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
if [ ${#localip} -eq 0 ]; then
|
||||
configWifiExists=$(sudo cat /etc/wpa_supplicant/wpa_supplicant.conf 2>/dev/null| grep -c "network=")
|
||||
if [ ${configWifiExists} -eq 0 ]; then
|
||||
# display user to connect LAN
|
||||
sed -i "s/^state=.*/state=noIP/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Connect the LAN/WAN'/g" ${infoFile}
|
||||
else
|
||||
# display user that wifi settings are not working
|
||||
sed -i "s/^state=.*/state=noIP/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='WIFI Settings not working'/g" ${infoFile}
|
||||
fi
|
||||
elif [ "${localip:0:4}" = "169." ]; then
|
||||
# display user waiting for DHCP
|
||||
sed -i "s/^state=.*/state=noDCHP/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Waiting for DHCP'/g" ${infoFile}
|
||||
else
|
||||
gotLocalIP=1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
# wait until raspberry pi gets a local IP
|
||||
function wait_for_internet() {
|
||||
online=0
|
||||
until [ ${online} -eq 1 ]
|
||||
do
|
||||
# check for internet connection
|
||||
online=$(ping 1.0.0.1 -c 1 -W 2 | grep -c '1 received')
|
||||
if [ ${online} -eq 0 ]; then
|
||||
# re-test with other server
|
||||
online=$(ping 8.8.8.8 -c 1 -W 2 | grep -c '1 received')
|
||||
fi
|
||||
if [ ${online} -eq 0 ]; then
|
||||
# re-test with other server
|
||||
online=$(ping 208.67.222.222 -c 1 -W 2 | grep -c '1 received')
|
||||
fi
|
||||
if [ ${online} -eq 0 ]; then
|
||||
sed -i "s/^state=.*/state=noInternet/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Network OK but NO Internet'/g" ${infoFile}
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
}
|
||||
|
||||
echo "Writing logs to: ${logFile}"
|
||||
echo "" > $logFile
|
||||
echo "***********************************************" >> $logFile
|
||||
@ -231,29 +285,6 @@ if [ ${sshReset} -eq 1 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
################################
|
||||
# WAIT FOR LOCAL NETWORK
|
||||
################################
|
||||
|
||||
# wait until raspberry pi gets a local IP
|
||||
gotLocalIP=0
|
||||
until [ ${gotLocalIP} -eq 1 ]
|
||||
do
|
||||
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
if [ ${#localip} -eq 0 ]; then
|
||||
# display user to connect LAN
|
||||
sed -i "s/^state=.*/state=noIP/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Connect the LAN/WAN'/g" ${infoFile}
|
||||
elif [ "${localip:0:4}" = "169." ]; then
|
||||
# display user waiting for DHCP
|
||||
sed -i "s/^state=.*/state=noDCHP/g" ${infoFile}
|
||||
sed -i "s/^message=.*/message='Waiting for DHCP'/g" ${infoFile}
|
||||
else
|
||||
gotLocalIP=1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
################################
|
||||
# HDD CHECK & PRE-INIT
|
||||
################################
|
||||
@ -311,6 +342,23 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
echo "Refreshing links between directories/drives .." >> $logFile
|
||||
sudo /home/admin/config.scripts/blitz.datadrive.sh link
|
||||
|
||||
# check if there is a WIFI configuration to restore
|
||||
configWifiExists=$(sudo cat /etc/wpa_supplicant/wpa_supplicant.conf 2>/dev/null| grep -c "network=")
|
||||
configWifiHDD=$(sudo cat /mnt/hdd/app-data/wpa_supplicant.conf 2>/dev/null| grep -c "network=")
|
||||
if [ ${configWifiExists} -eq 0 ] && [ ${configWifiHDD} -eq 1 ]; then
|
||||
echo "Restoring WIFI setting & rebooting .." >> $logFile
|
||||
sudo cp /mnt/hdd/app-data/wpa_supplicant.conf /boot/wpa_supplicant.conf
|
||||
sudo chmod 755 /boot/wpa_supplicant.conf
|
||||
sudo reboot now
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# make sure at this point local network is connected
|
||||
wait_for_local_network
|
||||
|
||||
# make sure before update/recovery that a internet connection is working
|
||||
wait_for_local_internet
|
||||
|
||||
# check if HDD contains already a configuration
|
||||
configExists=$(ls ${configFile} | grep -c '.conf')
|
||||
echo "HDD contains already a configuration: ${configExists}" >> $logFile
|
||||
@ -374,6 +422,16 @@ if [ ${isMounted} -eq 0 ]; then
|
||||
|
||||
fi # END - no automount - after this HDD is mounted
|
||||
|
||||
# make sure at this point local network is connected
|
||||
wait_for_local_network
|
||||
|
||||
# if a WIFI config exists backup to HDD
|
||||
configWifiExists=$(sudo cat /etc/wpa_supplicant/wpa_supplicant.conf 2>/dev/null| grep -c "network=")
|
||||
if [ ${configWifiExists} -eq 1 ]; then
|
||||
echo "Making Backup Copy of WIFI config to HDD" >> $logFile
|
||||
sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /mnt/hdd/app-data/wpa_supplicant.conf
|
||||
fi
|
||||
|
||||
# config should exist now
|
||||
configExists=$(ls ${configFile} | grep -c '.conf')
|
||||
if [ ${configExists} -eq 0 ]; then
|
||||
|
@ -100,7 +100,8 @@ function torthistx() {
|
||||
# command: status
|
||||
# start the status screen in the terminal
|
||||
function status() {
|
||||
sudo -u pi /home/admin/00infoLCD.sh
|
||||
echo "Gathering data - please wait a moment..."
|
||||
sudo -u pi /home/admin/00infoLCD.sh --pause 0
|
||||
}
|
||||
|
||||
# command: balance
|
||||
@ -124,3 +125,61 @@ function jmarket() {
|
||||
echo "sudo /home/admin/config.scripts/bonus.joinmarket.sh on"
|
||||
fi
|
||||
}
|
||||
|
||||
# command: gettx
|
||||
# retrieve transaction from mempool or blockchain and print as JSON
|
||||
# $ gettx "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16"
|
||||
function gettx() {
|
||||
tx_id="${1:-f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16}"
|
||||
if result=$(bitcoin-cli getrawtransaction "${tx_id}" 1 2>/dev/null); then
|
||||
echo "${result}"
|
||||
else
|
||||
echo "{\"error\": \"unable to find TX\", \"tx_id\": \"${tx_id}\"}"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# command: watchtx
|
||||
# try to retrieve transaction from mempool or blockchain until certain confirmation target
|
||||
# is reached and then exit cleanly. Default is to wait for 2 confs and to sleep for 60 secs.
|
||||
# $ watchtx "f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16" 6 30
|
||||
function watchtx() {
|
||||
tx_id="${1}"
|
||||
wait_n_confirmations="${2:-2}"
|
||||
sleep_time="${3:-60}"
|
||||
|
||||
echo "Waiting for ${wait_n_confirmations} confirmations"
|
||||
|
||||
while true; do
|
||||
|
||||
if result=$(bitcoin-cli getrawtransaction "${tx_id}" 1 2>/dev/null); then
|
||||
confirmations=$(echo "${result}" | jq .confirmations)
|
||||
|
||||
if [[ "${confirmations}" -ge "${wait_n_confirmations}" ]]; then
|
||||
printf "confirmations: ${confirmations} - target reached!\n"
|
||||
return 0
|
||||
else
|
||||
printf "confirmations: ${confirmations} - "
|
||||
fi
|
||||
|
||||
else
|
||||
printf "unable to find TX - "
|
||||
fi
|
||||
|
||||
printf "sleeping for ${sleep_time} seconds...\n"
|
||||
sleep ${sleep_time}
|
||||
|
||||
done
|
||||
}
|
||||
|
||||
# command: notifyme
|
||||
# A wrapper for blitz.notify.sh that will send a notification using the configured
|
||||
# method and settings.
|
||||
# This makes sense when waiting for commands to finish and then sending a notification.
|
||||
# $ notifyme "Hello there..!"
|
||||
# $ ./run_job_which_takes_long.sh && notifyme "I'm done."
|
||||
# $ ./run_job_which_takes_long.sh && notifyme "success" || notifyme "fail"
|
||||
function notifyme() {
|
||||
content="${1:-Notified}"
|
||||
/home/admin/config.scripts/blitz.notify.sh send "${content}"
|
||||
}
|
||||
|
12
home.admin/_tmux_alias.sh
Executable file
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# script for custom tmux status bar
|
||||
|
||||
configFile="/mnt/hdd/raspiblitz.conf"
|
||||
|
||||
if [ -f "$configFile" ]; then
|
||||
source ${configFile} 2>/dev/null
|
||||
echo "${hostname}"
|
||||
else
|
||||
#echo "$configFile does not exist"
|
||||
echo "unknown"
|
||||
fi
|
@ -1,2 +1,2 @@
|
||||
# RaspiBlitz Version - always [major].[main].[sub]
|
||||
codeVersion="1.6.0rc3"
|
||||
codeVersion="1.6.0"
|
||||
|
BIN
home.admin/assets/cashiersguide.pdf
Normal file
@ -12,6 +12,15 @@
|
||||
<!-- Upload new versions to raspiblitz.com (you can use plesk for upload) -->
|
||||
<link>https://raspiblitz.com/raspiblitz-torrents-rss.xml</link>
|
||||
|
||||
<item>
|
||||
<guid>https://github.com/rootzoll/raspiblitz/raw/v1.6/home.admin/assets/raspiblitz-v1.6-2020-08-04.img.gz.torrent</guid>
|
||||
<title>raspiblitz-v1.6-2020-08-04.img.gz.torrent</title>
|
||||
<enclosure
|
||||
url="https://github.com/rootzoll/raspiblitz/raw/v1.6/home.admin/assets/raspiblitz-v1.6-2020-08-04.img.gz.torrent"
|
||||
type="application/x-bittorrent"
|
||||
/>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<guid>https://github.com/rootzoll/raspiblitz/raw/v1.3/raspiblitz-v1.3-2019-09-05.torrent</guid>
|
||||
<title>raspiblitz-v1.3-2019-09-05.torrent</title>
|
||||
|
BIN
home.admin/assets/raspiblitz-v1.6-2020-08-04.img.gz.torrent
Executable file
BIN
home.admin/assets/slides_contributing_to_raspiblitz.pdf
Normal file
BIN
home.admin/assets/slides_joinmarket.pdf
Normal file
@ -180,7 +180,7 @@ tmux_conf_theme_right_separator_sub='|'
|
||||
# - #{username}
|
||||
# - #{username_ssh}
|
||||
tmux_conf_theme_status_left=' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
|
||||
tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} |#[bg=brightblue]#[fg=yellow]#(~/_tmux_network.sh)|#[bg=yellow]#[fg=brightblue]#(~/_tmux_chain.sh)'
|
||||
tmux_conf_theme_status_right='#{prefix}#{pairing}#{synchronized} #{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #(~/_tmux_alias.sh) |#[bg=brightblue]#[fg=yellow]#(~/_tmux_network.sh)|#[bg=yellow]#[fg=brightblue]#(~/_tmux_chain.sh)'
|
||||
|
||||
# status left style
|
||||
tmux_conf_theme_status_left_fg='#000000,#e4e4e4,#e4e4e4' # black, white , white
|
||||
|
@ -1117,10 +1117,10 @@ if [ "$1" = "link" ]; then
|
||||
echo "The /mnt/hdd/temp directory is for short time data and will get cleaned up on very start. Dont work with data here thats bigger then 25GB - because on BTRFS hdd layout this is a own partition with limited space. Also on BTRFS hdd layout the temp partition is an FAT format - so it can be easily mounted on Windows and OSx laptops by just connecting it to such laptops. Use this for easy export data. To import data make sure to work with the data before bootstrap is deleting the directory on startup." > ./README.txt
|
||||
sudo mv ./README.txt /mnt/hdd/temp/README.txt 2>/dev/null
|
||||
|
||||
echo "The /mnt/hdd/app-data directory should be used by additional/optinal apps and services installed to the RaspiBlitz for their data that should survive an import/export/backup. Data that can be reproduced (indexes, etc.) should be stored in app-storage." > ./README.txt
|
||||
echo "The /mnt/hdd/app-data directory should be used by additional/optional apps and services installed to the RaspiBlitz for their data that should survive an import/export/backup. Data that can be reproduced (indexes, etc.) should be stored in app-storage." > ./README.txt
|
||||
sudo mv ./README.txt /mnt/hdd/app-data/README.txt 2>/dev/null
|
||||
|
||||
echo "The /mnt/hdd/app-storage directrory should be used by additional/optinal apps and services installed to the RaspiBlitz for their non-critical and reproducable data (indexes, public blockchain, etc.) that does not need to survive an an import/export/backup. Data is critical should be in app-data." > ./README.txt
|
||||
echo "The /mnt/hdd/app-storage directrory should be used by additional/optional apps and services installed to the RaspiBlitz for their non-critical and reproducable data (indexes, public blockchain, etc.) that does not need to survive an an import/export/backup. Data is critical should be in app-data." > ./README.txt
|
||||
sudo mv ./README.txt /mnt/hdd/app-storage/README.txt 2>/dev/null
|
||||
|
||||
>&2 echo "# OK - all symbolic links build"
|
||||
@ -1374,9 +1374,6 @@ if [ "$1" = "clean" ]; then
|
||||
|
||||
>&2 echo "# Deleting the temp folder/drive (keeping SWAP file) .."
|
||||
tempPath="/mnt/hdd/temp"
|
||||
|
||||
# better do secure delete, because temp is used for backups
|
||||
# secure-delete works because - also in BTRFS setup, temp is EXT4
|
||||
|
||||
for entry in $(ls -A1 ${tempPath} 2>/dev/null)
|
||||
do
|
||||
@ -1390,10 +1387,10 @@ if [ "$1" = "clean" ]; then
|
||||
|
||||
if [ -d "${tempPath}/$entry" ]; then
|
||||
>&2 echo "# shredding DIR : ${entry}"
|
||||
sudo srm -r ${tempPath}/$entry
|
||||
sudo rm -r ${tempPath}/$entry
|
||||
else
|
||||
>&2 echo "# shredding FILE : ${entry}"
|
||||
sudo srm ${tempPath}/$entry
|
||||
sudo rm ${tempPath}/$entry
|
||||
fi
|
||||
|
||||
else
|
||||
|
@ -76,7 +76,7 @@ if [ "$1" = "export" ]; then
|
||||
fi
|
||||
|
||||
# clean old backups from temp
|
||||
rm /hdd/temp/raspiblitz-*.tar.gz 2>/dev/null
|
||||
rm -f /hdd/temp/raspiblitz-*.tar.gz 2>/dev/null
|
||||
|
||||
# get date stamp
|
||||
datestamp=$(date "+%y-%m-%d-%H-%M")
|
||||
@ -151,6 +151,8 @@ if [ "$1" = "export-gui" ]; then
|
||||
echo "To complete the data migration follow then instructions on the github FAQ."
|
||||
echo
|
||||
read key
|
||||
echo "Shutting down ...."
|
||||
sleep 4
|
||||
/home/admin/XXshutdown.sh
|
||||
exit 0
|
||||
fi
|
||||
@ -257,7 +259,7 @@ if [ "$1" = "import-gui" ]; then
|
||||
# make sure HDD/SSD is not mounted
|
||||
# because importing migration just works during early setup
|
||||
if [ ${isMounted} -eq 1 ]; then
|
||||
echo "FAIL --> cannot import migration data when HDD(SDD is mounted"
|
||||
echo "FAIL --> cannot import migration data when HDD/SSD is mounted"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -273,11 +275,19 @@ if [ "$1" = "import-gui" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# ask format for new HDD/SSD
|
||||
OPTIONS=(EXT4 "Ext4 & 1 Partition (default)" \
|
||||
BTRFS "BTRFS & 3 Partitions (experimental)"
|
||||
)
|
||||
CHOICE=$(whiptail --clear --title "Formatting ${hddCandidate}" --menu "" 9 52 2 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
OPTIONS=()
|
||||
# check if HDD/SSD contains Bitcoin Blockchain
|
||||
if [ "${hddBlocksBitcoin}" == "1" ]; then
|
||||
OPTIONS+=(KEEP "Dont format & use Blockchain")
|
||||
fi
|
||||
OPTIONS+=(EXT4 "Ext4 & 1 Partition (default)")
|
||||
OPTIONS+=(BTRFS "BTRFS & 3 Partitions (experimental)")
|
||||
|
||||
useBlockchain=0
|
||||
CHOICE=$(whiptail --clear --title "Formatting ${hddCandidate}" --menu "" 10 52 3 "${OPTIONS[@]}" 2>&1 >/dev/tty)
|
||||
clear
|
||||
case $CHOICE in
|
||||
EXT4)
|
||||
@ -296,6 +306,10 @@ if [ "$1" = "import-gui" ]; then
|
||||
exit 1
|
||||
fi
|
||||
;;
|
||||
KEEP)
|
||||
echo "Keep HDD & Blockchain"
|
||||
useBlockchain=1
|
||||
;;
|
||||
*)
|
||||
echo "CANCEL"
|
||||
exit 0
|
||||
@ -368,7 +382,7 @@ if [ "$1" = "import-gui" ]; then
|
||||
echo "OK: Migration data was imported"
|
||||
|
||||
# Copy from other computer is only option for Bitcoin
|
||||
if [ "${network}" == "bitcoin" ]; then
|
||||
if [ "${network}" == "bitcoin" ] && [ ${useBlockchain} -eq 0 ]; then
|
||||
OPTIONS=(SYNC "Re-Sync & Validate Blockchain" \
|
||||
COPY "Copy over LAN from other Computer"
|
||||
)
|
||||
@ -396,4 +410,4 @@ if [ "$1" = "import-gui" ]; then
|
||||
fi
|
||||
|
||||
echo "error='unkown command'"
|
||||
exit 1
|
||||
exit 1
|
||||
|
@ -40,6 +40,14 @@ if ! grep -Eq "^notifyMailHostname=.*" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "notifyMailHostname=$(hostname)" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
||||
fi
|
||||
|
||||
if ! grep -Eq "^notifyMailFromAddress=.*" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "notifyMailFromAddress=rb@example.com" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
||||
fi
|
||||
|
||||
if ! grep -Eq "^notifyMailFromName=.*" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "notifyMailFromName=\"RB User\"" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
||||
fi
|
||||
|
||||
if ! grep -Eq "^notifyMailUser=.*" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "notifyMailUser=username" | sudo tee -a /mnt/hdd/raspiblitz.conf >/dev/null
|
||||
fi
|
||||
@ -72,11 +80,12 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "switching the NOTIFY ON"
|
||||
|
||||
# install sstmp if not already present
|
||||
/usr/bin/which ssmtp &>/dev/null
|
||||
[ $? -eq 0 ] || sudo apt-get install -y ssmtp
|
||||
if ! command -v ssmtp >/dev/null; then
|
||||
sudo apt-get install -y ssmtp
|
||||
fi
|
||||
|
||||
# install python lib for smime into virtual env
|
||||
/home/admin/python3-env-lnd/bin/python -m pip install smime
|
||||
sudo -H /usr/bin/python3 -m pip install smime
|
||||
|
||||
# write ssmtp config
|
||||
cat << EOF | sudo tee /etc/ssmtp/ssmtp.conf >/dev/null
|
||||
@ -127,24 +136,22 @@ if [ "$1" = "send" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/usr/bin/which ssmtp &>/dev/null
|
||||
if ! [ $? -eq 0 ]; then
|
||||
if ! command -v ssmtp >/dev/null; then
|
||||
echo "please run \"on\" first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# now parse settings from config and use to send the message
|
||||
if [ "${notifyMethod}" = "ext" ]; then
|
||||
/home/admin/python3-env-lnd/bin/python3 /home/admin/XXsendNotification.py ext ${notifyExtCmd} "$2"
|
||||
/usr/bin/python3 /home/admin/XXsendNotification.py ext ${notifyExtCmd} "$2"
|
||||
elif [ "${notifyMethod}" = "mail" ]; then
|
||||
if [ "${notifyMailEncrypt}" = "on" ]; then
|
||||
/home/admin/python3-env-lnd/bin/python3 /home/admin/XXsendNotification.py mail "${@:3}" --cert ${notifyMailToCert} --encrypt ${notifyMailTo} "$2"
|
||||
/usr/bin/python3 /home/admin/XXsendNotification.py mail "${@:3}" --from-address "${notifyMailFromAddress}" --from-name "${notifyMailFromName}" --cert "${notifyMailToCert}" --encrypt ${notifyMailTo} "$2"
|
||||
else
|
||||
/home/admin/python3-env-lnd/bin/python3 /home/admin/XXsendNotification.py mail "${@:3}" ${notifyMailTo} "$2"
|
||||
/usr/bin/python3 /home/admin/XXsendNotification.py mail "${@:3}" --from-address "${notifyMailFromAddress}" --from-name "${notifyMailFromName}" "${notifyMailTo}" "$2"
|
||||
fi
|
||||
elif [ "${notifyMethod}" = "slack" ]; then
|
||||
/home/admin/python3-env-lnd/bin/python3 /home/admin/XXsendNotification.py slack -h "$2"
|
||||
/usr/bin/python3 /home/admin/XXsendNotification.py slack -h "$2"
|
||||
else
|
||||
echo "unknown notification method - check /mnt/hdd/raspiblitz.conf"
|
||||
fi
|
||||
|
@ -224,36 +224,34 @@ EOF
|
||||
if [ "${ElectRS}" == "on" ]; then
|
||||
echo "# changing the RPC password for ELECTRS"
|
||||
RPC_USER=$(cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcuser | cut -c 9-)
|
||||
sed -i "s/^cookie = \"$RPC_USER.*\"/cookie = \"$RPC_USER:${newPassword}\"/g" /home/electrs/.electrs/config.toml 2>/dev/null
|
||||
sudo sed -i "s/^cookie = \"$RPC_USER.*\"/cookie = \"$RPC_USER:${newPassword}\"/g" /home/electrs/.electrs/config.toml
|
||||
fi
|
||||
|
||||
# BTC-RPC-Explorer
|
||||
if [ "${BTCRPCexplorer}" = "on" ]; then
|
||||
echo "# changing the RPC password for BTCRPCEXPLORER"
|
||||
sed -i "s/^BTCEXP_BITCOIND_PASS=.*/BTCEXP_BITCOIND_PASS=${newPassword}/g" /home/btcrpcexplorer/.config/btc-rpc-explorer.env 2>/dev/null
|
||||
sed -i "s/^BTCEXP_BASIC_AUTH_PASSWORD=.*/BTCEXP_BASIC_AUTH_PASSWORD=${newPassword}/g" /home/btcrpcexplorer/.config/btc-rpc-explorer.env 2>/dev/null
|
||||
sudo sed -i "s/^BTCEXP_BITCOIND_PASS=.*/BTCEXP_BITCOIND_PASS=${newPassword}/g" /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
||||
sudo sed -i "s/^BTCEXP_BASIC_AUTH_PASSWORD=.*/BTCEXP_BASIC_AUTH_PASSWORD=${newPassword}/g" /home/btcrpcexplorer/.config/btc-rpc-explorer.env
|
||||
fi
|
||||
|
||||
# BTCPayServer
|
||||
if [ "${BTCPayServer}" == "on" ]; then
|
||||
echo "# changing the RPC password for BTCPAYSERVER"
|
||||
sed -i "s/^btc.rpc.password=.*/btc.rpc.password=${newPassword}/g" /home/btcpay/.nbxplorer/Main/settings.config 2>/dev/null
|
||||
sudo sed -i "s/^btc.rpc.password=.*/btc.rpc.password=${newPassword}/g" /home/btcpay/.nbxplorer/Main/settings.config
|
||||
fi
|
||||
|
||||
# JoinMarket
|
||||
if [ "${joinmarket}" == "on" ]; then
|
||||
echo "# changing the RPC password for JOINMARKET"
|
||||
sed -i "s/^rpc_password =.*/rpc_password = ${newPassword}/g" /home/joinmarket/.joinmarket/joinmarket.cfg 2>/dev/null
|
||||
sudo sed -i "s/^rpc_password =.*/rpc_password = ${newPassword}/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
echo "# changing the password for the 'joinmarket' user"
|
||||
echo "joinmarket:${newPassword}" | sudo chpasswd
|
||||
fi
|
||||
|
||||
# ThunderHub
|
||||
if [ "${thunderhub}" = "on" ]; then
|
||||
if [ "${thunderhub}" == "on" ]; then
|
||||
echo "# changing the password for ThunderHub"
|
||||
sed -i "s/^masterPassword: '.*' # Default password unless defined in account/\
|
||||
masterPassword: '${newPassword}' # Default password unless defined in account/g" \
|
||||
/mnt/hdd/app-data/thunderhub/thubConfig.yaml 2>/dev/null
|
||||
sed -i "s/^masterPassword:.*/masterPassword: '${newPassword}'/g" /mnt/hdd/app-data/thunderhub/thubConfig.yaml
|
||||
fi
|
||||
|
||||
echo "# OK -> RPC Password B changed"
|
||||
|
@ -17,7 +17,7 @@ sudo mkdir /mnt/hdd/temp 2>/dev/null
|
||||
sudo chmod 777 -R /mnt/hdd/temp 2>/dev/null
|
||||
|
||||
# localIP
|
||||
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | grep 'eth0\|wlan0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
localip=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '(*[eth|ens|enp|eno|wlan|wlp][0-9]$)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
echo "localIP='${localip}'"
|
||||
|
||||
# temp - no measurement in a VM
|
||||
@ -267,4 +267,4 @@ fi
|
||||
# info on scan run time
|
||||
endTime=$(date +%s)
|
||||
runTime=$(echo "${endTime}-${startTime}" | bc)
|
||||
echo "scriptRuntime=${runTime}"
|
||||
echo "scriptRuntime=${runTime}"
|
||||
|
@ -54,8 +54,8 @@ if Path("/mnt/hdd/raspiblitz.conf").is_file():
|
||||
is_testnet = False
|
||||
|
||||
ENV = "PROD"
|
||||
# DEFAULT_SHOPURL="shopdeu2vdhazvmllyfagdcvlpflzdyt5gwftmn4hjj3zw2oyelksaid.onion"
|
||||
DEFAULT_SHOPURL = "ip2tor.fulmo.org"
|
||||
DEFAULT_SHOPURL = "fulmo7x6yvgz6zs2b2ptduvzwevxmizhq23klkenslt5drxx2physlqd.onion"
|
||||
# DEFAULT_SHOPURL = "ip2tor.fulmo.org"
|
||||
LND_IP = "127.0.0.1"
|
||||
LND_ADMIN_MACAROON_PATH = "/mnt/hdd/app-data/lnd/data/chain/{0}/{1}net/admin.macaroon".format(cfg.network.value,
|
||||
cfg.chain.value)
|
||||
@ -66,7 +66,8 @@ if Path("/mnt/hdd/raspiblitz.conf").is_file():
|
||||
else:
|
||||
ENV = "DEV"
|
||||
print("# blitz.ip2tor.py (development env)")
|
||||
DEFAULT_SHOPURL = "ip2tor.fulmo.org"
|
||||
DEFAULT_SHOPURL = "fulmo7x6yvgz6zs2b2ptduvzwevxmizhq23klkenslt5drxx2physlqd.onion"
|
||||
# DEFAULT_SHOPURL = "ip2tor.fulmo.org"
|
||||
LND_IP = "192.168.178.95"
|
||||
LND_ADMIN_MACAROON_PATH = "/Users/rotzoll/Downloads/RaspiBlitzCredentials/admin.macaroon"
|
||||
LND_TLS_PATH = "/Users/rotzoll/Downloads/RaspiBlitzCredentials/tls.cert"
|
||||
@ -198,7 +199,7 @@ def apiPlaceOrderNew(session, shopurl, hostid, toraddressWithPort):
|
||||
'product': "tor_bridge",
|
||||
'host_id': hostid,
|
||||
'tos_accepted': True,
|
||||
'comment': 'test',
|
||||
'comment': 'RaspiBlitz',
|
||||
'target': toraddressWithPort,
|
||||
'public_key': ''
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ cfg.reload()
|
||||
|
||||
# todo: make sure that also ACME script uses TOR if activated
|
||||
session = requests.session()
|
||||
if cfg.run_behind_tor:
|
||||
if cfg.run_behind_tor.value:
|
||||
session.proxies = {'http': 'socks5h://127.0.0.1:9050', 'https': 'socks5h://127.0.0.1:9050'}
|
||||
|
||||
|
||||
@ -81,11 +81,6 @@ def handleException(e):
|
||||
print("error='{0}'".format(str(e)))
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
def get_subdomain(fulldomain_str):
|
||||
return fulldomain_str.split('.')[0]
|
||||
|
||||
|
||||
############################
|
||||
# API Calls to DNS Services
|
||||
############################
|
||||
@ -94,11 +89,13 @@ def duckdns_update(domain, token, ip):
|
||||
print("# duckDNS update IP API call for {0}".format(domain))
|
||||
|
||||
# make HTTP request
|
||||
url = "https://www.duckdns.org/update?domains={0}&token={1}&ip={2}".format(get_subdomain(domain), token, ip)
|
||||
url = "https://www.duckdns.org/update?domains={0}&token={1}&ip={2}".format(domain.split('.')[0], token, ip)
|
||||
print("# calling URL: {0}".format(url))
|
||||
try:
|
||||
response = session.get(url)
|
||||
if response.status_code != 200:
|
||||
raise BlitzError("failed HTTP code", str(response.status_code))
|
||||
print("# response-code: {0}".format(response.status_code))
|
||||
except Exception as e:
|
||||
raise BlitzError("failed HTTP request", url, e)
|
||||
|
||||
@ -126,14 +123,15 @@ def subscriptions_new(ip, dnsservice, domain, token, target):
|
||||
if ip == "dyndns":
|
||||
update_url = ""
|
||||
if dnsservice == "duckdns":
|
||||
update_url = "https://www.duckdns.org/update?domains={0}&token={1}".format(get_subdomain(domain), token, ip)
|
||||
subprocess.run(['/home/admin/config.scriprs/internet.dyndomain.sh', 'on', domain, update_url],
|
||||
update_url = "https://www.duckdns.org/update?domains={0}&token={1}".format(domain, token, ip)
|
||||
subprocess.run(['/home/admin/config.scripts/internet.dyndomain.sh', 'on', domain, update_url],
|
||||
stdout=subprocess.PIPE).stdout.decode('utf-8').strip()
|
||||
real_ip = cfg.public_ip
|
||||
|
||||
# update DNS with actual IP
|
||||
if dnsservice == "duckdns":
|
||||
duckdns_update(get_subdomain(id), token, real_ip)
|
||||
print("# dnsservice=dnsservice --> update {0}".format(domain))
|
||||
duckdns_update(domain, token, real_ip)
|
||||
|
||||
# create subscription data for storage
|
||||
subscription = dict()
|
||||
@ -304,7 +302,7 @@ If you havent already go to https://duckdns.org
|
||||
title="DuckDNS Domain")
|
||||
subdomain = text.strip()
|
||||
subdomain = subdomain.split(' ')[0]
|
||||
subdomain = get_subdomain(subdomain)
|
||||
subdomain = subdomain.split('.')[0]
|
||||
domain = "{0}.duckdns.org".format(subdomain)
|
||||
os.system("clear")
|
||||
|
||||
@ -416,7 +414,7 @@ Create one first and try again.
|
||||
height=10, width=40, init="",
|
||||
title="Static IP")
|
||||
ip = text.strip()
|
||||
ip = token.split(' ')[0]
|
||||
ip = ip.split(' ')[0]
|
||||
|
||||
# check for valid input
|
||||
try:
|
||||
|
@ -27,7 +27,7 @@ fi
|
||||
# install
|
||||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
|
||||
if [ "${bos}" == "on" ]; then
|
||||
if [ $(sudo ls /home/bos/.npmrc 2>/dev/null | grep -c ".npmrc") -gt 0 ]; then
|
||||
echo "# FAIL - bos already installed"
|
||||
sleep 3
|
||||
exit 1
|
||||
@ -54,13 +54,18 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# create symlink
|
||||
sudo ln -s "/mnt/hdd/app-data/lnd/" "/home/bos/.lnd"
|
||||
|
||||
# make sure rtl is member of lndadmin
|
||||
# add user to group with admin access to lnd
|
||||
sudo /usr/sbin/usermod --append --groups lndadmin bos
|
||||
|
||||
# install bos
|
||||
# check latest version:
|
||||
# https://github.com/alexbosworth/balanceofsatoshis/blob/master/package.json#L70
|
||||
sudo -u bos npm install -g balanceofsatoshis@5.43.1
|
||||
if ! [ $? -eq 0 ]; then
|
||||
echo "FAIL - npm install did not run correctly, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# setting value in raspi blitz config
|
||||
sudo sed -i "s/^bos=.*/bos=on/g" /mnt/hdd/raspiblitz.conf
|
||||
|
@ -23,7 +23,7 @@ if [ "$1" = "menu" ]; then
|
||||
# check if index is ready
|
||||
if [ "${isIndexed}" == "0" ]; then
|
||||
dialog --title " Blockchain Index Not Ready " --msgbox "
|
||||
The Blockchain Index is still getting build.
|
||||
The Blockchain Index is still getting built.
|
||||
${indexInfo}
|
||||
This can take multiple hours.
|
||||
" 9 48
|
||||
@ -119,6 +119,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
cd btc-rpc-explorer
|
||||
sudo -u btcrpcexplorer git reset --hard v2.0.0
|
||||
sudo -u btcrpcexplorer npm install
|
||||
if ! [ $? -eq 0 ]; then
|
||||
echo "FAIL - npm install did not run correctly, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# prepare .env file
|
||||
echo "# getting RPC credentials from the ${network}.conf"
|
||||
|
@ -118,7 +118,7 @@ SHA1 ${sslFingerprintTOR}
|
||||
go MAINMENU > SUBSCRIBE and add LetsEncrypt HTTPS Domain"
|
||||
elif [ ${#publicDomain} -eq 0 ]; then
|
||||
text="${text}\n
|
||||
To enable easy reachablity with normal brower from the outside
|
||||
To enable easy reachability with normal browser from the outside
|
||||
consider adding a IP2TOR Bridge (MAINMENU > SUBSCRIBE)."
|
||||
fi
|
||||
|
||||
@ -367,19 +367,24 @@ WantedBy=multi-user.target
|
||||
sudo systemctl daemon-reload
|
||||
# start to create settings.config
|
||||
sudo systemctl enable nbxplorer
|
||||
#sudo systemctl start nbxplorer
|
||||
|
||||
#echo "Checking for nbxplorer config"
|
||||
#while [ ! -f "/home/btcpay/.nbxplorer/Main/settings.config" ]
|
||||
# do
|
||||
# echo "Waiting for nbxplorer to start - CTRL+C to abort"
|
||||
# sleep 10
|
||||
# hasFailed=$(sudo systemctl status nbxplorer | grep -c "Active: failed")
|
||||
# if [ ${hasFailed} -eq 1 ]; then
|
||||
# echo "seems like starting nbxplorer service has failed - see: systemctl status nbxplorer"
|
||||
# echo "maybe report here: https://github.com/rootzoll/raspiblitz/issues/214"
|
||||
# fi
|
||||
#done
|
||||
if [ "${state}" == "ready" ]; then
|
||||
echo "Starting nbxplorer"
|
||||
sudo systemctl start nbxplorer
|
||||
echo "Checking for nbxplorer config"
|
||||
while [ ! -f "/home/btcpay/.nbxplorer/Main/settings.config" ]
|
||||
do
|
||||
echo "Waiting for nbxplorer to start - CTRL+C to abort"
|
||||
sleep 10
|
||||
hasFailed=$(sudo systemctl status nbxplorer | grep -c "Active: failed")
|
||||
if [ ${hasFailed} -eq 1 ]; then
|
||||
echo "seems like starting nbxplorer service has failed - see: systemctl status nbxplorer"
|
||||
echo "maybe report here: https://github.com/rootzoll/raspiblitz/issues/214"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Because the system is not 'ready' the service 'nbxplorer' will not be started at this point .. its enabled and will start on next reboot"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "***"
|
||||
@ -397,14 +402,10 @@ EOF
|
||||
|
||||
sudo mv /home/admin/settings.config /home/btcpay/.nbxplorer/Main/settings.config
|
||||
sudo chown btcpay:btcpay /home/btcpay/.nbxplorer/Main/settings.config
|
||||
#sudo systemctl restart nbxplorer
|
||||
|
||||
if [ "${state}" == "ready" ]; then
|
||||
echo "Starting nbxplorer"
|
||||
sudo systemctl start nbxplorer
|
||||
else
|
||||
echo "Because the system is not 'ready' the service 'nbxplorer' will not be started at this point .. its enabled and will start on next reboot"
|
||||
fi
|
||||
sudo systemctl restart nbxplorer
|
||||
fi
|
||||
|
||||
# BTCPayServer
|
||||
echo ""
|
||||
@ -449,21 +450,21 @@ WantedBy=multi-user.target
|
||||
if [ "${state}" == "ready" ]; then
|
||||
echo "Starting btcpayserver"
|
||||
sudo systemctl start btcpayserver
|
||||
echo "Checking for btcpayserver config"
|
||||
while [ ! -f "/home/btcpay/.btcpayserver/Main/settings.config" ]
|
||||
do
|
||||
echo "Waiting for btcpayserver to start - CTRL+C to abort"
|
||||
sleep 10
|
||||
hasFailed=$(sudo systemctl status btcpayserver | grep -c "Active: failed")
|
||||
if [ ${hasFailed} -eq 1 ]; then
|
||||
echo "seems like starting btcpayserver service has failed - see: systemctl status btcpayserver"
|
||||
echo "maybe report here: https://github.com/rootzoll/raspiblitz/issues/214"
|
||||
fi
|
||||
done
|
||||
else
|
||||
echo "Because the system is not 'ready' the service 'btcpayserver' will not be started at this point .. its enabled and will start on next reboot"
|
||||
fi
|
||||
|
||||
#echo "Checking for btcpayserver config"
|
||||
#while [ ! -f "/home/btcpay/.btcpayserver/Main/settings.config" ]
|
||||
# do
|
||||
# echo "Waiting for btcpayserver to start - CTRL+C to abort"
|
||||
# sleep 10
|
||||
# hasFailed=$(sudo systemctl status btcpayserver | grep -c "Active: failed")
|
||||
# if [ ${hasFailed} -eq 1 ]; then
|
||||
# echo "seems like starting btcpayserver service has failed - see: systemctl status btcpayserver"
|
||||
# echo "maybe report here: https://github.com/rootzoll/raspiblitz/issues/214"
|
||||
# fi
|
||||
#done
|
||||
sudo -u btcpay mkdir -p /home/btcpay/.btcpayserver/Main/
|
||||
|
||||
/home/admin/config.scripts/bonus.btcpayserver.sh write-tls-macaroon
|
||||
@ -488,6 +489,21 @@ fi
|
||||
# switch off
|
||||
if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
|
||||
# check for second parameter: should data be deleted?
|
||||
deleteData=0
|
||||
if [ "$2" = "--delete-data" ]; then
|
||||
deleteData=1
|
||||
elif [ "$2" = "--keep-data" ]; then
|
||||
deleteData=0
|
||||
else
|
||||
if (whiptail --title " DELETE DATA? " --yesno "Do you want want to delete\nthe BTCPay Server Data?" 8 30); then
|
||||
deleteData=1
|
||||
else
|
||||
deleteData=0
|
||||
fi
|
||||
fi
|
||||
echo "# deleteData(${deleteData})"
|
||||
|
||||
# setting value in raspi blitz config
|
||||
sudo sed -i "s/^BTCPayServer=.*/BTCPayServer=off/g" /mnt/hdd/raspiblitz.conf
|
||||
|
||||
@ -498,7 +514,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
|
||||
isInstalled=$(sudo ls /etc/systemd/system/btcpayserver.service 2>/dev/null | grep -c 'btcpayserver.service')
|
||||
if [ ${isInstalled} -eq 1 ]; then
|
||||
echo "*** REMOVING BTCPAYSERVER, NBXPLORER and .NET ***"
|
||||
echo "# *** REMOVING BTCPAYSERVER, NBXPLORER and .NET ***"
|
||||
# removing services
|
||||
# btcpay
|
||||
sudo systemctl stop btcpayserver
|
||||
@ -530,9 +546,15 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
sudo systemctl reload nginx
|
||||
# nuke user
|
||||
sudo userdel -rf btcpay 2>/dev/null
|
||||
echo "OK BTCPayServer removed."
|
||||
if [ ${deleteData} -eq 1 ]; then
|
||||
echo "# deleting data"
|
||||
sudo rm -R /mnt/hdd/app-data/.btcpayserver/
|
||||
else
|
||||
echo "# keeping data"
|
||||
fi
|
||||
echo "# OK BTCPayServer removed."
|
||||
else
|
||||
echo "BTCPayServer is not installed."
|
||||
echo "# BTCPayServer is not installed."
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
@ -95,7 +95,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
/home/admin/config.scripts/network.wallet.sh on
|
||||
|
||||
echo "# --> Installing prerequisites"
|
||||
sudo apt install -y libusb-1.0.0-dev libudev-dev virtualenv
|
||||
sudo apt install -y libusb-1.0.0-dev libudev-dev virtualenv libffi-dev
|
||||
|
||||
# activating Authentication here ...
|
||||
echo "# --> creating App-config"
|
||||
|
@ -43,7 +43,7 @@ if [ "$1" = "status" ]; then
|
||||
fi
|
||||
|
||||
# check if initial sync was done, by setting a file as once electrs is the first time responding on port 50001
|
||||
electrumResponding=$(echo exit | telnet 127.0.0.1 50001 2>/dev/null | grep -c "Connected to")
|
||||
electrumResponding=$(echo '{"jsonrpc":"2.0","method":"server.ping","params":[],"id":"electrs-check"}' | netcat -w 2 127.0.0.1 50001 | grep -c "result")
|
||||
if [ ${electrumResponding} -gt 1 ]; then
|
||||
electrumResponding=1
|
||||
fi
|
||||
@ -193,7 +193,7 @@ Check 'sudo nginx -t' for a detailed error message.
|
||||
echo "${TORaddress}"
|
||||
echo
|
||||
echo "To connect through TOR open the Tor Browser and start with the options:"
|
||||
echo "electrum --oneserver --server${TORaddress}:50002:s --proxy socks5:127.0.0.1:9150"
|
||||
echo "electrum --oneserver --server ${TORaddress}:50002:s --proxy socks5:127.0.0.1:9150"
|
||||
/home/admin/config.scripts/blitz.lcd.sh qr "${TORaddress}"
|
||||
fi
|
||||
echo
|
||||
|
@ -16,6 +16,7 @@ PGPcheck="15E7ECF257098A4EF91655EB4CA7FE54A6213C91"
|
||||
mode="$1"
|
||||
|
||||
# GATHER DATA
|
||||
source /home/admin/raspiblitz.info
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# setting download directory
|
||||
@ -71,6 +72,12 @@ fi
|
||||
# INSTALL
|
||||
if [ "${mode}" = "on" ] || [ "${mode}" = "1" ]; then
|
||||
|
||||
if [ $(sudo ls /home/faraday/.bashrc 2>/dev/null | grep -c ".bashrc") -gt 0 ]; then
|
||||
echo "# FAIL - already installed"
|
||||
sleep 3
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "# INSTALL bonus.faraday.sh"
|
||||
|
||||
echo
|
||||
@ -162,6 +169,11 @@ if [ "${mode}" = "on" ] || [ "${mode}" = "1" ]; then
|
||||
|
||||
# install service
|
||||
echo "*** Install systemd ***"
|
||||
sudo mkdir -p /mnt/hdd/temp/ 2>/dev/null
|
||||
sudo chmod 777 /mnt/hdd/temp/
|
||||
sudo chown bitcoin:bitcoin /mnt/hdd/temp/
|
||||
sudo touch /mnt/hdd/temp/faraday.service
|
||||
sudo chmod 777 /mnt/hdd/temp/faraday.service
|
||||
cat > /mnt/hdd/temp/faraday.service <<EOF
|
||||
[Unit]
|
||||
Description=faraday
|
||||
@ -185,7 +197,9 @@ EOF
|
||||
sudo mv /mnt/hdd/temp/faraday.service /etc/systemd/system/faraday.service
|
||||
sudo chown root:root /etc/systemd/system/faraday.service
|
||||
sudo systemctl enable faraday
|
||||
sudo systemctl start faraday
|
||||
if [ "${state}" == "ready" ]; then
|
||||
sudo systemctl start faraday
|
||||
fi
|
||||
|
||||
echo "# flag in raspiblitz config"
|
||||
if [ ${#faraday} -eq 0 ]; then
|
||||
|
@ -102,6 +102,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
sudo sed -i "s/^golang=.*/golang=off/g" /mnt/hdd/raspiblitz.conf
|
||||
echo "*** REMOVING GO ***"
|
||||
sudo rm -rf /usr/local/go
|
||||
sudo rm -rf /usr/local/gocode
|
||||
echo "OK Go removed."
|
||||
exit 0
|
||||
fi
|
||||
|
@ -20,7 +20,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
source /home/admin/raspiblitz.info
|
||||
|
||||
# switch on
|
||||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
@ -38,6 +38,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo adduser --disabled-password --gecos "" $USERNAME
|
||||
|
||||
# install kindle-display
|
||||
echo "# install .."
|
||||
cd $HOME_DIR
|
||||
sudo -u $USERNAME wget https://github.com/dennisreimann/kindle-display/archive/v$APP_VERSION.tar.gz
|
||||
sudo -u $USERNAME tar -xzf v$APP_VERSION.tar.gz kindle-display-$APP_VERSION/server
|
||||
@ -45,6 +46,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo -u $USERNAME rm v$APP_VERSION.tar.gz
|
||||
cd kindle-display/server
|
||||
sudo -u $USERNAME npm install
|
||||
if ! [ $? -eq 0 ]; then
|
||||
echo "FAIL - npm install did not run correctly, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# setup kindle-display config
|
||||
RPC_USER=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcuser | cut -c 9-)
|
||||
@ -53,6 +58,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo mkdir -p $APP_DATA_DIR
|
||||
sudo chown $USERNAME:$USERNAME $APP_DATA_DIR
|
||||
|
||||
echo "# create config file"
|
||||
if [[ ! -f "$CONFIG_FILE" ]]; then
|
||||
configFile=/home/admin/kindle-display.env
|
||||
touch $configFile
|
||||
@ -93,12 +99,15 @@ EOF
|
||||
sudo -u $USERNAME ln -s $CONFIG_FILE $APP_SERVER_DIR/.env
|
||||
|
||||
# generate initial data
|
||||
echo "# run data.sh"
|
||||
sudo -u $USERNAME $APP_SERVER_DIR/data.sh
|
||||
|
||||
# open firewall
|
||||
echo "# firewall kindle-display service"
|
||||
sudo ufw allow $SERVER_PORT comment 'kindle-display HTTP'
|
||||
|
||||
# install service
|
||||
echo "# prepare kindle-display service"
|
||||
cat > /home/admin/kindle-display.service <<EOF
|
||||
# systemd unit for kindle-display
|
||||
|
||||
@ -121,11 +130,19 @@ StartLimitBurst=2
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
sudo mv /home/admin/kindle-display.service /etc/systemd/system/kindle-display.service
|
||||
sudo systemctl enable kindle-display
|
||||
sudo systemctl start kindle-display
|
||||
|
||||
# generate initial screenshot
|
||||
sudo -u $USERNAME $CRON_FILE
|
||||
echo "# enable kindle-display service"
|
||||
sudo systemctl enable kindle-display
|
||||
|
||||
# https://github.com/rootzoll/raspiblitz/issues/1375
|
||||
if [ "${state}" == "ready" ]; then
|
||||
echo "# starting kindle-display service"
|
||||
sudo systemctl start kindle-display
|
||||
|
||||
# generate initial screenshot
|
||||
echo "# run cronfile"
|
||||
sudo -u $USERNAME $CRON_FILE
|
||||
fi
|
||||
|
||||
echo "OK - the KINDLE-DISPLAY script is now installed."
|
||||
echo ""
|
||||
|
@ -47,7 +47,7 @@ SHA1 ${sslFingerprintTOR}
|
||||
go MAINMENU > SUBSCRIBE and add LetsEncrypt HTTPS Domain"
|
||||
elif [ ${#publicDomain} -eq 0 ]; then
|
||||
text="${text}\n
|
||||
To enable easy reachablity with normal brower from the outside
|
||||
To enable easy reachability with normal browser from the outside
|
||||
consider adding a IP2TOR Bridge (MAINMENU > SUBSCRIBE)."
|
||||
fi
|
||||
|
||||
@ -215,11 +215,16 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# to the install
|
||||
echo "# installing application dependencies"
|
||||
cd /home/lnbits/lnbits
|
||||
sudo -u lnbits pipenv install
|
||||
sudo -u lnbits /usr/bin/pipenv run pip install python-dotenv
|
||||
# to the install
|
||||
# do install like this
|
||||
sudo -u lnbits pipenv run pip install python-dotenv
|
||||
sudo -u lnbits pipenv run pip install -r requirements.txt
|
||||
# instead of this
|
||||
#sudo -u lnbits pipenv install
|
||||
#sudo -u lnbits /usr/bin/pipenv run pip install python-dotenv
|
||||
|
||||
# update databases (if needed)
|
||||
echo "# updating databases"
|
||||
sudo -u lnbits /usr/bin/pipenv run flask migrate
|
||||
sudo -u lnbits pipenv run flask migrate
|
||||
|
||||
# open firewall
|
||||
echo
|
||||
@ -296,6 +301,21 @@ fi
|
||||
# switch off
|
||||
if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
|
||||
# check for second parameter: should data be deleted?
|
||||
deleteData=0
|
||||
if [ "$2" = "--delete-data" ]; then
|
||||
deleteData=1
|
||||
elif [ "$2" = "--keep-data" ]; then
|
||||
deleteData=0
|
||||
else
|
||||
if (whiptail --title " DELETE DATA? " --yesno "Do you want want to delete\nthe LNbits Server Data?" 8 30); then
|
||||
deleteData=1
|
||||
else
|
||||
deleteData=0
|
||||
fi
|
||||
fi
|
||||
echo "# deleteData(${deleteData})"
|
||||
|
||||
# setting value in raspi blitz config
|
||||
sudo sed -i "s/^LNBits=.*/LNBits=off/g" /mnt/hdd/raspiblitz.conf
|
||||
|
||||
@ -321,6 +341,14 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
sudo systemctl disable lnbits
|
||||
sudo rm /etc/systemd/system/lnbits.service
|
||||
sudo userdel -rf lnbits
|
||||
|
||||
if [ ${deleteData} -eq 1 ]; then
|
||||
echo "# deleting data"
|
||||
sudo rm -R /mnt/hdd/app-data/LNBits
|
||||
else
|
||||
echo "# keeping data"
|
||||
fi
|
||||
|
||||
echo "OK LNbits removed."
|
||||
else
|
||||
echo "LNbits is not installed."
|
||||
|
@ -45,6 +45,19 @@ else
|
||||
echo "# lndconnect is already installed"
|
||||
fi
|
||||
|
||||
# recheck if install worked
|
||||
isInstalled=$(lndconnect -h 2>/dev/null | grep "nocert" -c)
|
||||
if [ $isInstalled -eq 0 ]; then
|
||||
echo ""
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
echo "FAIL: Was not able to install/build lndconnect"
|
||||
echo "Retry later or report to developers with logs above."
|
||||
lndconnect -h
|
||||
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
read key
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#### CHECK IF IP2TOR BRIDGES ARE AVAILABLE
|
||||
ip2torREST_IP=""
|
||||
ip2torREST_PORT=""
|
||||
|
@ -33,25 +33,57 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
|
||||
isInstalled=$(sudo ls /etc/systemd/system/loopd.service 2>/dev/null | grep -c 'loopd.service')
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
|
||||
# install Go
|
||||
/home/admin/config.scripts/bonus.go.sh on
|
||||
|
||||
# get Go vars
|
||||
source /etc/profile
|
||||
|
||||
cd /home/bitcoin
|
||||
sudo -u bitcoin git clone https://github.com/lightninglabs/loop.git
|
||||
cd /home/bitcoin/loop
|
||||
# create dedicated user
|
||||
sudo adduser --disabled-password --gecos "" loop
|
||||
|
||||
# make sure symlink to central app-data directory exists ***"
|
||||
sudo rm -rf /home/loop/.lnd # not a symlink.. delete it silently
|
||||
# create symlink
|
||||
sudo ln -s "/mnt/hdd/app-data/lnd/" "/home/loop/.lnd"
|
||||
|
||||
# sync all macaroons and unix groups for access
|
||||
/home/admin/config.scripts/lnd.credentials.sh sync
|
||||
# macaroons will be checked after install
|
||||
|
||||
# add user to group with admin access to lnd
|
||||
sudo /usr/sbin/usermod --append --groups lndadmin loop
|
||||
# add user to group with readonly access on lnd
|
||||
sudo /usr/sbin/usermod --append --groups lndreadonly loop
|
||||
# add user to group with invoice access on lnd
|
||||
sudo /usr/sbin/usermod --append --groups lndinvoice loop
|
||||
# add user to groups with all macaroons
|
||||
sudo /usr/sbin/usermod --append --groups lndinvoices loop
|
||||
sudo /usr/sbin/usermod --append --groups lndchainnotifier loop
|
||||
sudo /usr/sbin/usermod --append --groups lndsigner loop
|
||||
sudo /usr/sbin/usermod --append --groups lndwalletkit loop
|
||||
sudo /usr/sbin/usermod --append --groups lndrouter loop
|
||||
|
||||
# install from source
|
||||
cd /home/loop
|
||||
sudo -u loop git clone https://github.com/lightninglabs/loop.git
|
||||
cd /home/loop/loop
|
||||
|
||||
# https://github.com/lightninglabs/loop/releases
|
||||
source <(sudo -u admin /home/admin/config.scripts/lnd.update.sh info)
|
||||
if [ ${lndInstalledVersionMain} -lt 10 ]; then
|
||||
sudo -u bitcoin git reset --hard v0.5.1-beta
|
||||
else
|
||||
sudo -u bitcoin git reset --hard v0.8.0-beta
|
||||
fi
|
||||
cd /home/bitcoin/loop/cmd
|
||||
sudo -u loop git reset --hard v0.8.0-beta
|
||||
cd /home/loop/loop/cmd
|
||||
go install ./...
|
||||
|
||||
|
||||
# make systemd service
|
||||
if [ "${runBehindTor}" = "on" ]; then
|
||||
echo "Will connect to Loop server through Tor"
|
||||
proxy="--server.proxy=127.0.0.1:9050"
|
||||
else
|
||||
echo "Will connect to Loop server through clearnet"
|
||||
proxy=""
|
||||
fi
|
||||
|
||||
# sudo nano /etc/systemd/system/loopd.service
|
||||
echo "
|
||||
[Unit]
|
||||
@ -59,10 +91,10 @@ Description=Loopd Service
|
||||
After=lnd.service
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/home/bitcoin/loop
|
||||
ExecStart=/usr/local/gocode/bin/loopd --network=${chain}net
|
||||
User=bitcoin
|
||||
Group=bitcoin
|
||||
WorkingDirectory=/home/loop/loop
|
||||
ExecStart=/usr/local/gocode/bin/loopd --network=${chain}net ${proxy}
|
||||
User=loop
|
||||
Group=loop
|
||||
Type=simple
|
||||
KillMode=process
|
||||
TimeoutSec=60
|
||||
@ -102,10 +134,13 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
isInstalled=$(sudo ls /etc/systemd/system/loopd.service 2>/dev/null | grep -c 'loopd.service')
|
||||
if [ ${isInstalled} -eq 1 ]; then
|
||||
echo "*** REMOVING LIGHTNING LOOP SERVICE ***"
|
||||
# remove the systemd service
|
||||
sudo systemctl stop loopd
|
||||
sudo systemctl disable loopd
|
||||
sudo rm /etc/systemd/system/loopd.service
|
||||
sudo rm -rf /home/bitcoin/loop
|
||||
# delete user
|
||||
sudo userdel -rf loop
|
||||
# delete Go packages
|
||||
sudo rm /usr/local/gocode/bin/loop
|
||||
sudo rm /usr/local/gocode/bin/loopd
|
||||
echo "OK, the Loop Service is removed."
|
||||
|
@ -104,17 +104,15 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "*** Run: npm install ***"
|
||||
export NG_CLI_ANALYTICS=false
|
||||
sudo -u rtl npm install --only=prod
|
||||
if ! [ $? -eq 0 ]; then
|
||||
echo "FAIL - npm install did not run correctly, aborting"
|
||||
exit 1
|
||||
else
|
||||
echo "OK - RTL install looks good"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
cd ..
|
||||
# check if node_modules exist now
|
||||
if [ -d "/home/rtl/RTL/node_modules" ]; then
|
||||
echo "OK - RTL install looks good"
|
||||
else
|
||||
echo "FAIL - npm install did not run correctly"
|
||||
echo "ABORT - RTL install"
|
||||
exit 1
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# prepare RTL-Config.json file
|
||||
echo "*** RTL.conf ***"
|
||||
|
159
home.admin/config.scripts/bonus.stacking-sats-kraken.sh
Executable file
@ -0,0 +1,159 @@
|
||||
#!/bin/bash
|
||||
|
||||
# https://github.com/dennisreimann/stacking-sats-kraken
|
||||
|
||||
USERNAME=stackingsats
|
||||
APP_DATA_DIR=/mnt/hdd/app-data/stacking-sats-kraken
|
||||
HOME_DIR=/home/$USERNAME
|
||||
CONFIG_FILE=$APP_DATA_DIR/.env
|
||||
RASPIBLITZ_FILE=/mnt/hdd/raspiblitz.conf
|
||||
SCRIPT_NAME=stacksats.sh
|
||||
SCRIPT_VERSION=0.2.0
|
||||
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
echo "small config script to switch stacking-sats-kraken on or off"
|
||||
echo "bonus.stacking-sats-kraken.sh [on|off]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# switch on
|
||||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "*** INSTALL STACKING-SATS-KRAKEN ***"
|
||||
|
||||
isInstalled=$(sudo ls $HOME_DIR 2>/dev/null | grep -c 'stacking-sats-kraken')
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
|
||||
# install nodeJS
|
||||
/home/admin/config.scripts/bonus.nodejs.sh on
|
||||
|
||||
# add user
|
||||
sudo adduser --disabled-password --gecos "" $USERNAME
|
||||
|
||||
# install stacking-sats-kraken
|
||||
cd $HOME_DIR
|
||||
sudo -u $USERNAME wget https://github.com/dennisreimann/stacking-sats-kraken/archive/v$SCRIPT_VERSION.tar.gz
|
||||
sudo -u $USERNAME tar -xzf v$SCRIPT_VERSION.tar.gz
|
||||
sudo -u $USERNAME mv stacking-sats-kraken{-$SCRIPT_VERSION,}
|
||||
sudo -u $USERNAME rm v$SCRIPT_VERSION.tar.gz
|
||||
cd stacking-sats-kraken
|
||||
sudo -u $USERNAME npm install
|
||||
if ! [ $? -eq 0 ]; then
|
||||
echo "FAIL - npm install did not run correctly, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# setup stacking config
|
||||
sudo mkdir -p $APP_DATA_DIR
|
||||
sudo chown $USERNAME:$USERNAME $APP_DATA_DIR
|
||||
|
||||
if [[ ! -f "$CONFIG_FILE" ]]; then
|
||||
configFile=/home/admin/stacking-sats-kraken.env
|
||||
touch $configFile
|
||||
sudo chmod 600 $configFile || exit 1
|
||||
echo '# Required settings
|
||||
KRAKEN_API_KEY="apiKeyFromTheKrakenSettings"
|
||||
KRAKEN_API_SECRET="privateKeyFromTheKrakenSettings"
|
||||
KRAKEN_API_FIAT="USD"
|
||||
KRAKEN_BUY_AMOUNT=21
|
||||
|
||||
# Optional settings for confirmation mail – requires `blitz.notify.sh on`
|
||||
# KRAKEN_MAIL_SUBJECT="Sats got stacked"
|
||||
# KRAKEN_MAIL_FROM_ADDRESS="humble@satstacker.org"
|
||||
# KRAKEN_MAIL_FROM_NAME="Humble Satstacker"
|
||||
|
||||
# Remove this line after verifying everything works
|
||||
KRAKEN_DRY_RUN_PLACE_NO_ORDER=1
|
||||
' > $configFile
|
||||
sudo mv $configFile $CONFIG_FILE
|
||||
fi
|
||||
|
||||
sudo chown $USERNAME:$USERNAME $CONFIG_FILE
|
||||
|
||||
# setup stacking script
|
||||
scriptFile="/home/admin/$SCRIPT_NAME"
|
||||
touch $scriptFile
|
||||
sudo chmod 700 $scriptFile || exit 1
|
||||
echo '#!/bin/bash
|
||||
set -e
|
||||
|
||||
# hide deprecation warning
|
||||
export NODE_OPTIONS="--no-deprecation"
|
||||
|
||||
# load config
|
||||
set -a; source /mnt/hdd/app-data/stacking-sats-kraken/.env; set +a
|
||||
|
||||
# run script
|
||||
cd ./stacking-sats-kraken
|
||||
if [[ "${KRAKEN_DRY_RUN_PLACE_NO_ORDER}" ]]; then
|
||||
result=$(node index.js --validate 2>&1)
|
||||
else
|
||||
result=$(node index.js 2>&1)
|
||||
fi
|
||||
echo "$result"
|
||||
|
||||
# send email
|
||||
if [[ "${KRAKEN_MAIL_SUBJECT}" && "${KRAKEN_MAIL_FROM_ADDRESS}" && "${KRAKEN_MAIL_FROM_NAME}" ]]; then
|
||||
/home/admin/config.scripts/blitz.notify.sh send "$result" \
|
||||
--subject "$KRAKEN_MAIL_SUBJECT" \
|
||||
--from-name "$KRAKEN_MAIL_FROM_NAME" \
|
||||
--from-address "$KRAKEN_MAIL_FROM_ADDRESS"
|
||||
fi
|
||||
' > $scriptFile
|
||||
|
||||
sudo mv $scriptFile $HOME_DIR/$SCRIPT_NAME
|
||||
sudo chown $USERNAME:$USERNAME $HOME_DIR/$SCRIPT_NAME
|
||||
|
||||
echo "OK - the STACKING-SATS-KRAKEN script is now installed."
|
||||
echo ""
|
||||
echo "Switch to the '$USERNAME' user and adapt the settings in $CONFIG_FILE"
|
||||
|
||||
# setting value in raspi blitz config
|
||||
grep -q '^stackingSatsKraken' $RASPIBLITZ_FILE && sudo sed -i "s/^stackingSatsKraken=.*/stackingSatsKraken=on/g" $RASPIBLITZ_FILE || echo 'stackingSatsKraken=on' >> $RASPIBLITZ_FILE
|
||||
else
|
||||
echo "STACKING-SATS-KRAKEN already installed."
|
||||
fi
|
||||
|
||||
cron_count=$(sudo -u $USERNAME crontab -l | grep "$SCRIPT_NAME" -c)
|
||||
if [ "${cron_count}" = "0" ]; then
|
||||
echo ""
|
||||
echo "You might want to set up a cronjob to run the script in regular intervals."
|
||||
echo "As the '$USERNAME' user you can run the 'crontab -e' command."
|
||||
echo ""
|
||||
echo "Here is an example for daily usage at 6:15am ..."
|
||||
echo ""
|
||||
echo "SHELL=/bin/bash"
|
||||
echo "PATH=/bin:/usr/sbin:/usr/bin:/usr/local/bin"
|
||||
echo "15 6 * * * $HOME_DIR/$SCRIPT_NAME > /dev/null 2>&1"
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# switch off
|
||||
if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
echo "*** UNINSTALL STACKING-SATS-KRAKEN ***"
|
||||
isInstalled=$(sudo ls $HOME_DIR 2>/dev/null | grep -c 'stacking-sats-kraken')
|
||||
|
||||
if [ ${isInstalled} -eq 1 ]; then
|
||||
echo "*** REMOVING STACKING-SATS-KRAKEN ***"
|
||||
|
||||
# setting value in raspi blitz config
|
||||
sudo sed -i "s/^stackingSatsKraken=.*/stackingSatsKraken=off/g" $RASPIBLITZ_FILE
|
||||
|
||||
# remove config
|
||||
sudo rm -rf $APP_DATA_DIR
|
||||
|
||||
# delete user and home directory
|
||||
sudo userdel -rf $USERNAME
|
||||
|
||||
echo "OK STACKING-SATS-KRAKEN removed."
|
||||
else
|
||||
echo "STACKING-SATS-KRAKEN is not installed."
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "FAIL - Unknown Parameter $1"
|
||||
exit 1
|
@ -84,6 +84,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo -u thunderhub git reset --hard v0.9.4
|
||||
echo "Running npm install and run build..."
|
||||
sudo -u thunderhub npm install
|
||||
if ! [ $? -eq 0 ]; then
|
||||
echo "FAIL - npm install did not run correctly, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo -u thunderhub npm run build
|
||||
|
||||
###############
|
||||
@ -293,6 +298,10 @@ if [ "$1" = "update" ]; then
|
||||
# install deps
|
||||
echo "Installing dependencies..."
|
||||
sudo -u thunderhub npm install --quiet
|
||||
if ! [ $? -eq 0 ]; then
|
||||
echo "FAIL - npm install did not run correctly, aborting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# build nextjs
|
||||
echo "Building application..."
|
||||
|
@ -24,7 +24,7 @@ if [ "$1" == "off" ]; then
|
||||
|
||||
# remove service paragraph
|
||||
sudo sed -i "/# Hidden Service for ${service}/,/^\s*$/{d}" /etc/tor/torrc
|
||||
# remove double lines
|
||||
# remove double empty lines
|
||||
awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc > .tmp && sudo mv .tmp /etc/tor/torrc
|
||||
|
||||
echo "# OK service is removed - restarting TOR ..."
|
||||
@ -76,8 +76,9 @@ if [ "${runBehindTor}" = "on" ]; then
|
||||
HiddenServiceDir /mnt/hdd/tor/$service
|
||||
HiddenServiceVersion 3
|
||||
HiddenServicePort $toPort 127.0.0.1:$fromPort" | sudo tee -a /etc/tor/torrc
|
||||
# remove double lines
|
||||
sudo awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc > /mnt/hdd/temp/tmp && sudo mv /mnt/hdd/temp/tmp /etc/tor/torrc
|
||||
|
||||
# remove double empty lines
|
||||
awk 'NF > 0 {blank=0} NF == 0 {blank++} blank < 2' /etc/tor/torrc | sudo tee /mnt/hdd/temp/tmp >/dev/null && sudo mv /mnt/hdd/temp/tmp /etc/tor/torrc
|
||||
|
||||
# check and insert second port pair
|
||||
if [ ${#toPort2} -gt 0 ]; then
|
||||
|
81
home.admin/config.scripts/internet.sh
Executable file
@ -0,0 +1,81 @@
|
||||
#!/bin/bash
|
||||
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
echo "# handle the internet connection"
|
||||
echo "# internet.sh status"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# FUNCTIONS
|
||||
|
||||
isValidIP() {
|
||||
if [ "$1" != "${1#*[0-9].[0-9]}" ]; then
|
||||
# IPv4
|
||||
echo 1
|
||||
elif [ "$1" != "${1#*:[0-9a-fA-F]}" ]; then
|
||||
# IPv6
|
||||
echo 1
|
||||
else
|
||||
# unkown
|
||||
echo 0
|
||||
fi
|
||||
}
|
||||
|
||||
# load local config (but should also work if not available)
|
||||
source /mnt/hdd/raspiblitz.conf 2>/dev/null
|
||||
|
||||
# get local IP (from different sources)
|
||||
localip_ALL=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '(*[eth|ens|enp|eno|wlan|wlp][0-9]$)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
if [ $(isValidIP ${localip_ALL}) -eq 0 ]; then
|
||||
localip_ALL=""
|
||||
fi
|
||||
localip_LAN=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '(*[eth][0-9]$)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
if [ $(isValidIP ${localip_LAN}) -eq 0 ]; then
|
||||
localip_LAN=""
|
||||
fi
|
||||
localip="${localip_ALL}"
|
||||
if [ ${#localip_LAN} -gt 0 ]; then
|
||||
# prefer local IP over LAN over all other if available
|
||||
localip="${localip_LAN}"
|
||||
fi
|
||||
|
||||
# check DHCP
|
||||
dhcp=1
|
||||
if [ "${localip:0:4}" = "169." ]; then
|
||||
dhcp=0
|
||||
fi
|
||||
|
||||
# check for internet connection
|
||||
online=0
|
||||
if [ ${#dnsServer} -gt 0 ]; then
|
||||
# re-test with other server
|
||||
online=$(ping ${dnsServer} -c 1 -W 2 | grep -c '1 received')
|
||||
fi
|
||||
if [ ${online} -eq 0 ]; then
|
||||
# re-test with other server
|
||||
online=$(ping 1.0.0.1 -c 1 -W 2 | grep -c '1 received')
|
||||
fi
|
||||
if [ ${online} -eq 0 ]; then
|
||||
# re-test with other server
|
||||
online=$(ping 8.8.8.8 -c 1 -W 2 | grep -c '1 received')
|
||||
fi
|
||||
if [ ${online} -eq 0 ]; then
|
||||
# re-test with other server
|
||||
online=$(ping 208.67.222.222 -c 1 -W 2 | grep -c '1 received')
|
||||
fi
|
||||
if [ ${online} -eq 0 ]; then
|
||||
# re-test with other server
|
||||
online=$(ping 1.1.1.1 -c 1 -W 2 | grep -c '1 received')
|
||||
fi
|
||||
|
||||
if [ "$1" == "status" ]; then
|
||||
|
||||
echo "localip=${localip}"
|
||||
echo "dhcp=${dhcp}"
|
||||
echo "online=${online}"
|
||||
exit 0
|
||||
|
||||
else
|
||||
echo "err='parameter not known - run with -help'"
|
||||
fi
|
75
home.admin/config.scripts/internet.wifi.sh
Executable file
@ -0,0 +1,75 @@
|
||||
#!/bin/bash
|
||||
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
echo "# handle the wifi"
|
||||
echo "# internet.wifi.sh status"
|
||||
echo "# internet.wifi.sh on SSID PASSWORD"
|
||||
echo "# internet.wifi.sh off"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wifiIsSet=$(sudo cat /etc/wpa_supplicant/wpa_supplicant.conf 2>/dev/null| grep -c "network=")
|
||||
wifiLocalIP=$(ip addr | grep 'state UP' -A2 | egrep -v 'docker0' | egrep -i '([wlan][0-9]$)' | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
connected=0
|
||||
if [ ${#wifiLocalIP} -gt 0 ]; then
|
||||
connected=1
|
||||
fi
|
||||
|
||||
if [ "$1" == "status" ]; then
|
||||
|
||||
echo "activated=${wifiIsSet}"
|
||||
echo "connected=${connected}"
|
||||
echo "localip='${wifiLocalIP}'"
|
||||
exit 0
|
||||
|
||||
elif [ "$1" == "on" ]; then
|
||||
|
||||
ssid="$2"
|
||||
password="$3"
|
||||
|
||||
if [ ${#ssid} -eq 0 ]; then
|
||||
echo "err='no ssid given'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ${#password} -eq 0 ]; then
|
||||
echo "err='no password given'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
wifiConfig="country=US
|
||||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||
update_config=1
|
||||
network={
|
||||
ssid=\"${ssid}\"
|
||||
scan_ssid=1
|
||||
psk=\"${password}\"
|
||||
key_mgmt=WPA-PSK
|
||||
}"
|
||||
echo "${wifiConfig}" > "/home/admin/wpa_supplicant.conf"
|
||||
sudo chown root:root /home/admin/wpa_supplicant.conf
|
||||
sudo mv /home/admin/wpa_supplicant.conf /boot/wpa_supplicant.conf
|
||||
sudo chmod 755 /boot/wpa_supplicant.conf
|
||||
|
||||
echo "# OK - reboot needed to activate new WIFI settings - use command: restart"
|
||||
exit 0
|
||||
|
||||
elif [ "$1" == "off" ]; then
|
||||
|
||||
wifiConfig="country=US
|
||||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||
update_config=1"
|
||||
echo "${wifiConfig}" > "/home/admin/wpa_supplicant.conf"
|
||||
sudo chown root:root /home/admin/wpa_supplicant.conf
|
||||
sudo mv /home/admin/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
sudo chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
sudo rm /boot/wpa_supplicant.conf 2>/dev/null
|
||||
sudo rm /mnt/hdd/app-data/wpa_supplicant.conf 2>/dev/null
|
||||
|
||||
echo "# OK - reboot needed to turn WIFI off - use command: restart"
|
||||
exit 0
|
||||
|
||||
else
|
||||
echo "err='parameter not known - run with -help'"
|
||||
fi
|
@ -48,7 +48,7 @@ Password C will be stored on the device.
|
||||
sleep 4
|
||||
error=""
|
||||
source <(sudo /home/admin/config.scripts/lnd.unlock.sh "$passwordC")
|
||||
if [ ${error} -gt 0 ];then
|
||||
if [ "${error}" != "" ];then
|
||||
echo "# PASSWORD C is wrong - try again or cancel"
|
||||
sleep 3
|
||||
sudo /home/admin/config.scripts/lnd.autounlock.sh on
|
||||
|
@ -3,7 +3,7 @@
|
||||
# command info
|
||||
if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
echo "tool to reset or sync credentials (e.g. macaroons)"
|
||||
echo "lnd.credentials.sh [reset|sync] [?tls|macaroons]"
|
||||
echo "lnd.credentials.sh [reset|sync|check] [?tls|macaroons|keepold]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -59,6 +59,23 @@ function copy_mac_set_perms() {
|
||||
sudo /bin/chmod --silent 640 /mnt/hdd/app-data/lnd/data/chain/"${n}"/"${c}"net/"${file_name}"
|
||||
}
|
||||
|
||||
function check_macaroons() {
|
||||
macaroons="admin.macaroon invoice.macaroon readonly.macaroon invoices.macaroon chainnotifier.macaroon signer.macaroon walletkit.macaroon router.macaroon"
|
||||
missing=0
|
||||
for macaroon in $macaroons
|
||||
do
|
||||
local file_name=${macaroon}
|
||||
local n=${1:-bitcoin} # the network (e.g. bitcoin or litecoin) defaults to bitcoin
|
||||
local c=${2:-main} # the chain (e.g. main, test, sim, reg) defaults to main (for mainnet)
|
||||
if [ ! -f /mnt/hdd/app-data/lnd/data/chain/"${n}"/"${c}"net/"${macaroon}" ]; then
|
||||
missing=$(($missing + 1))
|
||||
echo "# ${macaroon} is missing ($missing)"
|
||||
else
|
||||
echo "# ${macaroon} is present"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
###########################
|
||||
# RESET Macaroons and TLS
|
||||
###########################
|
||||
@ -78,18 +95,28 @@ if [ "$1" = "reset" ]; then
|
||||
resetMacaroons=0
|
||||
fi
|
||||
if [ "$2" == "macaroons" ]; then
|
||||
echo "# just resetting Macaroons"
|
||||
echo "# just resetting macaroons"
|
||||
resetTLS=0
|
||||
resetMacaroons=1
|
||||
keepOldMacaroons=0
|
||||
fi
|
||||
|
||||
if [ "$2" == "keepold" ]; then
|
||||
echo "# add the missing default macaroons without deauthenticating the old ones"
|
||||
resetTLS=0
|
||||
resetMacaroons=1
|
||||
keepOldMacaroons=1
|
||||
fi
|
||||
|
||||
|
||||
if [ ${resetMacaroons} -eq 1 ]; then
|
||||
echo "## Resetting Macaroons"
|
||||
echo "# all your macaroons get deleted and recreated"
|
||||
cd || exit
|
||||
sudo find /mnt/hdd/app-data/lnd/data/chain/"${network}"/"${chain}"net/ -iname '*.macaroon' -delete
|
||||
sudo find /home/bitcoin/.lnd/data/chain/"${network}"/"${chain}"net/ -iname '*.macaroon' -delete
|
||||
sudo rm /home/bitcoin/.lnd/data/chain/"${network}"/"${chain}"net/macaroons.db
|
||||
if [ ${keepOldMacaroons} -eq 0 ]; then
|
||||
sudo rm /home/bitcoin/.lnd/data/chain/"${network}"/"${chain}"net/macaroons.db
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${resetTLS} -eq 1 ]; then
|
||||
@ -126,10 +153,25 @@ elif [ "$1" = "sync" ]; then
|
||||
echo "# make sure LND app-data directories exist"
|
||||
sudo /bin/mkdir --mode 0755 --parents /mnt/hdd/app-data/lnd/data/chain/"${network}"/"${chain}"net/
|
||||
|
||||
echo `# make sure all user groups exit for default macaroons`
|
||||
sudo /usr/sbin/groupadd --force --gid 9700 lndadmin
|
||||
sudo /usr/sbin/groupadd --force --gid 9701 lndinvoice
|
||||
sudo /usr/sbin/groupadd --force --gid 9702 lndreadonly
|
||||
sudo /usr/sbin/groupadd --force --gid 9703 lndinvoices
|
||||
sudo /usr/sbin/groupadd --force --gid 9704 lndchainnotifier
|
||||
sudo /usr/sbin/groupadd --force --gid 9705 lndsigner
|
||||
sudo /usr/sbin/groupadd --force --gid 9706 lndwalletkit
|
||||
sudo /usr/sbin/groupadd --force --gid 9707 lndrouter
|
||||
|
||||
echo "# copy macaroons to central app-data directory and ensure unix ownerships and permissions"
|
||||
copy_mac_set_perms admin.macaroon lndadmin "${network}" "${chain}"
|
||||
copy_mac_set_perms invoice.macaroon lndinvoice "${network}" "${chain}"
|
||||
copy_mac_set_perms readonly.macaroon lndreadonly "${network}" "${chain}"
|
||||
copy_mac_set_perms invoices.macaroon lndinvoices "${network}" "${chain}"
|
||||
copy_mac_set_perms chainnotifier.macaroon lndchainnotifier "${network}" "${chain}"
|
||||
copy_mac_set_perms signer.macaroon lndsigner "${network}" "${chain}"
|
||||
copy_mac_set_perms walletkit.macaroon lndwalletkit "${network}" "${chain}"
|
||||
copy_mac_set_perms router.macaroon lndrouter "${network}" "${chain}"
|
||||
|
||||
echo "# make sure admin has a symlink at ~/.lnd to /mnt/hdd/app-data/lnd/"
|
||||
if ! [[ -L "/home/admin/.lnd" ]]; then
|
||||
@ -167,6 +209,15 @@ elif [ "$1" = "sync" ]; then
|
||||
sudo -u admin /home/admin/config.scripts/bonus.lnbits.sh write-macaroons
|
||||
fi
|
||||
|
||||
###########################
|
||||
# Check Macaroons and fix missing
|
||||
###########################
|
||||
elif [ "$1" = "check" ]; then
|
||||
check_macaroons ${network} ${chain}
|
||||
if [ $missing -gt 0 ]; then
|
||||
/home/admin/config.scrips/lnd.creds.sh reset keepold
|
||||
fi
|
||||
|
||||
###########################
|
||||
# UNKNOWN
|
||||
###########################
|
||||
|
@ -81,16 +81,10 @@ elif [ "${exportType}" = "scp" ]; then
|
||||
echo "Copy, paste and execute these commands in your client terminal to download the files."
|
||||
echo "The password needed during download is your Password A."
|
||||
echo ""
|
||||
echo "admin.macaroon:"
|
||||
echo "scp bitcoin@${local_ip}:/home/bitcoin/.lnd/data/chain/${network}/${chain}net/admin.macaroon ./"
|
||||
echo "Macaroons:"
|
||||
echo "scp bitcoin@${local_ip}:/home/bitcoin/.lnd/data/chain/${network}/${chain}net/\*.macaroon ./"
|
||||
echo ""
|
||||
echo "invoice.macaroon:"
|
||||
echo "scp bitcoin@${local_ip}:/home/bitcoin/.lnd/data/chain/${network}/${chain}net/invoice.macaroon ./"
|
||||
echo ""
|
||||
echo "readonly.macaroon:"
|
||||
echo "scp bitcoin@${local_ip}:/home/bitcoin/.lnd/data/chain/${network}/${chain}net/readonly.macaroon ./"
|
||||
echo ""
|
||||
echo "tls.cert:"
|
||||
echo "TLS Certificate:"
|
||||
echo "scp bitcoin@${local_ip}:/home/bitcoin/.lnd/tls.cert ./"
|
||||
echo ""
|
||||
|
||||
|
@ -15,12 +15,12 @@ passwordC="$1"
|
||||
# check if wallet is already unlocked
|
||||
echo "# checking LND wallet ... (can take some time)"
|
||||
walletLocked=$(sudo -u bitcoin /usr/local/bin/lncli --chain=${network} --network=${chain}net getinfo 2>&1 | grep -c unlock)
|
||||
if [ ${walletLocked} -eq 0 ]; then
|
||||
macaroonsMissing=$(sudo -u bitcoin /usr/local/bin/lncli --chain=${network} --network=${chain}net getinfo 2>&1 | grep -c "unable to read macaroon")
|
||||
if [ ${walletLocked} -eq 0 ] && [ ${macaroonsMissing} -eq 0 ]; then
|
||||
echo "# OK LND wallet was already unlocked"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# check if LND is below 0.10 (has no STDIN password option)
|
||||
fallback=0
|
||||
source <(/home/admin/config.scripts/lnd.update.sh info)
|
||||
@ -58,7 +58,7 @@ while [ ${fallback} -eq 0 ]
|
||||
|
||||
loopCount=$(($loopCount +1))
|
||||
echo "# calling: lncli unlock"
|
||||
result=$(echo "$passwordC" | sudo -u bitcoin lncli --chain=${network} --network=${chain}net unlock --recovery_window=5000 --stdin 2>&1)
|
||||
result=$(echo "$passwordC" | sudo -u bitcoin lncli --chain=${network} --network=${chain}net unlock --recovery_window=1000 --stdin 2>&1)
|
||||
wasUnlocked=$(echo "${result}" | grep -c 'successfully unlocked')
|
||||
wrongPassword=$(echo "${result}" | grep -c 'invalid passphrase')
|
||||
if [ ${wasUnlocked} -gt 0 ]; then
|
||||
@ -116,7 +116,7 @@ do
|
||||
echo "############################"
|
||||
echo "Calling: lncli unlock"
|
||||
echo "Please re-enter Password C:"
|
||||
lncli --chain=${network} --network=${chain}net unlock --recovery_window=5000
|
||||
lncli --chain=${network} --network=${chain}net unlock --recovery_window=1000
|
||||
|
||||
# test unlock
|
||||
walletLocked=$(sudo -u bitcoin /usr/local/bin/lncli getinfo 2>&1 | grep -c unlock)
|
||||
|
@ -102,6 +102,7 @@ if [ "$1" = "delete" ]; then
|
||||
sudo sed -i "s/^txindex=.*/txindex=0/g" /mnt/hdd/${network}/${network}.conf
|
||||
echo "# deleting tx index ..."
|
||||
sudo rm -r /mnt/hdd/${network}/indexes/txindex
|
||||
echo "# restarting bitcoind ..."
|
||||
sudo systemctl restart ${network}d
|
||||
exit 0
|
||||
fi
|
||||
|
Before Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 106 KiB After Width: | Height: | Size: 470 KiB |
BIN
pictures/services.png
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
pictures/settings.png
Normal file
After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
BIN
pictures/subscriptions.png
Normal file
After Width: | Height: | Size: 20 KiB |