# Share localhost

Building on your laptop and want to see it on your phone, or show a client? One command gives your dev server a public HTTPS link:

```bash
npx hostedge share 5173
```

Use the port your dev server prints (Vite 5173, Next.js 3000, Astro 4321…). The terminal shows the link and a QR code: scan it with your phone's camera. Press **Ctrl+C** to close the link.

## Signed in or not

- **Signed in** (`hostedge login`): you get a link like `https://amber-cedar-ab12--share.hostedge.app`. It appears on your workspace's Projects page with a QR code, where teammates can open it and anyone with the Developer role can stop it. Links close after 2 hours on the Free plan and 8 hours on paid plans; Free has one open link at a time, Starter 2, Pro 5, Agency 20.
- **Not signed in**, or with `--quick`: you get an anonymous temporary link. It works without an account, has no uptime guarantee and closes with Ctrl+C.

## Dev servers that check the host

Vite, Next.js and others refuse requests for unknown hostnames. HostEdge sends your dev server `Host: localhost`, so it works without changing its config. To send something else, use `--host-header`:

```bash
npx hostedge share 3000 --host-header myapp.test
```

## How it works

The CLI runs a small open-source tunnel helper on your machine (it uses one on your `PATH`, or downloads it once to `~/.hostedge/bin`). It opens an outbound connection, so nothing on your computer is exposed except that one port, and no firewall or router changes are needed. Anyone with the link can open your dev server while it runs, so do not share links to anything private.
