example: https://www.thunderhub.io/
https://github.com/apotdevin/thunderhub
use lnd v0.10.0 for full compatibility
https://github.com/rootzoll/raspiblitz/blob/v1.6/home.admin/config.scripts/bonus.thunderhub.sh
usage:
# update NodeJS
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/v1.6/home.admin/config.scripts/bonus.nodejs.sh
bash bonus.nodejs.sh off
bash bonus.nodejs.sh on
# download thunderhub install script
wget https://raw.githubusercontent.com/rootzoll/raspiblitz/v1.6/home.admin/config.scripts/bonus.thunderhub.sh
# run
bash bonus.thunderhub.sh on
# Preparations
# check and install NodeJS
/home/admin/config.scripts/bonus.nodejs.sh
# open the firewall for the chosen port (here: 3010)
# set any free port (the default port: 3000 is reserved for RTL)
# fill in the approrpriate local subnet (here: 192.168.0.0/16)
sudo ufw allow from 192.168.0.0/16 to any port 3010 comment 'allow ThunderHub on LAN'
# create a dedicated Hidden Service (if Tor is on)):
/home/admin/config.scripts/internet.hiddenservice.sh thunderhub 80 3010
# create thunderhub user
sudo adduser --disabled-password --gecos "" thunderhub
# change to thunderhub user
sudo su - thunderhub
git clone https://github.com/apotdevin/thunderhub.git
cd thunderhub
npm install
npm run build
# run this in Tmux if you want to keep it running after closing the terminal
npm run start -- -p 3010
Connect to RASPIBLITZ_IP:3010
or to the TOR_HIDDEN_SERVICE.onion
in the Tor Browser.
Copy the HEX macaroon and TLS.cert from the menu: LNDCREDS
-> EXPORT
-> HEX
Use localhost
or the LAN_IP
and the GRPC port 10009.
Afterwards use the command to run (in Tmux if you want to keep it running after closing the terminal):
sudo su - thunderhub
cd thunderhub
npm run start:compatible -- -p 3010
sudo userdel -rf thunderhub
with the RaspiBlitz install script:
bash bonus.thunderhub.sh update
Manual:
sudo systemctl stop thunderhub
sudo su - thunderhub
cd thunderhub
git pull
npm install
npm run build
exit
sudo systemctl start thunderhub
nano /home/thunderhub/thunderhub/.env
# -----------
# Server Configs
# -----------
LOG_LEVEL='debug'
# HODL_KEY='HODL_HODL_API_KEY'
# BASE_PATH='/basePath'
# -----------
# Interface Configs
# -----------
THEME='dark'
# CURRENCY='sat'
# FETCH_PRICES=false
# FETCH_FEES=false
# -----------
# Account Configs
# -----------
ACCOUNT_CONFIG_PATH='/home/thunderhub/thubConfig.yaml'
#COOKIE_PATH='/home/thunderhub/.cookie'
#SSO_SERVER_URL='127.0.0.1:10009'
#SSO_CERT_PATH='/home/thunderhub/.lnd/tls.cert'
#SSO_MACAROON_PATH='/home/thunderhub/.lnd/data/chain/bitcoin/mainnet/'
nano /home/thunderhub/thubConfig.yaml
masterPassword: 'PASSWORD' # Default password unless defined in account
accounts:
- name: 'blitz'
serverUrl: '127.0.0.1:10009'
macaroonPath: '/home/thunderhub/.lnd/data/chain/bitcoin/mainnet/admin.macaroon'
certificatePath: '/home/thunderhub/.lnd/tls.cert'
#password: 'accountpassword'
(can copy-paste the whole script)
# install service
echo "*** Install ThundeHub systemd for ${network} on ${chain} ***"
cat > /home/admin/thunderhub.service <<EOF
# Systemd unit for thunderhub
# /etc/systemd/system/thunderhub.service
[Unit]
Description=ThunderHub daemon
Wants=lnd.service
After=lnd.service
[Service]
WorkingDirectory=/home/thunderhub/thunderhub
ExecStart=/usr/bin/npm run start -- -p 3010
User=thunderhub
Restart=always
TimeoutSec=120
RestartSec=30
StandardOutput=null
StandardError=journal
[Install]
WantedBy=multi-user.target
EOF
sudo mv /home/admin/thunderhub.service /etc/systemd/system/thunderhub.service
sudo chown root:root /etc/systemd/system/thunderhub.service
sudo systemctl enable thunderhub
echo "OK - the ThunderHub service is now enabled"
sudo systemctl start thunderhub
Updated and removed some dependencies. The npm audit vulnerabilities is now less.
The
High
andModerate
dependencies as shown below can be safely ignored as shown in this thread: airbnb/babel-plugin-inline-react-svg#59The remaining vulnerabilities should all be
Low
.Will try to keep them as reduced as possible, but there's only so much I can do with external dependencies