Install Jenkins on Windows: A Step-By-Step Guide

November 10, 2021

Introduction

Jenkins is an open-source automation server developers can use to automate building, testing, and deploying applications. It is available on a variety of systems, including Windows, Linux, Unix, and macOS.

In this tutorial, we take you through the step-by-step process of installing, unblocking, and customizing Jenkins on Windows 10.

Install Jenkins on Windows

Prerequisites

  • A system running Windows 10
  • The latest copy of Java Development Kit or Java Runtime Environment installed
  • Access to an account with administrator privileges

Note: Check out our in-depth Jenkins tutorial perfect for users who are just starting.

Install Jenkins on Windows

1. Browse to the official Jenkins download page. Under the Downloading Jenkins section is a list of installers for the long-term support (LTS) version of Jenkins. Click the Windows link to begin the download.

Downloading the Windows installation file from the Jenkins website

2. Once the download is complete, run the jenkins.msi installation file.

3. The setup wizard starts. Click Next to proceed.

Starting the Jenkins install wizard

4. Select the install destination folder and click Next to continue.

Selecting the install destination

5. Under the Run service as a local or domain user option, enter the domain username and password for the user account you want to run Jenkins with. Click Test Credentials to verify the login data, then click Next to proceed.

Adding user credentials for the Jenkins administrator

Using the Run service as LocalSystem option doesn’t require you to enter user login data. Instead, it grants Jenkins full access to your system and services. Note that this is a less secure option and is thus not recommended.

Note: When selecting the Run service as local or domain user, the user in question must have the required permission to log on as a service. If this is not the case, an error message stating the account cannot be verified appears. In the event of this error, perform the following steps to resolve the issue:

1. Make sure you are logged in as a user with administrative privileges.
2. In the Administrative Tools, open Local Security Policy.
3. In the Local Security Policy window, expand Local Policy in the left-hand panel and select User Rights Assignment.
4. In the right-hand side panel, right-click Log on as service and select Properties.
5. Click the Add User or Group… button.
6. Use the Select Users or Groups dialogue to add the current user and click OK.
7. Save changes by clicking the OK button in the Properties window.

6. Enter the port number you want Jenkins to run on. Click Test Port to check if the selected port is available, then click Next to continue.

Entering the port number Jenkins will use

7. Select the directory where Java is installed on your system and click Next to proceed.

Selecting the Java install directory

8. Select the features you want to install with Jenkins and click Next to continue.

Choosing which Jenkins services to install

9. Click Install to start the installation process.

Starting the installation process

10. Once the installation is complete, click Finish to exit the install wizard.

Closing the install wizard

Unblock Jenkins

After completing the installation process, you have to unblock Jenkins before you can customize and start using it.

1. In your web browser, navigate to the port number you selected during the installation using the following address:

http://localhost:[port number]

2. Navigate to the location on your system specified by the Unblock Jenkins page.

The Unblock Jenkins page shows the path to the file with the administrator password

Note: The Unblock Jenkins page may point to a hidden directory. In case you cannot find the directory, make sure you enable viewing hidden items.

3. Open the initialAdminPassword file using a text editor such as Notepad.

4. Copy the password from the initialAdminPassword file.

Copying the administrator password

5. Paste the password in the Administrator password field on the Unblock Jenkins page and click Continue to proceed.

Entering the administrator password on the Unblock Jenkins page

Customize Jenkins

Once you unlock Jenkins, customize and prepare the Jenkins environment.

1. Click the Install suggested plugins button to have Jenkins automatically install the most frequently used plugins.

Selecting the Install suggested plugins option

Note: If you are an advanced user, clicking the Select plugins to install button allows you to choose which plugins to install.

2. After Jenkins finishes installing the plugins, enter the required information on the Create First Admin User page. Click Save and Continue to proceed.

Adding a new administrator user

3. On the Instance Configuration page, confirm the port number you want Jenkins to use and click Save and Finish to finish the initial customization.

Verifying the port number for Jenkins

4. Click the Start using Jenkins button to move to the Jenkins dashboard.

Opening the Jenkins dashboard

5. Using the Jenkins dashboard, click Create a job to build your first Jenkins software project.

Creating the first job to start using Jenkins

Note: Learn how to restart Jenkins manually while troubleshooting issues or installing plugins.

Conclusion

After reading this tutorial, you should have a functional Jenkins environment installed on your Windows system.

If you are interested in using Jenkins on a Linux system, have a look at our guides on installing Jenkins on Debian, installing Jenkins on CentOS, or installing Jenkins on Ubuntu.

Was this article helpful?
YesNo
Aleksandar Kovačević
With a background in both design and writing, Aleksandar Kovacevic aims to bring a fresh perspective to writing for IT, making complicated concepts easy to understand and approach.
Next you should read
How to Install Jenkins on Kubernetes Cluster
March 3, 2020

Use a provided set of YAML files to deploy scalable Jenkins on Kubernetes in 4 easy steps. Use Jenkins to automate your software development pipeline and deliver consistent business value to your customers.
Read more
Ansible vs Kubernetes: Understanding the Differences
June 3, 2021

From tools that help with deployment and update of apps on cloud servers, to full-fledged container orchestration solutions, the automation in software development is a diverse and developing field.
Read more
How to Deploy Redis Cluster on Kubernetes
September 30, 2021

Redis is an in-memory data store supporting multiple abstract data structures. Redis Cluster is a set of Redis instances that automatically shards data across nodes.
Read more
Ansible Playbook: How to Create and Configure Playbooks
December 17, 2020

Ansible is a Code as Infrastructure solution for monitoring and managing remote hosts. This is done by using Ansible playbooks. This tutorial shows you how to create and run Ansible playbooks.
Read more