this post was submitted on 22 Jun 2024
46 points (94.2% liked)

Selfhosted

40006 readers
1126 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I currently have a server, a Dell T310 with an SSD in it and 12Gig of ram (weird config, I know I messed up but it works fine so I can’t be bothered to change that for now), with all my dockers running in it.

It runs mostly fine, with Debian 11, a VPN so that I can block public ssh and allow it only on the VPN network, an nginx proxy to have services like a forgejo and a music library (ampache).

However it can’t run a Minecraft server with more than a single person on it without stuttering ; so I was considering changing it maybe next year, after more than 3 years of services, for something beefier but also consuming less W/h (current consumption is 80W), and since I already have a Mac for work I was wondering how suitable a Mac Mini M1/M2 would be for a homelab?

Does anyone have such a configuration and how does it work for you? Any hurdle that you should be aware of?

top 29 comments
sorted by: hot top controversial new old
[–] [email protected] 13 points 4 months ago* (last edited 4 months ago)

since I already have a Mac for work I was wondering how suitable a Mac Mini M1/M2 would be for a homelab?

Suitable yes, if you want to do it... maybe or maybe not. Here's a few pointers:

  • Debian can be installed on those machines, however I'm not sure how power management works properly:
  • Installation isn't as straightforward and as easy as in another systems because Apple decided to keep pushing the usual ARM bullshit of not including a proper UEFI with the system;
  • Some stuff will be broker, but you most likely don't need it for self-hosting;
  • If you keep macOS around you may have good luck with virtualizing Debian using UTM or VMware. Debian's arm64 images will run at optimal performance on that hardware.

If you're about to spend money I would grab an HP Mini unit with a "T" CPU, those will downclock really hard and you can get a i5-10500T (on ebay) for around 250€... and everything will work fine out of the box. An i7-8500T model also sells for 150€ or something like that.

Have a look at those CPU benchmarks (last one is probably yours):

If you're looking for power efficiency the newer CPUs are always better. Those mini units will downclock and idle at around 9-12W depending on hardware configuration but Apple should be able to do better - at least assuming you've power management working.

https://www.cpubenchmark.net/compare/4104vs4922vs3768vs3231vs1287/Apple-M1-8-Core-3200-MHz-vs-Apple-M2-8-Core-3500-MHz-vs-Intel-i5-10500T-vs-Intel-i5-8500T-vs-Intel-Xeon-X3430

[–] [email protected] 8 points 4 months ago* (last edited 4 months ago)

Got an M2 mini and at first had it running with MacOS and k3s (mini kubernetes). What annoyed me a bit was that if you restart you need to login to get kubernetes/docker starting up again. Also you cannot start docker desktop from cli, but need GUI access via apple remote desktop. You could remove the login but then your setup is completely unsecured against local access. After waiting a bit asahi linux supported the M2 mini and I gave it a try. It's a fedora linux, which I'm not super familiar with, but installing it was quite smooth and installing k3s was also easy and I'm only really using the server via ssh tunnel port forwarding and kubectl which is fine for me. It even uses less watt in this config what I remember after measuring. Restarting also starts k3s without login as with any linux. So quite happy with this config.

[–] [email protected] 6 points 4 months ago

I don't recommend Debian for Apple Silicon, just stick with Asahi Linux. There aren't any big issues, except the fact that not all Docker images are built for arm64.

[–] [email protected] 3 points 4 months ago (2 children)

The problem with Mac hardware is that it's ARM and vertically integrated with everything Apple. Not all hardware is supported by Linux because Apple won't write any linux drivers and everything is reverse engineered. You're better off buying something non-Apple which linux properly supports.

If power consumption is an issue for you get, a R9 7950X consumes as much and at times less power than an M1/M2 (I think even M3). Check out GamerNexus's charts. IINM AMD in W/Ghz performs better than Intel across the board.

