Skip to content
Back to feed

November 18, 2026 · Cloudflare

Hyperdrive - Custom CA and mTLS certificates for Hyperdrive over Workers VPC

Hyperdrive can now connect to private databases over Workers VPC with a custom certificate authority (CA) and client certificate authentication (mutual TLS, or mTLS). This covers PostgreSQL databases and Amazon RDS instances that present certificates signed by a private CA or the RDS CA bundle, and client certificates with RSA or EC P-256 keys.

Previously, a database that required a custom CA or a client certificate meant routing database traffic over WebSockets through Cloudflare Access and Cloudflare Tunnel. That approach added an Access application, a service token, and WebSocket handling to maintain.

Hyperdrive now connects directly to the database over Workers VPC, without Access.

Attach the certificates to the VPC Service, then create a Hyperdrive configuration from that service:

# Upload the private CA and the client certificate
npx wrangler cert upload certificate-authority --ca-cert ./db-ca.pem --name db-ca
npx wrangler cert upload mtls-certificate --cert ./client.pem --key ./client-key.pem --name db-client

# Attach the certificates to the VPC Service for your database
npx wrangler vpc service create my-postgres-db \
  --type tcp \
  --tcp-port 5432 \
  --app-protocol postgresql \
  --hostname <YOUR_DATABASE_HOSTNAME> \
  --tunnel-id <YOUR_TUNNEL_ID> \
  --certificate-authority <CA_CERTIFICATE_ID> \
  --client-certificate <CLIENT_CERTIFICATE_ID> \
  --cert-verification-mode verify_full

# Create the Hyperdrive configuration from the VPC Service
npx wrangler hyperdrive create <YOUR_CONFIG_NAME> \
  --service-id <YOUR_VPC_SERVICE_ID> \
  --database <DATABASE_NAME> \
  --user <DATABASE_USER> \
  --password <DATABASE_PASSWORD> \
  --scheme postgresql

You can use a custom CA, a client certificate, or both. Configure VPC Services with Wrangler 4.164.0 or later, the API, or Terraform provider 5.29.0 or later. Dashboard support for these settings is not yet available.

For setup details and certificate rotation, refer to Connect Hyperdrive to a private database using Workers VPC and Custom CA and client certificates.

Free. Unsubscribe any time.

All Hyperdrive changes