Browse the docs

Start

Creating VMs

Pick a guest, pick where it installs from, and Hangar does the rest.

Recipes

I want… Run
macOS with my own account hangar create mac --os macos --user dev
macOS base image (or xcode) ready hangar create mac --os macos --image base (or --image xcode)
macOS from an IPSW hangar create mac --os macos --ipsw ~/Downloads/UniversalMac_Restore.ipsw --user dev
Linux from a cloud image hangar create deb --os linux --user dev --disk-image https://cloud.debian.org/images/cloud/trixie/latest/debian-13-genericcloud-arm64.tar.xz
Linux from an installer ISO hangar create deb --os linux --iso ~/Downloads/debian-13-arm64-netinst.iso, then hangar run deb
Windows 11 hangar create win --os windows --iso ~/Downloads/Win11_arm64.iso --user admin
A copy of a VM hangar clone deb deb2
A VM from your team's image hangar create ci --os linux --image ghcr.io/acme/ci:1.0

You're asked for a password when you leave out --password. Set the size with --cpu, --memory and --disk (GB). Disks only use the space they need.

Guests and defaults

Guest Installs from CPU Memory Disk
macOS Hangar's image (--image vanilla by default, base or xcode), or an IPSW (--ipsw: a file, an https URL or latest from Apple) 4 8 GB 80 GB
Linux ISO (--iso), a cloud image (--disk-image, file or https URL), or an image in a registry (--image) 2 4 GB 20 GB
Windows 11 on Arm The official Arm64 ISO (--iso), installed unattended, or an image in a registry (--image) 4 8 GB 64 GB

Accounts

macOS (27 or later), Windows and Linux cloud images create --user on their first start. For cloud images Hangar writes a small cloud-init disk that holds only a hash of the password; add --ssh-key ~/.ssh/id_ed25519.pub to sign in with your key.

Cloud images can be raw, qcow2 (like Ubuntu's), or a .tar.gz / .tar.xz with a raw image inside (like Debian's).

Hangar's macOS images

Image What's inside
vanilla The latest macOS as Apple installs it, never started, so your account is created on its first start. New macOS VMs use it unless you pick an IPSW.
base Adds the Command Line Tools, Homebrew and Hangar's agent.
xcode Adds Xcode with the iOS platform to base.

base and xcode have the administrator admin with the password admin, which logs in automatically and uses sudo without a password. Remote Login (SSH) is on, and the VM never sleeps or locks its screen. Change the password in the VM's System Settings.

Each image builds on the one before, and parts a VM already has from another image are copied from your Mac instead of downloaded. They live at ghcr.io/baseguard/hangar-macos:vanilla, :base and :xcode. Hangar pins the tag to a digest once, checks every byte against the digests in that manifest, and never opens a downloaded disk on your Mac.

Debian and Ubuntu

New Virtual Machine › Linux downloads the latest Debian 13 or Ubuntu 26.04 LTS cloud image once from its publisher and checks it against the checksum list published next to it (integrity, not authenticity).

Your own cloud-init

--cloud-init user-data.yaml adds your #cloud-config (packages, files, commands) next to Hangar's account. Leave out --user to set up every account yourself.

Windows

Hangar reads the Windows ISO on this Mac to build the installation media, so use the official ISO from Microsoft; the media the installer writes back is never mounted here.

Windows VMs come with Remote Desktop on; --no-remote-desktop (or the switch in the app) keeps it off.

Downloads

macOS images, IPSWs, ISOs and cloud images are downloaded once over https and cached. The newest installed macOS is kept too, so the next macOS VM is a copy that's ready in seconds.

See and delete them in Settings › Downloads, or delete the ones you haven't used for a while:

hangar prune --older-than 30

ISOs later

Attach or detach an ISO for a macOS or Linux VM in the Virtual Machine menu or with hangar set <vm> --iso; macOS mounts it like a disk. A VM that Hangar started in a window without an ISO can change it while it runs.

Windows can't read ISOs here, as it needs a CD drive and VMs on a Mac don't have one.