← Blog

iSelfhost • My Mac Mini Cluster

A rack of UniFi networking gear above six Mac Minis in 2 Sonnettech RackMac Mini enclosures, labeled orion, taurus, cassiopeia, galileo, hopper, and lovelace
Wicked Power; Unapologetically Aluminum; An Orchestrated Apple Orchard

An Apple a Day

I recently made a post on my LinkedIn that got some attention. It was a picture of my racked Mac Minis, and a brief overview of how they power my digital life. I got some asks for a blog post discussing it further, and I’m more than happy to oblige :)

I started hoarding M4 Mac Minis at the beginning of 2025, back when the base model Mac Mini would set you back $599. Since then, my homelab’s macOS footprint has grown from one node to six, with a full suite of infrastructure-as-code tooling behind it.

Nearly two years in, I’ve gotten into a rhythm working with them, and I have plenty of thoughts (and code!) to share.

Bearing Fruition

Part of why I went down this path was curiosity about Apple Silicon’s performance per watt. A Mac Mini sips power at idle, runs damn near silent, and still has a Media Engine for video, a GPU that speaks Metal, and a Neural Engine for CoreML workloads. For a homelab that’s on 24/7, and for someone who’s already cozy with Apple products, that’s a pretty compelling package.

The other part was practical. I work on Jellify, a music player for Jellyfin, and it ships on iOS. Building and testing an iOS app, even in a CI pipeline, requires Xcode, which requires macOS. If I was going to have Macs in the rack anyway, they might as well pull their weight running everything else too.

Here’s what that rack looks like, from the network on down.

The Network

My homelab uses UniFi networking throughout. The Dream Machine Pro handles routing and doubles as the console for managing everything remotely. The Aggregation switch provides the 10Gbit links, and a 24-port switch handles everything that doesn’t need the extra bandwidth.

Only the Cosmonautical datacenter (more on the datacenters in a sec) gets the 10Gbit link, because of how much data its nodes move between each other. Jellyfin, Nextcloud, and friends read their libraries over NFS from the UNAS, SeaweedFS replicates every write across its three volume servers, and Patroni streams every Postgres change from the primary to its replicas. A gigabit link tops out around 115 MB/s, which that mix can eat up on its own, and when it does, everything sharing the link slows down with it. With ten times the headroom, a replica catching up or a library scan doesn’t get in the way of someone’s movie. The Jellify nodes mostly talk to GitHub, where my internet connection is the bottleneck long before the switch is, so 1Gbit through the USW-24 is plenty.

My favorite Ubiquiti Networks fun fact is that founder Robert Pera had worked at Apple before starting the company, so it seems poetic to unify Apple and Ubiquiti hardware together.

The Compute

The six Mac Minis live in two Sonnet RackMac Mini enclosures, three to a 2U shelf, and each shelf is its own Nomad datacenter.

RackMac Mini · 2UCosmonautical
  • orionM4 Pro24GB
  • taurusM4 Pro24GB
  • cassiopeiaM4 Pro24GB+ Thunderbolt DAS, 10 HDDs
RackMac Mini · 2UJellify
  • galileoM416GB
  • hopperM416GB
  • lovelaceM416GB
Two shelves, three Minis each, one Nomad datacenter per shelf.

The top shelf, Cosmonautical, is the core cluster. Its three M4 Pros run Nomad and Consul as server-client combos and host everything I personally rely on, from Postgres to Jellyfin.

The bottom shelf, Jellify, is client-only. It runs GitHub Actions runners for Jellify and hosts Penpot for Jellify’s design work. Xcode, Maestro, simulators, and the Android SDK are all provisioned by Ansible, so a fresh Mac goes from unboxed to building and testing apps with a single playbook run.

Back in 1999, Apple ran an ad bragging that the Power Mac G4 was so powerful it counted as a supercomputer under US export rules, complete with tanks rolling in to guard it. Makes me wonder what kind of equipment should be guarding this setup.

The Storage

Bulk SSD storage lives on a UNAS Pro 8, which serves NFS shares (music, books, ROMs and so on) to the whole cluster. A DIY Thunderbolt DAS holds 10 hard drives and is attached directly to Cassiopeia.

