Let’s create a routing LND node, part 1 - Preliminaries

Series: Let’s create a routing LND node

Supporting this series

If you want to support this series, you can:

  • Use tippin.me to send me a tip.
  • Use Tootmoney to ask for a Lightning invoice. On Mastodon, just send a toot like ‘@OpinionatedGeek #TootMoney #send 10000’ to have it reply with an invoice QR code.
  • Send bitcoin to this address: bc1qsaampnjm5ykcpd40pstcewt75xrtfy5cxpnpdf

Let’s try creating a new LND node for routing.

I have no idea how well this will work, or how it will turn out, or when we'll all get too bored to bother about updating this, but for now let’s try. And I don’t expect to get rich from routing fees but it might be an interesting exercise.

I'm going to create a new LND node and start with zero channels. Then I’ll try to build that up into a node that handles significant routing of payments. I don’t know how to do this, but with help and advice from around the net I’ll give it a go and keep you updated.

I plan on being pretty transparent about this. You’ll see at least some of:

  • The commands I run
  • The results
  • The fees it generates

So, this is the starting point. 0.5BTC in the wallet, 0 channels.

My LND node is running on a Vultr instance that costs $10 per month. I could probably run it on a $5 per month instance but I want to run additional servers on that same hardware. This is running against a bitcoind node on Time4VPS. LND is syncing right now so we’ll get started opening a few channels once it has finished and I’ve transferred in some BTC.

Syncing bitcoind with the chain was problematic. The S0.25 instance (€2.99 per month) was out because it didn’t have enough disk space to hold the mainnet blockchain. Neither the S0.5 (€3.99 per month) nor the S1 (€4.99 per month) instances would sync well - they kept running out of memory and crashing. I don’t know if that’s an initial sync thing or if it’ll require that level of memory constantly. One of the things I plan on trying is syncing LND with the S2 instance I’m running now (at €9.99 per month) and once it’s up and running switch over to an S0.5 to see how it gets on. It’s disappointing that Time4VPS instances don’t support virtual memory or docker though, but they are an awful lot cheaper than AWS instances.

If you want to help support this kind of thing, I’ll put up some donation addresses or something once the server is actually up and running.

<fx>Drums fingers waiting for LND to finish syncing</fx>

While we’re waiting to get to the interesting bit, here’s the Upstart script I use to run bitcoind at startup on my Time4VPS instances:

description "bitcoind" start on runlevel [0123456] stop on runlevel [!$RUNLEVEL] respawn respawn limit 10 60 # 10 times in 60 seconds script mkfifo /tmp/bitcoind-log-fifo ( logger -t bitcoind </tmp/bitcoind-log-fifo & ) exec >/tmp/bitcoind-log-fifo rm /tmp/bitcoind-log-fifo exec /root/bin/bitcoind 2> /dev/null end script


If you want to get in touch to offer advice on next steps, the best ways are probably Mastodon or Twitter.

Tags: Lightning
Created by on Logo15659OpinionatedGeek Ltd.Logo15659