Cloudflare Workers VPC
Securely connect your private cloud to Cloudflare to build cross-cloud apps.
Workers VPC allows you to connect your Workers to your private APIs and services in external clouds (AWS, Azure, GCP, on-premise, etc.) that are not accessible from the public Internet.
With Workers VPC, you can configure a Cloudflare Tunnel to establish secure, private connections from your private networks to Cloudflare. Then, you can configure a VPC Service for each service in the external private network you need to connect to, and use VPC Service bindings to connect from Workers.
export default { async fetch(request, env, ctx) { // Access your private API through the service binding const response = await env.PRIVATE_API.fetch( "http://internal-api.company.local/data", );
// Process the response from your private network const data = await response.json();
return new Response(JSON.stringify(data), { headers: { "content-type": "application/json" }, }); },
}; { "$schema": "node_modules/wrangler/config-schema.json", "name": "WORKER-NAME", "main": "src/index.ts", "compatibility_date": "2025-02-04", "vpc_services": [ { "binding": "VPC_SERVICE", "service_id": "ENTER_SERVICE_ID", "remote": true } ] }Deploy APIs or full-stack applications to Workers that connect to private authentication services, CMS systems, internals APIs, and more. Your Workers applications run globally with optimized access to the backend services of your private network.
Route requests to internal microservices in your private network based on URL paths. Centralize access control and load balancing for multiple private services on Workers.
Build employee-facing applications and MCP servers that aggregate data from multiple private services. Create unified dashboards, admin panels, and internal tools without exposing backend systems.
Build serverless applications and deploy instantly across the globe for exceptional performance, reliability, and scale.
Connect to PostgreSQL and MySQL databases from Workers with connection pooling and caching built-in, available to all Workers plans.
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Directory
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark
-