Profiles allow you to store credentials for multiple OVHcloud accounts in a single configuration file (~/.ovh.conf) and switch between them easily.
Retro-compatibility: If you don't use profiles, the CLI works exactly as before. No changes are required to your existing configuration.
Use the --profile flag with the login command to store credentials under a named profile:
ovhcloud login --profile work
ovhcloud login --profile personalEach profile is stored as a [profile:<name>] section in your ~/.ovh.conf file:
[default]
endpoint=ovh-eu
profile=work
[ovh-eu]
application_key=xxx
application_secret=xxx
consumer_key=xxx
[profile:work]
endpoint=ovh-eu
application_key=aaa
application_secret=aaa
consumer_key=aaa
[profile:personal]
endpoint=ovh-eu
application_key=bbb
application_secret=bbb
consumer_key=bbbThe default profile is a virtual profile that represents the legacy configuration (credentials stored in [ovh-<region>] sections). It is always listed and cannot be created or deleted.
# List all profiles (the active one is marked with *)
ovhcloud config profile list
# Show details of the active profile
ovhcloud config profile show
# Show details of a specific profile
ovhcloud config profile show work
# Switch the active profile
ovhcloud config profile switch personal
# Revert to legacy mode (no profile)
ovhcloud config profile switch default
# Delete a profile
ovhcloud config profile delete workUse the --profile flag on any command to override the active profile for that invocation only:
ovhcloud cloud project list --profile personal
ovhcloud cloud instance list --profile workThis does not change the active profile in the configuration.
You can also set the active profile via the OVH_PROFILE environment variable:
export OVH_PROFILE=work
ovhcloud cloud project listWhen resolving which profile to use, the CLI follows this order (first match wins):
--profileflagOVH_PROFILEenvironment variableprofilekey in[default]section of the configuration file- Legacy mode (no profile)
Settings like default_cloud_project are scoped to the active profile. Each profile maintains its own value, and there is no cross-profile fallback.
# Set default_cloud_project for the "work" profile
ovhcloud config profile switch work
ovhcloud config set default_cloud_project xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Set a different one for "personal"
ovhcloud config profile switch personal
ovhcloud config set default_cloud_project yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy