HODLmeTight 🚀 Profile picture
Feb 8 21 tweets 10 min read
So the #Lightning node migration concluded. Well, almost - it's a bit like when you're building a house. You never get finished. But critical and some good-to-have things are done.
Here I am sharing some details and approaches I have taken, so you can lean on if you want
Objective: Moving off my 8GB RaspiPi running with @getumbrel to better hardware and barebone node with Bitcoin and Lightning compiled myself.
If you really want to understand what's going on, need to get your hands dirty
Hardware Specs:
Intel NUC Barebone NUC11TNHi5 Tiger Canyon i5 NUC Kit Tall
2 x 250gb NVM
- 250GB Samsung 980 Pro M.2 PCIe 4.0 3D-NAND TLC
- soon complemented with another B-bay 250GB SSD
- 1TB Crucial MX500 2.5" (6.4cm) SATA 6Gb/s 3D-NAND TLC
- 16GB (1x 16GB) Crucial DDR4-3200
OS
Debian 11 Bullseye amd64 architecture is for both Intel and AMD 64 bit CPUs
Installed on SSD with LVM to easily move sizes b/w partitions. Partition 90% to root, so #Bitcoin Blockchain has enough space, and /homes get most of the rest
Filesystem
LVM for easier resizing the partitions
Big SSD for Bitcoin Blockchain
NVM for LND and other stuff, potentially replicated later on. NVMEs have the benefit of being hellfast. Hope to improve graph analytics, routing and channel.db compacting
45drives.com/community/arti…
With another SSD, I hope to get Raid 1 for desaster recover for the NVM. Drawback, it'll slow it down to the slowest of the 2 components. Dig in deeper here
Linux Raid: linuxbabe.com/linux-server/l…
ZFS: howtoforge.com/tutorial/how-t… & linuxhint.com/install-zfs-de…
Parkinglot, what I have not looked into yet:
- intel vmd controller, RAID Option coming with the Intel processing architecture. Not familiar enough, need to spend more time
- raspibolt.org/privacy.html#s…. Don't need SSH remote, since I like things tight and secure, only LAN access
Guides to follow install instructions. Especially focus on separate users for main services: Bitcoin, LND, Mempool, Thunderhub, BOS, all have their own user, home and tight permissioning. Keep things clean
github.com/alexbosworth/r…
raspibolt.org
medium.com/@stadicus/perf…
For compiling LND / Bitcoin, I've followed @alexbosworth guides github.com/alexbosworth/r… since raspibolt is not for NUC, but for Raspi ARM Linux (tgz). If you have another node already, grab the Blockchain via rsync or bitcoin-cli --add-node to speed things up
@alexbosworth Aliases
Being comfy with the command-line is key. Here are some helpers to sustain good operational overview
#
alias dfh='df -hal | grep G | head -10'
alias gitcommit='git commit -S -m'
alias tmuxr='tmux attach-session -t rebalancer'
alias pythonx='source venv/bin/activate'
#Monitoring
alias temp='watch sensors'
alias llog='sudo journalctl -f -u lnd'
alias blog='sudo journalctl -f -u bitcoin'
alias listchannels='lndmanage listchannels rebalance'
alias listchannelsub='lndmanage listchannels rebalance --unbalancedness'
My NUC is in a 19" Rack System with active cooling. However, NUCs especially with Intel on Turbo Mode (Bios) can get noisy. Keep an eye on your system temperature via command-line:
Debug / Aliases
alias temperature ostechnix.com/view-cpu-tempe…
UPS
You want your node to keep running in case of power interrupts, cause your channel.db is fragile. I got the
Eaton Ellipse ECO 650 USB connected to another raspi acting as NUT server melgrubb.com/2016/12/11/rph…
☝️So the NUC just had to be added as a client
Web
Blockexplorer instead of Mempool, couldn't figure out how to configure mempool to use bitcoin/.cookie for authentication, preferred over setting an rpc-user into bitcoin.conf. raspibolt.org/btcrpcexplorer…
Thunderhub docs.thunderhub.io/installation/
LNDG as manual install github.com/cryptosharks13… via manage.py. ToDo: nginx webserver
LNbits for tipping, multi-wallet account management
github.com/lnbits/lnbits-… via reverse-proxy and duckdns.org subdomain
LNDhub help.bluewallet.io/en/articles/28…
BTC-Pay only low in priority, since I'm not a merchant, but like digging into it to help merchants who want to get onto lightning
CLI
BOS - for balanced and multi-open channels, swaps and TG Bot connection raspibolt.org/bonus/lightnin…. Connected to TG via torrify to hide my clearnet IP from TG.
charge-lnd with custom macaroon as cron-job hourly github.com/accumulator/ch…
github.com/blckbx/mybosbo… for lndrevenue summary and connection details.
github.com/bitromortac/ln… to get deeper analysis on channel flows, identify channels which are barely routing (listchannels hygiene) and other data insights
github.com/edouardparis/l… like top, but for LN
Apps
LNMarkets - pulled most sats, but might migrate with the existing UID, need to get LN-URL running, still throws errors.
LNBits moved existing SQL-lite db, updated NGINX confs and router port-forwarding: DONE
BlueWallet attach from Umbrel LN / Electr to new server
Got the hybrid setup for Clearnet and Tor implemented github.com/blckbx/lnd-hyb… - fired up LND and with sweaty palms watched that baby just running was a relieving and blissful experience.
That was a quick summary of my journey, hopefully there are one or two things you can take on for your own journey. It's certainly worth it.
Thanks for baring with me, here you have a flash as a thank you:

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with HODLmeTight 🚀

HODLmeTight 🚀 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

:(