Where is JENKINS_HOME in windows?
Solution 1
I confirmed. Default Jenkins home is C:\Users\<user.name>\.jenkins
if Jenkins.war file used (not sure for Jenkins as service)
Solution 2
If you happen to be the admin of this Jenkins instance, then login to the instance and go to System information under manage Jenkins.
The URL should look something like this: https://your.jenkins.domain/systemInfo
Under this, Environment Variable should list your JENKINS_HOME.
Solution 3
On Windows, you'll find Jenkins Home to be in one of two places, assuming the JENKINS_HOME
variable hasn't set it to something other than the defaults.
Two Jenkins Home Locations
If you installed the jenkins.war
file on Tomcat or run it through the embedded Jetty server, Jenkins Home will be a folder named .jenkins
in the home folder of the user that starts Jenkins. If multiple users run Jenkins, each one will have a separate Jenkins Home with their own configuration, which is why you should always run the CI/CD instance with the same user account.
<userhome>\.jenkins
I have a user called Owner which runs Jenkins so the actual Jenkins Home location is:
C:\Users\Owner\.jenkins
If you used the Jenkins installer for Windows, the Jenkins Home location is buried a little bit deeper on the filesystem. It will be at:
C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins
You can change the Jenkins Home location by simply adding and editing the JENKINS_HOME environment or systems variable
Jenkins Home on Ubuntu
I know it's not the original ask, but for those with Jenkins on Ubuntu, the home folder is:
var\lib\jenkins
Solution 4
It's under jenkins.xml
file
<env name "JENKINS_HOME" value ="%localappdata% BLA BLA"...
In same file you need to replace all other %localappdata%
NarendraR
I'm an Automation Engineer working with Selenium using Java. I'm always passionate about new Learning and problem solving. Always seeks time to be a helpful hand over here Get in touch with me on LinkedIn
Updated on June 11, 2022Comments
-
NarendraR almost 2 years
I'm using jenkins.war file. I'm trying to test an groovy email template. This gives me below error
Groovy Template file [groovy1-html.template] was not found in $JENKINS_HOME/email-templates.
Unfortunately i'm not able to find
$JENKINS_HOME
. Is it somewhereC:\Users\<user.name>\.jenkins
? -
NarendraR about 5 yearsHey I'm not able to find
JENKINS_HOME
if run jenkins using jenkins.war (not as a service) -
Vighnesh Pai about 5 yearsJust let me know if you are looking for the path of the JENKINS_HOME or you are asking why its not taking the reference in your script?
-
NarendraR about 5 yearsI'm using windows 10
-
Vighnesh Pai about 5 yearsUnderstand. But that location is something which will be related to the OS. I've posted an image of Linux. Windows will be something like that. Please log into Jenkins and see under manage jenkins.
-
NarendraR about 5 yearsThat is what my question is. I'm not able to find that