Dev.to
7/2/2026

How to Let a Vercel App Read a Private ClickHouse on EC2 (Using Cloudflare Tunnel)
Short summary
Step-by-step guide to securely connecting a Vercel app to a private ClickHouse database on EC2 using Cloudflare Tunnel, which creates an outbound-only encrypted connection without opening ports or exposing server IP. Explains four key concepts and walks through setting up the tunnel, managing DNS via a throwaway domain, and configuring the connection. Ideal for DevOps engineers and teams needing secure private database access from cloud-hosted applications.
- •Cloudflare Tunnel enables outbound-only encrypted connections—no open ports, no exposed server IP
- •Guide covers ClickHouse, EC2, Vercel, DNS setup, and step-by-step tunnel configuration
- •Use case: connect cloud-hosted apps and AI agents to private databases securely
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



