MacServe.Log in or sign upSign up

Guides

Running Linux on an Apple silicon Mac

Three ways to get Linux onto an M-series Mac, a virtual machine, Docker, or Asahi on the bare metal, and which one suits hosting.

Why you need Linux at all

macOS is a Unix, which misleads people into thinking it is close enough. For hosting it isn't. There is no systemd, the filesystem is laid out differently, the networking primitives differ, and the package ecosystem has drifted a long way from anything your deployment target runs.

Nearly every deployment guide, container image and install script you will find was written for Linux. Running macOS as your server means translating all of that, forever, on your own. Running Linux on the Mac means you follow the instructions as written.

A virtual machine

A VM gives you a real Linux kernel with its own filesystem, services and network stack, virtualised on Apple's own framework so the overhead stays small on M-series hardware.

This is the option that behaves like a server. You get a machine you can SSH into, install packages on, and break without consequence to macOS. The cost is memory: whatever you allocate is reserved, so a Mac with 8 GB in total needs a careful split.

Docker, and what it is doing underneath

Docker Desktop on a Mac does not run containers natively. It starts a Linux virtual machine and runs them inside it. You are already paying for the VM, you just cannot see it, and what you get on top is a container-shaped interface rather than a machine you can log into.

For packaging an application that is a fine trade. For hosting it can be an awkward one, because you end up managing a fleet of containers through a layer that hides the Linux system underneath at exactly the moments you need to see it.

Asahi Linux on the bare metal

Asahi is the project reverse-engineering Apple silicon well enough to run Linux directly on it, with no macOS underneath. The results are impressive and the pace is fast.

As of September 2026 it supports the M1 and M2 families, and M3 support has been merged into the installer. M4 machines boot further than they used to but remain early bring-up, with no installer. Check the project's own feature-support pages before you plan around any of this.

The bigger consideration is that installing it means partitioning the machine and giving up macOS on that partition. For a Mac whose only job is to be a server, that can be a good trade. For the laptop you also use, it rarely is.

Asahi Linux: which hardware is supported

What we chose, and why

MacServe runs a Linux virtual machine on Apple's virtualisation framework. It was the only option that gives you a normal Linux server while leaving macOS exactly as it was. Your files are not shared into it, and you reach it over SSH like any other host.

Its disk is a sparse image on your Mac's internal SSD: it takes up only what Linux has actually written, but it stops growing at the size set when the server was created — 40 GiB by default. Nothing on the Mac is mounted inside it, so an external drive does not extend it either.

The caveat is the one every VM shares. Memory you assign to Linux is memory macOS no longer has. Start smaller than you think you need and raise it once you know what the workload actually wants.

Keep reading

Serving a site from a home connectionSet up a Linux server on your Mac