Configure Jenkins Slave and Connect to Master

For understanding and installing refer previous blog of Jenkins Server.

For adding a node as a slave to Jenkins master, follow following steps.

Step 1: On Jenkins master go to Manage Jenkins > Manage Nodes.


Step 2: Select New Node and enter node name.

Step 3: select Permanent Agent -> Press OK.


Step 4: On the next page, fill in the following fields:

  1. Set a number of executors (one or more) as needed. Default is 1.
  2. Set a Remote FS Root, a home directory for the master on the slave machine. i.e Linux Slave: “/opt/jenkins/” or Windows Slave: “E:/jenkins/”.
  3. Set Usage to “Use this node as much as possible”.
  4. Choose Launch method as “Launch agent via Java Web Start”.
  5. Set Availability, –> Keep this slave online as much as possible.
  6. Press Save.


Step 5: Now for connecting to slave to the master by

  1. Open a browser on the slave machine and go to the Jenkins master server url (http://yourjenkinsmaster:8080).
  2. Go to Manage Jenkins > Manage Nodes, click on the newly created slave machine.
  3. Connect agent to Jenkins by one of these ways.
    • Launch Agent from Browser.
    • Run from agent command line.
  4. We have chosen second option, login to agent node -> download the slave.jar file from Jenkins Master UI to slave machine then while executing the command, please specify download path of slave.jar file.


On Linux

nohup java -jar /opt/jenkins/slave.jar -jnlpUrl Jenkins%20Demo%20Slave /slave-agent.jnlp -jnlpCredentials jenkins:jenkins@123 &

On Windows

start /B java -jar c:\jenkins\slave.jar -jnlpUrl -jnlpCredentials jenkins:jenkins@12Now slave node will be in Connected state.

Now node will be in Connected state.


Tags: , , , ,


  1. Install plugins on Jenkins | Izel Technologies - July 26, 2016

    […] For understanding and installing jenkins server refer previous blog Jenkins Server and for connecting slave to the master node refer Configure Jenkins Slave and Connect to Master. […]

Leave a Reply