How to install Jenkins
Jenkins, an open-source automation server, is crucial for modern software development, automating critical aspects of the development lifecycle. This comprehensive guide will walk you through the detailed installation process of Jenkins on Windows and Mac operating systems.
Table of contents
- What is Jenkins?
- Why should you use Jenkins?
- Prerequisites for installation
- Minimum system requirements
- Installation on Windows
- Installation on Mac
- Common installation issues and solutions
- Installing Jenkins on Linux, Docker, and FreeBSD
- Conclusion
What is Jenkins?
Jenkins is a free, open-source automation server created to streamline continuous integration and continuous delivery (CI/CD) processes in software development. It plays a vital role in automating critical phases of the software development lifecycle, such as building, testing, and deploying applications.
Built-in Java, Jenkins offers flexibility and adaptability, making it easy for developers to integrate into their development workflows. Its user-friendly interface and extensive plugin support contribute to its popularity as a go-to tool for automating and optimizing software development practices.
Why should you use Jenkins?
Automation of repetitive tasks
Jenkins automates routine tasks like code building, testing, and deployment, reducing manual effort and minimizing errors. This results in increased efficiency and allows teams to focus on more strategic and creative aspects of development. By handling repetitive tasks seamlessly, Jenkins empowers development teams to enhance productivity and accelerate project timelines.
Continuous integration and continuous delivery (CI/CD)
Jenkins supports CI/CD, ensuring that code changes are regularly integrated, tested, and deployed, leading to faster and more reliable software delivery. This facilitates a smooth and agile development process, enhancing collaboration and responsiveness to market demands.
Extensive plugin ecosystem
Jenkins boasts a vast array of plugins that enhance its functionality, allowing users to customize and extend its features according to their needs. This flexibility empowers teams to tailor Jenkins to specific project requirements, fostering a versatile and adaptable automation environment.
Community support
With a large and active community, Jenkins benefits from continuous improvement, updates, and extensive support from developers worldwide. The collaborative nature of the community ensures that issues are addressed promptly, and best practices are shared, creating a robust and evolving platform.
Scalability
Jenkins scales effortlessly to accommodate projects of all sizes, from small startups to large enterprises, making it a versatile and adaptable automation solution. Its ability to grow with the evolving needs of a project or organization ensures long-term viability and scalability.
Cost-Effective
Being open-source, Jenkins is cost-effective, making it an attractive choice for businesses looking to streamline their development processes without a substantial financial investment. This affordability extends to maintenance and customization, contributing to a cost-efficient development pipeline.
Visibility into build and deployment processes
Jenkins provides transparency into the software development lifecycle, allowing teams to monitor and analyze the build and deployment processes for better visibility and control. This visibility enhances decision-making, enabling teams to identify bottlenecks and optimize workflows for improved efficiency.
Enhanced collaboration
Jenkins fosters collaboration among development and operations teams, breaking down silos and promoting a culture of continuous improvement and feedback. This collaborative approach improves communication and accelerates the identification and resolution of issues, leading to a more cohesive and efficient development cycle.
Prerequisites for installation
Before installing the Jenkins application of your respective operating system, you have to make sure that you have the prerequisites ready with you:
For Windows
Java Development Kit (JDK): Jenkins requires Java since it is built in Java and needs the Java Runtime Environment (JRE) for execution. Java provides platform independence and robustness, enabling Jenkins to run consistently across different operating systems. So, download and install the latest JDK from the official Oracle website.
Note
When you install the JDK, you are automatically also installing the JRE since the JDK comes with the JRE built-in.
Administrator Privileges: Ensure that you have administrative privileges on your Windows system. This is crucial for installing and configuring Jenkins seamlessly.
For Mac
Java Development Kit (JDK): Since Jenkins is a Java-based application, it requires Java. Download and install the latest JDK from the official Oracle website.
Note
When you install the JDK, you are automatically also installing the JRE since the JDK comes with the JRE built-in.
Homebrew (optional, but recommended): While not mandatory, using Homebrew to manage packages on macOS is recommended. If you still need to install Homebrew, consider following the instructions on the official Homebrew website. Homebrew simplifies the management of dependencies and can enhance the overall Jenkins experience on your Mac system.
Minimum system requirements
Meeting the minimum system requirements and prerequisites is essential to ensure a seamless installation of Jenkins on your system.
Windows
For Windows, the operating system should be at least Windows 10 (64-bit) or 11, with a minimum of 256 MB RAM. Additionally, ensure 1GB of free disk drive space to accommodate the Jenkins installation. Refer to the official Jenkins documentation for more details.
Mac
If you’re using a Mac, your system should run on the latest macOS version, featuring a processor with a minimum of 256 MB RAM. Ensure there is a minimum of 1GB of available disk drive space to facilitate the installation of Jenkins.
Installation on Windows
Here is how to install Jenkins on Windows:
Download Jenkins
Visit the official Jenkins website.

Under the Windows section, click the Download link to obtain the latest stable version.

Install Jenkins
Locate the downloaded jenkins.msi file and double-click to initiate the installation.

Choose the installation directory and ensure the default directory is recommended for most users. Then click on the Next button.

Select the first logon type option in the Logon Credential page if you are not a local or admin user. Then click Next.

Then, on the Port Selection page, set the default port to 8080 and hit the Test Port button. Then click Next.

Select the Java home directory.
Note
It is recommended that Java 11 or above is used.

The Custom setup page will appear, and select the Next button with all default settings.

Finally, click on the Install button. Once the installation is complete, click Finish.


