Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Before proceeding, ensure you have:
✅ A running Jenkins master instance
✅ Java installed on the agent machine
✅ Administrator access on the Windows machine
✅ Winsw.exe package Download Link
http://your-jenkins-server:8080/jnlpJars/agent.jar).curl http://your-jenkins-server:8080/jnlpJars/agent.jar -o agent.jarwinsw.exe package from the official repositoryJenkinsAgent directorywinsw.exe to JenkinsAgent.exe in the directoryJenkinsAgent.xml
JenkinsAgent.xml file and populate the following fields:<id><name><executable><arguments><service>
<id> Service ID e.g (jenkinsagent) </id>
<name> Agent Name e.g (JenkinsAgent) </name>
<description>This service runs the Jenkins Agent as a Windows service.</description>
<executable> Java Path </executable>
<arguments>-Xrs -Xmx256m -jar "%BASE%\agent.jar" -url http://your-jenkins-server:8080/ -secret YOUR_AGENT_SECRET -name windows -webSocket -workDir "D:\Jenkins"</arguments>
<log mode="roll" />
<onfailure action="restart" />
</service>2. After updating the values, your file should resemble this example:
<service>
<id>jenkinsagent</id>
<name>JenkinsAgent</name>
<description>This service runs the Jenkins Agent as a Windows service.</description>
<executable>C:\Program Files\Common Files\Oracle\Java\javapath\java.exe</executable>
<arguments>-Xrs -Xmx256m -jar "%BASE%\agent.jar" -url http://10.100.28.55:8080/ -secret 52b81a02183007dbaaafbc8decaabe9ba34906828132c432 -name windows -webSocket -workDir "D:\Jenkins"</arguments>
<log mode="roll" />
<onfailure action="restart" />
</service>3. Save the file after making changes.
cd C:\JenkinsAgentJenkinsAgent.exe installWin + R, type services.msc, and hit Enter.<id> field of your configuration file.JenkinsAgent directory: