Where is “Jenkins URL” configuration stored?
Asked Answered
S

6

31

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.

Schreck answered 30/7, 2012 at 14:38 Comment(1)
The correct place to change this is <yourjenkins>/configure. Look for "Jenkins URL". https://mcmap.net/q/446255/-jenkins-website-root-pathFoliolate
Y
30

It stores it in a rather unlikely place: hudson.tasks.Mailer.xml in Jenkins home folder.

Yodel answered 31/7, 2012 at 16:8 Comment(2)
In case someone runs into this nowadays, it's jenkins.model.JenkinsLocationConfiguration.xml in recent versionsIgnatz
do 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?Jongjongleur
B
19

I'm on Jenkins 2.68 and it's stored at jenkins.model.JenkinsLocationConfiguration.xml under the Jenkins home folder.

Barrack answered 7/7, 2017 at 0:33 Comment(1)
do 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?Jongjongleur
B
11

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# 
Ba answered 16/3, 2016 at 9:6 Comment(1)
Jenkins home directory in mac (installed with homebrew) is ~/.jenkinsCyanotype
C
0

The url can be found in the UI/web app under configuration > Jenkins Location; alternatively, login to your server and cat the contents at this location: var/lib/jenkins/jenkins.model.JenkinsLocationConfiguration.xml

Comb answered 13/8, 2021 at 19:27 Comment(0)
C
-3

The file config.xml in the Jenkins home folder.

Consign answered 30/7, 2012 at 21:35 Comment(1)
Right. I'm aware of that file but as far as I can tell the URL value isn't stored in it.Schreck
I
-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

Infusorian answered 30/7, 2012 at 22:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.