Product / CI & pipelines / Self-hosted agents

Self-hosted agents

Updated November 2026 · Self-hosted agents docs →

Run Semaphore jobs on your own Linux, macOS, Windows or Kubernetes machines, while Semaphore handles scheduling, logs and the UI.

TL;DR

  • Install the open-source agent on your machine and it pulls jobs from Semaphore.
  • The agent only makes outbound connections, so no inbound ports are opened.
  • Autoscaling can scale agents to zero when there is no work.
  • Mix managed machines and self-hosted agents in the same pipeline.

Watch: self-hosted agents

What it does

A self-hosted agent is a small open-source program you run on your own machine. It connects to Semaphore, picks up jobs and runs them in your environment, while Semaphore keeps scheduling, logs and the UI.

  • Your hardware, your network. Use GPUs, large machines, private networks or special licences that a cloud runner does not have.
  • Linux, macOS, Windows and Kubernetes. Run agents on any of them, or on AWS with the agent AWS stack.
  • Scale to zero. Autoscaling starts agents when jobs queue and stops them when idle.
  • One-way connection. The agent calls Semaphore over HTTPS. You open no inbound ports.
  • Encrypted. Traffic between the agent and Semaphore is encrypted.
  • Open source. The agent code is public on GitHub.

How it works

Create an agent type in your organization, start the agent with its token, then point a pipeline or a single block at that type.

.semaphore/semaphore.yml

version: v1.0
name: Build on our own machines
agent:
  machine:
    type: s1-gpu-linux
blocks:
  - name: Train and test
    task:
      jobs:
        - name: GPU tests
          commands:
            - checkout
            - make test-gpu

Install steps per platform are in installing self-hosted agents. Configuration options are in the agent config reference.

Managed machines or self-hosted?

Managed machinesSelf-hosted agents
Who maintains the machineSemaphoreYou
Hardware choiceListed machine typesAnything that runs the agent
Access to private networksThrough secrets and tunnelsDirect
Caching and imagesBuilt-in cache, updated OS imagesYour own
Mix both in one pipelineYes, per blockYes, per block

FAQ

Which operating systems are supported?

Linux, macOS and Windows, plus Kubernetes through the agent Helm chart and AWS through the agent AWS stack.

Do I need to open firewall ports?

No. The agent opens an outbound HTTPS connection to Semaphore and polls for jobs. Nothing connects in.

Can I use managed machines and my own machines in one pipeline?

Yes. Set the agent per pipeline or per block, so some blocks run on Semaphore machines and others on yours.

Is the agent open source?

Yes. The agent is open source and its code is on GitHub.

How is this different from the Hybrid edition?

Self-hosted agents are the feature. Hybrid is the edition built around it: Semaphore runs the control plane, you run all the jobs on your own agents.

Next steps

Install your first agent → · Hybrid edition → · All CI & pipeline features →

Blog · Deep dive

How to scale CI/CD with self-hosted agents

Autoscaling, agent types and running agents on AWS and Kubernetes.

Star us on GitHub