Altogether Now

Here’s how it all fits together:

Dream Machine Prorouter and UniFi OS console
USW Aggregation10 Gbit

Cosmonautical

  • orion
  • taurus
  • cassiopeia

NFS reads, SeaweedFS replication, Patroni streaming

USW-241 Gbit

Jellify

  • galileo
  • hopper
  • lovelace
  • + x64 Linux nodes

Mostly GitHub, so the internet uplink is the bottleneck

UNAS Pro 8NFS shares (music, books, ROMs) mounted across the cluster
Two Nomad datacenters, one rack. Only Cosmonautical gets the 10 Gbit backbone.

Software Sells Hardware

Hardware is nothing without the software to leverage it. As you might imagine, running bleeding-edge, proprietary hardware does limit the fun, but there is still plenty of fun to be had.

The OS: macOS

The base of the stack is macOS. Linux does support Apple Silicon thanks to the people way smarter than me working on Asahi Linux, but it doesn’t support M4 chips - at least as of this writing.

macOS is very much designed for the desktop, and most of the challenges come down to macOS assuming there’s a person sitting in front of the screen, ready to click “Allow”.

Local Network Privacy

Since macOS Sequoia, apps need permission to talk to devices on the local network, and that permission is granted through a GUI prompt. That’s great on a laptop, but not on a headless server. It’s tied to the binary’s code signature, so every time Homebrew upgrades a service like consul or php, macOS treats the new binary as a stranger and wants a fresh click. As far as I can tell this can’t be scripted either, since the permissions database is protected by System Integrity Protection. It’s pretty frustrating: the daemon logs no route to host while nc and ssh to the exact same IP work just fine.

Removable and Network Volumes

macOS gates removable and network volumes behind privacy prompts, so you get treated to gems like “This application would like to access files on a removable volume” and “This application would like to access files on a network volume”. On a cluster whose storage lives externally, that’s pretty much everything. Until someone clicks “Allow”, the task just sits waiting to start up.

Neither of these have been a dealbreaker for me, since nowadays these prompts only come up after I’m doing upgrades, but it does mean I’m using macOS Screen Sharing or connecting through Guacamole when things change to ensure that everything is connecting properly.

The Orchestrator: Nomad

With multiple nodes running, I wanted to have an orchestrator to keep everything in check. Before the Macs, my homelab ran on a 3-node Harvester cluster, so Kubernetes was what I reached for first. The problem is that Kubernetes is built and designed with Linux in mind, relying on Linux primitives to do its job.

I could have run a Linux VM atop macOS to make this work, but that’s an extra layer of complexity on every node and it walls workloads off from the things that are fun about Apple Silicon in the first place: the Media Engine, Metal, and CoreML.

Nomad ended up being a perfect fit. It’s a single macOS binary, and its raw_exec driver can schedule jobs straight on the host. That means Jellyfin gets hardware transcoding, Ollama gets Metal, and CoreML apps get the Neural Engine, all without any GPU passthrough to set up. Nice.

Nomad is also multi-platform, so the cluster isn’t locked into macOS. I’ve got Linux nodes in the Jellify datacenter now, and if I ever want a Windows box, it can join too.

The Container Runtime: Apple Container

Not everything I run ships as a native macOS app, though. A lot of apps I deploy only come as an OCI image, and so I needed a container runtime to bring them online. The obvious choice is Docker, whether through Docker Desktop or something lighter like Colima. Podman is also an option, and even has a task driver for Nomad. I opted instead to write my own task driver for Apple’s container tool, which runs each Linux container in its own lightweight VM on the Virtualization framework.

Docker Desktop, Colima, and Podman all work the same way on the Mac: they boot one big Linux VM in the background and run every container inside of it. Colima trims the overhead of Docker Desktop, but it’s still that same single shared VM. That VM is a box I have to size up front, carving out CPU and memory whether anything is running or not, and when it gets wedged, every container on that node goes down with it. It’s also one more thing for Nomad to know nothing about, since all it sees is a CLI talking to a daemon that’s talking to a VM.

