Chapter 1: Hardware selection, upgrade, and Ubuntu Server installation

1. Hardware selection

It is important to select adequately the hardware that will be used to build your Node. The Node will be running 24h /7 days and will countain your lightning channels. It is important to use high quality hardware and spend the extra dollars for it.
At the time of building my Node, there was a shortage of Raspberry Pi and I was looking for an optimal alternative. I have decided to go ahead and purchase a used Mac Mini (late 2012).
It is recommended NOT to purchase a Mac Mini newer than 2012 (i.e 2014 and up) because Apple started to solder the RAM to the Logic Board after 2012. The Mac Mini Late 2012 is the last model that is fully customizable with SSD and RAM upgrades.
Here is the list of hardware that will be used in this build:
• 2 x 8G DDR3L Sodim 1600Mhz 1.35V • 1 x Mac Mini (Late 2012) 2.5Ghz • 1 x Samsung Evo 870 1Tb SSD *
  • Note: As discussed earlier, it is important to select hardware of quality. I had initially purchased a low cost 2Tb SSD but it failed while trying to download the Bitcoin blockchain.

2. Hardware upgrade

To facilitate the upgrade of the hardware, you will need the proper tools to remove some T6 & T8 screws.
Here are the steps to dismount the few components of the Mac Mini to upgrade the hardware:
1- Unplug the Mac Mini 2- Turn it upside down with the black cover facing up. 3- Put your thumbs in the 2 grooves of the cover and turn the piece counterclockwise. 4- Remove the cover. 5- Remove 3 x T6 screws holding the fan. 6- Lift the fan and disconnect the connector by pulling gently straight up the wires. 7- Remove 1x T6 screw at the bottom of the shroud (black plastic piece on the left of the fan) 8- Remove the shroud by holding the top right part with your fingers and turning it clockwise. 9- Remove 4 x T8 screws of the grill WIFI cover. 10- The top of the grill is mounted under the Mac Mini case. Lift gently the bottom of the grill and pull towards yourself to remove the grill. 11- Move the grill aside, you do not have to disconnect the WIFI sensor, just be careful.

2.1 Upgrading the RAM

The RAM is visible and accessible from the moment you remove the cover. Simply release each RAM by releasing the clips on the side. Once disengaged, the RAM will spring in a 45-degree angle. Remove it and put back the upgraded RAM at a 45 degree angle and push it down for it to clip.

2.2 Upgrading the SSD

It is important to note that the Mac Mini has 2 SSD bay. They are referred to as the “upper bay” and “lower bay”. Since we have flipped the Mac Mini upside down to remove the bottom cover, the “upper bay” is located under the “lower bay”.
The “upper bay” is mounted with an expansion kit that holds the SSD in position whereas the “lower bay” SSD is simply resting on top of the “upper bay” SSD.
One important aspect is that the connecting cables for the “lower bay” and “upper bay” SSD are not the same. The “upper bay” SSD connects on the logic board on the right and the “lower bay” SSD cable connects on the left. Removing the “upper bay” SSD requires removing the logic board therefore requires more work. It is recommended to install the new SSD in the “lower” bay. Here are the 2 scenarios:
1- Your Mac Mini has already a Hard Drive installed in the “lower” bay. In that case insert a credit card under the HD and gently pry it upwards. You will be able to slide it out of the bay. The reason to pry it gently is because since there is no “upper” bay drive, The HD is being held in the air by 2 screws on the side that are aligned in 2 holes in the Mac Mini case. Once the HD is removed, transfer the connecting cable and the 2 screws to the new SSD. To put back the new SSD, it is easier to rotate the Mac Mini 90 degree and have the mounting holes at the bottom and use the gravity to get the 2 mounting screws in the holes. After, connect the connector to the logic board.
2- Your Mac Mini has already a Hard Drive installed in the “upper bay”? Leave it there, you do not need mounting screws, but you need a new connecting cable. You will have to buy a “lower bay connector”. Once installed on the SSD, slide the SSD on top of the original one. The connector will plug on the logic board on the left of the “upper bay” SSD connector.
A good preparation would be to go in “Disk Utility” menu on MacOS and search for “upper” or “lower” position before starting to disassemble.
Reassemble everything and you are done.

3. Installing Ubuntu Server

The next step is to install Ubuntu Server on the device. You will need to have created a bootable USB stick in order to proceed with the following instructions:
1- Connect your device up with a keyboard/mouse, ethernet cable, screen and with the boot USB inserted into the device but still powered off. 2- With the USB inserted, turn on your device. If it brings you to a Ubuntu screen then great move on to step 4, if not carry out the next step. 3- If the device does not boot to a Ubuntu screen with the USB plugged in, we need to tell it to boot from a USB rather than the internal hard drive. Shut the device. Turn it back on and hold “ALT” key once the computer is starting to boot. The “ALT” key is replacing the “OPTION” key on a Mac. Please select UEFI in the menu in order to reboot with the Boot stick. 4- You will arrive on the Ubuntu Server. 5- Next choose your desired language. 6- Select to update to new installer if any updates available. 7- Allow it to detect or select your regional keyboard layout. 8- Choose the basic installation, do not select any additional options. 9- At the next stage it will like you to connect to the internet, the WiFi will not work at this stage so you will need to plug in via ethernet if not already done. 10- Once connected to the internet an IP address is shown on the screen, write it down and press Done 11- Unless you’re using a proxy on the next screen (Configure Proxy) press Done 12- Leave the default Mirror address by pressing Done.  13- At the next screen Guided Storage Configuration you can select the disk setup, Uncheck “Set up this disk as a LVM” since you want to use the whole disk as your node and press Done. 14- The next screen will confirm the file system summary click Done. 15- Ensure you have opted for the correct disk and confirm action at the pop-up screen. 16- At the profile screen, you can provide your name, the servers name and provide the username. 17- It will ask you if you want to enable Ubuntu Pro, select skip for now. 18- At the SSH Setup screen, select to install OpenSSH server and select Done. 19- We did not opt to install any additional features at the next screen (Featured Server Snaps) click Done. 20- Once the install completes, the screen will show you (Install Complete!). 21- Select Reboot now. 22- Remove the USB drive when it tells you and press Enter.
This should now complete the Ubuntu installation stage, next we need to SSH to the server.

4. Connecting to the Ubuntu Server using SSH

Now that your Ubuntu Server is online, the rest of the operation will be done via another computer with SSH connection using Terminal.
To connect to your server, you will need to use the following command with the name of the server from step 16 and the IP address noted down in the step 10 from the previous section
ssh <server name>@<IP address>
You will be prompt to enter the password from step 16
<enter password>
Congratulation, you are now connected and ready to start installing your node applications!
The next Chapter will cover the installation of Bitcoin Core and the initial Blockchain synchronization.
Old macs are great targets for a lightning node! My raspiblitz runs on a 2012 MacBook pro running Debian :)
reply
Thanks for this. I'm going to give Ubuntu/LND a try on 2011 MM.
reply
Amazing! Let me know how it goes.
Also, I am debating between going with LND or C-LN.
Any thoughts?
reply
By the way, would you recommend any particular Ubuntu release? I guess one of the LTS releases? Seriously, this will be the difficult choice for me!
reply
The one I used is the newest server edition one from the website
Ubuntu Server 22.04 LTS
reply
I'm thinking that CLN might be just a good an option. I'm not as familiar with it as LND, so likely I'll go with what I'm already familiar with. Also feel that currently there's more software that works with LND. But that might change in the future. I know a lot of people prefer CLN, not sure the reasons. Maybe someone else can weigh in.
Let me know how it goes.
Will do!
reply
Maybe someone else can weigh in
I have found a website comparing both. I believe that CLN is lighter on the Node. However the only drawback I see is that it doesn't support Taproot.
reply
Great job!
reply
Thank you, I honestly wasn't expecting that many good feedback. I am glad people can find it useful/entertaining!
Awesome great post. Bookmarked. 🙏
reply
Thank you!
It doesn't seem like it but its a lot of research. I am now working on my next Chapter, which is installing Bitcoin Core.
reply
nice, always hated how apple started soldering the ram
reply
Interested to see how its running
I have an opportunity to pick one up pretty cheap
reply
It is running really well, took less than 18 hours to fully sync and I do not even hear it. I guess the performance will be tested once I get a couple LN channels up but until now I am extremely satisfied.
I cannot put enough emphasis on getting a good quality SSD. I initially had a cheap 2TB (you can see it on the pictures) but it died on me (big mistake).
reply
Very detailed post. There is a lot of useful information here, even if you're not going with the Mac mini. I'm sure upcoming chapters will be even more useful, as the hardware choice becomes less relevant. I look forward to your next chapter.
reply
Thank you,
Im finishing it up pretty soon. I can only work on it a bit of time everyday. Keeping you posted! Next step if Bitcoin Core.
reply
Hi, interesting instructions! I'm a longtime Mac user and not (yet) a Linux user, but I want to get used to it. I also have a 2012 Mac Mini and am thinking about setting up a Bitcoin Core node, but it's so tricky-technically.... I'm very hesitant. Why was Ubuntu SERVER chosen in this case? Could this also be done on the Ubuntu desktop? (...I have to admit I'm not a command line/terminal/IT/SSH guy...)
stackers have outlawed this. turn on wild west mode in your /settings to see outlawed content.