Jenkins Windows Slave Configuration with Screenshots

Topic General, Tools

In our last articles, we have discussed how to Install and Configure Jenkins and how to Configure Jenkins Master-Slave setup on Linux machine

I have received few requests/suggestions through my last article  Jenkins Master-Slave setup on Linux machine to share the approach on Configuring Jenkins Slave on Windows Machine

So here I am with our new article on How to Configure a Jenkins Slave on Windows Machine and Install it as a windows Service


1- Login to Jenkins and Click on Manage Jenkins


2- To create a new Slave – Click on New Node



3- Name the node



4- Fill all the required details.

Please refer our master-slave configuration article to know all the details of parameters present in the node configuration page



5- Choose the appropriate Launch method



Below mentioned steps to configure and enable security are very important steps.

If you miss this you might not be able to start/configure the Jenkins slave because by default Jenkins disabled the TCP Port for JNLP agents and due to this Agent is not able to reach Master.


6 – Again click on Manage Jenkins


7- Then click on Configure Global Security



8- Find out the Enable Security option


9-  And then change the


10- Once the new node is created, it will be in Offline mode


11- Now click on the Slave agent


12- You will see Agent is not able to reach the master Jenkins and the new jnlp jar can be downloaded from Jenkins



13- Open the Jenkins URL from Agent Windows Machine and navigate to Slave Configuration page

Once done, just click on Launch Button – You will see a new popup which confirms the Jenkins Master-Slave Connection.


Lets now create and install this as a Windows service which will avoid the hassle to go to url and perform the same operation every time.

Once you create the service it will always be up & running and then you can manage it through Windows Services

14- Don’t close the pop-up, instead just click on File Menu – If its not visible just maximise the popup window


15- Now, just click on Install as a service option



16- It will prompt you for the confirmation


17- Just click on OK


18- Go to Windows Settings and then to check the Windows Services


19- You can see the Jenkins Windows Slave is successfully configure and running (If not then just Start the Service)



20- Go back to your Jenkins Slave Page and now you will see that Agent is Successfully Running and ready to build your project


Thats it. You have successfully configured the Jenkins Slave on Windows Machine and Installed it as a Windows Service.

17 comments… add one

  • Bhimsen

    Hi Ravi,
    Very informative documentation. Appreciate your efforts.
    Can you please help me in setting up Windows slave server using launch method “Launch slave agents via ssh” instead of Java Web start?

    • Hi Bhimsen,
      Thanks for your feedback and sorry for delay in reply.
      The easiest way to connect windows slave is with Java Web start, however there are cases where you need to use ssh for some reasons.
      Have you considered and tried with Cygwin for Windows ? “” or Freesshd “” for the same ?

  • Bryan Calvo

    this guide worked 100% for me, thanks a lot

  • Ravi Kumar

    Hi Ravi,
    Thanks for your information.
    When we click on “Launch” button, an authentication pop-up is showed, we put our admin login, then we have a Jenkins window , and after some seconds, we have an error-popup failed to connect………
    Can you please help me on this:)
    Thanks in advance,

  • Ravi Kumar

    Hi Ravi,
    Thanks for your quick reply.
    The issue is not with the java version,as you mentioned in above screenshots i’m facing issue at step14 .
    After the jenkins slave pop-up i’m not finding the File Menu option to inastall as a service even maximized mode and after some time Error window pop-up appearing with the logs like.. to connect to URL:50000
    at org.jekinsci.remoting…
    any suggessions!

    • Did you try to check whether the port is accessible or not ?
      Have you made any changes to Iptables?
      By default, JNLP slave port configured as random – Have you tried with making fixed port or open Iptables over your firewall or configure port forwarding?
      If these also not working for you then, please share the network architecture of your master-slave connectivity and error logs.

    • Also, you can install the service with an alternative method described in my previous article

  • Rashmi


    When I clicked on Launch button from my agent, I see slave-agent jnlp file getting downloaded. I dont see any popup for making my agent as slave. What do I do now?


    • Hi Rashmi,
      Thanks for your query.
      Have you checked the browser settings (it should not block pop-ups), I would suggest to try on other browsers as well (IE, Firefox, Chrome, etc)
      However you can also make your agent as Jenkins slave through command line :

      Just run the below command with correct parameters as per your installation from your slave path:

      $ java -jar slave.jar -jnlpUrl http://yourserver:port/computer/slave-name/slave-agent.jnlp (You can refer the full command which should be displayed on your launch screen)

      Please make sure you are running this command from the location where the slave.jar was copied.

      If you see any error in download/ or fail to download – you can get the copy of your slave.jar from http://yourserver:port/jnlpJars/slave.jar

      Hope this helps and resolves your issue

  • Nan


    Thanks a lot. It saved me hours of troubleshooting.


  • susmit

    My slave machine is unable to reach to my masters as the port is not reachable.
    It was working till yesterday, I am not sure how to change the port number. I have created a Jenkins as a service(JAAS)

    • Hi Susmit,

      Thanks for your query. You first should find out the root cause of the issue.

      Assuming both your Jenkins master and slaves are on Windows

      Check jenkins master’s & slave’s logs for details

      Then check windows logs through Event Viewer

      You can open Jenkins.xml to verify which port is used by Master

      Try to see if Jenkins is still listening to that port
      On Command Prompt : netstat -ano | findStr “portnumber”

      Use netsh to define the incoming/outgoing ports

      You can also verify the master-slave connection as suggested in oficial article

      1- Use jenkins-cli to check the connection
      In the slave box download http://JENKINS_URL/jnlpJars/jenkins-cli.jar from Jenkins master and execute the command below:

      java -jar jenkins-cli.jar -s http://JENKINS_URL/ –username=USERNAME –password=PASSWORD help

      Check that the JNLP port and hostname are right

      2- Launch the commands below and check that the port and hostname are the right ones:

      curl -I http://JENKINS_URL/computer/SLAVE-Host/slave-agent.jnlp
      curl -I http://JENKINS_URL/tcpSlaveAgentListener/

      In case you suspect you have a firewall between the master and the slave, you need to configure the port number under JenkinsMasterURL/configureSecurity

      Check if that works.

  • saicharan

    How to run slaves and master run same job at a time


    • Hi Saicharan,

      Thanks for your query – I am assuming you are looking for the solution to run same job on multiple nodes (including master) at same time.
      This is achievable through “NodeLabel Parameter Plugin” – The official document ( demonstrate it in very simple way, just go through it and let me know in case of any query.

      Happy questing !!

Leave a Comment