How to pass the PATH variable to Bamboo when running it as a systemd service in RedHat Enterprise Linux 7

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When running Bamboo as a systemd service in RedHat Enterprise Linux (RHEL) 7 the PATH variable will not be automatically inherited by the Bamboo process.

This happens due to an OS restriction since systemd will not pass the PATH variable available for that user to any process started from it unless you explicitly pass the variable.

Resolution

Add and environment directive to your service passing the PATH values you want:

1. Edit the systemd configuration file for Bamboo

1 vi /usr/lib/systemd/system/bamboo.service

2. Add the following environment directive:

1 Environment=PATH=/opt/location_of_your_executable

3. Reload Daemon

1 systemctl daemon-reload

4. Restart Bamboo

1 systemctl stop bamboo; systemctl start bamboo
Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.