GitLab Runner setup and autoscaling

Self-managed GitLab Runners execute your CI/CD jobs on capacity you control. This page covers the executor, autoscaling, tag and cache decisions, the build sequence and how to keep Runner versions aligned with GitLab.

On this page

How GitLab Runner setup and autoscaling shape CI/CD capacity

A GitLab Runner is the application that picks up CI/CD jobs from a GitLab instance and executes them on compute you provide. Planning Runners means deciding where jobs run, how isolated each job must be, how capacity grows and shrinks with demand, and who owns each piece. If your self-managed GitLab instance already exists or is planned, Runner design is the part of the build that determines how fast pipelines finish, what a compromised job can reach and what the compute bill looks like. GitLab Runner is distributed under the MIT license and supports shell, Docker and autoscaling executors across clouds and hypervisors, so the choice is largely yours to make.

Runner work is harder than it looks for three reasons. First, the executor sets the isolation boundary. A shell executor runs jobs directly on the host, a Docker executor runs them in containers, and an autoscaling executor provisions fresh machines per job or per batch. Each choice changes what a malicious or careless pipeline can read, including host credentials, other projects' caches and the network. Second, autoscaling adds a second control plane. The GitLab instance decides which jobs are queued, but the autoscaler decides when cloud or hypervisor machines are created, and the two need separate monitoring, quotas and cleanup. Third, version drift is easy to create. The GitLab docs advise keeping Runner major and minor versions aligned with the GitLab instance, and Runners are often installed on separate hosts that nobody upgrades with the server. Confirm your current versions against the GitLab Runner documentation before you choose an executor, and record which team owns each Runner fleet.

Which parts make up a self-managed Runner fleet

A self-managed Runner fleet is several moving parts that depend on each other: the instance that queues jobs, the manager that picks them up, the executor that runs them, and the capacity layer that scales. Tags, scopes, and cache storage decide which jobs land where and how fast they finish. Know who owns each part before you size or script anything.

GitLab instance that issues jobs

The GitLab instance holds the pipeline definitions, queues each job, and records its status and logs. It is the source of truth for which jobs exist and which projects may use which runners. In a typical split, the platform team owns the instance and its upgrades, while application teams own the .gitlab-ci.yml files. Check that the instance version and the Runner version are kept aligned, since the Runner documentation advises matching major and minor versions with GitLab.

Current maintained release
19.5
Runner docs

Runner manager that polls for jobs

The Runner manager is the long-running process registered with GitLab. It polls the instance for pending jobs, requests capacity from its executor or autoscaler, and reports results back. Because it holds registration credentials, it is the component to restrict at the host level and to keep on a supported version. Platform engineers usually own it, and the configuration file, config.toml, should be treated as sensitive. Confirm the exact keys against the installed version.

Executor that runs each job

The executor defines the environment a job runs in: shell on the manager host, Docker containers, or Kubernetes pods, with autoscaling executors covering cloud and hypervisor machines. Shell is simplest but shares state between jobs, while container-based executors isolate jobs more cleanly. Choosing the executor sets the image, privilege, and network model for every build, so security and platform teams should decide it together with the application teams who write the jobs.

Autoscaling layer for machines and pods

The autoscaling layer creates and removes build machines or pods as queued work rises and falls. It needs cloud or hypervisor permissions, machine images, and capacity limits, and those limits set the cost ceiling and the queue wait time. Cloud or infrastructure teams usually own the capacity accounts and quotas, while the platform team owns the scaling settings. Ask for the scale limits, idle retention, and image update process in writing before you commit to a sizing model.

Tags and scopes that route jobs

Tags and scopes decide which runners may pick up which jobs. A job that requests a tag only runs on runners carrying that tag, and runner scope controls whether a runner serves one project, a group, or the whole instance. Shared runners across projects with different sensitivity levels are a common risk, so plan tags for production deployment work separately from ordinary build work. Review the scope of every runner during each access review.

Cache and artifact storage

