---
title: "Launch OpenStack CLI"
sidebar_label: "Launch OpenStack CLI"
sidebar_position: 3
description: "How to launch OpenStack CLI"
---

import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import CopyIcon from '@selectel/docux/icons/copy'
import {TabItemLabel} from '@selectel/docux/components'
import Formbricks from '@theme/MDXComponents/Formbricks'

# Launch OpenStack CLI

The process of launching OpenStack CLI depends on how you configured OpenStack API authentication:

* if you configured authentication via the operating system – [launch OpenStack CLI in the OS](#run-openstack-in-os);
* if you configured authentication in a Docker container – [launch OpenStack CLI in a Docker container](#run-openstack-in-docker).

### Launch OpenStack CLI in the OS \{#run-openstack-in-os}

<Tabs queryString="run-openstack-in-os">
  <TabItem value="unix">
    <TabItemLabel>
      Linux/macOS
    </TabItemLabel>

    1. Open the CLI.

    2. Apply environment variables from the RC file:

       ```bash
       source <file_name>
       ```

       Specify `<file_name>` — the name of the RC file you [downloaded](/cloud-servers/tools/openstack-cli/configure-openstack-cli.mdx#download-rc-file-for-os) to configure OpenStack CLI. The default is `rc.sh`.

    3. Enter your OpenStack password — the password of the service user for which you [downloaded the RC file](/cloud-servers/tools/openstack-cli/configure-openstack-cli.mdx#download-rc-file-for-os).

    4. Make sure OpenStack CLI is working. To do this, open the list of cloud servers:

       ```bash
       openstack server list
       ```

       If cloud servers have been created in the pool and project specified in the variables, they will appear in the output. If no servers have been created yet, the output will be an empty string.
  </TabItem>

  <TabItem value="windows">
    <TabItemLabel>
      Windows
    </TabItemLabel>

    1. Open the CLI.

    2. Add environment variables:

       ```bash
       set OS_AUTH_URL=<url>
       set OS_IDENTITY_API_VERSION=3
       set OS_VOLUME_API_VERSION=3
       set CLIFF_FIT_WIDTH=1
       set OS_PROJECT_DOMAIN_NAME=<account_id>
       set OS_PROJECT_ID=<project_id>
       set OS_TENANT_ID=<project_id>
       set OS_TENANT_NAME=<project_name>
       set OS_REGION_NAME=<pool>
       set OS_USER_DOMAIN_NAME=<account_id>
       set OS_USERNAME=<user_name>
       set OS_PASSWORD=<user_password>
       ```

       Specify:

       * `<url>` — the address (URL) for API authentication. The address depends on the region and pool; you can view it in the [list of URLs](/api/urls/);
       * `<account_id>` — account ID. You can find it in the [control panel](https://my.selectel.ru/) in the top-right corner;
       * `<project_id>` — project ID. You can copy it in the [control panel](https://my.selectel.ru/vpc/): from the top menu, click **Products** and select **Cloud Servers** → open the projects menu (the name of the current project) → in the project line, click ;<CopyIcon />
       * `<project_name>` — project name. You can view it in the [control panel](https://my.selectel.ru/vpc/): from the top menu, click **Products** and select **Cloud Servers** → open the projects menu (the name of the current project) → copy the project name;
       * `<pool>` — [pool](/infrastructure/locations.mdx#pool), for example, `ru-2`. You will only be able to manage project infrastructure in this pool;
       * `<user_name>` — name of the service user who has access to manage resources;
       * `<user_password>` — service user password. Once the user is created, you cannot view the password — you can only generate a new one. For more details, see the [Change service user password](/access-control/manage/edit-user-data-or-role.mdx#change-service-user-password) subsection of the Manage user data and roles article.

    3. Make sure OpenStack CLI is working. To do this, open the list of cloud servers:

       ```bash
       openstack server list
       ```

       If cloud servers have been created in the pool and project specified in the variables, they will appear in the output. If no servers have been created yet, the output will be an empty string.
  </TabItem>
</Tabs>

### Launch OpenStack CLI in a Docker container \{#run-openstack-in-docker}

1. Open the CLI.

2. Launch the Docker container:

   ```bash
   docker run -ti --rm -v $(pwd):/workspace osc:dalmatian
   ```

3. Apply environment variables from the RC file:

   ```bash
   source <file_name>
   ```

   Specify `<file_name>` — the name of the RC file you [downloaded](/cloud-servers/tools/openstack-cli/configure-openstack-cli.mdx#download-rc-file-for-docker) to configure OpenStack CLI. Default is `rc.sh`.

4. Enter your OpenStack password — the password of the service user for whom you [downloaded the RC file](/cloud-servers/tools/openstack-cli/configure-openstack-cli.mdx#download-rc-file-for-docker).

5. Make sure OpenStack CLI is working. To do this, open the list of cloud servers:

   ```bash
   openstack server list
   ```

   If cloud servers have been created in the pool and project specified in the variables, they will appear in the output. If no servers have been created yet, the output will be an empty string.

6. After working with OpenStack CLI, exit the Docker container:

   ```bash
   exit
   ```

<Formbricks />
