IBM Cloud Docs
Installing and using private endpoints

Installing and using private endpoints

To ensure that you have enhanced control and security over your data when you use the IBM Cloud Command Line Interface (CLI), you have the option of using private routes to IBM Cloud endpoints. Private routes are not accessible or reachable over the internet. By using the IBM Cloud private endpoints feature, you can protect your data from threats from the public network and logically extend your private network.

The CLI uses the private endpoint support that is provided by the IBM Cloud® platform. Platform services that are used by the core CLI provide private endpoint support.

Before you begin

First, enable virtual routing and forwarding in your account, and then you can enable the use of IBM Cloud private service endpoints. For more information about setting up your account to support the private connectivity option, see Enabling VRF and service endpoints. In addition to enabling VRF, you must be on a private network on ibmcloud. For more information, see how to connect to the IBM Cloud VPN.

To learn more about private connections on IBM Cloud, see Secure access to services by using service endpoints.

Installing from the shell

To install the latest CLI for your OS from the shell manually, use the following command for your OS:

If you don't want to install from the shell because it might use root permissions, you can download and run the installer.

  • For Mac, copy and paste the following command to a command line and run it:

    curl -fsSL https://ibm-cloud-cli-installer-scripts.s3.private.us.cloud-object-storage.appdomain.cloud/osx_private | sh
    
  • For Mac, from an IBM Cloud Virtual Private Cloud, copy and paste the following command to a command line and run it:

    curl -fsSL https://ibm-cloud-cli-installer-scripts.s3.direct.us.cloud-object-storage.appdomain.cloud/osx_vpc | sh
    
  • For Linux™, copy and paste the following command to a command line and run it:

    curl -fsSL https://ibm-cloud-cli-installer-scripts.s3.private.us.cloud-object-storage.appdomain.cloud/linux_private | sh
    
  • For Linux, from an IBM Cloud Virtual Private Cloud, copy and paste the following command to a command line and run it:

    curl -fsSL https://ibm-cloud-cli-installer-scripts.s3.direct.us.cloud-object-storage.appdomain.cloud/linux_vpc | sh
    
  • For Windows™, copy and paste the following command to a Windows™ PowerShell command prompt and run it:

    iex (New-Object Net.WebClient).DownloadString('https://ibm-cloud-cli-installer-scripts.s3.private.us.cloud-object-storage.appdomain.cloud/powershell_private')
    

    If you encounter errors like The underlying connection was closed: An unexpected error occurred on a send, make sure that you have .Net Framework 4.5 or later installed. Also, try to enable TLS 1.2 protocol by running the following command:

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    
  • For Windows™, from an IBM Cloud Virtual Private Cloud, copy and paste the following command to a Windows™ PowerShell command prompt and run it:

    iex (New-Object Net.WebClient).DownloadString('https://ibm-cloud-cli-installer-scripts.s3.direct.us.cloud-object-storage.appdomain.cloud/powershell_vpc')
    

    If you encounter errors like The underlying connection was closed: An unexpected error occurred on a send, make sure that you have .Net Framework 4.5 or later installed. Also, try to enable TLS 1.2 protocol by running the following command:

    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    

Downloading installation packages with private endpoints

Use the following steps to install the latest stand-alone IBM Cloud CLI:

  1. Select the installer of your OS to begin the download. The following operating systems are supported: macOS X 64-bit, Windows™ 64-bit, Linux™ x86 64-bit, Linux™ LE 64-bit (ppc64le), and System/390 Linux™.

  2. Run the installer:

    • For Mac and Windows™, run the installer.
    • For Linux™, extract the package and run the install script.

    Installers:

  3. Log in to IBM Cloud by using the CLI:

    ibmcloud login
    

    Now, you're ready to manage IBM Cloud resources. Enter ibmcloud help to view the command descriptions.

    If you're using a federated ID, log in with a one-time passcode or an API key.

Installing packages from previous releases for private endpoints

If you want to install these packages from previous releases, follow this template to construct the private endpoint link of the package that you want to download, replacing release_tag with the release version that you want to download.

To view previous releases, access the official ibm-cloud-cli-releases GitHub repository.

Mac OS X 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>.pkg

Windows™ 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_amd64.exe

Windows™ 32-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_386.exe

Linux™ 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_amd64.tar.gz

Linux™ 32-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_386.tar.gz

PowerLinux™ 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_ppc64le.tar.gz

System/390 Linux™ 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/IBM_Cloud_CLI_<release_tag>_s390x.tar.gz

Installing to a custom directory

When you use installers or a shell script to install the IBM Cloud CLI, it is installed in your system directories. If you want to specify a different directory, use the following steps.

If you install the IBM Cloud CLI to a custom directory, the ibmcloud update command can't be used to update the CLI.

  1. Select the matching binary of your platform to begin the download. The following platforms are supported: macOS, linux32, linux64, ppc64le, win32, win64, and s390x.

  2. Extract the package to a directory that you specify.

    You can see the following extracted content:

    For Linux™ and Mac:

    IBM_Cloud_CLI
    ├── LICENSE
    ├── NOTICE
    ├── autocomplete
    │   ├── bash_autocomplete
    │   └── zsh_autocomplete
    └──  ibmcloud
    
    

    For Windows™:

    IBM_Cloud_CLI
    ├── LICENSE
    ├── NOTICE
    └── ibmcloud.exe
    
  3. Add to the PATH environment variable and enable shell autocompletion.

    • Add the {YOUR_DIRECTORY}/IBM_CLOUD_CLI to the PATH environment variable.

Binary files

If you want to install binaries from previous releases, follow this template to construct the private endpoint link of the binary that you want to download, replacing release_tag with the release version that you want to download.

To view previous releases, access the official ibm-cloud-cli-releases Github repository.

Mac OS X 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_macos.tgz

Windows 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_windows_amd64.zip

Windows 32-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_windows_386.zip

Linux 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_amd64.tgz

Linux 32-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_386.tgz

Power Linux 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_ppc64le.tgz

System/390 Linux 64-bit

https://ibm-cloud-cli.s3.private.us.cloud-object-storage.appdomain.cloud/<release_tag>/binaries/IBM_Cloud_CLI_<release_tag>_linux_s390x.tgz

Using private endpoints in the CLI

For instructions on how to use private endpoints in the CLI, and to view the list of commands that support private endpoints, see Logging in to the CLI with a private endpoint