Installing Rover

Rover CLI installation guide for Linux, Mac, and Windows


The Rover CLI is available for Linux, Mac, and Windows.

Installation Methods

Linux / MacOS installer

To install or upgrade to the latest release of Rover:

Bash
1curl -sSL https://rover.apollo.dev/nix/latest | sh

To install or upgrade to a specific version of Rover (recommended for CI environments to ensure predictable behavior):

Bash
1# Note the `v` prefixing the version number
2curl -sSL https://rover.apollo.dev/nix/v0.39.1 | sh

If your machine doesn't have the curl command, you can get the latest version from the curl downloads page.

note
The rover supergraph compose command is not yet available for Alpine Linux. You can track the progress for supporting this command on Alpine in this issue.

Windows PowerShell installer

To install or upgrade to the latest release of Rover:

Bash
1iwr 'https://rover.apollo.dev/win/latest' | iex

To install or upgrade to a specific version of Rover (recommended for CI environments to ensure predictable behavior):

Bash
1# Note the `v` prefixing the version number
2iwr 'https://rover.apollo.dev/win/v0.39.1' | iex

Installing from a binary mirror using the bash and PowerShell scripts

Both the bash and powershell scripts support the APOLLO_ROVER_BINARY_DOWNLOAD_PREFIX environment variable, which defaults to https://github.com/apollographql/rover/releases/download.

This can be set in your environment to specify a remote mirror or proxy to a GitHub release download URL for the Apollo Rover GitHub repository.

For example, if your remote host is my-mirror-proxy.com/artifacts/github-com:

  • From a bash shell:

Bash
1# for bash (Mac/Linux)
2export APOLLO_ROVER_BINARY_DOWNLOAD_PREFIX="https://my-mirror-proxy.com/artifacts/github-com/apollographql/rover/releases/download"
  • From a PowerShell:

powershell
1# for PowerShell (Windows)
2$env:APOLLO_ROVER_BINARY_DOWNLOAD_PREFIX = "https://my-mirror-proxy.com/artifacts/github-com/apollographql/rover/releases/download"

This variable also supports basic authentication. Set the format of the URL to https://<username>:<password>@<remote-host>/apollographql/rover/releases/download

Docker image

Starting with Rover v0.39.1, Apollo publishes a Linux container image with each release. The image's default entry point is rover, so any arguments you pass to docker run are forwarded to the CLI. Each version tag is enforced as immutable, so a pinned tag can't change transparently.

Pull from either GitHub Container Registry or Docker Hub:

Bash
1docker pull ghcr.io/apollographql/rover:0.39.1
2# or
3docker pull apollograph/rover:0.39.1

Then run any Rover command:

Bash
1docker run --rm \
2  -e APOLLO_KEY \
3  -v "$PWD:/workspace" -w /workspace \
4  ghcr.io/apollographql/rover:0.39.1 \
5  subgraph check my-graph@prod --name products --schema ./schema.graphql

This is the recommended way to run Rover in CI on providers that support running steps inside a container image (CircleCI, Bitbucket Pipelines, GitLab CI/CD, Jenkins with a Docker agent, and so on). See the CI/CD guide for end-to-end examples.

npm installer

Rover is distributed on npm for integration with your JavaScript projects. Rover's Node dependency follows LTS versions where possible unless security concerns justify an earlier upgrade.

caution
This installation method is provided for convenience in projects that are already in the Node ecosystem. Apollo does not recommend it otherwise, as it exposes your installation to npm's surface area of potential supply-chain attacks. Rover's npm installation script has been minimized to reduce that surface, but it still represents nonzero risk. For other use cases, prefer the Linux/MacOS installer, the Windows PowerShell installer, or the Docker image.

Installing from a binary mirror

Internally, the npm installer downloads router binaries from https://rover.apollo.dev. If this URL is unavailable, for example, in a private network, you can point the npm installer at another URL in one of two ways:

  1. Setting the APOLLO_ROVER_DOWNLOAD_HOST environment variable.

    note
    This environment variable also changes the host that plugins for rover supergraph compose and rover dev are downloaded from. By default, rover dev attempts to install the latest version of plugins for the router, composition, and MCP server. To maintain this behavior, an X-Version: vX.X.X header must be present in the response from the binary mirror. To circumvent the need for this header, plugin versions can instead be pinned with the APOLLO_ROVER_DEV_COMPOSITION_VERSION, APOLLO_ROVER_DEV_ROUTER_VERSION, and APOLLO_ROVER_DEV_MCP_VERSION environment variables. For more details, see versioning for rover dev.
  2. Adding the following to your global or local .npmrc:

ini
1apollo_rover_download_host=https://your.mirror.com/repository

devDependencies install

Run the following to install rover as one of your project's devDependencies:

Bash
1npm install --save-dev @apollo/rover

You can then call rover <parameters> directly in your package.json scripts, or you can run npx -p @apollo/rover rover <parameters> in your project directory to execute commands.

note
When using npx, the -p @apollo/rover argument is necessary to specify that the @apollo/rover package provides the rover command. See npx's documentation for more information.
caution
Running Rover directly via npx (without first installing it as a devDependency) bypasses lockfiles — including Rover's own — and is the highest-risk install path in terms of supply-chain exposure. Prefer installing @apollo/rover as a devDependency so the resolved version is captured in your project's lockfile.

Global install

To install rover globally so you can use it from any directory on your machine, run the following:

Bash
1npm install -g @apollo/rover
note
If you've installed npm without a version manager such as nvm, you might have trouble with global installs. If you encounter an EACCES permission-related error while trying to install globally, DO NOT run the install command with sudo. This support page has information that should help resolve this issue.

Binary download

You can also download the Rover binary for your operating system and manually add its location to your PATH.

Unofficial methods

There are a few additional installation methods maintained by the community:

  1. Homebrew

  2. Nix

Next steps

After installing Rover, you can set up shell completion for bash or zsh to enable tab completion for Rover commands. See the completion command documentation for instructions.

Connecting to GraphOS

After you install Rover, you should authenticate it with GraphOS, because many of its commands communicate with GraphOS.

Run the following command:

shell
1rover config auth

This command instructs you where to obtain a personal API key and helps you set up a configuration profile. For more information, see Configuring Rover.