Static IP in GitHub Actions
Send only the workflow steps that need an allowlisted address through a dedicated IPv4, keeping firewalls closed to GitHub's cloud ranges.
First payment refunded within 7 days if it doesn’t work for you
- Partner API
- External DB
On this page14
GitHub-hosted runners exit from thousands of Azure IP addresses whose CIDR list changes every week. With Prontaro, regular builds and package installs run directly as usual, while protected steps use a proxy URL, a Relay URL, or the single-binary prontaro forward command for database migrations and SSH/SFTP deploys.
Which method to choose
| CI task | Prontaro method | CLI install needed? |
|---|---|---|
REST API calls, webhooks, smoke tests (curl, Node, Python, Go) |
PRONTARO_PROXY_URL / HTTPS_PROXY on that step |
No |
| Simple HTTP call to one allowlisted host | PRONTARO_RELAY_URL |
No |
Database migrations (psql, Prisma, Flyway) or SSH/SFTP deploys |
prontaro CLI + prontaro forward with PRONTARO_KEY |
Yes (single static binary) |
Prerequisites
- A Prontaro account on Dedicated or Pro (plans). Open my.prontaro.com/ips, pick a location, and click Add IP.
- Your dedicated IPv4 (
/32) added to the destination API, database, or firewall allowlist. - Access to Settings → Secrets and variables → Actions in your GitHub repository.
Step 1. Create separate credentials for CI
Path A. Proxy credentials and Relay
- Open IP addresses in my.prontaro.com, select your IP, and click Create proxy credentials (for example,
github-actions). - Copy the
HTTPSURL (https://u_ci:s3cr3t@<entry>.prontaro.io:443), orSOCKS5(socks5h://...). - If you only need a Relay URL for one host, click Add relay address and enter
api.example.com.
Leave the To destination list open until Step 5 so the api.ipify.org check in Step 4 succeeds.
Path B. prontaro CLI token
In the Prontaro dashboard, open CLI → New token, create a dedicated CLI token named github-actions, and copy it. You can revoke it independently of your workstation.
Step 2. Store secrets in GitHub Actions
Add the secrets to your repository (or scope them inside a protected GitHub Environment such as production with required reviewers):
- PRONTARO_PROXY_URL
- https://u_ci:s3cr3t@<entry>.prontaro.io:443
- PRONTARO_RELAY_URL
- https://relay-3f9c2a7e-5b1d-4c8a-9e60-1d2b3c4d5e6f.prontaro.run
- PRONTARO_KEY
- prontaro.<cli-token>
Only create the secrets your workflow needs (PRONTARO_PROXY_URL / PRONTARO_RELAY_URL for Path A, PRONTARO_KEY for Path B). Pass them only in the env: block of the specific step that uses them.
Step 3. Configure your workflow
Path A. Static IP without installing the CLI
Pass PRONTARO_PROXY_URL to curl or your script on a single step:
# .github/workflows/partner-sync.yml
name: Partner API sync
on:
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Call allowlisted partner API via proxy
env:
PRONTARO_PROXY_URL: ${{ secrets.PRONTARO_PROXY_URL }}
PARTNER_API_TOKEN: ${{ secrets.PARTNER_API_TOKEN }}
run: |
curl -fsS --proxy "$PRONTARO_PROXY_URL" \
-H "Authorization: Bearer $PARTNER_API_TOKEN" \
https://api.example.com/v1/syncWhen using a Relay URL (PRONTARO_RELAY_URL) for one host, omit --proxy and call the Relay base URL directly:
- name: Notify partner API via Relay URL
env:
PRONTARO_RELAY_URL: ${{ secrets.PRONTARO_RELAY_URL }}
PARTNER_API_TOKEN: ${{ secrets.PARTNER_API_TOKEN }}
run: |
curl -fsS \
-H "Authorization: Bearer $PARTNER_API_TOKEN" \
"${PRONTARO_RELAY_URL%/}/v1/sync"Path B. Database migrations and SSH with prontaro forward
You do not need a prontaro login step in CI: prontaro CLI reads your token directly from PRONTARO_KEY. Install the binary, forward the target port to 127.0.0.1, run the migration or deploy, and stop the background process with trap:
# .github/workflows/migrate-and-deploy.yml
name: Migrate DB and deploy
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install prontaro CLI
run: |
curl -fsSL https://prontaro.com/install.sh | sh
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
- name: Run database migration through static IP
env:
PRONTARO_KEY: ${{ secrets.PRONTARO_KEY }}
DATABASE_USER: ${{ secrets.DATABASE_USER }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
run: |
set -euo pipefail
prontaro forward 15432 db.example.com:5432 --ip 203.0.113.10 &
FWD_PID=$!
trap 'kill "$FWD_PID" 2>/dev/null || true' EXIT
for i in $(seq 1 30); do
if nc -z 127.0.0.1 15432; then break; fi
sleep 0.5
done
if ! nc -z 127.0.0.1 15432; then
echo "prontaro forward did not become ready on 127.0.0.1:15432" >&2
exit 1
fi
PGPASSWORD="$DATABASE_PASSWORD" psql \
"postgresql://${DATABASE_USER}@127.0.0.1:15432/app?sslmode=require" \
-f migrations/001_schema.sqlsslmode=verify-full:sslmode=requireencrypts the connection tunneled over127.0.0.1without verifying the hostname. For drivers enforcingverify-full, see Local port forwarding (prontaro forward).- SSH and SFTP: forward
deploy.example.com:22to port2222and verifyknown_hostswithHostKeyAlias:ssh -p 2222 -o HostKeyAlias=deploy.example.com deploy@127.0.0.1.
Step 4. Verify the outbound IP in Actions
Add this step to a workflow_dispatch workflow and run it manually to confirm the runner exits from your dedicated IPv4:
- name: Verify static IP
env:
PRONTARO_PROXY_URL: ${{ secrets.PRONTARO_PROXY_URL }}
run: curl -fsS --proxy "$PRONTARO_PROXY_URL" https://api.ipify.orgExpected step log output:
203.0.113.10Step 5. Lock down allowed targets (recommended)
Once verified, restrict your CI proxy credentials to the exact hosts and ports your pipeline calls:
- Open IP addresses → Proxy credentials in my.prontaro.com, select
github-actions, and switch to the Access tab. - Add
api.example.com:443under To and save.
Security and CI notes
- Restrict fork pull requests. Never expose secrets in
pull_request_targetor untrusted forks. Keep them in protected Environments restricted tomainor release tags. - Stop background
prontaro forward. Always terminate it withtrap 'kill "$FWD_PID" 2>/dev/null || true' EXITin the same step — otherwise the background process keeps stdout and stderr open and hangs the job. - Pass
--ipwith multiple IPs. On Pro accounts with two or more IPs,prontaro forwardcannot prompt in CI and exits with an error unless--ip <IP>is set. - Verify SHA256 in strict pipelines. If policy disallows piping into
sh, download the archive andSHA256SUMSfrom releases and check withsha256sum -c.
Common errors
| Error | Cause | Fix |
|---|---|---|
client_key_invalid or no saved login |
PRONTARO_KEY secret is empty, revoked, or unavailable in the current Environment/fork. |
Check the PRONTARO_KEY secret name and rules under Settings → Environments. |
You have 2 addresses — choose which one to go out from |
Account has multiple IPs and --ip was omitted in non-interactive CI. |
Add --ip <your-IP> to prontaro forward. |
| CI step hangs after migration finishes | Background prontaro forward kept stdout/stderr open. |
Add `trap ’kill “$FWD_PID” 2>/dev/null |
Database TLS hostname mismatch on 127.0.0.1 |
Driver enforces sslmode=verify-full against the production hostname. |
Use sslmode=require or follow the workarounds in the prontaro forward guide. |
For 407, 403, and other proxy or CLI codes, see error codes and HTTP & SOCKS5 proxy.
Next steps
- Local port forwarding (
prontaro forward) — outbound TCP connections to allowlisted databases and SSH servers from your dedicated IPv4. - Install
prontaroCLI on Linux — download the static binary and verify SHA256 checksums in CI pipelines. - HTTP & SOCKS5 proxy — proxy credentials, allowed target rules, and credential rotation.
- Static IP in GitLab CI/CD — the same proxy and
prontaro forwardpatterns for GitLab Shared Runners. - Diagnostics and error codes — troubleshooting
407,403,client_key_invalid, and runningprontaro doctor.
Related guides
- HTTP & SOCKS5 proxyRoute outbound HTTP, HTTPS, and TCP connections through your static IPv4 with one proxy credential set, end-to-end TLS, and From/To rules.
- Relay URLsCall IP-allowlisted HTTPS APIs from edge runtimes and no-code tools without proxy configuration by replacing the base URL with a Prontaro Relay URL.
- Local port forwarding (prontaro forward)Connect database drivers, SFTP clients, and CLI tools to remote servers from your static IPv4 over a local TCP port — no proxy support needed.
Something wrong on this page? Contact us