123DevOps··7 min read

What is Lima? Linux VMs on the Mac for running containerd, Docker, Podman and Kubernetes

Learn what Lima really is (a Linux VM tool, not a container runtime), how it shares files and forwards ports, the templates for containerd/nerdctl, Docker, Podman, k3s and k8s, and why it sits underneath Colima and Rancher Desktop.

Kubernetes

Containers are a Linux kernel feature. macOS has no namespaces or cgroups, so every “Docker on the Mac” hides a Linux virtual machine somewhere. Lima is the open source piece that creates and manages that VM, which is why it shows up underneath tools such as Colima and Rancher Desktop.

What is Lima

The name comes from Linux Machines. In its official definition, Lima “launches Linux virtual machines with automatic file sharing and port forwarding”, similar to WSL2 on Windows. The repository description sums it up: Linux VMs, with a focus on running containers.

One point deserves clarity, because people often say “the Lima container runtime”: Lima is not a container runtime. It doesn’t run containers on its own, as containerd or CRI-O do. It boots a Linux VM and, inside it, installs and configures a runtime (containerd with nerdctl by default, or Docker, Podman, k3s, kubeadm…). The project’s original goal was precisely to bring containerd and nerdctl to Mac users, but it works for any Linux VM use case.

Lima was accepted into the CNCF Sandbox in 2022 and moved to Incubating in October 2025. As of November 2026 that is its current status; check the project page at cncf.io/projects/lima. It is licensed under Apache 2.0, and the latest version on the GitHub releases page as of this date is 2.3.0. Its focus is macOS, but it also runs on Linux and NetBSD hosts, among others.

What problem it solves

  • Containers on the Mac without Docker Desktop: a lightweight, CLI-managed VM with the runtime of your choice.
  • Transparent files and ports: your Mac home directory shows up inside the VM, and a port opened in the VM becomes reachable on localhost on the Mac, with no manual setup.
  • Disposable Linux environments: test a distribution, a kernel or a provisioning script without cluttering your machine.
  • Other architectures: on Apple Silicon Macs, the --rosetta (on vz VMs) and --arch options help run x86_64 binaries and images when there’s no ARM build.
  • Real local Kubernetes: k3s or kubeadm clusters in VMs, closer to production than a container pretending to be a node.

How it works

limactl reads a YAML template that describes the VM: image, CPUs, memory, disk, mounts, ports and provisioning scripts. It starts the VM with the available hypervisor, injects a guest agent that detects open ports and sets up forwarding, and mounts host directories.

Piece Role
limactl CLI that creates, starts, stops, clones and deletes instances
lima Shortcut for limactl shell; runs commands inside the default instance
Templates Ready-made YAMLs (docker, podman, k3s, k8s, distributions…) that can be combined with base
VM types vz (Virtualization.framework, default on macOS 13.5+), qemu, krunkit, plus wsl2 and others
Mounts Directory sharing (reverse-sshfs, 9p or virtiofs)
Guest agent Detects open ports in the VM and forwards them to the host
containerd + nerdctl Installed by default in the default template, in rootless mode

Who uses Lima underneath, according to the project’s documentation and README: Rancher Desktop and Colima (both described as based on Lima), Finch, and Podman Desktop, which has a plugin for Lima VMs. Rancher Desktop uses Lima on macOS and Linux; on Windows, it uses WSL2. The Lima documentation recommends not touching the Rancher Desktop VM directly with limactl.

Hands-on example

limactl is installed on the machine where this article was written. The commands below don’t download anything and were actually run (I omitted the warning’s timestamp in the output):

limactl --version
limactl info | jq -c '{version, vmTypes, hostOS, hostArch}'
limactl list
limactl version 2.3.0
{"version":"2.3.0","vmTypes":["vz","krunkit","qemu"],"hostOS":"darwin","hostArch":"aarch64"}
level=warning msg="No instance found. Run `limactl create` to create an instance."

The list of local templates also works offline (filtered excerpt):

limactl create --list-templates | grep -E '^(default|docker|docker-rootful|podman|k3s|k8s|k0s)$'
default
docker
docker-rootful
k0s
k3s
k8s
podman

From here on, the commands follow the official documentation and were not run, because limactl start downloads the VM image. The current template syntax is template:NAME; the template://NAME form, with slashes, is from the 1.x series.

# containerd + nerdctl ("default" instance)
limactl start
lima nerdctl run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine

# Rootless Docker, using the Mac's docker CLI
limactl start template:docker
export DOCKER_HOST=$(limactl list docker --format 'unix://{{.Dir}}/sock/docker.sock')
docker run -d --name nginx -p 127.0.0.1:8080:80 nginx:alpine

# Podman
limactl start template:podman

# Kubernetes with k3s
limactl start template:k3s
export KUBECONFIG=$(limactl list k3s --format '{{.Dir}}/copied-from-guest/kubeconfig.yaml')
kubectl get nodes

For full kubeadm, use template:k8s; according to the documentation, it supports multiple nodes since Lima 2.0. To adjust resources, create your own template that inherits from another one with base. This one was validated locally with limactl validate, which downloads nothing:

# dev.yaml: a Docker VM with more resources and a fixed port
base:
  - template:docker
cpus: 4
memory: "6GiB"
disk: "60GiB"
portForwards:
  - guestPort: 8080
    hostPort: 18080
limactl validate dev.yaml   # run: "`dev.yaml`: OK"

# not run: start downloads the image
limactl start --name=dev --mount-only ~/projects:w dev.yaml
limactl shell dev
limactl stop dev && limactl delete dev

By default, the templates mount your home directory read-only. --mount-only ~/projects:w replaces that mount with a single writable folder. Prefer this over mounting your whole home as writable, and don’t declare overlapping mounts (such as ~ and ~/projects together), which the documentation says are not supported.

When to use it (and when not to)

Use Lima when:

  • You want containers on the Mac with open source tools and full control of the VM.
  • You need disposable Linux VMs for testing, with your home mounted and ports forwarded.
  • You want local Kubernetes with k3s or kubeadm in a VM, as a complement to what we compared in Lightweight local Kubernetes.
  • You’re building a tool that needs a manageable Linux VM underneath, as Colima and Rancher Desktop do.

Prefer another option when:

  • You want a graphical interface and zero configuration: Rancher Desktop, Podman Desktop or another option compared in Kiri, the Docker Desktop alternative.
  • You’re on Linux and only need containers: run Docker or Podman directly on the host, no VM.
  • You need a container runtime for production Kubernetes nodes: then the choice is containerd or CRI-O, not Lima.

Alternatives

Tool What it is Relationship with Lima
Lima Linux VMs with automatic mounts and ports Foundation for Colima and Rancher Desktop
Colima CLI for Docker, containerd or Incus with minimal setup Built on Lima
Rancher Desktop Desktop app with containerd/dockerd and Kubernetes Uses Lima on macOS and Linux
Podman Desktop Desktop app for Podman and Kubernetes Compatible with Lima VMs via a plugin
WSL2 Linux VM integrated into Windows Same concept, on Windows

Summary

  • Lima creates Linux VMs with automatic file sharing and port forwarding
  • It is not a container runtime: containerd/nerdctl, Docker, Podman or Kubernetes run inside the VM
  • CNCF Incubating project as of November 2026; check the current status on the project page
  • Templates use the template:NAME syntax (docker, podman, k3s, k8s…)
  • limactl validate checks a template without downloading anything; limactl start downloads the image
  • Colima and Rancher Desktop are built on Lima
  • Mount as writable only what the VM needs to change

Every container on the Mac runs in a Linux VM; with Lima, that VM stops being a black box.

Get updates on new posts and stay in the loop!