npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

localhostforonline

v1.9.0

Published

Expose your localhost to the internet

Readme

localhostforonline

npm version

Expose your local development server to the internet in seconds. No configuration, no DNS setup, no TLS certificates — just a single command.

npx localhostforonline --port 3000

Quick start

# Expose a local HTTP server on port 3000
npx localhostforonline --port 3000

# Output:
# Tunnel created!
# ✓ Your URL: https://a1b2c3d4-e5f6-7890-abcd-ef1234567890.localhostfor.online
# ✓ Local:    localhost:3000
# ✓ Logs:     https://localhostfor.online/dashboard?session=a1b2c3d4-e5f6-7890-abcd-ef1234567890

Open the generated URL in your browser — your local app is now online.


How it works

Visitor → localhostfor.online (edge proxy) → secure tunnel → your machine (localhost:3000)
  1. You start a tunnel from your machine to localhostfor.online
  2. The platform generates a unique public URL: https://<uuid>.localhostfor.online
  3. Anyone with that URL can access your local server through the tunnel
  4. All requests are logged in real time to your dashboard

Features

Secure tunnels

All traffic is encrypted end-to-end via TLS. Your local server is never directly exposed to the public internet. HTTPS by default.

Live dashboard

Monitor every request in real time:

  • Stats: Total requests, bandwidth, average latency, tunnel status
  • Request log: Method, URL, status code, size, duration — for every request
  • Request details: Expand any request to see full headers and body (request + response)
  • Tunnel history: All tunnels you've created, with quick access to their logs

Access the dashboard

WebSocket support

Full-duplex communication, auto-detected — no extra flags needed. When the server detects an Upgrade: websocket header, it automatically upgrades to WebSocket forwarding.

Custom subdomains

Reserve a custom subdomain for your tunnel to get a predictable, shareable URL:

npx localhostforonline --port 3000 --subdomain my-app
# → https://my-app.localhostfor.online

TCP forwarding

Raw TCP support for any protocol — SSH, databases, SMTP, and more:

npx localhostforonline --port 22 --tcp

API keys & account

Link your tunnels to an account for permanent history and management:

  1. Log in at https://localhostfor.online/login with your Google account
  2. Run localhostforonline login in your terminal
  3. Start a tunnel:
    npx localhostforonline --port 3000

Anonymous access

Even without an account, anyone with a tunnel URL can view its request history:

https://localhostfor.online/dashboard?session=<uuid>

CLI commands

Root command — Start a tunnel

localhostforonline [flags]

Exposes a local port to the internet. Supports HTTP, WebSocket, and TCP.

login — Authenticate the CLI

localhostforonline login

Opens a browser window for Google OAuth and persists your API key to ~/.localhostfor/config.yaml.

Use localhostforonline login --no-browser to print the authentication URL instead of opening a browser.

whoami — Show current user

localhostforonline whoami

CLI flags

| Flag | Type | Description | |------|------|-------------| | --port | int | Local port to expose (e.g. 3000) | | --url | string | Full local URL (e.g. http://localhost:8080) | | --subdomain | string | Reserve a custom subdomain for your tunnel (requires login) | | --host-header | string | Rewrite Host header (rewrite = set to localhost:<port>) | | --tcp | bool | Enable raw TCP forwarding (allocates a dedicated port) | | --dev | bool | Force dev mode (auto-detected for Next.js) |

Either --port or --url is required, but not both.


Output format

Tunnel created!
✓ Your URL: https://a1b2c3d4-e5f6-7890-abcd-ef1234567890.localhostfor.online
✓ Local:    localhost:3000
✓ Logs:     https://localhostfor.online/dashboard?session=a1b2c3d4-e5f6-7890-abcd-ef1234567890
✓ TCP Port: 20000               (only when using --tcp)
Press Ctrl+C to stop

When using a custom subdomain, the logs URL becomes:

✓ Logs: https://localhostfor.online/subdomains/my-app/logs

Protocol support

| Protocol | How | Example | |----------|-----|---------| | HTTP (default) | All methods: GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, CONNECT | npx localhostforonline --port 3000 | | WebSocket | Auto-detected via Upgrade: websocket header | Same command — no extra flags | | TCP | Dedicated TCP port for raw byte relay | npx localhostforonline --port 22 --tcp |


TCP forwarding

When using --tcp, the server allocates a dedicated TCP port. Connect by sending the 36-byte project UUID (without the project- prefix) first, then your raw data:

# Expose SSH
npx localhostforonline --port 22 --tcp

# Connect from another terminal
printf 'a1b2c3d4-e5f6-7890-abcd-ef1234567890' | nc localhostfor.online 20000

Installation

Via npx (no install required)

npx localhostforonline --port 3000

Via global npm

npm install -g localhostforonline
localhostforonline --port 3000

Platform

Website

https://localhostfor.online

  • / — Landing page with documentation
  • /onboarding — Get started and create an account
  • /dashboard — Tunnel list and request history
  • /dashboard?session=<uuid> — Request log for a specific tunnel
  • /login — Sign in with Google to get an API key
  • /account — Your account details

Need help?

For consultation or help becoming a tech provider, contact us on WhatsApp: +55 11 96743-5133