wrangler vpc service create accepts --type tcp
Introduced 2026-03-27 · score 0.93
HOW TO USE IT
When exposing a TCP database through Workers VPC, create a TCP service with its port, private IPv4 address, and tunnel ID.
npx wrangler vpc service create my-db --type tcp --tcp-port 5432 --ipv4 10.0.0.1 --tunnel-id <tunnel-uuid>WHY THIS HELPS
Expose a TCP database service, such as PostgreSQL or MySQL, through Workers VPC.
REQUIREMENTS AND LIMITATIONS
- Version: 4.78.0
- <NAME> (required): Name of the VPC service.
- --type (required): VPC service type; use `tcp`.
- --tcp-port: TCP port number; provide the database service port.
- --ipv4: IPv4 address for the host; conflicts with `--ipv6`.
- --ipv6: IPv6 address for the host; conflicts with `--ipv4`.
- --tunnel-id (required): UUID of the Cloudflare tunnel.
- Prerequisite: Have a running tunnel that can reach the database host and port.
- Prerequisite: Wrangler authentication must have the `Connectivity Directory Admin` role to create VPC services.
- The service port, IPv4 address, and tunnel ID are needed in the example workflow.
FIRST-PARTY EVIDENCE
- https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.78.0
- https://developers.cloudflare.com/workers-vpc/get-started/
- https://developers.cloudflare.com/workers/wrangler/commands/vpc/
- https://developers.cloudflare.com/workers-vpc/configuration/vpc-services/
Check the installed version and the source before using it. Entry JSON