Apple’s container flips that around. There’s no shared VM to babysit; each container is its own VM, booting in under a second and sized to what the job asks for. When a Nomad allocation stops, its VM goes away and the memory goes back to macOS, ready for another job to use. Every container also gets its own IP address, so there’s no port-forwarding dance between the host and a VM, and one misbehaving container can’t take its neighbors out. Apple’s Meet Containerization session from WWDC25 goes deeper under the hood to show how it all works.

Docker Desktop, Colima, Podman

macOS
One Linux VM, fixed CPU + RAM
containercontainercontainerreserved, sitting idle
  • Sized up front, used or not
  • Ports forwarded host ↔ VM
  • VM wedges, every container goes down

Apple container

macOS
container192.168.64.2
container192.168.64.3
container192.168.64.4
free memory, back to macOS
  • Each VM sized to its job
  • Own IP, no port forwarding
  • One fails, the rest keep running
Dashed boxes are VMs. One shared VM for everything, or one tiny VM per container.

It’s also just… it’s Apple’s. It’s written in Swift and built on the same frameworks as the rest of the OS, so it gets better with every macOS release instead of fighting against it. On a cluster that’s all-in on Apple Silicon where memory is at a premium, using Apple’s own container runtime felt like the natural fit. It’s even open source.

If you’d like to try the driver out for yourself, you can grab the latest release from my GitHub repository. Feature requests welcome :)

The Service Mesh: Consul

Being built under the same HashiCorp roof, Nomad pairs nicely with Consul for service discovery, health checks, and key/value storage. Every service registers itself with Consul, so jobs find each other by name over DNS (<service>.service.consul) instead of hard-coded IPs.

It pulls double duty, too: Consul is the distributed config store that Patroni uses to handle Postgres failover, and it’s where the Terraform state for my Nomad jobs lives.

The Management: Ansible

Setting up six Macs by hand was never going to happen, I’m far too lazy for that.

Ansible was the obvious choice for managing this six-pack. It runs over SSH and only needs Python on the target, which the Xcode Command Line Tools provide. There’s no agent to install and nothing else to bootstrap beyond flipping on Remote Login.

Since adopting Ansible as my management tool of choice, I’ve built up quite a collection of collections (Collectionception?). They’ve grown into a nice lil family and are all published on Ansible Galaxy:

The Nomad jobs themselves are defined in Terraform, and both the Ansible playbooks and Terraform configs get run by Semaphore, which (of course) runs as a Nomad job on the very cluster it deploys to.

Apple + IBM sounds familiar…

If you’re keeping track: Nomad, Consul, and Terraform come from HashiCorp, which IBM acquired in 2025, and Ansible comes from Red Hat, which IBM acquired back in 2019. So my homelab is technically Apple hardware running IBM software.

Just missing Motorola in the mix and it’s like AIM never dissolved.

Roll Out the Barrels

The jobs I run on the rack can be broken up into tiers, based on how critical they are.

Tier 3Secondary Applications

Tier 2Mission Critical Applications

  • NextcloudNomad service, plus batch jobs for cron, previews, NFS scans, and Backblaze backups
  • JellyfinNative .app, VideoToolbox transcoding. Dispatcharr tunes Live TV
  • AudioMuse-AINative .app, sonic analysis on CoreML
  • Ollama + Open WebUI
  • PenpotApple container on the Jellify datacenter, SSO gated to GitHub teams

Tier 1Core Infrastructure

Stacked by criticality. Everything above leans on Tier 1, so that's what gets the most tender loving care.

Some jobs are raw_exec, running on bare macOS (Jellyfin, Postgres/Patroni, Nextcloud’s php-fpm, AudioMuse), while others are Linux containers through Apple container via my nomad-driver-container plugin.

Shut Up and Drive!

All of this would be a very beautiful but expensive space heater if nobody used it. Cosmonautical is mostly used by me, my friends, and my family, and Jellyfin sees the most use by a mile.

Jellyfin and Co.

Jellyfin is where I watch and listen to damn near everything. Movies, shows, and Live TV through Dispatcharr all come from the cluster, and when someone wants something that isn’t in the library yet, they ask for it in Seerr instead of texting me. Since Jellyfin runs natively on macOS, transcoding goes through the Media Engine, so a friend streaming on hotel Wi-Fi doesn’t bring the Mac to its knees.