Jobs depend on a cache for dependency downloads and on artifact storage for build outputs passed between stages. Both can be local to the runner or sent to shared object storage, which changes how fast jobs start and where build data sits. Storage owners should define retention, encryption, and access rules, and should confirm the cache and artifact settings for the installed Runner version. Test a restore of cached data as part of acceptance, because a broken cache slows every pipeline without failing a single job.

How a job moves from GitLab to an autoscaled executor

The job starts in self-managed GitLab, where the pipeline queues it with tags that define which Runners may take it. A Runner manager picks it up and asks the autoscaling layer for a cloud or hypervisor instance or pod, which runs the job with cache and artifact stores attached. Check that the trust boundary sits where you expect, that the stores are reachable only from the job network, and that the autoscaler removes instances after the job finishes.

Job flow from GitLab through the Runner manager to an autoscaled executor, with cache and artifact stores as separate dependencies.

Which executor and scope fit which workload

This table compares the shell, Docker, autoscaling and Kubernetes executors, plus instance, group and project scope and shared versus dedicated runners. Read each row against your build trust level, workload shape and the platforms your team already operates. Capability details change between Runner releases, so confirm them in the GitLab Runner documentation before you commit to a design.

OptionWhen it fitsOperational cost
Shell executorTrusted internal builds that need direct access to host tools, licensed software or hardware on one machineJobs share the host, so isolation between projects is weak. Host tooling drifts over time and must be maintained by hand
Docker executorContainerized builds where each job should start from a known image on a fixed set of hostsYou own image choice, pull policy and host Docker configuration. Isolation is better than shell but still depends on the host and privilege settings
Autoscaling executor (cloud or hypervisor)Bursty pipeline load, or teams that want machines created and removed on demand across cloud or hypervisor capacityMachine images, provisioning, lifecycle cleanup and cloud or hypervisor quotas need ongoing care. Confirm supported providers in the Runner docs
Kubernetes executorTeams already running Kubernetes with cluster capacity, quotas and admin skills to spareDepends on cluster health, namespace and RBAC design, and cluster upgrades. Runner pods still need image and privilege controls
Instance-level runnerShared tooling and common build standards used across many groups and projectsMisuse by one project can affect others. Access rules, tags and capacity limits need central ownership
Group or project runnerWorkloads with specific data, compliance or tooling needs owned by one teamMore runners to register, patch and monitor. Each owner must keep the Runner version aligned with GitLab
Shared runnersLow-risk jobs where pooled capacity keeps idle machines to a minimumMixed workloads share queues and hosts, so sensitive builds need tighter controls or a different option
Dedicated runnersSensitive builds, deployments with production credentials or jobs that need fixed capacityIdle capacity and extra administration are the main cost. Confirm how tags restrict which jobs can run on them

Building a Runner fleet in the right order

