BTP · Intermediate · Configuration
How to set up a Cloud Foundry org, space and the cf CLI on SAP BTP
Enable Cloud Foundry in a subaccount, create a space with the right members, install the Cloud Foundry command line interface and log on to the correct org and space.
- APPLICABILITY
- SAP BTP subaccounts with the Cloud Foundry environment (enterprise or trial). Not applicable to Kyma or to the ABAP environment itself.
- TOOLS / TRANSACTIONS
- SAP BTP cockpit · cf CLI
Your project assignment
A hypothetical project gets a new subaccount for development. You must prepare a space called dev, give one colleague developer access and prove from your own terminal that the command line reaches that space.
Where to start: URLs and transactions
- SAP BTP cockpit
- https://cockpit.btp.cloud.sap/
- Cockpit navigation
- Subaccount → Overview → Cloud Foundry Environment; Cloud Foundry → Spaces
- SAP Developers: Install the Cloud Foundry Command Line Interface (CLI)
- https://developers.sap.com/tutorials/cp-cf-download-cli/
Prerequisites
- Subaccount administrator rights to enable Cloud Foundry, or Org Manager rights if the org already exists.
- Permission to install software on your workstation, or a package provided by IT.
- A decision on space names and who needs which space role.
Configuration workflow
From subaccount to a targeted space
All steps visible. Play or advance one stage at a time.
Hands-on implementation — step by step
Follow the screen navigation, replace example values with approved project values, and mark each step after checking its result. The screens below are original teaching aids, not live SAP screenshots. Progress is local to this visit.
- 1
Subaccount → Overview → Enable Cloud Foundry
Open the subaccount overview. If the Cloud Foundry environment is not yet enabled, choose Enable Cloud Foundry, accept or adjust the instance and org name and create it.
Subaccount → Overview → Enable Cloud FoundryERPClimb · illustrative screen - Plan
As entitled- Org name
example-dev-org (hypothetical)
Expected result: The overview shows the org name and the API endpoint.
Why this matters: Each subaccount with Cloud Foundry has exactly one org.
- 2
Note the API endpoint
Copy the API Endpoint displayed in the Cloud Foundry Environment section of the overview.
Note the API endpointERPClimb · illustrative screen - Section
Cloud Foundry Environment- API Endpoint
https://api.cf.<region>.hana.ondemand.com
Expected result: You have the endpoint of this subaccount's region.
Why this matters: The CLI must talk to the region where the org lives.
- 3
Cloud Foundry → Spaces → Create Space
Create a space and tick the roles you need for your own user.
Cloud Foundry → Spaces → Create SpaceERPClimb · illustrative screen - Space name
dev- Your roles
Space Manager, Space Developer
Expected result: The space is listed.
Why this matters: Applications and service instances always live in a space.
- 4
Space → Members → Add Members
Open the space, go to Members and add your colleague with the Space Developer role. The user must already be an org member.
Space → Members → Add MembersERPClimb · illustrative screen - User
colleague@example.com (hypothetical)- Role
Space Developer
Expected result: The colleague is listed as a space member.
Why this matters: Space roles decide who may deploy and bind services.
- 5
Install the cf CLI
Install the Cloud Foundry CLI with the installer or package manager described in the SAP tutorial, open a new terminal and check the version.
Install the cf CLIERPClimb · illustrative screen - Package
Cloud Foundry CLI, current major version- Command
cf --version
Expected result: The CLI prints its version.
Why this matters: A current CLI version is needed for the platform's API.
- 6
cf login
Log on to the endpoint. Enter your user and password, or use the single sign-on option and paste the temporary passcode from the page the CLI names. Select the org and space when prompted.
cf loginERPClimb · illustrative screen - Command
cf login -a <API endpoint>- Single sign-on
cf login -a <API endpoint> --sso- Org / space
example-dev-org / dev
Expected result: The CLI shows the API endpoint, user, org and space.
Why this matters: Logon creates the token that later commands use.
- 7
cf target and a read-only check
Display the target and run two read-only commands in the space.
cf target and a read-only checkERPClimb · illustrative screen - Command
cf target- Command
cf apps- Command
cf services
Expected result: The target is correct and both lists are returned without an authorization error.
Why this matters: Read-only commands prove access without changing anything.
Project acceptance checklist
Use this checklist to prepare evidence for your project lead.
0 of 4 checks marked. This does not certify the SAP configuration.
Validate your configuration
- cf target shows the expected API endpoint, org and space.
- cf apps and cf services run without an authorization error in the space, even if the lists are empty.
Common errors and what to check
logon fails with a credentials error although the password is right.
Check: The account uses single sign-on or a custom identity provider: log on with the single sign-on option and a temporary passcode.
logon succeeds but no org is offered.
Check: The API endpoint belongs to another region than the subaccount.
commands end with a not-authorized message.
Check: You are an org member without a role in the space; a Space Developer role is needed to work with applications and services.
cf is not recognised as a command.
Check: The CLI is not installed or not on the path; open a new terminal after installation.
More in the SAP Library
Need help with a configuration error? Open ERPClimb Copilot.
Technical references & further reading
Official documentation for technical verification, release compatibility and further study.