Download and Install Barn
5 minute read
Barn is one command-line tool, barn, with a small companion binary for editing /etc/hosts. On Apple Silicon it also ships Barn.app, the native component that runs macOS guests. Install it as your normal user: Barn asks for sudo itself when a host setup step needs it.
Install Barn 1.5.0 with Homebrew or the installer, or choose an archive or package below. Run barn version to verify the installed version. Build from source
Install
Install with Homebrew. This also installs QEMU, which Linux guests need:
On Apple Silicon the formula also installs Barn.app, signed with Developer ID and notarized by Apple; the CLI finds it automatically. To run macOS guests, continue with barn mac doctor in the macOS guide. Intel Macs run Linux guests only.
The installer script picks the amd64 or arm64 archive, verifies its SHA-256 against the release’s checksums.txt, and installs into ~/.local/bin without sudo:
Add the export PATH=… line to ~/.bashrc or ~/.zshrc. The script works on macOS too if you prefer not to use Homebrew. It installs versioned copies under ~/.local/bin/.barn-releases/; leave that layout as it is.
There is nothing else to set up now. The first interactive barn up checks for QEMU, firmware, and the host network, shows what it will install, and asks once before doing it. For a script or CI job, prepare the host up front with barn setup --yes, or preview the changes with barn setup --dry-run (details).
System requirements
| Guest | Host | Needs |
|---|---|---|
| Linux | macOS on Apple Silicon or Intel | QEMU 8.2.1 or later (HVF acceleration) |
| Linux | Linux on amd64 or arm64 | QEMU 6.2 or later, a usable /dev/kvm, and NetworkManager or systemd-networkd |
| macOS 27 | Apple Silicon running macOS 27 or later, with a logged-in desktop session | Barn.app; no QEMU |
A Linux VM defaults to 1 vCPU, 2 GiB of memory, a 64 GiB root disk, and a 128 GiB data disk. Disks are thin-provisioned and grow only as the guest writes data.
A new macOS VM defaults to 4 vCPUs and 8 GiB of memory. Its disk inherits the prepared base’s capacity. The first base defaults to 100 GiB. Allow about 65 GiB of free space to download Apple’s macOS 27.2.1 restore image and install the base. Later VMs share the base’s disk blocks through APFS cloning. See macOS requirements.
Download Barn 1.5.0
Released on 2026-12-03. Pick your host operating system and CPU architecture:
SHA-256 checksums · Detached signature · Release metadata · Installer script
Every archive and package has a matching .spdx.json software bill of materials on the GitHub release page.
| File | What it is | Shipped in |
|---|---|---|
barn | The CLI for Linux labs and macOS VMs | Every archive and package |
barn-hosts-helper | Companion that edits /etc/hosts for barn hosts install | Every archive and package, paired with its CLI |
Barn.app | Native runner and desktop window for macOS guests | The macOS arm64 archive and the Apple Silicon Homebrew install |
Other installation methods
Linux packages
The DEB and RPM packages pull in QEMU, UEFI firmware, and OpenSSH as dependencies. On ARM64 hosts, replace amd64 with arm64:
Manual archives
Download barn_1.5.0_<os>_<arch>.tar.gz and checksums.txt, and verify the digest before extracting:
Extract the archive and add its bin/ directory to PATH. Keep the files together: the CLI checks the helper’s embedded SHA-256 before running it, and looks for bin/Barn.app next to itself.
Build from source
To try unreleased changes or build Barn.app yourself, see Build from Source.
Upgrade Barn
In 1.5.0, the release owner signs checksums.txt. Use the public key from a trusted source to verify checksums.txt.sig before checking individual downloads. Verification command
When upgrading from 1.3.0 or earlier, update the CLI and check barn version before running barn update. Catalog 2026112601 uses a new Minisign key. Version 1.3.0 rejects that signature and keeps its previously active catalog.
Upgrade through the channel you installed with. With Homebrew:
On Linux, run install.sh again or install the newer DEB/RPM package, then check command -v barn and barn version. If you have both a ~/.local/bin copy and a packaged one, PATH decides which runs; upgrade that one or remove the other.
Upgrades keep everything under ~/.barn: VM disks, SSH keys, state, and configuration. Before upgrading on a Mac, stop running macOS VMs (barn mac stop NAME), because the CLI, helper, and Barn.app are replaced together.
Some releases change defaults. Check these before running barn up on an existing lab, and run barn plan to see the effect:
| Upgrading from | What changed | To keep the old behavior |
|---|---|---|
| 1.4.0 to 1.5.0 | New labs default to Debian 13. Existing labs retain their saved image default for new peers. | Use barn init -I u24 to start a new Ubuntu 24.04 lab. |
| 1.2.x | vm_image: rocky now means Rocky Linux 10 (el10) and vm_image: ubuntu means Ubuntu 26.04 (u26) | Set vm_image: el9 or vm_image: u24 |
| 1.1.x | New nodes default to 1 vCPU / 2 GiB instead of 2 vCPU / 4 GiB; existing VMs keep their size until you change it | Set vm_cpu: 2 and vm_mem: 4GiB |
Upgrading Barn never changes the OS inside existing VMs. Guest images update separately:
| To update | Run | Effect on existing VMs |
|---|---|---|
| Barn itself | brew upgrade, install.sh, or a newer package | None; disks and state are kept |
| The Linux image catalog | barn update (or barn update --mirror) | None; new and recreated nodes use the newer images |
| Cached Linux base images | Preview with barn image update --dry-run, then run barn image update | Existing nodes keep their backing images |
| The macOS base image | barn mac image update | None; apply it to a VM with barn mac recreate NAME --update |
The 1.5.0 release notes cover mirror upgrades and image defaults. For proxy or PATH issues, see Troubleshooting. To remove Barn, see Uninstall.