Reputation: 31
I want to change the default localhost port from 8080 to any other for jenkins. I am using Ubuntu 16.04.
Upvotes: 2
Views: 11073
Reputation: 1
To change Default Port of Jenkins in Windows while using jenkins.war use java -jar jenkins.war --httpPort=9999.
I have created a small Video
Upvotes: -1
Reputation: 47
There is another solution for Linux systems that mentioned in Jenkins Documentation here
If Jenkins fails to start because a port is in use, run:
systemctl edit jenkins
and add the following:
[Service]
Environment="JENKINS_PORT=8081"
This will change the port from 8080 to 8081
Upvotes: 0
Reputation: 111
This solution is for centos.
To change the port you need to update /etc/sysconfig/jenkins
file. Here you can find
JENKINS_PORT="8080"
variable declared. Just update this port.
Upvotes: 1
Reputation: 88
This questions already has been asked 1 or 2 times on the internet. Maybe just use the search on this website...
java -jar jenkins.war --httpPort=9090
or
java -jar jenkins.war --httpsPort=9090
Upvotes: 0
Reputation: 2364
You can go to /etc/default/jenkins and add --httpPort=9999 or whatever port to JENKINS_ARGS.
Then you should restart Jenkins with sudo service jenkins restart.
OR
In /etc/default/jenkins change the JENKINS_PORT= variable to whatever port you want. Restart jenkins, and it should be running on your desired port.
Upvotes: 1