I was wondering how one could change Jenkins' default port 8080. Using linux or windows, this is simply done with the configuration file. But the Mac config file of Jenkins looks completely different from the other ones.
Of course one could pass the --httpPort parameter when starting the server, but I want to do this within a config file.
Is there an option for that?
PS: Passing the Jenkins instance through apache would kinda solve the problem, but I want to change the Jenkins port.
Thanks!
This worked for me for changing port to 7070 or other.
More info about this
it looks like the default way is:
#add the default parameters - this will edit /Library/Preferences/org.jenkins-ci.plist
#stop
#start
Just write the following command in the terminal:
That should resolve it.
An other solution in case of running two daemons of Jenkins, on different HTTP ports (i.e. 7070 and 7071) : Multiple Jenkins daemons on different HTTP ports (Mac OS X)
I'll walk you through it:
cd /Applications/Jenkins
sudo vi winstone.properties
AddhttpPort=9999
to the file. To see all the options you can put in there typejava -jar jenkins.war --help
run
java -jar jenkins.war
from/Applications/Jenkins
. Your port will be changed.jenkins.war
picks up config options from./winstone.properties
by default.I have installed Jenkins on my Mac OS High Sierra using Brew.
Please follow below steps:
Assign any free port like 7070 or any number you want.[If you have static IP then you can give port 80(HTTP)]
--httpPort=7070
You also need to restart the Jenkins Server. using below brew service commands:
$ brew services stop jenkins
$ brew services start jenkins
That's all.!