---
name: cli-ibmcloud-cli-proxy
title: Using a proxy with the IBM Cloud CLI
description: You can use the HTTPS_PROXY environment variable to set a proxy for requests from the IBM Cloud&reg; CLI.
last-updated: 2026-02-04
---

> ## Documentation Index
> The table of contents for this documentation set is at https://cloud.ibm.com/docs/cli?format=markdown
> The index for all IBM Cloud docs is at: https://cloud.ibm.com/docs/llms.txt
> Use these files to discover more information as needed.

# Using a proxy with the IBM Cloud CLI
{: #ibmcloud-cli-proxy}

You can use the HTTPS_PROXY environment variable to set a proxy for requests from the IBM Cloud&reg; CLI.
{: shortdesc}

With the HTTPS_PROXY environment variable, you can set the host and port of your proxy for use by the IBM Cloud&reg; CLI.

## Before you begin
{: #ibmcloud-cli-proxy-prereq}

* [Install the IBM Cloud CLI](https://cloud.ibm.com/docs/cli?topic=cli-getting-started&format=markdown).

## Setting the HTTPS_PROXY environment variable
{: #ibmcloud-cli-proxy-usage}

To set the proxy, export the environment variable before using the  IBM Cloud&reg; CLI in the terminal. Enter the following command:

Mac or Linux&trade
```bash
  export HTTPS_PROXY=https://your-server:your-port
```
{: codeblock}

Windows&trade
```bash
  set HTTPS_PROXY=https://your-server:your-port
```
{: codeblock}

Windows PowerShell&trade
```bash
  $env:HTTPS_PROXY = "https://your-server:your-port"
```
{: codeblock}


For more information about environment variables for the IBM Cloud CLI, see [Tips and Tricks for Using the IBM Cloud CLI](https://www.ibm.com/think){: external} and [IBM Cloud CLI (ibmcloud) environment variables](https://cloud.ibm.com/docs/cli?topic=cli-ibmcloud_env_var&format=markdown).