Static IP guide
Making API requests with a static IP from a Python app on Koyeb
On Koyeb, a Python service adopts Fixie through one secret and one requests option: store the proxy URL as FIXIE_URL, expose it with --env "FIXIE_URL=@FIXIE_URL", and pass the proxies dict on allowlisted calls. Koyeb's own IPs can change with scaling; Fixie's do not.
Recommended setup
Use Fixie HTTP/S proxy for HTTP and HTTPS requests to an API, webhook provider, or service that allowlists outbound IP addresses. Store the proxy value in FIXIE_URL, then configure Python to route outbound traffic through Fixie before connecting to API allowlisting.
Set up Fixie on Koyeb
Create a Fixie HTTP/S proxy in the Fixie dashboard. Copy the proxy value into Koyeb secrets as FIXIE_URL, and copy the outbound IPs into the destination allowlist.
Set a Koyeb secret
koyeb secret create FIXIE_URL --value "..."
koyeb app init YOUR_APP_NAME --env "FIXIE_URL=@FIXIE_URL"Implementation
The example below shows the core application-side change. Keep credentials in environment variables and avoid committing proxy, database, or API secrets.
Make an HTTP request through FIXIE_URL
import os
import requests
proxies = {
"http": os.environ["FIXIE_URL"],
"https": os.environ["FIXIE_URL"],
}
response = requests.get("https://api.example.com/data", proxies=proxies)
print(response.status_code)Good to know
- Fixie maintains a Koyeb example app on GitHub if you want a working reference deployment to compare against.
- For SDKs whose HTTP layer you cannot configure, exporting http_proxy and https_proxy in the service environment proxies them transparently.
Allowlist and test the static IPs
- Open the Fixie dashboard and copy the outbound IP addresses for this proxy.
- Add both IPs to the API provider.
- Deploy the updated Python app on Koyeb.
- Run a small connection test before sending production traffic.
Related guides
- Making API requests with a static IP from a Python app on Heroku
- Making API requests with a static IP from a Node app on Koyeb
- Making API requests with a static IP from a Python app on Vercel
- Making API requests with a static IP from a Python app on Render
- Making API requests with a static IP from a Python app on Fly.io
- Making API requests with a static IP from a Python app on AWS Lambda