Getting Started with OVHcloud CLI

Knowledge Base

Getting Started with OVHcloud CLI


Icons/System/eye-open Created with Sketch. 432 Views 13.10.2025 CLI

Objective

The OVHcloud Command Line Interface (CLI) is a tool designed to interact with OVHcloud services directly from your terminal. It allows you to automate tasks, manage resources, and access OVHcloud APIs efficiently.

Installation

To install the OVHcloud CLI, you can use the following command:

curl -fsSL https://raw.githubusercontent.com/ovh/ovhcloud-cli/main/install.sh | sh

It is also possible to install OVHcloud CLI using Homebrew:

brew install --cask ovh/tap/ovhcloud-cli

Alternatively, you can download the latest release from the GitHub repository:

  1. Visit the releases page.
  2. Download the binary for your operating system (Linux, macOS, or Windows).
  3. Unpack the archive and move the binary to a directory included in your $PATH.
  4. Verify the installation:
ovhcloud version

Authenticating the CLI

OVHcloud CLI requires authentication to be able to make API calls. There are several ways to define your credentials.

Check out the authentication page for further information about the configuration and the authentication means.

  • Interactive login:
# Log in and create API credentials (interactive)
ovhcloud login
  • Using a configuration file:

Default settings can be set using a configuration file named .ovh.conf and located in your ${HOME} directory. You can check this guide to learn how to create API credentials.

Example of configuration file:

[default]
endpoint = ovh-eu

[ovh-eu]
application_key    = <application key>
application_secret = <application secret>
consumer_key       = <consumer key>

[ovh-cli]
default_cloud_project = <Public Cloud project ID>
  • Using environment variables:
OVH_ENDPOINT=ovh-eu
OVH_APPLICATION_KEY=xxx
OVH_APPLICATION_SECRET=xxx
OVH_CONSUMER_KEY=xxx
OVH_CLOUD_PROJECT_SERVICE=<Public Cloud project ID> 

Example Commands

Here are some basic commands to get started:

  • List your cloud projects:
ovhcloud cloud project list
  • Show details of a specific project:
ovhcloud cloud project get <PROJECT_ID>
  • List instances in a project:
ovhcloud cloud instance list --cloud-project <PROJECT_ID>
  • Create a new instance:
ovhcloud cloud instance create BHS5 --cloud-project <PROJECT_ID> --name my-instance --flavor-selector --image-selector --network.public --ssh-key.name <SSH_KEY_NAME>

Note: The --project-id option is not necessary if you defined a default_cloud_project in your configuration file, or if the OVH_CLOUD_PROJECT_SERVICE environment variable is defined.

For further information about the available commands, you can check the complete documentation.

Product Coverage

Most products offer basic commands to list services, retrieve and edit their details. Some products already have more advanced coverage, for example: Baremetal, Public Cloud (Instances, Managed Kubernetes, Rancher, Storage, Network), VPS and IAM.

Note: The actions currently available in the CLI correspond to those offered by the main OVHcloud API. Actions specific to each product, accessible via their own APIs, are not yet covered, but will gradually be added depending on the product.

Resources

Related articles