how to change port number for Jenkins installation In Ubuntu 12.04 how to change port number for Jenkins installation In Ubuntu 12.04 jenkins jenkins

how to change port number for Jenkins installation In Ubuntu 12.04


First open the /etc/default/jenkins file.
Then under JENKINS_ARGS section, you can change the port like this HTTP_PORT=9999.

Then you should restart Jenkins with sudo service jenkins restart.

Then to check the status use this command sudo systemctl status jenkins


For others still looking for answers you can go to /etc/sysconfig/jenkins in CentOS/RHEL or /etc/default/jenkins in Debian based distributions and change the JENKINS_PORT= variable to whatever port you want. Restart jenkins, and it should be running on your desired port.


  1. First, run this command to open jenkins configurations:

     sudo nano /etc/default/jenkins
  2. The only part you need to change is:

     #port for HTTP connector (default 8080; disable with -1) Http_port = 8080

    There you need to change to the desired port. For example:

     HTTP_PORT = 8081
  3. Finally, Restart Jenkins service by running this command:

     sudo service jenkins restart

Then you're ready to open it with a new port.