No idea where you are, but you can get a small factor PC from one of the vendors that preload linux, or configure a small form factor PC of your liking for cheap and put linux on it. You'll get more out of your money for the same or better performance with about the same energy consumption (or a bit more).
Somebody I know who happens to live in Hungary got himself this cheap beauty. They deliver all over Europe, but if you live elsewhere on this planet, there probably is something similar like this out there.

Anti Commercial-AI license

[–] [email protected] 2 points 4 months ago (1 children)

There are plenty of Linux containers available for ARM in part because a lot of developers want to run Linux containers within macOS on Apple Silicon.

That has had the effect improving the experience of running Linux directly on ARM servers.

[–] [email protected] 0 points 4 months ago (2 children)

That may be, but buying a Mac Mini is like buying a device made from the ground up for Windows, where any other operating system has to reverse engineer 100% of the things to work well, or you have to emulate another OS on it (which comes with its own pitfalls), and it's 200+€ more expensive than its nearest equivalent.

Every single company I've worked at which introduced Apple Silicon to its developers has had headaches with compatibility. The worst I've seen was it taking a developer a month to get up and running because the specific component we used didn't have a build for the specific ARM architecture. Multipass, UTM, podman, docker desktop, all didn't work until colima and forcing the VM to emulate x86 + forcing docker in the VM to use the x86 image worked. There was a persistent problem with disk IO since it used 9p or whatever. Installing dependencies from scratch meant waiting 30 minutes on the M2.

Why pay a premium for less compatibility and worse specs? Just get yourself something that works, which is cheaper, maybe even supports a company that invests in Linux and its ecosystem, and be able to ask an existing developer community instead of asking the subsection of linux users that run your specific app on however you're running linux on Appe hardware.

Anti Commercial-AI license

[–] [email protected] 2 points 4 months ago (1 children)

I didn’t pay a premium, I got a great deal.

The reverse engineering work was already complete, and all the containers I needed for ARM were available.

These have great performance per watt.

[–] [email protected] -1 points 4 months ago (1 children)

That's great if it's your experience.

I'm just saying me and others have consistently had different experiences, and OP can get a better experience at half the price, with the same (or better) energy consumption, all while supporting the Linux ecosystem directly.

Anti Commercial-AI license

[–] [email protected] 0 points 4 months ago (1 children)

I’ve donated to marcan to work on Asahi Linux, which gets upstreamed. That’s direct.

What has better performance per watt than M1 at a better price?

[–] [email protected] 0 points 4 months ago

That may be, but buying a Mac Mini is like buying a device made from the ground up for Windows, where any other operating system has to reverse engineer 100% of the things to work well, or you have to emulate another OS on it (which comes with its own pitfalls), and it’s 200+€ more expensive than its nearest equivalent.

Every single company I’ve worked at which introduced Apple Silicon to its developers has had headaches with compatibility. The worst I’ve seen was it taking a developer a month to get up and running because the specific component we used didn’t have a build for the specific ARM architecture. Multipass, UTM, podman, docker desktop, all didn’t work until colima and forcing the VM to emulate x86 + forcing docker in the VM to use the x86 image worked. There was a persistent problem with disk IO since it used 9p or whatever. Installing dependencies from scratch meant waiting 30 minutes on the M2.

Why pay a premium for less compatibility and worse specs? Just get yourself something that works, which is cheaper, maybe even supports a company that invests in Linux and its ecosystem, and be able to ask an existing developer community instead of asking the subsection of linux users that run your specific app on however you’re running linux on Appe hardware.

[–] [email protected] 1 points 4 months ago

What benchmark do you have that says a R9 7950X "consumes as much and at times less power than an M1/M2"??? I mean, a) of course that's a crazy comparison because the M1/M2 is an entry-level laptop chip and the 7950x is AMD's flagship high performance desktop chip and b) the M1/M2's power consumption at full load is ~20W and the 7950x idles at 20-30W.

A reasonable comparable is one of AMD's monolithic laptop chips like the 7840U or (if you're willing to consume more power) 7840HS.