This sequence moves a Runner fleet from version alignment and workload planning to tested, tagged, autoscaling capacity that jobs reach on purpose. Each step closes with a check, so a failure is caught before the next layer depends on it.

  1. Confirm GitLab and Runner versions together

    Record the GitLab version your instance runs today and the version you plan to run after the next upgrade, then select a Runner release that matches its major and minor version. The GitLab Runner documentation advises keeping Runner major and minor versions aligned with GitLab, so pin the Runner package in your configuration management and note the chosen version in the change record. Check that the GitLab upgrade stop schedule does not fall inside your rollout window. Done when the version pair is written down and approved by the platform owner.

  2. Define workload classes and isolation needs

    Group your CI jobs into classes such as ordinary builds, container image builds, deployments to production, and jobs that touch regulated data or signing keys. For each class, record the required network access, whether it needs privileged container features, the secrets it reads, and whether jobs from different projects may share a host. Ask security and the owners of sensitive projects to sign off on the isolation level per class. Done when each class has a one-page profile that the executor choice in the next step can be checked against.

  3. Choose executors and scopes per class

    Match each workload class to a shell, Docker, or autoscaling executor, and decide whether the runner is instance-wide, group-level, or project-specific. Shell executors run jobs directly on the host and give the least isolation, Docker executors give each job a container, and autoscaling executors create short-lived machines on cloud or hypervisor capacity. Confirm with your platform team which executor types your Runner version and infrastructure support. Done when a table maps every class to one executor and one scope, and the table has been reviewed against the isolation profiles.

  4. Install the Runner manager on a dedicated host

    Install the GitLab Runner manager on its own host or VM, separate from the GitLab application servers and from any build capacity it launches. Keep the manager's configuration file under version control with restricted access, because it holds registration and cloud credentials. Set the service to start on boot and confirm the manager can reach your GitLab URL and your cloud or hypervisor API. Done when the manager reports healthy in its service status and a version check matches the version chosen in step one.

  5. Configure the executor and autoscaling target

    Set the executor settings and, for autoscaling, the capacity limits, machine image, instance type, idle count, and maximum concurrency for each runner. Use the limits to cap total spend and to prevent a runaway pipeline from creating unlimited machines. Ask your cloud or hypervisor administrator to confirm quotas and the permissions the manager needs to create and delete machines. Done when a scale-up test that queues several jobs creates the expected machines, and a scale-down test removes idle machines after the configured idle period.

  6. Set tags that map to job requirements

    Assign tags such as the class name, operating system, architecture, or a sensitive-data label, and write matching tags entries in the pipeline configuration of the projects that need them. Keep tags descriptive and few, since a job with a tag no runner carries will wait indefinitely. Decide whether runners should run untagged jobs, and lock down sensitive tags to protected projects. Done when a test pipeline with each tag lands on the intended runner, and a deliberately mismatched tag stays pending as expected.

  7. Configure caches and artifact storage

    Choose where the runner stores its cache, either on the local host or in an object storage bucket that autoscaled machines can all reach, and set the cache key strategy in pipeline configuration. Object storage makes cache reuse possible across short-lived machines, but it adds a storage bill and access policies you must maintain. Confirm with your storage team which bucket, retention, and encryption settings apply. Done when a second job with the same cache key reports a cache hit in its log, and the cache contents are visible in the bucket or on the host.

  8. Register runners against the instance

    Register each runner with the GitLab instance using the scope chosen in step three, then review its settings in the admin or group interface, including whether it runs untagged jobs and whether it is limited to protected branches. Remove any leftover registrations from test hosts. Run a final pipeline from a representative project of each class and check that the job log shows the expected runner, executor, and tags. Done when every class has a passing pipeline on its intended runner and the registration list matches the fleet record.

What drives Runner effort and cost

This table lists the drivers a quote for Runner setup and autoscaling depends on, how each one raises effort, and one way to keep it down. Read each row as a question to answer before asking a partner or your own team for a fixed-scope estimate.

DriverWhy it raises effort or costHow to keep it down
Number of teams and pipelinesEach team adds projects, tags, scopes and pipeline patterns that must be mapped to runners and reviewed for access.Group teams by shared runner classes and publish one pipeline template per team type.
Peak concurrencyPeak simultaneous jobs set the autoscaling ceiling, the capacity you pay for and how much queueing developers see at busy times.Agree a measured peak from current pipeline history before sizing, and cap maximum instances per runner.
Distinct workload classesEach class (for example, small lint jobs, Docker builds, GPU or large test jobs) may need its own executor, machine size and tags.Limit the design to a small number of runner classes and move outlier jobs to a pilot class first.
Target environmentsCloud accounts, hypervisors, Kubernetes clusters and air-gapped networks each need separate provisioning, credentials and network rules.Start with one environment that hosts most jobs and add others only when a workload requires them.
Image and toolchain varietyEvery distinct base image, language version and proprietary tool adds build, patch and test work across runners.Standardize on a few approved base images and document how teams request new ones.
Cache and artifact designShared caches, distributed object storage and artifact retention need storage sizing, cleanup rules and isolation between projects.Keep caches scoped per project or branch and set artifact expiry rules agreed with the platform owner.
Compliance evidence requirementsAssessors may ask for runner isolation records, version alignment, access logs and proof of patching, which adds documentation and testing time.Confirm the specific evidence list with your auditor before scoping and collect it from the first pilot onward.
Runner version alignment and upgradesRunner major and minor versions should match GitLab, so each GitLab upgrade adds a runner upgrade across every host or cluster.Use one runner deployment method and a documented upgrade order that follows each GitLab upgrade.

