cloudflare-vpc-services

Configure and troubleshoot Cloudflare VPC service bindings connecting Workers to private APIs through cloudflared tunnels.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/brillianodhiya/VisionScript --skill cloudflare-vpc-services-brillianodhiya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cloudflare-vpc-services
Source: https://github.com/brillianodhiya/VisionScript/tree/main/.agents/skills/cloudflare-vpc-services
Command: npx skills add https://github.com/brillianodhiya/VisionScript --skill cloudflare-vpc-services-brillianodhiya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires wrangler, cloudflared, and includes scripts (resource) and references (resource) components.

What problem does it solve? Connecting Cloudflare Workers to private APIs in AWS, Azure, GCP, or on-premise networks often fails with cryptic dns_error, timeout, and routing issues caused by misconfigured tunnels, wrong protocols, or incorrect fetch() usage. This Skill provides the exact configuration patterns and troubleshooting steps to set up VPC services correctly the first time. ## Core Features & Use Cases - VPC Service Configuration: Create IP-based and hostname-based VPC service payloads and wrangler.jsonc bindings using ready-to-use templates. - Worker Code Patterns: Write fetch() calls against service bindings with correct absolute URLs, authentication headers, path routing, and error handling. - Troubleshooting Playbooks: Diagnose dns_error, public-internet leakage, connection timeouts, and port confusion with documented root causes and fixes. - Use Case: A Worker needs to call an internal REST API inside a private AWS VPC. Use this Skill to create the VPC service, bind it in wrangler.jsonc, and write the Worker fetch() code without hitting dns_error. ## Quick Start Ask the AI to configure a Cloudflare VPC service binding so your Worker can call an internal API through a cloudflared tunnel.

Frequently Asked Questions about cloudflare-vpc-services

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a Cloudflare Worker to a private API?▼

Create a VPC service pointing to your internal IP or hostname, add a vpc_services binding in wrangler.jsonc with the service_id, then call env.BINDING.fetch() with an absolute internal URL in your Worker code.

Why does my Cloudflare VPC service return dns_error?▼

dns_error occurs when cloudflared is older than version 2025.7.0 or the tunnel uses http2 instead of QUIC protocol. Update cloudflared, configure QUIC, and allow outbound UDP port 7844.

How do I configure wrangler vpc_services bindings?▼

Add a vpc_services array in wrangler.jsonc with binding name, service_id UUID from VPC service creation, and remote set to true. The binding name becomes the environment variable used as env.BINDING.fetch().

Can I specify a port in the fetch() URL for VPC services?▼

No, ports in fetch() URLs are ignored. The actual port comes from the http_port or https_port configured in the VPC service itself; the fetch() URL only sets the Host header and SNI value.

Why are my VPC requests going to the public internet?▼

Requests leak to the public internet when fetch() uses a public hostname instead of an internal VPC hostname. Always use internal hostnames like internal-api.company.local so traffic routes through the tunnel.

When should I not use Cloudflare Workers VPC?▼

Avoid it for public API integrations and general Workers development, which need no tunnel. Cloudflare Access or Zero Trust setup is also a separate use case handled by different tooling.