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.