How Runner setup differs by environment

A single host running one Runner suits a small internal team with a limited number of projects. The executor is usually shell or Docker, images come from a registry the host can reach, and the cache usually sits on local disk. Version updates are manual, so one named person must own them.

  • Executor choice: Docker isolates each job's environment more clearly than shell, so confirm which projects will share the host before you choose.
  • Image supply: Pin image tags and pull from a registry you control, so job results do not change unexpectedly.
  • Cache: Plan disk size and cleanup on the host, since the cache persists between jobs.
  • Version updates: Upgrade the Runner in step with the GitLab minor release, following the GitLab Runner documentation for the version pairing.
  • Shared state: One host runs every job, so a compromised job can reach files and credentials left by earlier jobs.

Before you start, confirm which teams can register Runners to this host and who has administrator access to the machine.

Isolating jobs and protecting runner credentials

Runners execute your pipeline code, so whatever they can reach, an untrusted job can reach too. The controls below decide which projects can use a Runner, what a job can see on the host, and which credentials sit where. Plan them before the first production pipeline runs, then tighten them gradually as the GitLab hardening guidance recommends.

Isolate jobs from each other

Jobs on a shared host can read each other's workspace, caches and leftover files when the executor does not separate them. The shell executor offers the weakest isolation because jobs run directly on the host operating system. Docker and Kubernetes executors create a fresh environment per job, but a privileged container or mounted Docker socket can still reach the host. Check which executor you chose and whether any job can request privileged mode.

Hardening guidance

Treat shared hosts as shared trust

A Runner that serves several projects, or several business units, can expose one project's secrets and source code to another. Dedicate Runners to a single trust boundary where possible, such as one project group or one sensitivity level. If a host must be shared, document that every project on it can read what any other job on it can read. Ask your team to confirm this model in writing before onboarding.

Restrict Runners with scope and protection

Use project or group registration for Runners that should serve only specific repositories, and avoid instance-wide Runners for sensitive work. Enable the protected option so the Runner only picks up jobs from protected branches and tags. Pair this with runner tags so that deployment jobs can only land on the hosts you intend. Review who can register new Runners, because a rogue registration gives a new host access to pipeline jobs.

Handle registration and authentication tokens

Registration tokens and runner authentication tokens allow a host to join your GitLab and receive jobs. Store them in your secrets manager, not in configuration files committed to repositories or in CI variables visible to developers. Rotate tokens when staff change or a host is retired, and remove retired Runners from the instance so their credentials stop working. Confirm the token rotation steps for your Runner version in the Runner documentation.

Runner docs

Least-privilege autoscaler credentials

Autoscaling executors hold credentials to create and delete virtual machines, containers or pods in your cloud or hypervisor. Give that identity permission only for the instances, networks and images it needs, and keep it out of the Runner hosts that run jobs. A job that reaches these credentials could start arbitrary compute at your expense. Ask the implementer which identity the autoscaler uses and whether it can be scoped to a single pool.

Protect variables and cache from merge requests

Merge requests from forks or untrusted contributors can run pipeline code that prints or uploads CI variables and poisons shared cache entries. Keep sensitive variables protected and masked, and limit them to protected branches. Avoid sharing one cache key across trust levels, and do not run untrusted merge request pipelines on Runners that hold deployment credentials. Test these rules with a deliberately malicious merge request before go-live.

Testing that runners scale and fail safely

Test the Runner fleet before handover by proving three things: jobs land only on the runners they are meant for, the fleet adds and removes capacity under load, and failures stop work visibly instead of letting it run unsafely. Start with routing. Run a test job for each tag you have defined and confirm it executes on the intended runner and nowhere else. Then run an untagged job from a project outside the restricted group and confirm it does not pick up a runner that holds deployment credentials or privileged access. Check the runner's scope and tag settings in the GitLab interface as well, because a test that passes only because a job happened to queue on the right machine proves little.

