# Download and Install Barn

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

---

LLMS index: [llms.txt](/v1.5/llms.txt)

---

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](../source-build/)

## Install {#install-the-release}

**macOS**

Install with [Homebrew](https://brew.sh/). This also installs QEMU, which Linux guests need:

```bash
brew install pgsty/infra/barn
barn version
```

On Apple Silicon the [formula](https://github.com/pgsty/homebrew-infra/blob/main/Formula/barn.rb) 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](../macos/#install). Intel Macs run Linux guests only.

**Linux**

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`:

```bash {wrap=true}
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](../../reference/commands/setup/#barn-setup)).

## System requirements {#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 |
{.platform-table .wide .expand}

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](../macos/#requirements).

## Download Barn 1.5.0 {#release-downloads}

Released on 2026-12-03. Pick your host operating system and CPU architecture:

| Host OS | Architecture | Archive | Debian / Ubuntu | RHEL / Fedora |
|---|---|---|---|---|
| macOS | Apple Silicon (`arm64`) | [tar.gz](https://github.com/pgsty/barn/releases/download/v1.5.0/barn_1.5.0_darwin_arm64.tar.gz) | — | — |
| macOS | Intel (`amd64`) | [tar.gz](https://github.com/pgsty/barn/releases/download/v1.5.0/barn_1.5.0_darwin_amd64.tar.gz) | — | — |
| Linux | x86-64 (`amd64`) | [tar.gz](https://github.com/pgsty/barn/releases/download/v1.5.0/barn_1.5.0_linux_amd64.tar.gz) | [DEB](https://github.com/pgsty/barn/releases/download/v1.5.0/barn_1.5.0_linux_amd64.deb) | [RPM](https://github.com/pgsty/barn/releases/download/v1.5.0/barn_1.5.0_linux_amd64.rpm) |
| Linux | ARM64 (`arm64`) | [tar.gz](https://github.com/pgsty/barn/releases/download/v1.5.0/barn_1.5.0_linux_arm64.tar.gz) | [DEB](https://github.com/pgsty/barn/releases/download/v1.5.0/barn_1.5.0_linux_arm64.deb) | [RPM](https://github.com/pgsty/barn/releases/download/v1.5.0/barn_1.5.0_linux_arm64.rpm) |
{.wide .expand}

[SHA-256 checksums](https://github.com/pgsty/barn/releases/download/v1.5.0/checksums.txt) · [Detached signature](https://github.com/pgsty/barn/releases/download/v1.5.0/checksums.txt.sig) · [Release metadata](https://github.com/pgsty/barn/releases/download/v1.5.0/release.json) · [Installer script](https://github.com/pgsty/barn/releases/download/v1.5.0/install.sh)

Every archive and package has a matching `.spdx.json` software bill of materials on the [GitHub release page](https://github.com/pgsty/barn/releases/tag/v1.5.0).

| 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 |
{.wide .expand}

## Other installation methods {#other-installation-methods}

### Linux packages {#linux-packages}

The DEB and RPM packages pull in QEMU, UEFI firmware, and OpenSSH as dependencies. On ARM64 hosts, replace `amd64` with `arm64`:

```bash {tab="Debian / Ubuntu" group="linux-package" value="deb"}
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
```

```bash {tab="RHEL / Fedora" group="linux-package" value="rpm"}
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 {#manual-archives}

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

```bash
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 {#build-from-source}

To try unreleased changes or build `Barn.app` yourself, see [Build from Source](../source-build/).

## Upgrade Barn {#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](../../reference/repository-signing/#bootstrap)

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:

```bash
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 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` |
{.wide .expand}

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` |
{.wide .expand}

The [1.5.0 release notes](/v1.5/release/1.5.0/) cover mirror upgrades and image defaults. For proxy or `PATH` issues, see [Troubleshooting](../troubleshooting/#download-and-path-problems). To remove Barn, see [Uninstall](../uninstall/).
