Mining Bitcoin at Home with Datum and Start9

I have an Umbrel set up (in preparation for my next video), so I’ll see what the process looks like on there when I get back home tomorrow. I can’t recall if Umbrel exposes the “CLN Application” web UI (or if it has something custom-rolled), but if it does, the path to create an offer should be:

Under the “Lightning Wallet” section:

  • Open the “Transactions” tab
  • Click “Receive”
  • Select the “Offer” radio button
  • Enter the description specified by Ocean
  • Leave “Amount” blank
  • Click “Generate Offer”

Look forward to the next video!

I’d say it’s the “CLN Application” web UI as it follows the Blockstream.com theme. The UI has (in my humble opinion as a non techie) is very limited functionality. BTC wallet, Lightning wallet and open channels functionality.

On the Bolt12 web page it advises to run CLN with the ‘–enable-experimental-features’ or ‘–enable-experimental-offers’ flag. I can’t see how to do that via the UI.

I can get to the Umbrel terminal but to be perfectly candid, I’ve never enter a command in the entirety of my life other than hit return key on my old mac.

I’ve followed the steps you’ve listed on the Lightning Wallet section of CLN on a couple of occasions. The final step is to generate a signature from a Lightning Wallet. I can’t figure how to cross that bridge for love nor money.

Actually, the final step for Core Lightnjng is just to click “Generate Offer”. The rest happens outside of Core Lightning.

Copy the offer that Core Lightning generated (following the steps above), and paste that into the interface in Ocean. It will give you a message to sign. Take that message over to your favorite wallet software. I use Sparrow, but most wallet software has a feature for signing messages.

Important note: Core Lightning, despite having a base layer wallet feature, does not have a feature for signing messages. If you generated your user ID for Ocean (the Bitcoin address) from Core Lightning, you’ll need to abandoned that user ID and create a new one. The Bitcoin address that you use for your Ocean user ID must be one that you control the keys to and can load into a wallet software that supports message signing (such as Sparrow, Electrum, Nunchuk, etc). This can be either a hot wallet (fine if you are merely using it for your Ocean account and don’t hold a lot of sats there) or one that you secure with a hardware signer (so your seed phrase/ private key never touches a computer connected to the internet)

Using your favorite wallet software (not Core Lightning), sign the message that Ocean generates, copy the signature, and paste that back into the interface in Ocean. This proves to Ocean that:

  1. You control the keys to the Bitcoin address that you are using as your user ID
  2. You authorize them to send your payouts to the lightning node that you generated the Offer from.

I think where you may have gotten stuck is that the Lightning offer is merely used for receiving payouts. It is not directly related the the Bitcoin address that you are using as your User ID for Ocean (beyond the fact that you own both).

Ok, I think I’ve got it. I’ve got hot wallets on my phone but not on my desktop. I was going to set up Alby Hub on desktop and see how it goes from there but am happy to go with Sparrow, Electrum of Nunchuck based on your experience

Ah, ok I see - Alby Hub has a feature for signing messages with your Lightning Node’s private key. I’ve not integrated Alby Hub with Core Lightning myself (I use it with LND), so I’m not familiar with how to get that integration working. Have you been following a guide for that?

No guide… I’m thrashing around and clutching at straws tbh. Alby Hub has a option to connect to your Lightning Node. The initial problem I found when downloading Alby Hub from Umbrel Store wont happen without downloading LND which I find frustrating because I’ve got CLN loaded.

Ok… I’ve had a read up on Electrum and Sparrow. Both seem more aligned to where I want to go by way learning and establishing Lightning Channels, connecting to my Knots node, connecting to my CLN node, understanding Bitcoin technically and taking steps to using terminals.

Hi Paul- thanks so much for taking the time to record your tutorials and moderate this site. It’s very much appreciated!

I have a Start9 server, along with a Bitaxe, and was able to follow your tutorial for Knots and installing CLN. I moved 500,000 sats to CLN in the Bitcoin wallet, opened a channel to PaulsCode for 100,000 sats, which is now confirmed (it’s been over 24 hours now). Now i’m trying to get some inbound liquidity, but i cannot seem to send a payment out. I’m trying to send to my Strike lightning wallet, amounts of 5000 or 10,000 sats, but i get a “Sending Payment…” message with spinning arrow that never sends. Any ideas? Thanks in advance!

This is the most common complaint that I have gotten from folks using my node. There are two problems going on, but the main one is that the fee to send the transaction is higher than your max fee rate is set for CLN. I have the fee rate set unusually high on my node, and no doubt some custodial services also have additional fees they add on top. That means the total fess for the route are probably over what your node is configured to accept. Unfortunately the Core Lightning service on Start9 does not expose the config option in CLN to increase this, so if fees go past a certain amount, sends will consistently fail to find a suitable route. The other problem is with Core Lightning routing in general (discussed further here in this thread on the Start9 forum) The two problems compound each other, where you end up having to shut down your node, clear the gossip store, turn it back on, and wait several hours for it to re-populate. That doesn’t resolve the fee problem though.

The reason I have the fees set high, for anyone curious, is because of a problem that BTC Sessions ran into which cost him a lot of sats to recover from. He had the default fee rate on his node set to the default low settings, and he reduced his minimum channel size very low (like I did on mine) to encourage his viewers to start experimenting with lightning by connecting to his node. What ended up happening, though, is that scores of people opened small channels to his node (for mining), sent the sats to his side of the channel (like I showed in my video here) to create inbound liquidity to receive payouts. The net result of this was to sap all of BTC Session’s inbound liquidity from his main channels with the broader network, because all of the users were opening only one single channel, just to him, and sending the sats to his side. This meant that everybody routed all traffic through his main channels rather than participating themselves in the routing by having many other channels of their own. He could not re-balance either (since there were no routes through any of the small channels to circular re-balance) He ended up having to close all of the channels (which cost him more in base layer transaction fees then what he got from routing) and bump up his minimum channel capacity to prevent people from swarming his node again.