Next, test scaling with a burst. Submit enough parallel jobs to exceed the idle capacity you configured, then confirm that the autoscaler provisions instances, that jobs start within the time you agreed, and that the fleet returns to its idle count once the queue drains. Record the instance counts before, during and after the burst. Then test failure modes deliberately: remove or make unreachable one provisioned instance, exhaust the cloud or hypervisor quota, and point a job at an image that cannot be pulled. In each case the expected result is that jobs stay queued or fail with a clear message in the job log. Any job that runs on a partially configured or unexpected host is a defect. Confirm the exact autoscaler and executor behavior for your version in the GitLab Runner documentation before writing these expectations.

Finish with two checks that are easy to skip. Run a cache test by executing the same job twice and confirming that the second run restores the cache, and that a job on a different runner or branch cannot read another project's cache where your settings forbid it. Then run a version check: confirm that the Runner version matches the GitLab version in use on the major and minor numbers, as the Runner documentation advises, and record the output of the Runner version command alongside the GitLab version. Keep a dated log of every test, its expected result, its actual result and the person who verified it. That log is the acceptance evidence to hand over, and it becomes the baseline you rerun after each GitLab upgrade.

What to monitor, back up, upgrade and document

A runner fleet fails quietly: jobs queue, autoscalers hit quota and old Runner versions drift away from GitLab. The items below connect monitoring, patching, backup and documentation so that one team can run the fleet after handover, and each one has an owner and a check.

Queue time and job failures

Track how long jobs wait for a runner and how often they fail before the script starts. Rising queue time usually means a missing tag, a saturated runner class or a scaler that is not launching machines. Rising failures that happen before the script runs often point to executor or image problems. Set alerts on both signals per runner class, so a single slow pool does not hide behind a healthy average.

Runner docs

Autoscaler and quota health

For autoscaling executors, check that machines are created, register and are removed on schedule. Watch cloud or hypervisor quota, instance limits, image availability and credential expiry, because these fail silently when demand rises. Confirm that idle capacity shrinks after peaks, since machines left running add cost without adding throughput. Ask the platform team to confirm which quota alerts exist and who receives them.

Runner version tracking at each upgrade

Keep Runner major and minor versions aligned with the GitLab instance, as the Runner documentation advises. Record the Runner version of every pool in the same change log as each GitLab upgrade, and plan Runner updates into the same window as the required upgrade stops. A Runner that falls behind can run jobs that the server no longer handles as expected, so treat version drift as a defect to fix.

Upgrade paths

Patch cadence against the maintenance policy

Under the maintenance policy, bug fixes are backported only to the current stable release, while security fixes also reach the previous two monthly releases. That means a bug fix requires moving to the current stable release, and a security fix may arrive in an older line you still run. Plan a monthly review of minor and patch releases for the GitLab instance and the Runner fleet, and document which release line each environment is on.

Security backport window
Two monthly releases
Maintenance policy

Runner configuration and token handling

Runners are generally replaceable compute, so the backup focus is the configuration file, registration tokens, cloud credentials and the cache and artifact stores that the GitLab backup guidance covers. Store the runner configuration in version control with secrets removed, keep credentials in a secrets manager, and rotate runner tokens after staff changes. Confirm which tokens can register new runners and who can revoke them.

Backup and restore

Runbook for adding a runner class

Write a step-by-step runbook for adding a new runner class, covering the executor choice, image source, tags, scope (project, group or instance), cache location, scaler limits and the monitoring thresholds to set. Include a test job that proves the tags route correctly and a rollback step that removes the class without affecting others. A written runbook lets the next engineer add capacity without rediscovering the design.

Questions teams ask before building Runners

Can a small team run its own GitLab Runners?

Yes, if the team already operates Linux hosts, container tooling or a cloud account and can own patching and capacity. A single shell or Docker Runner on one host is a contained task, and GitLab Runner is distributed under the MIT license, so the software itself carries no license fee. The harder part is the ongoing work: keeping Runner versions aligned with GitLab, rotating registration tokens, watching queue times and replacing failed build hosts. A small team should decide in advance who owns that work each month, because a Runner fleet that nobody maintains tends to fail quietly during a release.

