FeaturesDocumentationPricingGet Started

Documentation

Get a public URL for your localhost in under 30 seconds.

Quick Start

LocalToLink requires Node.js 22.14 or later. Run this from your project directory:

npx localtolink

The CLI detects your running local app, creates a secure tunnel, and prints a public URL like https://k7m2x9p4q1.localtolink.com. Share that URL with anyone — traffic is forwarded to your localhost automatically.

Specify a Port

If you have multiple apps running, or auto-detection picks the wrong one, specify the port explicitly:

npx localtolink --port 5173

JSON Output

For scripts, CI pipelines, or AI agent integration, use --json for machine-readable output:

npx localtolink --json

{
  "status": "connected",
  "localPort": 5173,
  "url": "https://k7m2x9p4q1.localtolink.com",
  "websocketUrl": "wss://k7m2x9p4q1.localtolink.com",
  "expiresAt": "2026-09-04T18:00:00Z"
}

CLI Reference

FlagDescription
--port, -pLocal port to forward (default: auto-detect)
--jsonOutput machine-readable JSON to stdout
--serverControl API base URL (default: production)
--no-reconnectDisable automatic reconnection on disconnect
--helpShow help
--versionShow CLI version

Port Auto-Detection

When no port is specified, LocalToLink scans common development ports and running processes, then HTTP-probes each candidate to find your app:

3000, 3001, 4000, 4200, 5000, 5173, 5174, 8000, 8080, 8888, 9000

If multiple apps are detected and you are not in an interactive terminal, the CLI exits with an error. Use --port or run without --json to pick from a list.

Exit Codes

CodeMeaning
0Success (tunnel stopped normally)
1General error
2Configuration error
3Server unreachable
4No app found / multiple apps in JSON mode
5Policy denied (rate limit, kill switch, etc.)
6Version too old

Free Tier Limits

Anonymous tunnels are free and require no account. Sessions have time and bandwidth limits. See the Terms of Service for details.

Report Abuse

If you encounter suspicious content served through a LocalToLink tunnel, please submit an abuse report. We review all reports promptly.