I'm trying to set up a non-default URL as part of a puppet script that installs Jenkins. I know how to edit the value via the web UI but I can't seem to find where the value is actually stored. I've looked through the jenkins_home folder and apache and have yet to find it.
Asked
Active
Viewed 2.6k times
5 Answers
27
It stores it in a rather unlikely place: hudson.tasks.Mailer.xml
in Jenkins home folder.
![](../../users/profiles/1178189.webp)
malenkiy_scot
- 15,749
- 6
- 60
- 85
-
43In case someone runs into this nowadays, it's `jenkins.model.JenkinsLocationConfiguration.xml` in recent versions – joostdevries Apr 10 '14 at 13:17
-
1do you guys know if changing the URL in that file should actually change the URL for Jenkins? Or must it be changed from the management console? – demonicdaron Sep 05 '18 at 10:46
9
If you don't find the URL when grepping Jenkins home, it's because you didn't saved the configuration. If not set, Jenkins fallback to request URL, without saving it on disk.
root@jenkins-dev:/var/lib/jenkins# grep jenkinsUrl *.xml
jenkins.model.JenkinsLocationConfiguration.xml: <jenkinsUrl>http://jenkins-dev.lxc/</jenkinsUrl>
root@jenkins-dev:/var/lib/jenkins#
![](../../users/profiles/2613806.webp)
Étienne Bersac
- 366
- 2
- 9
-
Jenkins home directory in mac (installed with homebrew) is ~/.jenkins – chuckSaldana Apr 16 '19 at 15:12
9
I'm on Jenkins 2.68 and it's stored at jenkins.model.JenkinsLocationConfiguration.xml
under the Jenkins home folder.
![](../../users/profiles/1361802.webp)
wonton
- 5,487
- 4
- 39
- 73
-
2do you know if changing the URL in that file should actually change the URL for Jenkins? Or must it be changed from the management console? – demonicdaron Sep 05 '18 at 10:46
-3
The file config.xml in the Jenkins home folder.
![](../../users/profiles/1287080.webp)
sti
- 10,865
- 1
- 24
- 25
-
1Right. I'm aware of that file but as far as I can tell the URL value isn't stored in it. – nweiler Jul 31 '12 at 14:17
-3
I did a grep for "http" in my Jenkins root directory led me to hudson.model.UpdateCenter.xml
I'm using Jenkins version 1.462
![](../../users/profiles/496127.webp)
pwan
- 2,864
- 2
- 21
- 38