---
title: "Setting OpenStack Environment Variables"
description: "By setting OpenStack environment variables on your desktop, you can use the OpenStack API to manage your infrastructure."
url: https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/compute-set-openstack-environment-variables
lang: en
---
> For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt.

# Setting OpenStack Environment Variables

By setting OpenStack environment variables on your desktop, you can use the OpenStack API to manage your infrastructure.

 

## Requirements

- access to the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/)
- an [OpenStack user account](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/create-and-delete-a-user.md)
- OpenStack [installed on your system](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/compute-prepare-openstack-api-environment.md)

 

## Instructions

### Step 1: Retrieve the variables

To retrieve your environment variables, you can download the OpenRC file from the OpenStack user account you have created.

Log in to the [OVHcloud Control Panel](https://manager.us.ovhcloud.com/) and switch to the `Public Cloud` section. Select your Public Cloud project at the top of the left-hand sidebar.

1. Switch to the `Public Cloud` section.
2. Click on `Users & Roles`.
3. Click on the _more options_ `...` button to the right of your user and select `Download OpenStack's RC file`.

An OpenRC file corresponds to a specific user and zone. You cannot manage multiple zones in the same file.

 

### Step 2: Set the variables

#### **On Linux**

- Open a terminal, or connect via the user who will be making the OpenStack API calls.
- Load the file’s contents in the current environment. You will then be prompted to enter the Horizon user password.

```bash
source openrc.sh
Please enter your OpenStack Password:
```

As outlined in [this guide](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/create-and-delete-a-user.md), the password is only visible once — when it is created.

If you forget your password, you will need to reset it.

If the CLIs are already installed, check if they are working properly:

```bash
(env)$ openstack server list
+--------------------------------------+------------+--------+-----------------------------------------------+-----------+--------+
| ID                                   | Name       | Status | Networks                                      | Image     | Flavor |
+--------------------------------------+------------+--------+-----------------------------------------------+-----------+--------+
| 8d7c67c0-38e1-4091-88d5-c14844c1f455 | b2-7-gra11 | ACTIVE | Ext-Net=2001:xxxx:xxx:xxx::xxxx, xx.xxx.xx.xx | Debian 12 | b2-7   |
+--------------------------------------+------------+--------+-----------------------------------------------+-----------+--------+
```

 

#### **On Windows**

The OpenRC file is not designed to be launched on Windows.

There are two ways of setting environment variables:

1. You will need to adapt the file by changing certain commands. The **export** part can be replaced with **set**:
   ```bash
   set OS_PASSWORD="Your Horizon user password"
   ```

2. You can set the variables directly via the system settings: Control Panel > System > Advanced System Properties > Environment Variables:

 

## Go further

Browse all the [Public Cloud - General information guides](https://docs.us.ovhcloud.com/en/public-cloud/cross-functional/landing-page-cross-functional.md).

Browse the rest of the [OVHcloud US documentation](https://docs.us.ovhcloud.com/en/index.md) for guides on our other products and services.

Learn more about [Public Cloud](https://us.ovhcloud.com/public-cloud/) on the OVHcloud US website.
