How to add Java arguments to CloudBees CI?

Article ID:209715698
Last Reviewed:2026-03-18()
2 minute readKnowledge base

Issue

  • I don’t know how to add/update Java arguments for a controller or operations center

Resolution

It depends on the way you installed CloudBees CI.

The Jenkins System and Remoting Properties are added as Java Arguments. Both also apply to CloudBees CI.

Testing the properties

IMPORTANT: This type of setting is not persistent; thus, the property default values will be reset after the next restart.

In the Script Console, depending on the property setting.

Most of the Jenkins properties are static, therefore you can update its value like in the following examples:

TcpSlaveAgentListener.CLI_HOST_NAME="<ci.example.com>" //OR com.cloudbees.hudson.plugins.folder.computed.FolderComputation.BACKUP_LOG_COUNT=10

There are some exceptions like the JENKINS-35484 which makes use of the Jenkins SystemProperties

Traditional Platform

Running CloudBees CI inside Jetty Winstone container

For Jenkins®, see Overriding service configurations.

This is the default way to run CloudBees CI if you installed it using packages provided by CloudBees.

To pass Java arguments to CloudBees CI, you need to change the CloudBees CI service configuration file. You might require elevated privileges to be able to modify this file.

For CloudBees CI on traditional platforms - operations center, you can find this file under:

  • /etc/sysconfig/cloudbees-core-oc: RPM based Linux distributions

  • /etc/default/cloudbees-core-oc: DEB based Linux distributions

  • C:\Program Files\CloudBeesCoreOC\jenkins.xml: default location for Windows

For CloudBees CI on traditional platforms - client controller, you can find this file under:

  • /etc/sysconfig/cloudbees-core-cm: RPM based Linux distributions

  • /etc/default/cloudbees-core-cm: DEB based Linux distributions

  • C:\Program Files\CloudBeesCoreCM\jenkins.xml: default location for Windows

RPM based Linux distributions

In your service configuration file, look for the argument JENKINS_JAVA_OPTIONS. It should look something like this:

JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true"

Starting with version 2.303.2.3 or newer, you should use the following array-based syntax, for example to add -Xms and -Xmx arguments:

JENKINS_JAVA_OPTIONS=("-Djava.awt.headless=true")
JENKINS_JAVA_OPTIONS+=("-Xms2048m")
JENKINS_JAVA_OPTIONS+=("-Xmx2048m")

This array-based syntax is the recommended syntax as it is simpler to comment out individual arguments if required, and comparing differences with backups of the file are simpler.

If running a product version older than 2.303.2.3 use the previous syntax:

JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -Xms2048m -Xmx2048m"

DEB based Linux distributions

In your service configuration file, look for the argument JAVA_ARGS. It should look something like this:

JAVA_ARGS="-Djava.awt.headless=true"

Then, add the arguments:

JAVA_ARGS="-Xmx2048m -Djava.awt.headless=true"

Running CloudBees CI in Windows as a Service

In your service configuration file (by default $JENKINS_HOME\jenkins.xml) add the arguments into the <arguments> tag. It should look like this
<arguments>-Xmx2048m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar "%BASE%\jenkins.war" --httpPort=8080</arguments>

Running CloudBees CI inside Docker

The JAVA_OPTS should be passed to the container via --env JAVA_OPTS="..." like the following:

docker run --name cloudbees-controller -p 8080:8080 -p 50000:50000 --env "JAVA_OPTS=-Dhudson.footerURL=https://mycompany.com" cloudbees/cloudbees-core-cm
With Docker, in terms of memory, other constraints apply.
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.