Running GeoServer in Cloud Foundry

Many organizations are moving applications and databases workload to cloud providers. One target platform for apps is Cloud Foundry. While it is not the best environment for intense usage of GeoServer, it is sufficient for simple usage. This tutorial is a simple guide on a basic deployment.

For more advanced deployments, refer to section Advanced Topics

Java Environment

Cloud Foundry runs micro services written in multiple languages using the abstraction concept of language buildpacks. The java buildpack supports OpenJDK and proprietary JREs and tomcat from version 6.0.0 to 9.x.y

Cloud Foundry client

To interact with Cloud Foundry, install the command line tool for your platform.

Get a Cloud Foundry trial account (or use your organization paid plan)

Register for a free trial account with SAP or IBM.

Warning At this time, IBM doesn’t allow more 64 MB of memory in free instances which prevents from starting the geoserver. The tutorial will be updated if this changes, however, the Cloud Foundry commands and manifest files are identical because Cloud Foundry truly is multi cloud!

Cloud Foundry on SAP Cloud Platform

Logon to your cockpit and select your trial organization


Notice the field organization name and the Cloud Foundry API endpoint.


Use those 2 values to login with the command line:

$ cf login -a -o your_org_name_trial
API endpoint:



Targeted org your_org_name_trial

Targeted space dev

API endpoint: (API version: 3.88.0)
Org:            your_org_name_trial
Space:          dev

And now that you are logged in, you can list the apps:

cf apps
Getting apps in org your_org_name_trial / space dev as

No apps found

Publish GeoServer

Now that you are logged in to a Cloud Foundry space, you can publish GeoServer as a servlet. Download GeoServer as a war file. Create a deployment configuration file called manifest.yml:

- name: geoserver
path: ./geoserver.war
health-check-type: process
random-route: true
    - java_buildpack

The default behavior is to use the latest OpenJRE and tomcat versions. And voilà, you’re ready to publish GeoServer!:

$ cf push -f manifest.yml
Pushing from manifest to org / space dev as
Using manifest file manifest.yml
Getting app info...
Packaging files to upload...
Uploading files...
    45.38 MiB / 45.38 MiB [=================================================================] 100.00% 3m59s
Waiting for app to start...

This should take two minutes the first time then you can check your application status by running:

$ cf apps
Getting apps in org 2d2950f1trial / space dev as

name        requested state   instances   memory   disk   urls
geoserver   started           1/1         1G       1G

You can open the url in your browser. HTTP is automatically redirected to HTTPS and traffic is encrypted using the Cloud Foundry platform certificates which are trusted by most browsers.

Advanced Topics

Changing the memory limit

Use the command cf scale, for instance to set the limit at 2Gigabytes, execute:

$cf scale geoserver -m 2G -f
Scaling app geoserver in org 2d2950f1trial / space dev as

This restarts the application and displays the new limit:

     state     since                    cpu    memory         disk           details
#0   running   2020-11-13 01:54:56 PM   0.4%   470.8M of 2G   250.2M of 1G

As for most parameters, resource limits can also be set in the manifest file

Changing the manifest file

The manifest file allows you to configure:
  • Resource limits (memory and cpu)

  • configure the route URL

  • Set environment variables, for instance to set a specific tomcat version

- name: geoserver
path: ./geoserver.war
health-check-type: process
random-route: true
    JBP_CONFIG_TOMCAT: '{ tomcat: { version: 8.0.+ } }'

Scaling challenges

Total Memory limit of 8 GB. The goal of Cloud Foundry as a micro service platform is to break a monolithic application into smaller blocks. The containers are restricted to 8 GB in IBM and SAP platforms.