Skip to main content

Expose Localhost to the Internet

Developers search for how to expose localhost when they need to share a work-in-progress app, test webhooks, or demo to someone who is not on their LAN. Asyx is a secure tunnel: your machine keeps running the app; Asyx provides a public HTTPS front door.

What “expose localhost” means

Your app binds to 127.0.0.1 or localhost so only your computer can reach it. A tunnel forwards traffic from a public URL to that local port. Visitors use HTTPS; your firewall stays closed; you control when the tunnel is on.

When a tunnel beats deploying

SituationTunnelFull deploy
Quick demo or PR preview✅ Minutes❌ Hours
Webhook callback testing✅ Stable URL⚠️ Staging env
AI agent built a local prototype✅ One command❌ Overkill
Production traffic at scale⚠️ Fair-use caps✅ Purpose-built

For validation and sharing, tunnels win on speed. For long-running production, deploy to your cloud when ready.

How Asyx does it

  1. Enrollasyx setup binds a device certificate and reserves https://<name>.tunnel.asyx.ai.
  2. Tunnelasyx tunnel --http --port <n> maps public HTTPS to your local port.
  3. Share — Send the URL; TLS and routing are handled automatically.
  4. StopCtrl+C closes the public route instantly.

Only your enrolled device can open tunnels. That is stronger than sharing a long-lived API key on a shared agent.

Quick start

npm install -g asyx
asyx setup
# start your app on port 3000, then:
asyx tunnel --http --port 3000

See Publish in 60 Seconds for a step-by-step walkthrough.

Security basics

  • TLS everywhere — Visitors connect over HTTPS.
  • Device-bound — Tunnel control requires your provisioned certificate.
  • Short-lived credentials — Session JWTs refresh in-band; no static tunnel secrets in git.
  • Optional access controlQuickpass can restrict who reaches a protected tunnel.

Common ports

StackTypical port
Next.js / React (Vite)3000, 5173
Flask / Django5000, 8000
Express3000, 8080
Static python -m http.server8000

Related guides

FAQ

Is exposing localhost safe?
You choose what port to publish and when the tunnel runs. Do not expose admin interfaces or databases without access controls. Use Quickpass when the demo should not be public.

Does Asyx replace ngrok or Cloudflare Tunnel?
For many dev and demo workflows, yes. See vs ngrok & Cloudflare for a developer-focused comparison or the security comparison for architecture depth.

Do I need port forwarding on my router?
No. Outbound connection from your machine is enough.

What are usage limits?
Fair-use caps apply on the free tier. Details appear in the console after you sign up.