Skip to content

Installation

Install the gantry binary with your package manager, check it runs, and turn on shell completion.

Getting startedUpdated 30 Sep 20264 min read

Install the CLI

Gantry ships as a single binary. Install it globally with the package manager you already use; the package only downloads the build for your platform, so it stays under 10 MB.

$ npm install -g @gantry/cli

Rather not go through a JavaScript package manager? The install script puts the binary in ~/.gantry/bin and adds that folder to your PATH.

$ curl -fsSL https://gantry.sh/install | sh
Pin the version in CI
Set GANTRY_VERSION=2.8.1 before the script runs. Unpinned installs always fetch the latest release, which is rarely what a reproducible build wants.

Verify the install

$ gantry --versiongantry 2.8.1 (darwin-arm64, built 2026-09-30)

If your shell answers command not found, open a new terminal so it picks up the updated PATH. Still nothing? Run ~/.gantry/bin/gantry doctor, which checks the install and tells you what to add to your shell profile.

System requirements

PlatformMinimumNotes
macOS13 VenturaApple silicon and Intel. Linux images run in a 30 MB VM that Gantry starts and stops for you.
LinuxKernel 5.11x86_64 and arm64. Rootless mode needs unprivileged user namespaces.
WindowsWSL 2Install inside your WSL distribution, not in PowerShell.

Plan for about 4 GB of free disk for the layer cache on a typical web project.

Rootless mode on Linux

Gantry never asks for root. On Linux it maps your user to root inside the container with user namespaces, which a few distributions ship switched off. Check, and turn them on if the value is 0:

$ sysctl kernel.unprivileged_userns_clonekernel.unprivileged_userns_clone = 0$ sudo sysctl -w kernel.unprivileged_userns_clone=1
This is a system-wide setting
On shared machines and CI runners, check with whoever owns the host before changing it. Gantry falls back to running builds only, without starting containers, when namespaces are off.

Shell completion

Completion covers commands, flags, profile names and the service names in the nearest gantry.toml. Write the script for your shell, then open a new terminal.

$ gantry completion zsh > "${fpath[1]}/_gantry"

Try it: type gantry up -- and press Tab to list every flag.

Updating and uninstalling

Gantry updates itself in place, whichever way you installed it. It checks for a new release once a day and mentions it after a command finishes; it never updates on its own.

$ gantry self update$ gantry self uninstall --purge

--purge also deletes the layer cache in ~/.gantry. Without it, a reinstall picks up where you left off. Next, run your first project.