windowscommand-linejenkinswarcommand-prompt

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


I have jenkins.war and I started it from command prompt in Windows as:

java -jar jenkins.war

It was started well and easily browsed as http://localhost:8080

I want to start on 9090 port. How can I do that?


Solution

  • 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