Fixie Google Cloud Run
With Fixie static IP, your Google Cloud Run services can send any (HTTP, HTTPS, Database, TCP, and more) outbound requests from a fixed set of static IP addresses. Fixie for Cloud Run is language- and framework-agnostic.
By default, a Cloud Run service reaches the internet through a dynamic IP address pool, so the outbound IP a request leaves from isn't something you control and can change between revisions or scale-up events. Fixie sits in front of your outbound traffic and gives you both HTTP and SOCKS V5 proxies, so requests leave from the same pair of IP addresses without you having to provision or manage any additional infrastructure yourself.
Fixie can be used with any backend language, including JavaScript, Ruby, Python, Java, Go, and PHP.
Unlike Heroku and Vercel where there are native integrations available, Google Cloud Run support needs to be added manually at this time.
Getting Started
To get started, create a Fixie account, and create a new Proxy Application.
After the proxy is created, go to Proxy's Details page where you'll see a couple of important values:
- Proxy URL: Your Fixie HTTP/S or SOCKS proxy URL that includes your username, password and proxy server load-balancer to use.
- Outbound IPs: Your pair of Fixie IP-addresses. These will never change, so feel free to allow-list them with firewalls or services.
Configure Your Application
Next, update your application to use your Fixie proxy server. We have documentation for many popular languages that run on Cloud Run:
You also need to make sure Fixie credentials are accessible by your Cloud Run service. Store your Proxy URL as an environment variable rather than hardcoding it in source. To add one from the console:
- Open your service in the Cloud Run Services page and select it.
- Click Edit & Deploy New Revision.
- Open the Containers tab, then the Variables & Secrets section.
- Click Add Variable, enter the name (e.g.
FIXIE_URL) and your Fixie proxy URL as the value. - Click Deploy.
(If you're already using Secret Manager for other credentials, you can reference a secret there the same way instead of a plain variable.) We recommend the following naming conventions for Environment Variables so it's easier to follow along with our documentation:
FIXIE_URLfor your Fixie HTTP/S proxyFIXIE_SOCKS_HOSTfor your Fixie SOCKS proxy
If you'd rather manage this from the terminal, the gcloud CLI supports setting an environment variable on deploy:
Feel free to create different Fixie proxies for different environments (for example, a staging and a production Cloud Run service) to keep credentials and logs separate — it also makes debugging easier, since you can tell at a glance from the proxy's own request logs which environment generated a given request, instead of digging through logs that mix staging and production together.
Local setup
To use Fixie locally, replicate the FIXIE_URL and/or FIXIE_SOCKS_HOST environment variables in your local environment. For example, you can add them to a .env file.
Keep sensitive configuration values, like credentials, out of source control. Exclude the
.envfile in Git with:echo '.env' >> .gitignore.
Changing plans
Use the Fixie dashboard to change your plan. To change the plan, click Change Plan button and select an appropriate plan.
NOTE: Changing the plan won't affect your outbound IP address
Deleting a proxy
To remove the proxies, go to the Fixie dashboard and select Delete for the desired proxy.
Is this guide useful?
Having issues? Please reach out to our team here.