How to start jenkins on different port rather than 8080 using command prompt in Windows? How to start jenkins on different port rather than 8080 using command prompt in Windows? windows windows

How to start jenkins on different port rather than 8080 using command prompt in Windows?


Use the following command at command prompt:

java -jar jenkins.war --httpPort=9090

If you want to use https use the following command:

java -jar jenkins.war --httpsPort=9090

Details are here


Open the jenkins.xml in the jenkins home folder (usually C:\Program Files (x86)\Jenkins) and change the port number:
httpPort=xxxx
to
httpPort=yyyy
then restart the service. it should change the setting permanently.


With Ubuntu 14.4 I had to change the file /etc/default/jenkins

E.g.

   #HTTP_PORT=8080   HTTP_PORT=8083

and restart the service

service jenkins restart