DevOps & Tools September 10, 2026 6 min read

Exposing Localhost to the Web: Cloudflare Tunnels on Devs.Surf

Turn your local machine into a publicly accessible staging server without port-forwarding, static IPs, or complex firewall rules.

Written by ByteLogic Team

Need to test a webhook from Stripe, demo a client project running on your laptop, or expose a local Ollama AI model to a colleague? With Cloudflare Tunnels (formerly Argo Tunnel) and a free devs.surf subdomain, you can securely route public internet traffic to any local port without exposing your home IP or opening firewall ports.

Step 1: Install cloudflared CLI

Install the lightweight Cloudflare Tunnel daemon:

# macOS via Homebrew
brew install cloudflare/cloudflare/cloudflared

# Linux Debian/Ubuntu
sudo apt install cloudflared

Step 2: Create a Free Tunnel

Authenticate and generate a named tunnel:

cloudflared tunnel login
cloudflared tunnel create local-staging

This creates a tunnel ID (e.g. f2a34b5c-xxxx-xxxx-xxxx-xxxxxxxxxxxx) and a credentials JSON file.

Step 3: Point Devs.Surf DNS to the Tunnel Target

Cloudflare tunnels route through <TUNNEL_ID>.cfargotunnel.com. In your Devs.Surf DNS Manager, add:

Type Name Target TTL
CNAME @ f2a34b5c-xxxx-xxxx.cfargotunnel.com 3600

Step 4: Run the Tunnel Locally

Route incoming requests directly to your local application port (e.g. port 3000):

cloudflared tunnel run --url http://localhost:3000 local-staging

Any request hitting https://myproject.devs.surf will now be proxied through Cloudflare's edge directly into your local machine with end-to-end HTTPS encryption.

READY TO USE THIS DOMAIN?

Grab a free devs.surf subdomain and connect it to your preferred host in under 60 seconds.

SEARCH FREE DOMAINS

RELATED_GUIDES