Skip to content
Self-Hosted Runners
step 1/5

Reading — step 1 of 5

Read

~1 min readProduction Concerns

Self-Hosted Runners

Default: GitHub-hosted runners are clean VMs (Ubuntu, Windows, macOS), 7GB RAM, 14GB disk, 2 cores. Provisioned per job. Free tier: 2000 minutes/month.

Trade-offs of cloud runners:

  • ✅ No infrastructure to manage
  • ✅ Latest base images
  • ✅ Free for public repos
  • ❌ Slow (cold start each job)
  • ❌ Limited compute (2 cores, 7GB)
  • ❌ Cost scales with usage
  • ❌ No GPU access (until recently)

Self-hosted runners are your own machines, registered with the CI provider:

# Download runner binary; register with token
./config.sh --url https://github.com/myorg/myrepo --token ABC123
./run.sh

The runner polls the API for jobs, executes them, reports back.

Pros:

  • Faster (warm caches, persistent disk)
  • More compute (whatever you provision)
  • Custom hardware (GPUs, big RAM)
  • Behind your firewall (access internal resources)
  • Cheaper at high volume

Cons:

  • You manage them (patching, scaling)
  • Security: workflow code runs on YOUR machine. Untrusted PRs can be dangerous.
  • Persistent state can leak between jobs

Best practices:

  • Use ephemeral runners (one job, then destroy)
  • Limit to private repos (no untrusted code)
  • Network isolation (separate from production)
  • Rotate runner tokens

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…