Skip to content

Download and Install Barn

Install Barn on macOS or Linux, check host requirements, and upgrade an existing installation.

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:

brew install pgsty/infra/barn
barn version

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:

curl -fLO https://github.com/pgsty/barn/releases/latest/download/install.sh
bash install.sh
export PATH="$HOME/.local/bin:$PATH"
barn version

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

GuestHostNeeds
LinuxmacOS on Apple Silicon or IntelQEMU 8.2.1 or later (HVF acceleration)
LinuxLinux on amd64 or arm64QEMU 6.2 or later, a usable /dev/kvm, and NetworkManager or systemd-networkd
macOS 27Apple Silicon running macOS 27 or later, with a logged-in desktop sessionBarn.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:

Host OSArchitectureArchiveDebian / UbuntuRHEL / Fedora
macOSApple Silicon (arm64)tar.gz——
macOSIntel (amd64)tar.gz——
Linuxx86-64 (amd64)tar.gzDEBRPM
LinuxARM64 (arm64)tar.gzDEBRPM

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.

FileWhat it isShipped in
barnThe CLI for Linux labs and macOS VMsEvery archive and package
barn-hosts-helperCompanion that edits /etc/hosts for barn hosts installEvery archive and package, paired with its CLI
Barn.appNative runner and desktop window for macOS guestsThe 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:

Debian / Ubuntu
barn_release=https://github.com/pgsty/barn/releases/download/v1.5.0
curl -fLO "$barn_release/barn_1.5.0_linux_amd64.deb"
curl -fLO "$barn_release/checksums.txt"
sha256sum --check --ignore-missing checksums.txt
sudo apt install ./barn_1.5.0_linux_amd64.deb
barn version
RHEL / Fedora
barn_release=https://github.com/pgsty/barn/releases/download/v1.5.0
curl -fLO "$barn_release/barn_1.5.0_linux_amd64.rpm"
curl -fLO "$barn_release/checksums.txt"
sha256sum --check --ignore-missing checksums.txt
sudo dnf install ./barn_1.5.0_linux_amd64.rpm
barn version

Manual archives

Download barn_1.5.0_<os>_<arch>.tar.gz and checksums.txt, and verify the digest before extracting:

barn_release=https://github.com/pgsty/barn/releases/download/v1.5.0
curl -fLO "$barn_release/barn_1.5.0_darwin_arm64.tar.gz"
curl -fLO "$barn_release/checksums.txt"
shasum -a 256 -c checksums.txt --ignore-missing

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:

brew update
brew upgrade pgsty/infra/barn
command -v barn
barn version

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 fromWhat changedTo keep the old behavior
1.4.0 to 1.5.0New 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.xvm_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.xNew nodes default to 1 vCPU / 2 GiB instead of 2 vCPU / 4 GiB; existing VMs keep their size until you change itSet vm_cpu: 2 and vm_mem: 4GiB

Upgrading Barn never changes the OS inside existing VMs. Guest images update separately:

To updateRunEffect on existing VMs
Barn itselfbrew upgrade, install.sh, or a newer packageNone; disks and state are kept
The Linux image catalogbarn update (or barn update --mirror)None; new and recreated nodes use the newer images
Cached Linux base imagesPreview with barn image update --dry-run, then run barn image updateExisting nodes keep their backing images
The macOS base imagebarn mac image updateNone; 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.

Table reader