Browse the docs

Start

Getting started

Hangar runs macOS, Linux and Windows virtual machines on your Mac, and lets you see and control where their network traffic goes. It's an app and a command line, working on the same VMs. It's also a local sandbox for AI agents: see Running AI agents.

Hangar needs macOS 27 or later on a Mac with Apple silicon.

Quick start

Pick a guest and run the commands; the image is downloaded once and cached, so the next VM takes seconds. First time here? Install Hangar and its command line first.

Hangar's base image comes with the Command Line Tools, Homebrew and Hangar's agent, and the user admin with the password admin.

hangar create mac --os macos --image base
hangar run mac

SSH is on, so from the terminal:

ssh admin@$(hangar ip mac --wait 60)

For your own account instead, leave out --image and add --user: hangar create mac --os macos --user dev.

Debian 13's official cloud image, downloaded once and cached. You're asked for dev's password.

hangar create deb --os linux --user dev --disk-image https://cloud.debian.org/images/cloud/trixie/latest/debian-13-genericcloud-arm64.tar.xz
hangar run deb --background
ssh dev@$(hangar ip deb --wait 60)

Add --ssh-key ~/.ssh/id_ed25519.pub to sign in with your key. From an installer ISO instead: hangar create deb --os linux --iso ~/Downloads/debian-13-arm64-netinst.iso.

Download the official Windows 11 Arm64 ISO from Microsoft's download page, then:

hangar create win --os windows --iso ~/Downloads/Win11_arm64.iso --user admin
hangar run win

Windows installs unattended and creates admin on its first start. Remote Desktop is on; --no-remote-desktop keeps it off.

Install

  1. Download Hangar.dmg from Releases and drag Hangar into Applications.
  2. Optional, for the command line: in Hangar choose Settings › Command Line › Install…

To link the command line by hand instead:

sudo ln -sf /Applications/Hangar.app/Contents/Helpers/hangar /usr/local/bin/hangar

In the app

  1. On the welcome screen (or after ⌘N) click macOS or Linux. The Quick Start tab opens with the Base image (the Command Line Tools, Homebrew and Hangar's agent) or Debian 13 picked; choose another if you like.
  2. Click Create and Start. The VM opens when it's ready.
  3. For your own account, an ISO, the latest IPSW from Apple or other sizes, use the Advanced tab.

Every Quick Start VM has the user admin with the password admin and SSH on. Change the password in the VM.

Where to next

  • Running AI agents: a VM of its own for Claude Code, Codex or any agent.
  • Creating VMs: macOS, Linux and Windows, from images, IPSWs, ISOs or a registry.
  • Commands: the everyday commands, and the full list.
  • Traffic rules: watch every connection a VM makes, and decide which ones get through.

Every command has help, too: hangar help <command>.