Skip to content
All posts
4 min read

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.

aidevelopmenttutorial

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://localport.io/install.sh | sh

# Tunnel your app
localport http 3000 --token YOUR_TOKEN --region eu

You get a URL like https://my-application.eu.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 http 3000 --token YOUR_TOKEN
# Copy https://my-application.eu.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://my-application.eu.localport.dev/auth/callback. It stays the same across restarts, so you register it with Google once.

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, and 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, press Ctrl+C and the URL stops answering.

Works with any framework

Localport doesn't care what generated your code or what framework it uses. If it listens on a port, Localport can tunnel it, whether that's Next.js, FastAPI, Express, Django, Rails, or anything else.

What it costs#

Every plan includes HTTP, TCP and TLS tunnels at one flat price for the team, and every plan starts with a trial. See pricing.

Get started →