How to change Jenkins Port Number on Windows
Overview
Lets get the steps involved in changing the Jenkins port number. Sometimes it is required to change port number of Jenkins Server due to port conflicts between different applications and services. In this tutorial, we will change the port number of Jenkins on the Windows platform.
Steps
Open the Jenkins.xml file under the Jenkins installation directory.
By default its under the directory : Program Files\Jenkins or Program Files (x86)\Jenkins
- Edit the port from 8080 to some other number lets say 9090.
–httpPort=9090
<arguments>-Xrs -Xmx256m -Dhudson.lifecycle=hudson.lifecycle.WindowsServiceLifecycle -jar “%BASE%\jenkins.war” –httpPort=9090 –webroot=”%BASE%\war”</arguments>
- Type services.msc in the search box.
- Locate the Jenkins Service in the Window.
Restart Jenkins Server.
Login with the new port URL on the browser. Now we should be able to run the Jenkins on the new specified port number in the configuration file.