Using Localhost Tunnels for AI and Vibe Coding
When your AI coding tool needs a callback URL, webhook endpoint, or public API for testing, a localhost tunnel gets you there in seconds.
If you're building with AI tools — Cursor, Bolt, v0, Replit Agent, or prompting Claude and ChatGPT to write code — you'll hit a point where your app needs to be reachable from the internet.
Maybe you're building a Slack bot that needs webhook events. Maybe your AI assistant generated an API and now you need to test it with a real client. Maybe you're setting up OAuth and need a legitimate callback URL.
Whatever the scenario: your app runs on localhost, and something external needs to reach it.
The one-minute fix
# Install (once)
curl -fsSL https://get.localport.dev | sh
# Tunnel your app
localport tunnel --token YOUR_TOKEN --local localhost:3000
You get a URL like https://abc123.tunnel.localport.dev. Use it wherever you need a public endpoint.
Common scenarios
Testing webhooks in your AI-generated app
You asked Cursor to build a Stripe integration. It generated the webhook handler at /api/webhooks/stripe. Now you need Stripe to actually send webhooks there.
localport tunnel --token YOUR_TOKEN --local localhost:3000
# Copy https://abc123.tunnel.localport.dev/api/webhooks/stripe into Stripe dashboard
OAuth callback URLs
Your AI tool generated a login flow with Google OAuth. Google needs a redirect URI that's a real URL, not localhost.
Use your tunnel URL: https://abc123.tunnel.localport.dev/auth/callback
Sharing your prototype
You're building something fast with v0 or Bolt. You want someone to see it before you deploy. Tunnel it and send the link — they see your running app in real time.
API testing across devices
Your AI wrote a REST API. You want to test it from your phone, from Postman on another machine, or from a serverless function. The tunnel URL works from anywhere.
No devops required
The whole point of vibe coding is moving fast. You don't want to set up a cloud server, configure a reverse proxy, or manage DNS records. You want a URL that points to your local machine, right now.
Localport gives you that in one command. When you're done, Ctrl+C and the URL disappears.
Works with any framework
It's free
The free tier includes HTTP, TCP, and TLS tunnels. No credit card, no trial expiration. Build first, upgrade if you need team features or custom domains.
Get started →