Configure Jenkins
After completing the Jenkins installation phase, you should start its configuration. The following steps will guide you on how you can configure the Jenkins application:
- After installation, navigate to the Jenkins installation directory (usually C:\Program Files (x86)\Jenkins).
- Find the initial administrator password in the path of the secrets/initialAdminPassword file. And copy it.
- Open a web browser, go to
http://localhost:8080
, and paste the administrator password into the Jenkins setup wizard and click Continue.

Customize Jenkins
You can also customize your Jenkins environment by below-given steps:
Click on the Install suggested plugins button so Jenkins will retrieve and install the essential plugins. But you can choose the Option Select Plugins to Install and select the plugins you want to install.

Then Jenkins will start downloading and installing all the necessary plugins to create new Jenkins Jobs.

After all suggested plugins are installed, the Create First Admin User panel will appear. Fill all the fields with desired account details and hit the Save and Finish button.

Once you have filled in the above data, it will ask for URL information where you can configure the default instance path for Jenkins. Leave it as it is to avoid any confusion later. However, if another application already uses the 8080 port, you can use another port for Jenkins and finally save the settings, and you are done with the installation of Jenkins. Hit the Save and Continue button.

Congratulations! You have successfully installed a new Jenkins Server. Hit the Start using Jenkins button.

Installation on Mac
Here is how to install Jenkins on macOS:
Download Jenkins
Visit the official Jenkins website.

In the macOS section, click the Download link to get the latest stable version.

Install Jenkins
Locate the downloaded .pkg file and double-click to start the installation. Then, follow on-screen instructions, opting for default options unless specific preferences are necessary.
Open a terminal and navigate the Jenkins installation directory (/Applications/Jenkins/Home). Retrieve the initial administrator password with the command:
sudo cat secrets/initialAdminPassword
Open a web browser, go to http://localhost:8080
, and paste the administrator password into the Jenkins setup wizard. Then click Continue, follow the setup wizard to create an admin user, and install suggested plugins.
Start Jenkins
Open Terminal and run the below path code:
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
Then, access Jenkins via http://localhost:8080
.
Common installation issues and solutions
Jenkins fails to start
Failed to start Jenkins. java.io.IOException: Failed to start Jetty
Cause:
- Incorrect Java version or misconfiguration.
- Jenkins service conflicts with other services.
Solution:
- Check the Java version. Jenkins requires a compatible JDK. Ensure it’s correctly installed and configured.
- Examine Jenkins logs for error messages. Logs are typically found in the Jenkins installation directory.
- Check for conflicting services that might use the same port.
Port 8080 is already in use
Address already in use: bind
Cause:
- Another process is using port 8080.
Solution:
- Identify and terminate the process using port 8080.
- Change Jenkins’ default port by modifying the JENKINS_PORT variable in the Jenkins configuration file.
Jenkins setup wizard doesn’t appear
HTTP ERROR 404: Not Found
Cause:
- Incorrect Java version or misconfiguration.
- Jenkins service has yet to start.
Solution:
- Check if Java is installed and the correct version.
- Ensure the initial administrator password is correctly entered in the setup wizard.
- Start the Jenkins service if it is not already started.
Plugin installation issues
ERROR: Could not find local repository for 127.0.0.1:50000/jenkins
Cause:
- Firewall/antivirus blocking or network issues.
- Jenkins service has yet to start.
Solution:
- Disable firewall/antivirus temporarily during installation.
- Manually install plugins if automatic installation fails.
- Start the Jenkins service if it is not already started.
Jenkins is unresponsive
Jenkins is unresponsive and slow to load pages
Cause:
- Insufficient system resources (RAM and CPU).
- Internal errors within Jenkins.
Solution:
- Check system resources (RAM and CPU) and ensure they meet the minimum requirements.
- Examine Jenkins logs for error messages and address them accordingly.
Jenkins installation for Linux, Docker, and FreeBSD
While the detailed installation guide primarily focuses on Windows and Mac operating systems, Jenkins is a versatile tool that can be installed on various operating systems. Here’s a brief overview of how you can approach installing Jenkins on different platforms:
Linux
Jenkins is well-supported on various Linux distributions, including Ubuntu, CentOS, and Debian. The installation process on Linux involves:
- Downloading the Jenkins package suitable for your distribution.
- Installing Java if not already present.
- Configuring Jenkins to start as a service.
Refer to the official Jenkins documentation for distribution-specific instructions.
Docker
Jenkins can be run as a Docker container, providing a lightweight and containerized solution. Docker allows you to isolate Jenkins and its dependencies from the underlying system. You can pull the official Jenkins image from the Docker Hub and run Jenkins as a container, customizing configurations as needed.
FreeBSD
For users on FreeBSD, Jenkins can be installed using the FreeBSD Ports Collection or by downloading the Jenkins package directly. The installation process on FreeBSD involves:
- Ensuring that Java is installed.
- Downloading the Jenkins package.
- Configuring Jenkins to start automatically.
Final thoughts on the installation guide for Jenkins
With the successful installation of Jenkins on both Windows and Mac, you have now unlocked a powerful tool for streamlining your software development process. Jenkins’ robust automation capabilities can significantly enhance efficiency in your workflow.
Delve into the vast array of plugins and features that Jenkins provides, allowing you to customize it according to your needs. This marks the beginning of a smooth automation and continuous integration journey for your development projects.
If you encounter any challenges, refer to the common installation issues and solutions section for guidance. When configured correctly, Jenkins is a versatile platform that can significantly contribute to the success of your software development endeavors. Please fully utilize its capabilities and embrace a more automated and efficient development lifecycle. Happy testing!
Related articles
Follow our blog
Be the first to know when we publish new content.