Music is obviously the part I care about the most. It’s how Jellify gets dogfooded: I stream self-hosted music through Jellify every day across various setups, so I’m constantly on the hunt for bugs or imagining new features.

Sonic Analysis with AudioMuse-AI

Streaming services have one big advantage over a self-hosted library, and that’s recommendations. Spotify knows that a song is upbeat, or mellow, or sounds a lot like another song. A folder of FLACs on a NAS doesn’t know any of that.

AudioMuse-AI closes that gap. It analyzes the audio of every track in the Jellyfin libraries, building up a sonic profile of the whole collection. It runs as a native .app on macOS, so the analysis happens on Apple Silicon with CoreML, and the results live in Postgres and Redis alongside everything else.

AudioMuse-AI’s Jellyfin plugin exposes all of it through Jellyfin itself. The plugin swaps Jellyfin’s Instant Mix for one built on sonic similarity, so any Jellyfin client gets smarter mixes without changing a thing. It also adds endpoints for similar tracks and artists, plain-language search (“upbeat summer songs”), and chat-generated playlists.

To make those easy to use in Jellify, I wrote a typed client for the plugin, @jellify-music/audiomuse-ai-jellyfin-sdk, built on top of the Jellyfin TypeScript SDK. Jellify checks if the plugin is installed on your server, and if it is, you can describe a playlist and have AudioMuse-AI build it from your own library. All of that analysis runs on hardware I own, against music I own.

Jellify Actions

The Jellify datacenter was built to run GitHub Actions for Jellify. A Nomad system job puts one ephemeral runner on every node tagged as a runner. Each runner takes exactly one job, wipes its work folder, and registers a fresh replacement, so no build ever sees the last one’s leftovers.

Any action that doesn’t need a Mac lands on x64 Linux runners from the same Nomad job. These include:

Fork PRs get GitHub’s hosted runners instead, so fork code never runs on my hardware, as GitHub recommends.

Maestro Testing

Maestro end-to-end tests are the headline act, and the reason those runners need to be Macs in the first place: the iOS Simulator only runs on macOS.

Every PR, plus a nightly run, builds a release copy of the app and drives it through the full UI flow on both an iOS Simulator and an Android emulator: setup and login, home, quick actions, library, search, discover, settings, and the player and queue. The same flows run on both platforms, with small helper subflows papering over the differences (iOS has no back button, for one).

The tests run as raw_exec straight on macOS, using the Xcode, simulators, and Android SDK that Ansible provisions, so there’s no VM between the emulator and the hardware. When a run finishes, screenshots, logs, and the UI hierarchy get uploaded as artifacts, and the result gets posted to Discord. If a PR breaks the player or the queue, I find out before it ships, not from a bug report.

Release Notes

The Jellify runners are mostly walled off from Cosmonautical. There’s one exception, though: release notes.

Every Jellify release, both store builds and over-the-air updates, gets its notes written by an LLM running on the cluster. The pipeline is a composite GitHub Action with a few steps:

  1. Work out the tag. A store release counts from the previous store release, so people updating from the App Store or Play Store see everything since their last update, including anything that already shipped over the air. An OTA update counts from the previous tag of either kind, so it only covers what’s new.
  2. Collect the changes. A script walks every commit between the two tags and asks the GitHub API which merged PR each one belongs to. Then it uses GraphQL (the only API that tells you which issues a PR closes) to pull in the closed issues, and it collects every contributor who isn’t a bot. Version bumps and merge commits are skipped, since they don’t say anything about the release.
  3. Write the narrative. The PR titles, closed issues, and any commits that didn’t come from a PR go to gemma4:12b, running on Ollama and served through the OpenAI-compatible API in Open WebUI. The prompt asks for a short summary and three highlight bullet points. For OTA updates, it also mentions that the update downloads the next time the app is opened.
  4. Ship it. The narrative goes to TestFlight with the iOS build, and to Discord through a webhook that pings the release role. The GitHub release gets the narrative too, followed by the list of closed issues, merged PRs, and a thank-you to everyone who contributed.
  1. 1Work out the tagLast store release, or last tag of either kind for OTA
  2. 2Collect the changesMerged PRs, closed issues, contributors
  3. 3Write the narrativegemma4:12b on Ollama, via Open WebUICosmonautical
  4. 4Ship itTestFlight, Discord, GitHub release
