pull down to refresh

How to setup a LNbits instance on your own machine

I've seen lately many people that want to start play with LNbits. And many are noobs in running nodes, or don't have already channels open, their nodes are not well prepared, running behind Tor etc.
So here is a quick guide how to install, configure and run a LNbits instance ON ANY PC WITH LINUX.
  1. If you do not have a LinuxOS machine ready, I suggest to take whatever old laptop or PC with min 4GB RAM and install DebianOS on it (or whatever other Linux you want). I prefer Debian because is pure linux, clean, fast, no bullshit and is the most compatible with all repositories. Set a static local IP for that machine. Install ufw firewall and open the port 443 in it.
  2. Install LNbits using poetry method. Are just few lines copy/paste, no need to be a super linux coder to use them. Any windoze user could do it :) Do not start yet the lnbits! Must be configured first.
  3. Use caddy option to configure the https access to your LNbits. Is the most easier method and clean. Use a subdomain for your LNbits instance like lnbits.mydomain.com or bank.mydomain.com
  4. Open port 443 (https) on your router and forward it to your local machine IP that host your LNbits instance.
  5. Go to your domain admin web and edit DNS records to contain A record for your lnbits.mydomain.com for the IP you have on your router. If you have dynamic IP, you could use any DynDNS app to configure it using CNAME in your DNS.
  6. Edit LNbits .env file and activate the adminUI extension so you could manage it directly in browser.
  7. Start LNbits with the siomple command "poetry run lnbits" (run in lnbits-legend folder) and in the startup console you will see the link to the adminUI. Copy and paste into your browser and start configuring your LNbits.
  8. You will have to setup: funding source, users, authorized users to access your LNbits. Is good to limit the public access only to the users you create them.
  9. As funding source, if you do not run your own LN node (that you can link it to your LNbits), you can use many simple funding sources like: lntxbot, lntipbot, lnpay.co, openNode.com etc. With https://www.lnpay.co/ is very easy to setup and they have good servers, you can open a free account if you do not have too much traffic.
  10. If you do not want to keep the funds in these custodial funding sources, you can setup the LNbits extension scub and forward all the sats automatically to an external address. Or do it manually when you consider is the proper time. But anyways, use these custodial funding sources as testing playground, not for production cases. You can change the funding source anytime from adminUI, without any other changes in your LNbits.
More about getting started with LNbits, here is a detailed guide (in 3 languages).

Happy Lightning with LNbits!

My next project.
reply
check my profile if you need inexpensive hardware. ill have a pfsense appliance posted soon for the networking side of things.
reply
@ThrillerX_ this is dedicated to you. I heard in one of your SN Live episodes that you want to try LNbits. Here it is a simple guide for you.
reply
I run LNbit on my Raspiblitz through Tor. That was really just a couple of clicks to get it going, whereas this seems a bit more tedious to get started with?
reply
  1. This quick guide is more for those that still do not run a bundle node or a node at all, but want to try LNbits.
  2. If you run LNbits behind Tor you are limiting its use ONLY to Tor users. For testing and play around is OK, but keep in mind that not all LN wallets could interact with your LNbits over Tor.
  3. Yes, you could open your raspiblitz Lnbits to clearnet (see my other guide here). You have many scenarios how to use it.
reply
started reading, gave up on 5. don't think it's my level. thanks though. this kind of stuff are sinking gradually for me so maybe in the future I'll get to it.
reply
don't give up the fight. basic DNS is easy to learn and crucial knowledge for a digital citizen. whichever service provider you purchase your domain name (eg., .com) from should have a knowledge base article on how to setup the DNS 'A' record within their management interface.
reply
I need to purchase domain name?
reply
ideally, yes.
one alternative is to use a dynamic DNS provider. determine if your router offers a "DDNS" feature and which providers are supported.
i like namecheap as a service provider.
reply
OK thanks I'll look into it
reply
Then you should read all my other guides about Bitcoin and LN on my substack. Start with the first one. Be aware: are like 60+ guides + short ones in the memes section. So take your time. https://darthcoin.substack.com/s/english/archive?sort=new
reply
Oh didn't realize it was you. do you have a Telegram group for OBW?
reply
reply
Learn how to attach LNBits wallet to SN #697132
reply
Where does something like https://tunnelsats.com/ land compared to these options? It seems most guides come with a $5 per month VPS subscription. Tunnelsats appears to be bit cheaper and involves less steps. What are the trade offs?
reply