How to start Jenkins on a different port rather than 8080?

0 votes
I am facing an error every time I start Jenkins on the 8080 port. Is there a way to run the same Jenkins instance on another port?
Jul 4, 2018 in Jenkins by Tyrion anex
• 8,360 points

2 answers to this question.

0 votes

This is simple, use the following command:

java -jar jenkins.war --httpPort='xyz'

For https,

java -jar jenkins.war --httpsPort='xyz'

Finally, restart the service, this should change the port permanently.

answered Jul 4, 2018 by Sophie may
• 9,940 points
0 votes

In case you want to change the default jenkins port on Linux,

  • You can go to /etc/default/jenkins  

  • add --httpPort=9999 or whatever port to JENKINS_ARGS.

  • Then you should restart Jenkins with sudo service jenkins restart.

answered Jul 31, 2019 by Sirajul
• 50,550 points

Related Questions In Jenkins

+1 vote
4 answers
0 votes
2 answers

How to auto build a job in jenkins if there is any change in code on Github repository?

To automatically run build on code commit, follow ...READ MORE

answered Jul 31, 2019 in Jenkins by Sirajul
• 50,550 points
0 votes
1 answer

How to rebuild an item on Jenkins pipeline

Yes you can, its pretty simple actually. Go ...READ MORE

answered Jul 10, 2018 in Jenkins by Kalgi
• 2,620 points
0 votes
3 answers

How to get the Maven Version of a project in Jenkins?

Here is a snippet from our Jenkins ...READ MORE

answered Oct 4, 2019 in Jenkins by Petr Doležal
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,400 points
0 votes
1 answer
0 votes
1 answer

I’m facing a login error when I try to run Jenkins on Docker. How do I solve this?

You have to open the /var/log/jenkins/jenkins.log file to ...READ MORE

answered Jul 24, 2018 in Jenkins by Sophie may
• 9,940 points
+2 votes
2 answers

How to trigger a Jenkins pipeline A in another Jenkins pipeline B?

You can run the following code, its ...READ MORE

answered Jul 5, 2018 in Jenkins by Sophie may
• 9,940 points