Ok, I’m learning a lot and there is a lot to be learned. Here are a few additional tips for running a lightning node on a virtual server.
I first tried core lightning but it didn’t seem to perform well with the pruned node. I decided to give another node software a try and I found that LND has sufficient support for running against a pruned node. So far so good with LND as my node software.
There are other node software implementations. eclair for example is an alternate lightning implementation that is written using Scala. Not all lightning nodes can run against a pruned bitcoin node though so you have to research things a bit. But I mainly pointed this alternative out because I’ve also found it isn’t easy to switch. Channels are not portable between node software. Which brings me to…
You can’t easily switch your backend. Even with LND, I started out using a pruned bitcoind as the backend. I thought about switching to neutrino as an alternative to a pruned backend but some research into this and I found the channels are not compatible. I’d have to completely close the channels, shut down the node and bring it back up with the new backend and re-open channels. Not really something you do unless just testing. So.. you might strongly look at neutrino before starting to run your node and open channels.
lightning nodes have lots of front ends and tools available. A few I’ve found interesting:
I’ve been playing with owning some bitcoin for a while. Like long enough to own some but not long enough to have made any money. Like… I didn’t buy it when it was cheap before 2017. But that isn’t the point. The point is, I have fun playing with it and owning some and I decided to play around with the a bitcoin lightning node on on my VPS.
Can you run a bitcoin lightning node on a virtual private server?
Why would someone want to install a bitcoin lightning node on a virtual private server with limited disk space Here are my reasons.
I don’t have unlimited bandwidth at my home. Seriously? Yes Seriously. I look forward to the day when my city has access to a fiber network. In the mean time, it is what is is. Why do you need unlimited bandwidth anyway? Well, it turns out the existing blockchain is pretty big. It takes around 500GB (time of writing) for the first download and then the node is going to be adding some extra traffic 24/7 from then on.
I don’t have a spare little computer to keep on 24/7 to run my bitcoin node. Seriously? Yes all my little computers are busy. I suppose I could get another one but… well that bandwidth thing is sort of important.
I already have a VPS and well, to be frank this blog doesn’t get much traffic.
But what about the practicality of it? I thought you need a lot of disk space.
Well it turns out you can run bitcoind in a pruned mode. Basically, you choose how much disk space you want to allocate to your local installation and when the daemon downloads new blocks, any old blocks are discarded if they exceed your pruned size.
Yet to be determined though, what if my lightning node gets real busy, could the database star taking up a lot of size? I suppose that could be an issue. I haven’t got that far yet. I’m putting the in the list here as a reminder. I’ll either get that far or I won’t.
I used lightningd or Core Lightning (CLN) because supposedly it takes a few less resources. And they said you can run it against a pruned node.
OK so how did it go?
Here are the installation steps I’ve taken so far:
Install bitcoind. This is actually pretty easy. You can get the latest release right from the GitHub bitcoin. Basically I just had to put prune=<some size in MB> in the bitcoin.conf and fire it up. They really do make it quite simple to get started. BTW you can download a pruned snapshot. It makes it so you don’t have to download the entire blockchain initially. Saves a lot of time and bandwidth.
A lot of guides I found on the internet suggested installing some kind of block explorer. One such was btc-rpc-explorer. I installed this and tested it out but I didn’t really find anything useful for my lightning node by installing it.
Next comes the lightningd setup. I built and installed CLN according to various guides. (Easy to google).
You probably want some UI to manage the lightning node. You can do everything from the command line with lightning-cli but that gets sort of old and hard to keep track of after a bit. I chose Ride The Lightning. I haven’t got enough experience on this to recommend something else or unrecommend this one, but installation is straight forward according to their docs and it seems to be able to do all the important things on your lightning node.
Here is the only major issue I found:
Because I’m running bitcoind in pruned mode, lightningd needs some care setting up. Mainly, the issue is described in a bug (still open while I’m writing this). What happens is, lightningd requests a block from bitcoind but bitcoind doesn’t have it any more. They’ve talked about getting the block from a peer or something but no resolution. So, there is a workaround on the bug for a script that disables the network status of bitcoind if the current block gets too far ahead of the lightning block being processed. That made it so I could get my bitcoind up to date and lightningd was also up to date and running.
This is all #reckless. Due to pruned mode, it seems the lightningd is a bit vulnerable to not having access to date it might need. I need to research this more fully. For now, play with pretty small number of sats.
I want to research automated plugins. CLBoss looks interesting.
Need to research backup mechanisms. How do the normal backup mechanisms of lightning nodes differ when you have a pruned node? Is running a bit risky a guarantee of loss of my funds? (Hope not lol)
Some time ago I set out to update Redneck Bounce to be playable on both Android and iPhones. I actually did a bit of work over the break and brought all the old power up features forward to the new version 2.
I recently had need to attach a Verizon USB dongle to a Raspberry PI device running Linux for mobile internet access. Documenting here in order so it won’t take so long to find this in the future if I need to get it to work again.
I used another computer (Mac or Windows) in order to set up the device initially. You can browse to 192.168.32.2 and under the settings ensure that 1) the firmware is up to date and 2) the device is set to automatically connect.
On Linux, the device first enumerates with Vid/Pid 10a9:606f. If it does not receive a command to switch, it changes to 10a9:6072. This interface seems to bind properly with the qmi_wwan driver but I wasn’t able to connect to the internet with that and it isn’t what the other platforms were using. You want the 10a9:6064 interface. In order to get that interface, you can use udev and usb_modeswitch to cause the device to come up as expected.
We commonly refer to software that you aren’t using all the time as becoming susceptible to bit rot. After discovering multiple things that didn’t work on my site, I went ahead and updated all the software to latest revisions.
In the mean time… if you need to contact me, you might try twitter @allmybrain. I’ll work out the bugs in the contact forms sooner or later.
It came time to renew an old domain name I had this week. Something about renewing a domain I’ve not used for years finally got to me and I decided to let it go. It seems weird to remove a piece of the internet.
Privacy & Cookies Policy
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.