🇪🇺 Fixed outbound IP for Laravel apps

🇪🇺 Static IP for Laravel

Your Laravel app calls partner APIs that enforce IP whitelisting, but cloud deploys rotate your outbound IP. Route Guzzle and the Laravel HTTP client through two fixed EU IPs with one HTTPS_PROXY env var.

routes/api.php

# .env

HTTPS_PROXY=https://user:pass@eu-01.outboundgateway.com:8443

$resp = Http::withToken('..')

  ->get('https://api.partner.eu/data');

# auto-honours HTTPS_PROXY

The Problem

Laravel apps deployed on cloud platforms get dynamic outbound IPs. When your app calls a partner API that enforces IP whitelisting, those rotating IPs get blocked.

Partner APIs enforce IP allowlisting

Payment providers, CRMs, and enterprise APIs require IP whitelisting. When your Laravel app's cloud deployment gets a new outbound IP on every deploy, the whitelist breaks and API calls fail silently.

Cloud platforms rotate IPs

Whether you deploy Laravel on Heroku, Kubernetes, AWS, Forge, or Vapor, the outbound IP changes with every deploy or scale event. You can't predict what IP your app will call from.

Dev, staging, and prod all differ

Your Laravel project has multiple environments, each with its own dynamic IP. Managing separate whitelists for dev, staging, and production is a maintenance nightmare.

No native static IP in Laravel

Laravel itself doesn't provide a static outbound IP feature. The IP depends entirely on where you deploy it. You need an external proxy to give your app a predictable egress.

The Solution

Set one env var. All outbound calls route through your static EU IP.

The Laravel HTTP client (which wraps Guzzle) and standalone Guzzle both read HTTPS_PROXY from the environment automatically. Set it once in your .env file and every outbound call your controllers make leaves through your fixed EU IPs.

No code changes. Set HTTPS_PROXY in your .env and your existing Http::get() calls work as-is.
Two fixed EU IPs with automatic failover. If one goes down, the other takes over.
TLS passthrough. The proxy never sees your traffic. API keys and payloads stay encrypted.

Implementation

Set HTTPS_PROXY in your .env file. Your existing Laravel code works as-is.

Laravel HTTP Client (recommended)

Laravel's built-in Http facade wraps Guzzle and respects HTTPS_PROXY automatically.

# .env
HTTPS_PROXY=https://user:pass@eu-01.outboundgateway.com:8443
PARTNER_API_TOKEN=your_token

// routes/api.php or app/Http/Controllers/Api.php
use Illuminate\Support\Facades\Http;

$resp = Http::withToken(env('PARTNER_API_TOKEN'))
    ->get('https://api.partner.eu/data');

// Http facade honours HTTPS_PROXY automatically
$data = $resp->json();

Guzzle (standalone)

If you use Guzzle directly in your Laravel app, it also respects HTTPS_PROXY automatically.

// .env sets HTTPS_PROXY

$client = new \GuzzleHttp\Client();

// Guzzle reads HTTPS_PROXY from env automatically
$resp = $client->get('https://api.partner.eu/data', [
    'headers' => ['Authorization' => 'Bearer ..'],
]);

Docker / Kubernetes / Forge

Set it wherever your Laravel app runs. Never paste the proxy string in plaintext.

# Docker Compose
services:
  laravel:
    env_file: .env

# Kubernetes: Secret
env:
  - name: HTTPS_PROXY
    valueFrom:
      secretKeyRef:
        name: outboundgateway-proxy
        key: proxy-url

# Laravel Forge: set in Site > Environment
HTTPS_PROXY=https://user:pass@eu-01.outboundgateway.com:8443

Two IPs, automatic failover

Your account comes with two static IP addresses (for example 51.xx.xx.10 and 51.xx.xx.11). Whitelist both on your partner API. If one proxy node is briefly unavailable, traffic shifts to the other.

📖 Complete Documentation: For detailed examples, error handling, and other PHP libraries, see the PHP SSL Proxy Guide and all other language guides.

Why Laravel developers choose OutboundGateway

A pair of fixed IPs

Two addresses to whitelist, with automatic failover. No rotating cloud pool to chase.

Zero code changes

Set HTTPS_PROXY in .env and your existing Http:: and Guzzle calls work as-is.

EU-hosted

European data centres and a GDPR-conscious setup, giving your Laravel app a predictable EU address.

Works everywhere

Docker, Kubernetes, Forge, Vapor, Heroku, AWS. One env var covers every deployment.

Encrypted end to end

TLS passthrough means the proxy can't read your traffic. API keys and payloads stay private.

Flexible plans

Starting from €19/month. Flexible plans for every scale. Cancel anytime.

Give your Laravel app a static EU IP

Stop letting dynamic IPs break your partner API integrations. Set one env var and your outbound calls route through two fixed EU IPs.

€19/month starter plan • 7-day refund policy • Direct founder support

Frequently asked questions

Does this require changing my Laravel config or service providers?

No. You don't need to add any service providers, change config/http.php, or modify your controllers. Just add HTTPS_PROXY to your .env file. The Laravel HTTP client (which wraps Guzzle) reads it automatically.

Does this work with the Laravel Http facade and Guzzle?

Yes. Both the Laravel Http facade (which wraps Guzzle internally) and standalone Guzzle respect the HTTPS_PROXY environment variable by default. If you use either in your Laravel app for API calls, setting the env var is all you need.

What if my Laravel app runs behind Octane, Nginx, or Apache?

The proxy works at the PHP HTTP library level, not the web server level. Whether you run Laravel with Octane (Swoole/RoadRunner), Nginx + PHP-FPM, or Apache, as long as the HTTPS_PROXY environment variable is set for the PHP process, outbound HTTP calls route through the proxy.

Still deciding?

Happy to talk through how a two-IP EU egress fits your Laravel project.

Contact Our Founders →