Skip to content

Home / Blog / Runners and limits

Can I get a static IP address for GitHub Actions to allowlist in a firewall?

Not on standard GitHub-hosted runners. The three routes: larger runners on Enterprise Cloud, self-hosted runners or a runner service, with plans, limits and costs.

Not on a standard GitHub-hosted runner. Its traffic leaves from large shared ranges that GitHub publishes, updates once a week and advises against allowlisting. The ways to a fixed address are a GitHub larger runner with a static IP range, which needs GitHub Enterprise Cloud and is limited to 10 pools by default, a self-hosted runner you run yourself, or a runner service that sells an address.

In short
  • Standard GitHub-hosted runners leave from shared ranges, published under the actions key of GET /meta and updated once a week.
  • GitHub does not recommend allowlisting them: the ranges are not dedicated to GitHub Actions.
  • A larger runner can get static IP ranges on GitHub Enterprise Cloud, up to 10 pools by default, on Linux and Windows but not macOS.
  • GitHub charges nothing extra for the static IP; the larger runner is billed per minute.
  • When GitHub added a second range in 2023 it gave administrators 30 days to update their allowlists.

This post covers why the published ranges are the wrong thing to allowlist, what each of the three routes gives you and costs, what happens to your allowlist when GitHub changes a range, and a way to avoid allowlisting at all. The GitHub facts were read from GitHub’s pages on the date this post was last checked.

Why not allowlist the ranges GitHub publishes?

Because they are not yours. GitHub publishes the ranges under the actions key of the GET /meta API and updates the list once a week, and its hosted-runner reference says “These ranges are not dedicated to GitHub Actions”. Allowlisting them lets unrelated workloads in those ranges reach you, and GitHub says it does not recommend it. It adds that some Linux runners come from a multi-cloud pool, so their addresses are not limited to Azure datacenter ranges, which can break a policy that only admits Azure or Microsoft-owned ranges.

What are the options for a fixed address?

RouteWhat it needsWhat you getLimits
GitHub larger runner with a static IP rangeGitHub Enterprise CloudRanges unique to the runner and shared by every job on it; GitHub's 2023 changelog says two by defaultUp to 10 larger runner pools with static ranges by default; Linux and Windows only, not macOS; the larger runner is billed per minute
Your own self-hosted runnerA machine you supplyThe address of the network you put the machine onYou run and patch the machine. GitHub says self-hosted runners should almost never serve a public repository
A runner service that sells an addressDepends on the serviceAn address the service says your jobs leave fromAsk whether it is shared, who can use it and what happens when it is down

GitHub larger runners. By default a larger runner gets a dynamic address that changes for each job. With GitHub Enterprise Cloud you can instead tick Assign unique & static public IP address ranges for this runner under Networking on the runner in your organization’s Actions → Runners settings, and save. The ranges are unique to that runner. A larger runner is a pool that scales out, and every job in the pool shares the same ranges, so more parallel jobs do not need more addresses. GitHub lets you configure up to 10 pools with static ranges by default and sends you to its Support portal for more; its limits page words a limit differently, as 10 IPs per enterprise and organization, also raisable by a support ticket, and GitHub does not say how the two relate. macOS larger runners cannot have one, and if a runner goes unused for more than 90 days its ranges are removed and cannot be recovered.

GitHub gives one warning in particular: if you use a fixed range, it recommends only using larger runners with private repositories, because forks of your repository can potentially run dangerous code on your larger runner. Our reading is that such code would then leave from the address you have allowlisted.

Self-hosted runners. A runner on a machine you run leaves from your network’s address, so the allowlist is yours. The price is the work of keeping the machines patched and clean, and GitHub’s secure-use guidance says self-hosted runners should almost never be used for public repositories, because anyone who can open a pull request can attack the machine, and that they, unlike GitHub’s hosted runners, are not guaranteed to be clean for every job.

A runner service. Ask of any service what is shared and what is not. On ours, without the add-on, outbound traffic is not separated by organisation: a job leaves from the address of the machine it runs on, which other customers’ jobs share, so allowlisting one of our addresses is not a boundary between tenants, as our security page says. The Static IP add-on is described there as “a dedicated address your builds leave from, so a database, an artefact repository or a partner’s API can allowlist you instead of a shared range”. You ask for it under Settings → Runners → Add-ons, a person on our side completes the request, and it is billed per organisation by the month. If the route to the address is down when a job starts, the job does not start, rather than leave from a shared address your allowlist would reject. Every size we run, with its memory, disk and rate a minute, is on our managed GitHub Actions runners page.

Does a static IP cost extra on GitHub?

Not for the address. GitHub’s rate reference says there is no additional cost for configurations that assign public static IP addresses to a larger runner. The larger runner itself is billed per minute, rounded up to a whole minute per job, and it is not free in a public repository. Larger runners are available only to organizations and enterprises on Team or Enterprise Cloud, but the static address needs Enterprise Cloud, so on Team you can have the machine and not the fixed range. The runner size guide has the per-minute rates by size.

What happens to my allowlist when GitHub changes a range?

GitHub gave notice last time, though we found no page that promises it. When GitHub moved static-IP larger runners to two ranges on 6 September 2023, it added a second range, in a different geographic location, as a guard against a regional outage. New runners received both. For existing runners GitHub added one or more ranges, emailed administrators and gave them 30 days to update their firewalls and allowlists before it started using the new ranges. So an allowlist for a static range needs a place where the person who owns it gets GitHub’s email, and an entry for every range the runner lists, not only the first.

Can I avoid IP allowlisting altogether?

Often, if the thing you are protecting is a cloud account. OpenID Connect lets a workflow exchange a short-lived token directly with your cloud provider, so the job proves who it is instead of where it comes from and you store no long-lived secret for it. It does not help for a database or partner API that admits only listed addresses, which is what the routes above are for. The security hardening post covers the permissions that go with it.

Sources

Frequently asked questions

Can I get a static IP address for GitHub Actions?

Not on standard GitHub-hosted runners. You can get static ranges on a GitHub larger runner with GitHub Enterprise Cloud, run your own self-hosted runner, or use a runner service that sells an address.

Do standard GitHub-hosted runners have a fixed IP address?

No. They leave from large shared ranges listed under the actions key of GET /meta, updated once a week. GitHub says the ranges are not dedicated to Actions and does not recommend adding them to an allowlist.

Which GitHub plan do I need for a static IP?

GitHub Enterprise Cloud. Larger runners are available on Team and Enterprise Cloud, but GitHub's documentation says to use static IP addresses your organization must use Enterprise Cloud. macOS larger runners cannot have one.

Does a static IP cost extra on GitHub?

No. GitHub's rate reference says there is no additional cost for configurations that assign public static IP addresses to a larger runner. The larger runner itself is billed per minute, and is not free in public repositories.

Move your CI onto our runners with one line

Change one line, watch your own build, then decide.

Connect GitHub

Card required. You pay only for the minutes your jobs run.

.github/workflows/ci.yml
jobs: test:removed: runs-on: ubuntu-latestadded: runs-on: runnersio-4vcpu-ubuntu-2604 steps: - uses: actions/checkout@v4 - run: make testadded: build:added: runs-on: runnersio-32vcpu-ubuntu-2604