Title: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on February 16, 2018, 07:32:05 PM Hi experts,
I don't know if this is the right place to ask, but I'd like to start to play with Lightning network, but want to start small. I've found this https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md (https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md) on github, and I've made my first step, I've ordered the Raspberry Pi 3B. I've found some threads about Raspberry Pi but it's usually about running some nodes (bitcoin, other alts) on PI but not about LN. Do you have any experience with the LN node on the PI? I'm not afraid of linux or anything, just wanted to ask in advance before the PI arrives, what to download, where to search for some info (I can use google, but this is something specific.) Thanks in advance! Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: nitrousteam on February 16, 2018, 11:13:01 PM Credit for tutorial goes to Stadicus:
https://medium.com/@stadicus/noobs-guide-to-%EF%B8%8F-lightning%EF%B8%8F-on-a-raspberry-pi-f0ab7525586e Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on February 17, 2018, 08:27:44 AM Credit for tutorial goes to Stadicus: Thanks, I haven't found this one yet. https://medium.com/@stadicus/noobs-guide-to-%EF%B8%8F-lightning%EF%B8%8F-on-a-raspberry-pi-f0ab7525586e I have read it thru quickly, it uses the eclair version of lightning hub, the one I put it into the OP was referring to lnd which is a different build, according to my understanding, they are totally different. I'll search for the differences, surely there's somewhere a comparison about the different LN nodes (there's 3 kind of LN nodes as I saw somewhere). Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on February 23, 2018, 09:40:48 PM Status update:
I've received the Raspberry PI, I've managed to set it up, so it's working, but there's nothing installed yet in connection with bitcoin. I've used this install guide, it was really straightforward and was easy to follow. https://medium.com/@stadicus/noobs-guide-to-️-lightning️-on-a-raspberry-pi-f0ab7525586e (https://medium.com/@stadicus/noobs-guide-to-️-lightning️-on-a-raspberry-pi-f0ab7525586e) What I'm reading now is a so called neutrino light client which is not a full node but something like a pruned one without the full blockchain, it connects to other nodes to gather the necessary information about blockchain. If I use this, the 16Gb SD card in the Raspberry PI will be enough to run a bitcoin node with LN hub installed. (I understand that running a full node will be necessary in the future, but now I would like to test only, so it's enough for that purpose.) Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on February 24, 2018, 09:21:15 PM Next status update:
I've just managed to set up the Raspberry PI 3 with a working minimal OS, but nothing installed which is connected with bitcoin. Now I've decided to run a neutrino lightweight node to let the lnd connect to it because it doesn't require a full node running locally. So I was about to install the lnd on the raspberry but failed with the GO language, which is a must to have lnd installed. I was following this guide: https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md (https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md) When I started to intall GO: Code: sudo apt-get install golang-1.10-go Code: Reading package lists... Done So I was about to install the 1.8 GO but no success: Code: sudo apt-get install golang-1.8-go Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bob123 on February 25, 2018, 01:46:35 PM Code: sudo apt-get install golang-1.10-go Code: Reading package lists... Done So I was about to install the 1.8 GO but no success: Code: sudo apt-get install golang-1.8-go You might try to add this repository and install 1.8 or 1.9: Code: $ sudo add-apt-repository ppa:gophers/archive If apt-get won't find your desired version you might consider downloading it directly from https://golang.org/dl/ (https://golang.org/dl/) Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on February 25, 2018, 02:22:19 PM Thanks bob123, the direct download worked at the end:
So I've just managed to install the necessary GO languange on the Raspberry PI, using these guides (had to combine them to get it to work, but at last it works...) https://tecadmin.net/install-go-on-debian/# https://stackoverflow.com/questions/48348262/install-go-golang-on-raspbian To make it easier for you, here are the steps: 1) Code: sudo apt-get update Code: wget https://dl.google.com/go/go1.10.linux-armv6l.tar.gz make sure you download the arm version for the Raspberry 3) install an old version of GO Code: sudo apt-get install golang this will install the 1.7 version, which is not good for us yet 4) Uncompress the previously downloaded 1.10 version into your (pi) home directory Code: sudo tar -C /home/pi -xzf go1.10.linux-armv6l.tar.gz 5) remove the old golang installation Code: sudo apt remove golang remove the other unnecessary stuff after removing the old golang Code: sudo apt-get autoremove 6) edit your .profile insert these lines to let the system found your go language installation Code: export GOROOT=/home/pi/go 7) log out and log in again check the version and the environment of your installed GO, should look like this: Code: go version Code: go env That's all :) Now moving towards to lnd installation... Just another tip: If you're on a fresh installation of Raspbian, you won't have the 'git' to use the golang's built-in downloader part, to be able to install Glide, which is also necessary. So to get this command working: Code: go get -u github.com/Masterminds/glide you will need this: Code: sudo apt-get install git After this, you can start downloading Glide with the above mentioned command When it's done, you'll find Glide in the GOPATH/bin Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on March 04, 2018, 11:03:13 PM Briefing the last steps I've just managed to take:
using this website: http://dev.lightning.community/guides/installation/ (http://dev.lightning.community/guides/installation/) I've managed to install lnd and btcd (roasbeef's edition) Installing lnd: Using the few commands on the website, the lnd installation was successfull (be aware that the testing of the installation took ~30 minutes, just take this into consideration if you're in a hurry while installing) Installing btcd It was also really simple, using the command on the above mentioned websites. Next steps: Starting the installed things, especially figuring out how to create a wallet on the PI, stay tuned :) Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on March 17, 2018, 12:45:18 PM The Lightning network has moved to beta, so now it's possible to officially do testing on the mainnet. Until now, most of the mainnet testing was done without support from the developers, I hope that from now on the support will help the testers.
In connection with the thread, we need to upgrade the lnd because the changes compared to the previous version are not backward compatible because of the new beta version. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: nicosey on March 17, 2018, 08:46:00 PM Does it have to be a full node?
Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on March 18, 2018, 12:28:39 AM Does it have to be a full node? No, my idea is to have a so called neutrino version of the lnd. This means that it only takes 200-300 MegaBytes, because it's a kind of pruned node, so it doesn't download and keep the whole blockchain on site (and does not use 200-400 GigaBytes like a full node) but it connects to some full nodes on the network. For testing purposes, it's fine for me, if I'll take it more seriously in the future, I just attach a USB external drive with a 500Gb HDD and it can act as a full node with the full blockchain on the HDD. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: delpiero10 on March 18, 2018, 12:17:01 PM Does it have to be a full node? No, my idea is to have a so called neutrino version of the lnd. This means that it only takes 200-300 MegaBytes, because it's a kind of pruned node, so it doesn't download and keep the whole blockchain on site (and does not use 200-400 GigaBytes like a full node) but it connects to some full nodes on the network. For testing purposes, it's fine for me, if I'll take it more seriously in the future, I just attach a USB external drive with a 500Gb HDD and it can act as a full node with the full blockchain on the HDD. I'm running lightningd instead of lnd but my configuration is very similar: rasperry pi 3 + external HDD for full blockchain. Everything works fine so far. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: Rath_ on March 18, 2018, 05:46:28 PM I'm running lightningd instead of lnd but my configuration is very similar: rasperry pi 3 + external HDD for full blockchain. Everything works fine so far. Could you tell me what is the CPU and RAM usage when everything you need to run a full node is turned on? Can you still use the device for browsing the Internet while everything is running in the background? I was thinking of buying the latest Raspberry Pi 3B+ but I would to know more before doing so. I don't really need a full node since I use a hardware wallet but I would like to support Bitcoin network and try running a Lightning Network node on the mainnet. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: delpiero10 on March 18, 2018, 06:15:47 PM I'm running lightningd instead of lnd but my configuration is very similar: rasperry pi 3 + external HDD for full blockchain. Everything works fine so far. Could you tell me what is the CPU and RAM usage when everything you need to run a full node is turned on? Can you still use the device for browsing the Internet while everything is running in the background? I was thinking of buying the latest Raspberry Pi 3B+ but I would to know more before doing so. I don't really need a full node since I use a hardware wallet but I would like to support Bitcoin network and try running a Lightning Network node on the mainnet. https://i.imgur.com/jvJJ4If.png I'm running my raspberry in CLI mode and using it only as btc/ln node so I didn't try to browse the internet. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on March 30, 2018, 08:31:15 PM Because of the new beta version of LND, I've deleted the previously installed LND and BTCD from the PI and started from scratch. I would like to start a neutrino version of the LND, so according to my current understanding, BTCD is not necessary at all, but I'm not 100% sure yet. This can change in the future as I move forward with testing this thing.
Hint: if you want to start to risk your coins on the main net, you should modify the config.go file in the src directory: Code: if cfg.Bitcoin.Node == "neutrino" && cfg.Bitcoin.MainNet { After saving the config.go file, I have installed the new LND again (the process is the same as above, it just installs the new version). Now I'm having issues with starting the LND, if I manage to start it (asking for wallet password), I'll post it here. Code: 2018-03-30 22:16:18.654 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create wallet, or `lncli unlock` to unlock already created wallet. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: delpiero10 on March 31, 2018, 05:01:19 AM Because of the new beta version of LND, I've deleted the previously installed LND and BTCD from the PI and started from scratch. I would like to start a neutrino version of the LND, so according to my current understanding, BTCD is not necessary at all, but I'm not 100% sure yet. This can change in the future as I move forward with testing this thing. Hint: if you want to start to risk your coins on the main net, you should modify the config.go file in the src directory: Code: if cfg.Bitcoin.Node == "neutrino" && cfg.Bitcoin.MainNet { After saving the config.go file, I have installed the new LND again (the process is the same as above, it just installs the new version). Now I'm having issues with starting the LND, if I manage to start it (asking for wallet password), I'll post it here. Code: 2018-03-30 22:16:18.654 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create wallet, or `lncli unlock` to unlock already created wallet. did you run lncli create/unlock without errors? Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on March 31, 2018, 08:07:30 AM ... Now I'm having issues with starting the LND, if I manage to start it (asking for wallet password), I'll post it here. Code: 2018-03-30 22:16:18.654 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create wallet, or `lncli unlock` to unlock already created wallet. did you run lncli create/unlock without errors? Now I'm waiting for lnd to find some proper nodes, but it's struggling to find any. Maybe it's because of the beta upgrade, nodes needs to upgrade before they will be able to serve neutrino type nodes, so I'm trying to start it periodically, and also checking github, e.g.: https://github.com/lightninglabs/lightning-app/issues/26 (https://github.com/lightninglabs/lightning-app/issues/26) Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: GameBitCEO on April 01, 2018, 10:17:33 PM Really interested in that topic. Thanks for your replies
Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on April 11, 2018, 10:11:10 PM So, lnd has been updated again, it's 0.4.1 now, so I thought why not to update on the PI too...
I'm writing this post because the update was not as easy as 1-2-3 (OK, maybe just for me, but anyway) So I've logged in to the PI, and changed the working directory to the lnd source: Code: cd $GOPATH/src/github.com/lightningnetwork/lnd Code: pi@Lightning1:~/projects/src/github.com/lightningnetwork/lnd $ git pull remote: Counting objects: 4, done. After heavy googling, I've found the solution here: https://techsparx.com/software-development/git/reset-local-changes.html (https://techsparx.com/software-development/git/reset-local-changes.html) So I have used this: Code: git reset --hard Code: git pull My problem is that my lnd neutrino node can't find any node to connect to, so I'm still struggling with it, but somehow sometime I'll get it working... Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: delpiero10 on April 12, 2018, 05:23:06 PM Quote My problem is that my lnd neutrino node can't find any node to connect to, so I'm still struggling with it, but somehow sometime I'll get it working... Can you upload log file? Is there any error? Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on April 12, 2018, 05:40:57 PM Quote My problem is that my lnd neutrino node can't find any node to connect to, so I'm still struggling with it, but somehow sometime I'll get it working... Can you upload log file? Is there any error? There's no particular error, it just doesn't find a node to connect to. I have several things that seem suspicious in the log, first one is a DNS problem (or something in connection with DNS (what can be the :53: after the router's IP address...) Code: 2018-04-11 23:59:53.598 [INF] CMGR: DNS discovery failed on seed x49.dnsseed.bluematt.me: lookup x49.dnsseed.bluematt.me on 192.168.1.254:53: no such host The log: Code: lnd –bitcoin.active –bitcoin.mainnet –debuglevel=debug –bitcoin.node=neutrino --noencryptwallet Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: delpiero10 on April 12, 2018, 08:11:02 PM one more question... did you modify the config.go file again after git reset? You have mentioned that this change is needed to run a neutrino version:
Code: if cfg.Bitcoin.Node == "neutrino" && cfg.Bitcoin.MainNet { Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on April 12, 2018, 09:07:19 PM one more question... did you modify the config.go file again after git reset? You have mentioned that this change is needed to run a neutrino version: Thanks for pointing me to the right direction, I haven't modified the file, and as I've checked the log I've posted in the last post, I've realized that I've forgot to run the Code: if cfg.Bitcoin.Node == "neutrino" && cfg.Bitcoin.MainNet { Code: make && make install I've quickly run the install, and now the version of the lnd is really 0.4.1, but the problem remains the same. I'm looking into the DNS things maybe I can find something with google... Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on May 02, 2018, 08:04:24 PM So, I had enough trying to locate a working neutrino compatible node for the LN mainnet (I don't want to run a full node on the raspberry PI, because this is the point of the neutrino node).
So I switched to testnet and voilá... Code: lnd –bitcoin.active –bitcoin.testnet –debuglevel=debug –bitcoin.node=neutrino --noencryptwallet --neutrino.connect=faucet.lightning.community So I'll start now with testnet and later on with the mainnet... Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: vlom on May 02, 2018, 08:11:53 PM really nice. thank you for sharing all this. as soon as i find the time i will try it too. i have an unused pi waiting to be connected. btw: which post should I merit... :P
btw: a first question. i once had a core node running. but the pi was so slow and it wasent able to be up to date with the chain. do you have this problem too? Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on May 02, 2018, 08:39:17 PM really nice. thank you for sharing all this. as soon as i find the time i will try it too. i have an unused pi waiting to be connected. btw: which post should I merit... :P Thanks :) Of course, all of them :Pbtw: a first question. i once had a core node running. but the pi was so slow and it wasent able to be up to date with the chain. do you have this problem too? So you mean you have started to run a full node on the pi, let it download the whole chain and sync it afterwards? It takes week or so, because of the size of the blockchain and the realatively slow processor of the PI.Usually the solution is to run first a full node on a windows/linux PC (with a powerful processor) and let it download and sync the blockchain to an external USB connected HDD. As soon as it has finished the sync (takes days, still) you can detach the HDD and attach it to the PI and voilá, the PI has to do nothing but continue to sync the daily changes which it can handle more easily. If you have an older PI, with a slower processor, search for the model if it worths the effort to try to build it, because of the minimal speed requirements. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: delpiero10 on May 11, 2018, 08:49:47 PM really nice. thank you for sharing all this. as soon as i find the time i will try it too. i have an unused pi waiting to be connected. btw: which post should I merit... :P btw: a first question. i once had a core node running. but the pi was so slow and it wasent able to be up to date with the chain. do you have this problem too? If you are talking about pi performance(not slow downloading speed) you can run raspberry in cli mode(without GUI). You can find it in raspi-config. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on August 02, 2018, 05:30:57 PM Just managed to spend a little time with the Raspberry PI LN hub project again, it's not easy to deal with things like this, if you have no freetime :)
First thing is to update the lnd itself, there's a new version out there, so I need to update it, preferably via git, hope it will be an easy go... I'll be back... Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: Rath_ on August 02, 2018, 05:53:42 PM Just managed to spend a little time with the Raspberry PI LN hub project again, it's not easy to deal with things like this, if you have no freetime :) First thing is to update the lnd itself, there's a new version out there, so I need to update it, preferably via git, hope it will be an easy go... I'll be back... Did you consider running RaspiBlitz (https://github.com/rootzoll/raspiblitz)? The whole setup process is fairly easy and it shouldn't take you too much time. Check out the readme file for detailed documentation. It is worth mentioning that this project supports LCD displays so that you can easily view the most important information any time you want. Take a look at some questions regarding running a Lightning Network node here (https://bitcointalk.org/index.php?topic=4792622.msg43243696#post_point2). Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on August 03, 2018, 07:45:02 PM Just managed to spend a little time with the Raspberry PI LN hub project again, it's not easy to deal with things like this, if you have no freetime :) First thing is to update the lnd itself, there's a new version out there, so I need to update it, preferably via git, hope it will be an easy go... I'll be back... Did you consider running RaspiBlitz (https://github.com/rootzoll/raspiblitz)? The whole setup process is fairly easy and it shouldn't take you too much time. Check out the readme file for detailed documentation. It is worth mentioning that this project supports LCD displays so that you can easily view the most important information any time you want. Take a look at some questions regarding running a Lightning Network node here (https://bitcointalk.org/index.php?topic=4792622.msg43243696#post_point2). The only (but very important) difference for me that it uses a full blockchain on an external HDD instead of the "light" version (neutrino node), which don't require a full blockchain available locally (uses a trusted node for the blockchain data), which could be really handy if you already have a full node locally and you want to play only with LN on your Raspberry PI. So I'll give it a try as soon as I give up this neutrino thing :) Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: TheBeardedBaby on October 01, 2018, 11:48:06 AM How is going with your project?
I'm considering order a RB Pi3B+ with a SATA module to hook up one HDD for a full node + LN. Never played with Raspberry before so it's gonna be a challenge. How are the temperatures btw. Have to find a good place and build a box with cooling. I really want to start rolling next month. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: lightningslotmachine on October 01, 2018, 12:03:57 PM I used this tutorial to setup bitcoin + lightning
https://github.com/Stadicus/guides/blob/master/raspibolt/README.md (https://github.com/Stadicus/guides/blob/master/raspibolt/README.md) Very easy to follow. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: TheBeardedBaby on October 01, 2018, 12:33:59 PM I used this tutorial to setup bitcoin + lightning https://github.com/Stadicus/guides/blob/master/raspibolt/README.md (https://github.com/Stadicus/guides/blob/master/raspibolt/README.md) Very easy to follow. Great, thank you for the info, how are the temperatures btw? Do I need an extra/bigger radiator to cool it, maybe fan too? When everything is done I'll probably will put it in a box and have it on the desk but I want to order everything together, that's why I'm asking if I'll need some more stuff. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: lightningslotmachine on October 01, 2018, 02:00:26 PM Great, thank you for the info, how are the temperatures btw? Do I need an extra/bigger radiator to cool it, maybe fan too? When everything is done I'll probably will put it in a box and have it on the desk but I want to order everything together, that's why I'm asking if I'll need some more stuff. You don't need anything more than the stuff listed there. No extra fan or anything like that. Even a Raspberry Pi case is optional. Don't think it will overheat. I've had it running 24/7 for a couple of weeks now. Been working just fine. Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: delpiero10 on October 01, 2018, 06:29:46 PM how are the temperatures btw? CPU temp is around 58°C on my node(btc+ln) Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: bitart on October 01, 2018, 10:27:51 PM I used this tutorial to setup bitcoin + lightning https://github.com/Stadicus/guides/blob/master/raspibolt/README.md (https://github.com/Stadicus/guides/blob/master/raspibolt/README.md) Very easy to follow. Great, thank you for the info, how are the temperatures btw? Do I need an extra/bigger radiator to cool it, maybe fan too? When everything is done I'll probably will put it in a box and have it on the desk but I want to order everything together, that's why I'm asking if I'll need some more stuff. I've bought this copper heat sink (http://www.banggood.com/Raspberry-Pi-23-Copper-Heat-Sink-Heatsink-With-3M-Special-Thermal-Cooling-Paste-p-1045808.html), it's for the Pi and it was really easy to stick it onto the chips... it's about 2 EUR, free shipping, so it's not a big deal... I think you should have some cooling because of the SATA HDD rather than the PI Title: Re: Running bitcoin node with LN hub on a Raspberry Pi 3 Post by: TheBeardedBaby on October 02, 2018, 08:07:49 AM Mine is sitting in the cupboard (doors closed) and it's fine there were no problem with overheating or anything similar (I've no HDD attached, I was trying to run a neutrino type hub) I've bought this copper heat sink (http://www.banggood.com/Raspberry-Pi-23-Copper-Heat-Sink-Heatsink-With-3M-Special-Thermal-Cooling-Paste-p-1045808.html?p=OS11181479072201504Z), it's for the Pi and it was really easy to stick it onto the chips... it's about 2 EUR, free shipping, so it's not a big deal... I think you should have some cooling because of the SATA HDD rather than the PI Yeah, that was my concern too, I'm thinning for something like this for the SATA solution and probably will have it open for a while. https://ae01.alicdn.com/kf/HTB1DxA7Kf9TBuNjy0Fcq6zeiFXa6/Raspberry-Pi-2-5-SATA-HDD-SSD-Storage-Expansion-Board-X820-V3-0-USB-3-0.jpg_640x640.jpg |