Azure DevOps agents - self-hosted

August 31, 2023

In continuation to the previous article where we deep dived into Azure DevOps Microsoft-hosted agent, today - we will create a self-hosted agent

Create a self-hosted agent:

To create a self-hosted agent, go to Project Settings and then select Agent Pools.

Click on the "Default" pool

default agent pool

click on the New agent button

New agent button

select the agent type - For this demo, we will use the Windows 64 bit agent

select the agent type

click Download, extract the zip file

execute the config.cmd

agent config

Follow the instructions on the command prompt

we need to supply the organisation URL and Personal Access Token

If you have not already created a PAT , you can create one from the following screen

create a PAT

The PAT shold have "Read & manage" scope for the Agent Pools

read and manage permission

Once the configuration is completed, we will be able to see the agent in the portal as given below

(For this demo we have used my laptop as an agent server)

laptop as an agent

the agent might be offline, lets start it by executing run.cmd

When the agent is started successfully, the log should say "Listening for Jobs"

Scanning for tool capabilities.
Connecting to the server.
2023-08-31 06:48:17Z: Listening for Jobs

In the portal, we can see that the agent is online

agent online


We created a simple-self hosted agent, in the upcoming article, we will see more in detail about intenal working and maintenance activities for Azure Devops self-hosted agents

Thanks for reading, Goodbye until next week!

Profile picture

Written by Thillai Madhavan who lives and works in India. Stay updated by following him on LinkedIn.

All the information on this website - - is published in good faith and for general information purposes only. does not make any warranties about the completeness, reliability and accuracy of this information. Any action you take upon the information you find on this website (, is strictly at your own risk. will not be liable for any losses and/or damages in connection with the use of our website. From our website, you can visit other websites by following hyperlinks to such external sites. While we strive to provide only quality links to useful and ethical websites, we have no control over the content and nature of these sites. These links to other websites do not imply a recommendation for all the content found on these sites. Site owners and content may change without notice and may occur before we have the opportunity to remove a link that may have gone 'bad'. Please be also aware that when you leave our website, other sites may have different privacy policies and terms which are beyond our control. Please be sure to check the Privacy Policies of these sites as well as their "Terms of Service" before engaging in any business or uploading any information. By using our website, you hereby consent to our disclaimer and agree to its terms. Should we update, amend or make any changes to this document, those changes will be prominently posted here
© 2024, OrganicDevOps