Some actual useful charts: https://www.notebookcheck.net/Apple-M3-SoC-analyzed-Increased-performance-and-improved-efficiency.766789.0.html https://www.techspot.com/review/2499-apple-m2/

[–] [email protected] 3 points 4 months ago

I have a Mac mini m1 and run several containers to manage media, arrs and vpn. I also have a Debian vm for homeassitant. I had used UTM prior but now moved the vm to VMware fusion.

Main issue I run into is not enough ram as the base model only has 8gb. And I do not have redundancy optimised when I reboot. I have it locked with a password so it doesn’t auto run the containers or the vm.

I double the mac for light browsing too. I considered getting a dedicated Linux mini pc for the services next to a desktop Mac. But my usage is too sparse at both ends of the spectrum.

[–] [email protected] 3 points 4 months ago

Everyone else has described the complications that a Mac mini would have. So why not consider something else? Lenovo, HP, and Dell make 1l ultra small form factor PCs and they're pretty cheap on eBay. They're also low power. Search for Tiny Mini Micro to find information.

I have three Lenovo Thinkcentre machines - two with 32gb RAM and one with 64gb RAM - running my Proxmox VE cluster. Highly recommend using those small machines instead of a Mac mini.

[–] [email protected] 3 points 4 months ago (3 children)
[–] [email protected] 5 points 4 months ago (1 children)
[–] [email protected] 1 points 4 months ago (2 children)

I mean technically it does. Isn't this the Ashai Linux and isnt it very Alpha / Beta stage? As far as I'm aware this is not recommended for anything critical ( per the project maintainers) and unless OP loves tinkering he is most likely going to hit a lot of unique edge case scenarios that require a lot of time to unwind. If you have a very narrow use case this might work but is probably not worth the headache.

[–] [email protected] 3 points 4 months ago (1 children)

Asahi is not at all “alpha” and I’d hesitate to describe even parts of it on the first and second generation Apple silicon as “beta.” Its daily driver levels of stability and I’m constantly impressed by it.

[–] [email protected] 2 points 4 months ago (2 children)

From the Ashai website - "Asahi Linux is a work in progress. Many hardware components are not yet supported!"

Just be warned a lot of people have bricked or nearly bricked their computers just trying to get Ashai installed on their Mac. Daily driver this is not but they are making great progress! It will get there eventually.

[–] [email protected] 4 points 4 months ago (1 children)

BULLSHIT

No one has hard bricked a device, you can always flash MacOS back with a tool. Any issues installing are years old. OFC it's a work in progress, so is all of Linux even RHEL. It is 100% ready to daily drive and many people do.

[–] [email protected] 1 points 4 months ago

Ok cool 😎

[–] [email protected] 1 points 4 months ago

It's a fair warning, but on my M2 MBA the only things that don't work are the microphone and some elements of graphics acceleration. I keep macos on a tiny partition for firmware updates and, I guess, to recover in the event of a catastrophic failure, but ... it's been rock solid. Most of the software I use has compatible builds, which might be the most surprising part.

[–] [email protected] 1 points 4 months ago

All the hardware support for the Mac Mini is complete and working.

I’ve had no problems running Asahi Linux on an M1 Mac Mini.

[–] [email protected] 3 points 4 months ago

Yes, thanks to AshiLinux

[–] [email protected] 2 points 4 months ago (2 children)

I was thinking more like just having dockers on macOS

But running a Linux like asahi is an option

[–] [email protected] 2 points 4 months ago

IMO venturing out in the unknown using fringe case hardware/software is a hobby by itself. It’s my 2nd hobby besides self hosting. Being more about experimenting than stability and ease of use, it’s not compatible with self hosting so I keep them separate

[–] [email protected] 1 points 4 months ago

I host using an M1 Mac Mini using Fedora Asahi Linux. Installed easily, no problems. Fast and quiet!

I ran a Minecraft server for a while. Worked fine.

[–] [email protected] 1 points 4 months ago

I have an old mac mini running nextcloud on Ubuntu, I did upgrade memory and plug in external ssd