Config Server for Pivotal Cloudfoundry is an externalized configuration service, which can be used as a central place to manage all of our cloudfoundry application’s external properties across all the environments.

Cloudfoundry applications can use the Pivotal Cloudfoundry Config Server service to manage configurations across environments.

In this tutorial, let’s register Config Server for Pivotal Cloud Foundry (PCF) and configure it’s git coordinates.

Table of contents

  1. Prerequisites
  2. Add properties files in github for each of your environments
  3. Register Spring Config Server Application on PCF


  • An account on Pivotal Cloud Foundry (PCF). You can create one here.
  • PCF Command Line Interface (CLI) installed on your computer. PCF CLI can be found in tools section of your PCF account.

Add properties files in github for each of your environments

For this tutorial purpose, I have created a Configuration GIT repository which has sample file for both dev and prod environments.

Register Spring Config Server Application on PCF

Log into your PCF account using cf command

cf login -a -u "" -p "your-password" -o "your-org" -s "your-space"


API endpoint:
Targeted org your-org
Targeted space your-space

API endpoint: (API version: 2.128.0)
Org:            your-org
Space:          your-space

Create a configuration file my-config.json

Create a json file with the github url where you have the properties file. If you want to render the properties in dev folder, then set the searchPaths to dev. For prod, it needs to be set to prod.

    "git": {
        "uri": "",
        "label": "master",
        "searchPaths": "dev",
        "cloneOnStart": true

Register the Config Server for Pivotal Cloudfoundry

Use the above created configuration json file to register the config service in cloudfoundry.

cf create-service -c my-config.json p-config-server trial my-config-server


Creating service instance my-config-server in org your-org / space your-space as

Create in progress. Use 'cf services' or 'cf service my-config-server' to check operation status.

Check Config Service Creation Status

You can check the status of service registration using cf service. The status will be create succeeded once the registration is successful. This might take few minutes.

cf service my-config-server


Showing info of service my-config-server in org your-org / space your-space as

name:             my-config-server
service:          p-config-server
plan:             trial
description:      Config Server for Spring Cloud Applications
service broker:   p-spring-cloud-services

This service is not currently shared.

Showing status of last operation from service my-config-server...

status:    create succeeded
started:   2020-01-05T15:03:12Z
updated:   2020-01-05T15:05:19Z

There are no bound apps for this service.

Upgrades are not supported by this broker.


Congratulations! You just registered a spring cloud config server on Pivotal cloudfoundry (PCF) using PCF CLI.

Your feedback is always appreciated. Happy coding!