The one place the Jellify datacenter reaches into Cosmonautical: borrowing its LLM capabilities.

So every Jellify release goes from merged PRs to TestFlight and a Discord announcement without me writing a word, all powered by a Mac Mini in my rack.

Designing in Penpot

The newest job on the rack is Penpot, an open source design and prototyping tool. Jellify’s designs used to live in Figma, but we wanted a more free and open alternative and Penpot is the one we landed on. Unlike the rest of my Tier 2 apps, it runs on the Jellify datacenter: the frontend, backend, and exporter each run as an Apple container task on the Jellify Macs.

It doesn’t bring any backing services of its own, though. Consul spans both datacenters, so Penpot finds the same Postgres and Redis clusters as every Cosmonautical job, and keeps its assets on an NFS share. Logins go through Keycloak, and only members of Jellify’s design, engineering, and triage teams on GitHub get in. A Nomad batch job syncs those teams into a Keycloak group every 15 minutes, so adding someone to a GitHub team is all it takes to give them access.

It also got me reacquainted with the Network Volumes prompt from earlier. Each Mac quietly waited for someone to click “Allow” before Penpot’s containers could start, and I had deployed Penpot when I wasn’t there to click it.

Standard Operating Procedures

With vulnerabilities landing faster than ever, I’ve had plenty of practice running through patching procedures. Patches go in one of two ways: Homebrew via Ansible, or Nomad jobs via Semaphore.

Homebrewed

Homebrew upgrades get deployed by rerunning the Nomadintosh playbook. Every run upgrades Nomad, Consul, and the rest of the Homebrew packages in my inventory to their latest versions, so patching a host is as simple as running the playbook again.

Upgrading is the easy part. Homebrew swaps the binary on disk, but anything already running keeps using the old one, so the playbook also handles the restarts:

The one step that can’t be automated is the privacy prompts. After an upgrade, I hop onto each Mac via Guacamole and click “Allow” on the Local Network and file access prompts for the freshly signed binaries.

Nomad Life

Version bumps for Nomad jobs come from Renovate, which opens a PR against my Terraform whenever a new release of an app ships. Once I merge it to main, Semaphore runs terraform plan and then holds the change for my approval before terraform apply rolls it out to the cluster. GitOps FTW.

System Updates

This is where we reach another one of macOS’s weak points: system updates will invariably require a restart. There’s no live patching and no swapping out the kernel while the host keeps serving, so every macOS update means taking a node down for 5-15 minutes while it installs and reboots.

The tiering takes most of the sting out of this. Everything in Tier 1 is either highly available or able to fail over, so Postgres hands off to a replica, Consul and Nomad hold quorum on the remaining servers, and Nomad reschedules what it can onto the other Macs. I just do one node at a time and wait for it to rejoin before moving on to the next. Security updates are set to install automatically, so at least the most urgent patches aren’t waiting on me.

Still, it’s a pain. Every update is a planned outage for whatever can’t move, and a reason to babysit the rack. Apple, if you’re reading this: I’d love to be able to run these system updates without a full reboot.

The Power to Be Your Best

How did my planning around performance per watt pan out? Pretty well, actually.

Before the Macs, my three-node Harvester cluster (each node with a Ryzen 7 5700G and an RTX 4060) idled somewhere in the mid 200Ws, and could easily pull around 400W once I threw some real load at it. Those numbers come from remembering what my UPS showed, not careful measurement, but they’re in the right ballpark.

The new rack (affectionately referred to as “Mac Rack Mini Pro”) has twice as many nodes and still comes in well under that. It idles in the mid 100Ws, and under load it settles in the mid 200Ws, about where the old cluster used to idle. Those are whole-rack numbers by the way: the UPS also powers the networking gear, the UNAS, and the DAS, so the Minis themselves are drawing even less than that.

Idle

