Cloud Foundry Documentation
- General Information
- Contribute to Cloud Foundry documentation
- Cloud Foundry concepts
- Cloud Foundry Command Line Interface (cf CLI)
-
- Information for Operators
- Deploying Cloud Foundry
- Administering Cloud Foundry
- Managing the runtime
- User accounts and communications
- Routing
- Enabling IPv6 for hosted apps
- Distributed tracing
- Enabling Zipkin tracing
- Enabling W3C tracing
- Supporting WebSockets
- Configuring load balancer health checks for CF routers
- Troubleshooting slow requests
- Troubleshooting router error responses
- Securing incoming traffic
- Configuring trusted system certificates for apps
- Bulletin Board System data store encryption
- Enabling and configuring TCP routing
- Configuring HTTP/2 support
- Isolation segments
- Delayed jobs in Cloud Foundry
- Managing apps and their stacks
- Running and Troubleshooting Cloud Foundry
- Cloud Foundry logging
- Configuring system logging
- Configuring Diego for upgrades
- Audit Events
- UAA audit requirements
- Usage events and billing
- Configuring SSH access for Cloud Foundry
- Configuring Diego Cell disk cleanup scheduling
- Configuring Health Monitor Notifications
- Adding a custom stack
- Monitoring and testing Diego components
- Troubleshooting Cloud Foundry
- UAA performance
- UAA performance metrics
- Scaling Cloud Controller
- Cloud Controller Multi-Process Mode (Puma)
- Scaling Cloud Controller (cf-for-k8s)
- Logging and metrics in Cloud Foundry
- Logging and metrics architecture
- Installing the Loggregator plug-in for cf CLI
- Security event logging
- App logging in Cloud Foundry
- Limiting your app log rate in Cloud Foundry
- Cloud Foundry component metrics
- Container metrics
- Loggregator guide for Cloud Foundry operators
- Logging and metrics in Cloud Foundry
- Configuring the OpenTelemetry Collector
- Deploying a nozzle to your Cloud Foundry Loggregator Firehose
- BOSH Documentation
- BOSH Backup and Restore (BBR)
- Information for developers
- Developing and managing apps
- How to push your app with Cloud Foundry CLI (cf push)
- Pushing your app using Cloud Foundry CLI (cf push)
- Deploying with app manifests
- App manifest attribute reference
- Deploying an app with Docker
- Deploying your large apps
- Starting, restarting, and restaging apps
- Pushing an app with multiple processes
- Running cf push sub-step commands
- Configuring app deployments
- Pushing apps with sidecar processes
- Using blue-green deployment to reduce downtime
- Troubleshooting app deployment and health
- SSH for apps and services
- Routes and domains
- Managing services
- Streaming app logs
- Managing apps with the cf CLI
- Cloud Foundry environment variables
- Available Cloud Controller API client libraries
- Designing and running your app in the cloud
- Cloud Foundry API app revisions
- How to push your app with Cloud Foundry CLI (cf push)
- Cloud Foundry Buildpacks
- Cloud Native Buildpacks
- Classic Buildpacks
- What are classic buildpacks?
- Binary buildpack
- Go buildpack
- Hosted Web Core buildpack
- Java buildpack
- .NET Core buildpack
- NGINX buildpack
- Node.js buildpack
- Using PHP buildpack with runtimes
- Python buildpack
- R buildpack
- Ruby buildpack
- Staticfile buildpacks
- Creating custom buildpacks
- Information for Managed Service Authors
- Services in Cloud Foundry
- Service Broker API
- Managing service brokers in Cloud Foundry
- Managing access to service plans
- Binding credentials in Cloud Foundry
- CredHub
- Dashboard Single Sign-on
- Service instance sharing in Cloud Foundry
- Service broker examples
- App log streaming in Cloud Foundry
- Offering Route Services in Cloud Foundry
- Supporting multiple CF instances
- User Account and Authentication
- API Reference
- UAA API
- CAPI API
Using the cf CLI with a proxy server
Page last updated:
If you have an HTTP or SOCKS5 proxy server on your network between a host running the Cloud Foundry Command Line Interface (cf CLI) and your API endpoint, you must
set the https_proxy variable with the hostname or IP address of the proxy server. The https_proxy environment variable holds the hostname or IP address of the
proxy server.
The https_proxy variable is a standard environment variable. As with any environment variable, the specific steps used to set it depends on your operating
system.
Format of https_proxy
The https_proxy variable is set with hostname or IP address of the proxy server in URL format, as shown in the following example:
https_proxy=http://proxy.example.com
If the proxy server requires a username and password, you must include the credentials, as shown in the following example:
https_proxy=http://username:[email protected]
If the proxy server uses a port other than 80, you must include the port number, as shown in the following example:
https_proxy=http://username:[email protected]:8080
If the proxy server is a SOCKS5 proxy, you must specify the SOCKS5 protocol in the URL, as shown in the following example:
https_proxy=socks5://socks_proxy.example.com
The cf ssh command for cf CLI v7 does not work through a SOCKS5 proxy. cf CLI v7 is out of support; you must be running cf CLI v8.
Set https_proxy in macOS or Linux
To set the https_proxy environment variable in macOS or Linux:
Use the command specific to your shell. For example, in bash, use the
exportcommand, as shown in the following example:export https_proxy=http://my.proxyserver.com:8080To make this change persistent, add the command to the appropriate profile file for the shell. For example, in bash, add a line similar to the following example to your
.bash_profileor.bashrcfile:https_proxy=http://username:password@hostname:port export $https_proxy
Set https_proxy in Windows
To set the https_proxy environment variable in Windows:
Open the Start menu.
Right-click Computer and select Properties.

In the left pane of the System window, click Advanced system settings.

In the System Properties window:
- Select Advanced.
- Click Environment Variables.

Under User variables, click New.

For Variable name, enter
https_proxy.For Variable value, enter your proxy server information.

Click OK.
