Installation
Each GitHub release has an
archive per platform with the fbk and fbkd binaries:
| Platform | Target |
|---|---|
| Linux x86_64 | x86_64-unknown-linux-gnu |
| Linux ARM64 | aarch64-unknown-linux-gnu |
| macOS (Apple Silicon) | aarch64-apple-darwin |
| Windows 11 x64 | x86_64-pc-windows-msvc |
The Windows archive is a .zip; see
Windows: run Firebrick natively to install
it. The steps below install both binaries in ~/.local/bin, which doesn’t need
root permissions. Keep fbk and fbkd in the same directory, because the CLI
starts the daemon from its own directory. To install them with Homebrew or build
them with Cargo instead, see
Installing with Homebrew or
Installing with Cargo.
System requirements
Section titled “System requirements”Check that your machine meets these requirements before you download anything.
-
Linux, on x86_64 or ARM64:
- A CPU with hardware virtualization (Intel VT-x or AMD-V) enabled in the firmware.
- The KVM kernel module loaded, so
/dev/kvmexists. - Read and write access to
/dev/kvmfor your user, usually through thekvmgroup. - glibc 2.35 or newer for the release binaries.
When Linux runs inside a VM or a container, the host must expose
/dev/kvmto it, for example through nested virtualization. -
macOS: Apple Silicon. Intel Macs aren’t supported.
-
Windows: Windows 11 on x64 with hardware virtualization enabled in the firmware and the Windows Hypervisor Platform turned on; see Windows: run Firebrick natively. Windows support is a preview, like microsandbox’s. Firebrick also runs the Linux release inside a WSL 2 distribution with nested virtualization; see Windows: run Firebrick in WSL 2.
On Linux, or in your WSL distribution, check KVM and glibc before you install:
ls -l /dev/kvmtest -r /dev/kvm && test -w /dev/kvm && echo "KVM is usable"ldd --version | head -1 # glibc 2.35 or newerWhen a check fails:
/dev/kvmis missing: enable hardware virtualization in the firmware, or load the KVM module for your CPU withsudo modprobe kvm_intelorsudo modprobe kvm_amd. On WSL, enable nested virtualization as described in Windows: run Firebrick in WSL 2./dev/kvmexists, but KVM isn’t usable: add your user to thekvmgroup withsudo usermod -aG kvm "$USER", then log out and in again. On WSL, runwsl --shutdownfrom PowerShell instead and open the distribution again.
See Troubleshooting for these, and Troubleshooting when glibc is older than 2.35.
1. Download and install the binaries
Section titled “1. Download and install the binaries”The commands in this step use bash or zsh syntax. If you use fish, run bash
first and run them in that shell.
Set the release to install and pick the target for your machine:
VERSION=v0.16.0case "$(uname -s)-$(uname -m)" in Linux-x86_64) TARGET=x86_64-unknown-linux-gnu ;; Linux-aarch64) TARGET=aarch64-unknown-linux-gnu ;; Darwin-arm64) TARGET=aarch64-apple-darwin ;; *) echo "Unsupported platform: $(uname -s)-$(uname -m). Stop here and build from source." ;;esacNAME="firebrick-$VERSION-$TARGET"When this prints Unsupported platform, there’s no release archive for your
machine. Skip the remaining steps and follow
Building from source instead.
Download the archive and its checksum, and verify the archive:
curl -fLO "https://github.com/wmeints/firebrick/releases/download/$VERSION/$NAME.tar.gz"curl -fLO "https://github.com/wmeints/firebrick/releases/download/$VERSION/$NAME.tar.gz.sha256"shasum -a 256 -c "$NAME.tar.gz.sha256" # or: sha256sum -c "$NAME.tar.gz.sha256"Extract the archive and copy both binaries to ~/.local/bin:
tar -xzf "$NAME.tar.gz"mkdir -p ~/.local/bininstall -m 755 "$NAME/fbk" "$NAME/fbkd" ~/.local/bin/2. Add ~/.local/bin to your PATH
Section titled “2. Add ~/.local/bin to your PATH”Check whether the directory is on your PATH already:
command -v fbkWhen this prints nothing, add the directory to the startup file of your shell and open a new terminal:
-
zsh, the default shell on macOS:
Terminal window echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc -
bash, the default shell on most Linux distributions:
Terminal window echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc -
fish:
Terminal window fish_add_path ~/.local/bin
3. Verify the installation
Section titled “3. Verify the installation”fbk --versionfbk lsfbk --version prints the installed version, for example fbk 0.16.0.
fbk ls starts fbkd, which installs the microsandbox runtime in
~/.local/state/firebrick/msb, and lists your sandboxes (none yet). An error
here means fbkd couldn’t start, for example because it isn’t next to fbk.
macOS: remove the quarantine flag
Section titled “macOS: remove the quarantine flag”The macOS binaries aren’t signed. When you download the archive through a
browser instead of curl, macOS quarantines the binaries and refuses to run
them. Remove the quarantine flag:
xattr -d com.apple.quarantine ~/.local/bin/fbk ~/.local/bin/fbkdWindows: run Firebrick natively
Section titled “Windows: run Firebrick natively”fbk and fbkd run on Windows 11 x64 through the Windows Hypervisor Platform.
Windows support is experimental. Run these steps in PowerShell:
-
Turn on the Windows Hypervisor Platform from an administrator PowerShell, and restart Windows when it asks you to:
Terminal window Enable-WindowsOptionalFeature -Online -FeatureName HypervisorPlatform -
Download the archive and its checksum, and verify the archive:
Terminal window $Version = "v0.16.0"$Name = "firebrick-$Version-x86_64-pc-windows-msvc"$Base = "https://github.com/wmeints/firebrick/releases/download/$Version"Invoke-WebRequest "$Base/$Name.zip" -OutFile "$Name.zip"Invoke-WebRequest "$Base/$Name.zip.sha256" -OutFile "$Name.zip.sha256"$Expected = (Get-Content "$Name.zip.sha256").Split(" ")[0]if ((Get-FileHash "$Name.zip").Hash -ne $Expected) { throw "Checksum mismatch" } -
Extract the archive and copy both binaries to
%LOCALAPPDATA%\Programs\firebrick:Terminal window Expand-Archive "$Name.zip" -DestinationPath .$Dir = "$env:LOCALAPPDATA\Programs\firebrick"New-Item -ItemType Directory -Force $Dir | Out-NullCopy-Item "$Name\fbk.exe", "$Name\fbkd.exe" $Dir -
Add the directory to your
PATH, unless it’s there already, and open a new terminal:Terminal window $UserPath = [Environment]::GetEnvironmentVariable("Path", "User")if (";$UserPath;" -notlike "*;$Dir;*") {[Environment]::SetEnvironmentVariable("Path", "$UserPath;$Dir", "User")} -
Verify the installation with
fbk --versionandfbk ls, as in Verify the installation.
The binaries aren’t signed. When you download the archive through a browser
instead, unblock it with Unblock-File "$Name.zip" before you extract it, or
SmartScreen may refuse to start fbkd. To build the binaries from source
instead, install the Visual Studio Build Tools with the C++ workload, which Rust
needs to link them, from an administrator PowerShell, then follow
Building from source. Cargo installs fbk.exe and
fbkd.exe in %USERPROFILE%\.cargo\bin.
winget install Microsoft.VisualStudio.2022.BuildTools --override "--passive --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"On Windows, Firebrick keeps its data and logs in %LOCALAPPDATA%\firebrick and
your approvals in %APPDATA%\firebrick; see
File locations. The generated SSH config
is included from %USERPROFILE%\.ssh\config, so the .fbk host names work for
Windows’ OpenSSH and the editors that use it. The clipboard works without extra
tools, and ~user in a mount’s host path isn’t supported.
fbk starts the daemon without a console, so you can’t ask it to stop cleanly
from one. Stop-Process -Name fbkd ends it at once: running sandboxes keep
running, but a network or image upgrade that’s still in progress is cut off, and
the last few seconds of network activity aren’t recorded. Stop it when no fbk
command is running. Windows can’t replace or remove a running program, so stop
the daemon before you upgrade or uninstall Firebrick.
Windows: run Firebrick in WSL 2
Section titled “Windows: run Firebrick in WSL 2”The Linux release also runs in a WSL 2 distribution when WSL exposes KVM to it through nested virtualization. Check the System requirements for Windows first.
-
Enable nested virtualization in
%UserProfile%\.wslconfigon Windows:[wsl2]nestedVirtualization=true -
Restart WSL from PowerShell so it picks up the setting:
Terminal window wsl --shutdown -
In the WSL distribution, run the checks from System requirements. When
/dev/kvmis missing there, nested virtualization isn’t active.
Then follow the Linux steps above inside the distribution, and keep your
projects in the distribution’s file system, for example under ~/projects,
instead of under /mnt/c.
fbkd generates its SSH config in the distribution and includes it from
~/.ssh/config there, so the .fbk host names from
Editor support only resolve for ssh and editors that
run inside WSL. Editors on Windows don’t see them.
Upgrading and uninstalling
Section titled “Upgrading and uninstalling”To upgrade, repeat step 1 with the new VERSION. The next fbk command that
talks to the daemon, such as fbk ls, finds that the daemon has another version
and restarts it:
note: restarting the firebrick daemon (running 0.9.0, fbk is 0.10.0)fbk doesn’t restart the daemon while another fbk run session, SSH
connection, start, upgrade or network change is in progress; it fails and asks
you to close them first. Sandboxes keep running across the restart. A daemon of
version 0.9.0 or earlier can’t be restarted by fbk, so stop it once after
upgrading from such a version:
pkill -TERM -x fbkdWhen the restarted daemon still has another version, the fbkd next to fbk,
or on your PATH, isn’t the one you installed: fbk names the binary it
started, so you can replace it. See also
Troubleshooting.
To uninstall, stop the daemon and remove the binaries:
pkill -TERM -x fbkdrm ~/.local/bin/fbk ~/.local/bin/fbkdOn Windows, stop the daemon with Stop-Process -Name fbkd instead, then repeat
steps 2 and 3 of
Windows: run Firebrick natively to upgrade,
or remove %LOCALAPPDATA%\Programs\firebrick to uninstall.
Installing with Homebrew
Section titled “Installing with Homebrew”On macOS (Apple Silicon) and Linux (x86_64 and ARM64), install both binaries from the Firebrick tap with Homebrew. There’s no formula for Windows. Check the System requirements first; they apply to the Homebrew install as well.
brew install wmeints/tap/firebrickfbk --versionHomebrew installs the binaries of the GitHub release, side by side in its bin
directory, as the CLI requires. Continue with
Verify the installation. Homebrew refuses the
formula on an Intel Mac, which Firebrick doesn’t support.
To upgrade, run brew upgrade firebrick; the next fbk command that talks to
the daemon restarts it, as described in
Upgrading and uninstalling. To uninstall, stop
the daemon and remove the formula:
pkill -TERM -x fbkdbrew uninstall firebrickInstalling with Cargo
Section titled “Installing with Cargo”Each release is also published to crates.io. Instead of downloading an archive,
build and install both binaries with Cargo. This needs a
Rust toolchain and protoc 3.15 or newer, the Protocol
Buffers compiler, on your PATH. The protobuf-compiler package of Ubuntu
22.04 is too old; install a current release from the
protobuf releases
instead:
cargo install firebrick-cli firebrick-daemonfbk --versionCargo installs fbk and fbkd in ~/.cargo/bin, so both binaries end up in
the same directory, as the CLI requires. Install both crates with the same
version. To upgrade, run the same command again; the next fbk command that
talks to the daemon restarts it, as described in
Upgrading and uninstalling. On Windows, stop the
daemon with Stop-Process -Name fbkd first, because Windows can’t replace a
running program. To uninstall, stop the daemon and run cargo uninstall firebrick-cli firebrick-daemon.
Building from source
Section titled “Building from source”Install the development toolchain with mise from a clone
of the repository, then let cargo install put both binaries in ~/.cargo/bin.
Make sure that directory is on your PATH, as in step 2:
git clone https://github.com/wmeints/firebrick.gitcd firebrickmise installcargo install --locked --path crates/clicargo install --locked --path crates/daemonA build from source that isn’t a release defaults to a firebrick-base image
tag that may not exist yet. Set image in .firebrick.yml to a released tag or
your own image; see Custom images.