Incorrect environment variables when running remote agent on macOS

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the server and data center platforms.


After installing the remote agent as a daemon on macOS builds start to fail because environment variables are not being picked.


Create a test plan with a script task to print the environment variables:

echo $PATH


By default, the macOS daemon does not pick environment variables.


There are two possible solutions for this issue. We can either set the environment variables on the plist file or at wrapper.conf:

Option A

You can set the environment variables in <Bamboo agent home>/conf/wrapper.conf, copy your JAVA_HOME and PATH and insert them in the wrapper configuration. E.g.

# Allow the service to interact with the desktop.

Restart the service.

More information on Wrapper environment variables configuration: Environment Variable Definition

Option B

You can configure them in the plist file {{/Library/LaunchDaemons/org.tanukisoftware.wrapper.bamboo-agent.plist}} like in the example below. Add the following inside the dict:


Then reload the daemon:

sudo launchctl unload -w /Library/LaunchDaemons/org.tanukisoftware.wrapper.bamboo-agent.plist
sudo launchctl load -w /Library/LaunchDaemons/org.tanukisoftware.wrapper.bamboo-agent.plist

Last modified on Mar 31, 2021

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.