I don't know where this is set, but jobs from my Jenkins 2.289.2 server appear to be working out of the directory /home/jenkins/workspace/${job_name}. E.g. if I have a minimal pipeline script that just touches a path-unspecified file, it ends up in that directory.

Question: where is this setting viewable or editable in the Jenkins web UI?
Question: (assuming this is an editable setting) is this editable per-job, or is this only a global configuration?
Question: is this setting viewable in "Configuration as Code"? I don't see the directory anywhere in the yml generated by the View Configuration button at ${jenkins_url}:8080/configuration-as-code/

1 Answer 1


Your first question is a duplicate of this question.

Your second question. Each machine has a setting. So the Jenkins controller and the Jenkins Agent/s will each have its own setting.

You can change the workspace inside a pipeline. But I have never seen anyone do it.

I can't answer your last question because I don't have a jenkins with that plugin to look at but it is something that can be configured. I see in the README an example for setting it on an Agent.

EDIT: Thanks to @Ian we now know that those setters were moves to system properties. With that information I was able to research more on JasC and found that you can set the rawBuildsDir if you use the restricted flag. But you can set the workspacedDir unless you drop into a groovy init file. You can find all the information in this GitHub issue.

  • Something is different between the highest-voted answer to your first linked Q&A (stackoverflow.com/a/34918545/5437543), and my version of Jenkins: my configuration page has the read-only value of Home directory, but no fields at all (not even read-only) for Workspace Root Directory or Build Record Root Directory.
    – StoneThrow
    Aug 5, 2022 at 16:40
  • 1
    Several years ago (but after the linked answer, Build Record Root Directory as removed from UI as unsafe. Now a system property. Same for workspace.
    – Ian W
    Aug 6, 2022 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.