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:
1curl -sSL https://rover.apollo.dev/nix/latest | shTo install or upgrade to 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.34.0 | shIf 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 or upgrade to the latest release of Rover:
1iwr 'https://rover.apollo.dev/win/latest' | iexTo install or upgrade to 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.34.0' | iexInstalling 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:
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:
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
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_HOSTenvironment variable.noteThis environment variable also changes the host that plugins forrover supergraph composeandrover devare downloaded from. By default,rover devattempts to install the latest version of plugins for the router and composition. To maintain this behavior, anX-Version: vX.X.Xheader 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_VERSIONandAPOLLO_ROVER_DEV_ROUTER_VERSIONenvironment 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/repositorydevDependencies install
Run the following to install rover as one of your project's devDependencies:
1npm install --save-dev @apollo/roverYou 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/rovernpm 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 authThis command instructs you where to obtain a personal API key and helps you set up a configuration profile. For more information, see Configuring Rover.