What drives the effort and cost of a Runner build?

The main drivers are the executor type, the number of distinct environments the jobs need, and how much the fleet must scale on its own. A shell executor is the simplest to stand up but gives the least isolation, while Docker and Kubernetes executors add image management and cluster work. Autoscaling on cloud or hypervisor capacity adds provisioning templates, instance lifecycle rules and cost controls. Costs fall into compute for idle and busy build capacity, the one-time design and build work, and recurring upkeep. Ask any partner to itemize these in the written scope so you can see which parts are one-time and which recur.

How long does a Runner setup take, and why does it vary?

Duration depends on scope rather than on a standard timeline. A fleet with one executor type on existing infrastructure is a much smaller project than one that spans several clouds, hypervisors and build images, or that must support both Linux and Windows jobs. Other factors include how many teams need separate scopes, whether caching must be shared across hosts, and how long security review of images and credentials takes inside your organization. Ask for a written plan with milestones that show when your teams can run their first pipelines on the new Runners, and confirm which tasks depend on your own approvals.

What does the work need from our side?

Expect to provide access and decisions before the build starts. The implementation needs an account or hypervisor credential with permission to create instances, a defined network path from Runners to your GitLab instance and to package or image registries, and a policy for which base images jobs may use. It also needs GitLab administrator access to create instance, group or project Runners and to set tags and protected scopes. If your environment is offline, confirm early how images and packages reach the hosts. Missing any of these usually moves the schedule, so list them in the scope document.

Must Runner versions match GitLab exactly?

GitLab's Runner documentation advises keeping the major and minor versions of Runner aligned with GitLab, while patch-level differences are handled more loosely. Because GitLab requires upgrades to pass through required upgrade stops at x.2, x.5, x.8 and x.11, plan Runner upgrades as part of each stop rather than as a separate task. Upgrade the GitLab instance first, then bring Runners to the matching minor version within the same maintenance window, and test a pipeline on one Runner before rolling the rest. Confirm the exact compatibility rules for your versions in the Runner documentation before you schedule the window.

Can one shared Runner fleet safely serve several teams?

A shared fleet can serve several teams, but safety depends on isolation and scoping rather than on sharing alone. Use separate Runner scopes, such as project or group Runners, for sensitive workloads, and protect Runners that deploy to production so only protected branches can use them. Tags route jobs to the right hardware, but they are not a security boundary by themselves. Shell executors share the host between jobs, which weakens isolation, so teams with different trust levels usually need container or ephemeral VM isolation. Review the hardening guidance for runner settings and protected variables, and confirm the isolation model with your security team before onboarding a second team.

How DeployOpen scopes, builds and hands over Runner work

DeployOpen plans, implements and documents self-managed GitLab Runner fleets inside your own cloud accounts, data centers or isolated networks. The work starts from a written scope that fixes which executors, capacity sources, tags and caching choices are in and out.

How we scope

  • Written scope lists executors, capacity sources, runner tags and scopes, and caching approach to be delivered.
  • Inventory of existing pipelines, job types, image sizes and peak concurrency that the fleet must serve.
  • Engagements are fixed-scope, so deliverables and timelines are agreed in writing before build work begins.

How we build

  • Runner configuration, autoscaling settings and executor setup built in your environment and version-controlled.
  • Test pipelines exercise tags, scopes, cache behavior and job isolation before any production project is switched.
  • Runner versions pinned to match the GitLab major and minor version, with the alignment documented for your team.

How we hand over

  • Documentation covers runner registration, scaling rules, cache locations, token handling and upgrade steps.
  • Runbooks describe how to add capacity, rotate runner tokens, and recover a failed runner host or manager.
  • Your engineers walk through the handover so they can operate the fleet without DeployOpen involvement.

How we support

  • Ongoing support, Runner upgrades and continuous testing are available as retainers after handover.
  • Retainer scope, response expectations and upgrade coordination are confirmed in writing before they start.
  • Runner upgrades are planned alongside GitLab upgrade stops so both sides of each pipeline stay supported.

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.