← Guides

How to give GitHub Actions a static outbound IP

GitHub-hosted runners start on a fresh virtual machine with an IP from a large, shared and changing range. If your database, staging server or partner API only accepts allowlisted IPs, your workflow fails. You have three options.

Updated 2026-11-19 · 6 min read

Why the IP keeps changing

Every job on a standard GitHub-hosted runner gets a new VM. GitHub publishes the address ranges in its meta API, but they are huge, shared by every GitHub customer and change over time. Allowlisting all of them is the same as allowlisting nobody.

Option 1: larger runners with a static IP range

On GitHub Team and Enterprise Cloud plans you can create larger runners and assign them static IP addresses. It is the most native option if you already pay for those plans and per-minute larger-runner pricing works for you.

Option 2: a self-hosted runner

Run the GitHub Actions runner on your own server with a fixed IP. You get full control, but you also patch, scale and secure that machine, and a compromised workflow runs on your infrastructure.

Option 3: keep hosted runners, send traffic through a dedicated IP

Keep the free hosted runners and route only the requests that need allowlisting through a server with a static IPv4. Two ways to do that:

Proxy in a workflow

Store the proxy URL as a repository secret named MAZE_PROXY_URL, then set it only on the steps that need it:

- name: Deploy to allowlisted server
  env:
    HTTPS_PROXY: ${{ secrets.MAZE_PROXY_URL }}
    HTTP_PROXY: ${{ secrets.MAZE_PROXY_URL }}
    NO_PROXY: localhost,127.0.0.1
  run: |
    curl -s https://ifconfig.me   # prints your static IP
    ./deploy.sh

WireGuard in a workflow

Save a WireGuard config (one config per repository or environment) as the secret WG_CONFIG:

- name: Connect WireGuard
  run: |
    sudo apt-get update -qq && sudo apt-get install -y -qq wireguard resolvconf
    echo "${{ secrets.WG_CONFIG }}" | sudo tee /etc/wireguard/wg0.conf > /dev/null
    sudo chmod 600 /etc/wireguard/wg0.conf
    sudo wg-quick up wg0
    curl -s https://ifconfig.me   # prints your static IP

- name: Run migrations against the allowlisted database
  run: ./migrate.sh

Security tips

Skip the setup

A dedicated server and static IPv4 in 38 cities, ready in about 3 minutes. WireGuard for people, SOCKS5/HTTP proxy for code. From $9.99/month.

FAQ

Questions, answered.

Something else? Open a ticket, a human replies.

Does this work with pull requests from forks? +

Secrets are not passed to workflows triggered by forks, so those jobs will not get the static IP. That is usually what you want.

What does it cost? +

Larger runners and self-hosted machines vary. A MazeVPN Solo plan with a dedicated IPv4, proxy and 5 WireGuard configs is $9.99/month and works for any number of workflows.

More guides

Stop getting blocked. Start getting allowlisted.

Your own static IP, live in minutes. Full refund within 3 days if it is not right for you.