Part 3: How to change the port of Jenkins CI/CD?

Step by step guide to change the port of Jenkins CI/CD, which is already installed in your machine.

🙋‍♂️ Shubham Verma    🗓 September 17, 2020


Part 3: How to change the port of Jenkins CI/CD?


C

hanging the port of Jenkins a little bit tricky and sometimes it becomes a bottleneck of the using Jenkins. Some we installed Jenkins on its default port 8080. But after that, we realized that some of the other processes are being used on port 8080 ( currently that process was stopped and 8080 is free). So we need to change the port of Jenkins. So in this tutorial, we'll see how we can change the port of Jenkins. We'll change the port 8080 to 7070.
So let's get started.


Change the port of Jenkins:

Change the port of Jenkins from 8080 to 7070. To change the port, follow the instruction below:
In your machine, Goto the location:


Now run command ls and see the below file (it should be there):

Now open the file homebrew.mxcl.jenkins.plist using open command as:

The above command will open this file in your default editor:
idkblogs.com: How to change the port of Jenkins CI/CD?

How to change the port of Jenkins CI/CD?


Now you need to change the port in string --httpPort=7070.
Now restart the Jenkins using below command:

Note: if you have Jenkins.war file then run the command java -jar Jenkins.war –httpPort=7070. You need not do anything to change the port. You can just give the port using command line.
Now open you Jenkins on port 7070 ( I'll use port 7070 in a further post):
Now, you've successfully changed your Jenkins port. Now open URL "localhost:7070" and you can see the Jenkins is running on port 7070.
Screenshot:

idkblogs.com: How to change the port of Jenkins CI/CD?

How to change the port of Jenkins CI/CD?



Conclusion:

In this tutorial, we changed the port of Jenkins. If you want to learn more about the Jenkins then read my articles, The links are give below.



Support our IDKBlogs team

Creating quality content takes time and resources, and we are committed to providing value to our readers. If you find my articles helpful or informative, please consider supporting us financially.

Any amount (10, 20, 50, 100, ....), no matter how small, will help us continue to produce high-quality content.

Thank you for your support!




Thank you

I appreciate you taking the time to read this article. The more that you read, the more things you will know. The more that you learn, the more places you'll go. If you’re interested in Node.js or JavaScript this link will help you a lot.

If you found this article is helpful, then please share this article's link to your friends to whom this is required, you can share this to your technical social media groups also. You can follow us on our social media page for more updates and latest article updates.
To read more about the technologies, Please subscribe us, You'll get the monthly newsletter having all the published article of the last month.