Docs
circleci.com
Start Building for Free

Runner Concepts

1 week ago2 min read
Cloud
Server v3.x
On This Page

Namespaces and resource classes

Self-hosted runners require both a namespace and a resource class.

A namespace is a unique identifier claimed by a CircleCI organization. Each CircleCI organization can claim one unique and immutable namespace. Typically, the namespace chosen is the lowercase representation of your organization’s name on your VCS (this is suggested).

A resource class is a label to match your CircleCI job with a type of runner that is identified to process that job. The first part of the resource class is your organization’s namespace. For example, a CircleCI resource class could be circleci/documentation. Resources classes are created when you go through the process of installing self-hosted runners.

Resource classes help you identify a pool of self-hosted runners, which allow you to set up your configuration to send jobs to specific places. For example, if you have multiple machines running macOS, and multiple machines running Linux, you could create resource classes for each of these, orgname/macOS and orgname/linux, respectively. At the job level in your .circleci/config.yml, you can associate which self-hosted runner resources to send a job to based on the resource class.

Optionally, you can give your resource class a description.

Please note, if you are already using orbs, you have an existing namespace. Your self-hosted runner namespace will be the same one you are using for orbs. If you need to change your namespace, please contact support.

Launch agent and task agent

The self-hosted runner consists of two components: the launch agent and the task agent.

  • launch agent - manages gathering the information required to run a task (defined as a parallel run of a job) while also downloading and launching a task agent process

  • task agent - handles running a task retrieved and configured by the launch agent

The system has been designed to allow admins to configure the task agent to run with a lower level of privileges than the launch agent. Any user who is able to execute a job will be able to gain the same privileges as task agent. The instructions below are the recommended deployment which follows this approach (launch agent will run as root, but task agent will run as circleci).

Self-hosted runner concurrency

To achieve better throughput, you can break your single build process into different steps and run them concurrently (at the same time). CircleCI offers the flexibility of deploying work to self-hosted runners across all your resource classes.

Rather than limit the total number of registered self-hosted runners, CircleCI self-hosted runners are limited by the total number of self-hosted runner jobs (tasks) across your resource classes.

Debugging with SSH

CircleCI self-hosted runners support rerunning a job with SSH for debugging purposes. Instructions on using this feature can be found at Debugging with SSH.

Public repositories

CircleCI self-hosted runners are not recommended for use with public projects that have the "Build forked pull requests" setting enabled. In this case, a malicious actor may alter your machine or execute code on it by forking your repository, committing code, and opening a pull request. Untrusted jobs running on your CircleCI self-hosted runner pose significant security risks for your machine and network environment, especially if your machine persists its environment between jobs. Some of the risks include:

  • Malicious programs running on the machine

  • Escaping the machine’s self-hosted runner sandbox

  • Exposing access to the machine’s network environment

  • Persisting unwanted or dangerous data on the machine


Help make this document better

This guide, as well as the rest of our docs, are open source and available on GitHub. We welcome your contributions.

Need support?

Our support engineers are available to help with service issues, billing, or account related questions, and can help troubleshoot build configurations. Contact our support engineers by opening a ticket.

You can also visit our support site to find support articles, community forums, and training resources.