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 the latest release of Rover:
1curl -sSL https://rover.apollo.dev/nix/latest | sh
To install a specific version of Rover (recommended for CI environments to ensure predictable behavior):
1# Note the `v` prefixing the version number
2curl -sSL https://rover.apollo.dev/nix/v0.26.2 | sh
If your machine doesn't have the curl
command, you can get the latest version from the curl
downloads page.
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 the latest release of Rover:
1iwr 'https://rover.apollo.dev/win/latest' | iex
To install a specific version of Rover (recommended for CI environments to ensure predictable behavior):
1# Note the `v` prefixing the version number
2iwr 'https://rover.apollo.dev/win/v0.26.2' | iex
npm
installer
Rover is distributed on npm for integration with your JavaScript projects.
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:
Setting the
APOLLO_ROVER_DOWNLOAD_HOST
environment variable.ⓘ noteThis environment variable also changes the host that plugins forrover supergraph compose
androver dev
are downloaded from. By default,rover dev
attempts to install the latest version of plugins for the router and composition. To maintain this behavior, anX-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 theAPOLLO_ROVER_DEV_COMPOSITION_VERSION
andAPOLLO_ROVER_DEV_ROUTER_VERSION
environment variables. For more details, see versioning forrover dev
.Adding the following to your global or local
.npmrc
:
1apollo_rover_download_host=https://your.mirror.com/repository
devDependencies
install
Run the following to install rover
as one of your project's devDependencies
:
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.
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.Global install
To install rover
globally so you can use it from any directory on your machine, run the following:
1npm install -g @apollo/rover
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:
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:
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.