Harvester x643 nodesmid 200s W
Mac Minis6 nodesmid 100s W

Under load

Harvester x643 nodes~400 W
Mac Minis6 nodesmid 200s W
Watts at the wall, approximate, from what the UPS showed. Twice the nodes, and under load the Macs land about where Harvester used to idle.

That’s added up over time. Since making the switch, my power usage has dropped by around 75–125 kWh a month. Twice the nodes, less power.

Should You Eat the Forbidden Fruit?

For most people, as you might’ve guessed, probably not. If you don’t need macOS, a cheaper Linux box with discrete graphics for hardware acceleration will get you to the same place with far less friction.

But if you’re a die-hard Apple fan, appreciate fun hardware, or your use case actually requires Apple’s software like Xcode, the seeds you sow will yield a nice harvest. The Minis are whisper quiet, sip power, and can really crunch data. Running them as a cluster, as you can see, is entirely possible.

They aren’t cheap, and macOS is prepared to fight you every step of the way. No matter how much you automate, be prepared for reboots, and to remote into the desktop every now and again to click through whatever prompt it’s decided to throw at you this time.

What’s Next?

I truly believe a homelab is never really finished. As such, I’ve already got a couple of ideas lined up for the rack ;)

Downloading More RAM

The biggest limit on what I can run locally is memory. Each Cosmonautical Mini has 24GB of unified memory, and that has to cover the model, its context, and everything else the node is running. That rules out a lot of the bigger open models.

Apple recently added RDMA over Thunderbolt 5 to macOS, which lets one Mac read and write another Mac’s memory directly, without going through the network stack. Taurus and Orion both have Thunderbolt 5 ports, so I’m planning to cable them together and split a single model across both of them.

Ollama can’t do that part, since it only runs a model on one machine. Apple’s MLX can, though. Its distributed mode is built to use RDMA over Thunderbolt, and mlx-lm can shard a model across both Minis and serve it over an OpenAI-compatible API. That means Open WebUI and the release notes pipeline can talk to it the same way they talk to Ollama today.

HomeKitschy

My smart home already runs on Home Assistant OS, on a (you guessed it) Mac Mini. This one’s a 2012 Intel model with a Nortek GoControl HUSBZB-1 QuickStick Combo Zigbee + Z-Wave USB stick plugged into it. Home Assistant’s HomeKit Bridge integration exposes its entities to HomeKit, and an Apple TV 4K acts as the home hub, so everything shows up in the Home app and works with Siri, no matter what brand it is.

Next up, I want to expand the setup with Node-RED, MQTT, and Zigbee2MQTT. Rather than piling more add-ons onto the old Mini, I’m going to deploy them as Nomad jobs, so they’re coordinated and managed like everything else on the rack.

Once that’s in place, the rack itself can join the house. The UPS’s power draw (via Network UPS Tools) and each node’s stats can go into Home Assistant, onto a Lovelace dashboard, and through the HomeKit Bridge into the Home app, with an alert on my phone when something goes down. Then “Hey Siri, how’s the cluster?” would get an actual answer, and Home automations could react to the rack the same way they react to everything else in the house.

I’ve also ordered an Apple HomeView for the purpose of seeing how it reacts to Jellify, but it should pair nicely with these Home Assistant plans.

A Few Thank Yous

A lot of people made this setup possible and inspired me to build it, and they deserve a salute.

The Maintainers

This project really does stand on the shoulders of giants. Thank you to the maintainers of:

The Builders

The apps are the reason the cluster exists at all. Thank you to the open source contributors behind Nextcloud, Dispatcharr, Ollama, Open WebUI, RomM, Guacamole, Seerr, and Penpot.

And to the people behind the services those apps lean on, quietly doing their jobs underneath: PostgreSQL and Patroni, Redis, SeaweedFS, Traefik, Fail2ban, OpenLDAP, Keycloak, and Renovate.

The Visionaries

Some people showed me this was possible and made me realize its potential before I ever racked a Mac. Thank you to:

The Sponsors

Finally, thank you to everyone who sponsors me on GitHub and Patreon. Your support is what lets me spend time building systems like this one and working on Jellify.