To avoid making the same mistake he did, I didn’t just set my minimum channel capacity very low (10K sats) but I also bumped up my routing fee to 1K stas per million (or 0.1%) with a minimum routing fee of 1 sat. This means if someone opens a 10K sat channel and sends all of the liquidity to my side, the fees I collect are 11 sats. If 100 people swarm my node, and each send out 10K sats, They will consume 1M sats of my inbound liquidity, but I will have collected 1.1K sats in fees (which is enough to do a base layer transaction to add more liquidity to my node). That way I don’t have to close anybody’s channels, and I can continue to collect transaction fees from them as they receive their mining payouts until they are ready to close their channels themselves.

But, unfortunately that led to the problem that you are now encountering. The issue doesn’t affect LND (since you can easily increase your acceptable fees), but Core Lighting is required for Ocean mining, since LND doesn’t yet support Lightning Offers. One way you can get around the problem (though it is a bit technical, unfortunately) is you can open both a Core Lightning node and a LND node on your server. From the LND node, open a channel with a good well-connected node (you can start with mine if you want to begin with a small channel – I recommend using my “PaulsCode LND” node, though, which is easier for me to re-balance, but you can use either). You’ll be able to send from it no problem (using Ride the Lighting, you can specify your max fee rate) to create inbound liquidity. Then open a channel from your LND node back to your Core Lightning node. That channel will be inbound liquidity on the Core Lightning side, so you will be able to start receiving payouts right away. When it eventually fills up on the Core Lightning side, you can just create an invoice from your LND node, and pay it from your Core Lightning node (for zero fees, since it is a direct connection), freeing your inbound liquidity back up.

1 Like

Thank you for that explanation. It makes much more sense to me now. I had also watched BTC Sessions tutorial, and understand now why there’s an issue here. I also saw your Boltz Exchange action- would that help in this case? Or could I put more BTC into my CLN and open a larger channel to a larger partner?

Yes, that is another option if you have the sats to spend. A good node to connect with is ACINQ, which last I checked has a minimum channel capacity of 1 million sats. If you open a channel with them, you would then send most of the 1M sats (minus the minimum balance) back to cold storage via Boltz. Depending on ACINQ’s liquidity, you might have to break it into multiple pieces (such as two 500K chunks or four 250K chunks) if they aren’t able to route the full 1 million in a single bite.

If a million is a bit high for you to put into lightning now, I can also set up a virtual meeting to walk you through setting up a Core Lightning to LND link if you’d rather go that route. It would probably be easier than reading my wall of text above, haha.

1 Like

One other thought- could i send/gift you, for example, 10,000 sats directly? Would that avoid routing fee issue and give me some inbound liquidity? If not, I’m not opposed to the 1M sat option you mentioned above, and yes, I realize i’m going through a lot to just mine a few sats on a Bitaxe with Ocean. But the lightning fees and gifted sats are a small price to pay to learn and teach my kids about the future of money.

1 Like

I can open a channel with you (which will show up as 100% inbound liquidity on your side). No need for the 10K sat payment (I’ll collect routing fees over time if it works). What is the name of your node?

My Node ID is 03e7d6e4507881cb416194cb0cf76b9bebbea52f5083af1e44c998a33cdb8a2146@5e56sfil45v3wyvtnbwgtsygnra3djp2qrgcwmroa5auybs3pbt7h6id.onion:9735

Is that what you need?

1 Like

Channel should be active.

Excellent- I do see it in my CLN connections now. Thank you!

I’m guessing it will also benefit you and us if we open a number of public channels between us thus generally contributing to Lightning payments routing and specifically earning fees alongside Ocean hashing payouts

Yes, in general, the more channels there are on Lightning, the stronger and more reliable and decentralized the network becomes. You do have to weigh that with the fact that a Lightning node is essentially a hot wallet. Being on a dedicated server with a niche OS like Start9 helps of course, but you should always approach it from the perspective that you do not want to have more sats tied up in Lightning than you are able to lose in the worst case scenario of your keys being hacked.

Since Core Lightning has routing issues in general, though, I would recommend actually not putting too much effort into building out your Core Lightning channels (at least for now, until they improve their software). LND is way more reliable, and is where I would recommend focusing as you start to build your expertise in Lightning, presence on the network, and using Bitcoin as a medium of exchange. One way you could have the best of both worlds, though, would be once you have your LND node up and well connected, set up a channel from it back to your Core Lightning node. The more folks who are able to eventually reach that level, the less pressure there will be on my main channels. Like I mentioned, though, I’ve got the fee rate high enough for it to be manageable, so this is certainly not any sort of imperative.

Ok. As mentioned I’m running the Umbrel Home off the shelf server so can load LND from their App Store. Just checked to confirm it can run on Knots. I’ll aim to set up 3 x 25,000 sat channel. Also I’ve got a 200k ‘private’ channel open with ACINQ on CLN. Seems like a waste of a route sitting there for use with Ocean Bolt 12 payouts for Bitaxe hash which won’t touch the sides of it. Can’t see how to make the channel public. I’m guessing it will be a case of closing it as and when I’m confident with LND?

Yes, that is what I would do. Get things going well with LND, then close the channel. Once the closure finalizes after a number of confirmations, you’ll be able to move the funds from that channel out of the base layer wallet for other purposes.