Turn localhost into a public HTTPS link.

portlight

Portlight makes your local app reachable from the internet. If it is on localhost:3000, expose port 3000 and share the URL it prints.

$ portlight expose --port 3000
Exposed http://127.0.0.1:3000 as https://demo.portlight.616.pub
Press Ctrl+C to stop.

Downloads

Install, then expose a local port or directory.

Use the install command below. Set PORTLIGHT_TOKEN or pass --token, then run portlight expose for an app or portlight serve for files.

Loading release info... Verified downloads
Already installed? portlight update checks for a newer release. portlight uninstall removes the CLI.

Agent workflows

Give agents the URL, not your localhost.

Remote coding agents and remote-controlled browsers cannot always reach your private localhost. Give them a portlight URL when they need to inspect a preview, receive a callback, or call a local service.

$ portlight skill
$ portlight expose --port 3000 --json
$ portlight serve --json
Abstract agent workflow routed from a terminal to browser and webhook targets
Copy for another agent
Use portlight when you need a public HTTPS URL for a local HTTP service.

If portlight is already installed, run `portlight skill` for the full agent guide.

If portlight is missing, install it:
macOS/Linux: curl -fsSL https://portlight.616.pub/install.sh | sh
Windows PowerShell: irm https://portlight.616.pub/install.ps1 | iex

Use PORTLIGHT_TOKEN if it is already set. If the user gives you a token, pass it with --token <token> or set PORTLIGHT_TOKEN for this shell.

Start the local service first, then run:
portlight expose --port <port> --ttl 30m --json

If you only need to share files from a directory, run this inside that directory instead:
portlight serve --ttl 30m --json

Read the JSON ready event and use the url field. Keep the command running while the URL is needed. Stop the process, or wait for TTL, to close the URL. Do not print the token in logs.

What it is for

Use it when localhost needs to be reachable.

Previews, webhooks, file handoffs, and agents often need a real HTTPS URL. Portlight gives one to your local app or directory.

Previews

Open a local app on another device or embed it in a preview iframe.

File handoffs

Serve a directory with listing and share it in one command.

Webhook testing

Receive callbacks while your app runs on your machine.

Automation

Return JSON when CI or an agent needs to capture the URL.

Usage

The basic flow is one token and one command.

Start your app as usual, or let portlight serve a directory for you. Keep the command running while the URL should work.

01

Provide the token

# macOS / Linux
export PORTLIGHT_TOKEN=<token>

# Windows PowerShell
$env:PORTLIGHT_TOKEN='<token>'

# Or pass it directly
portlight expose --token <token> ...
02

Expose or serve

portlight expose --port 3000 --ttl 30m

portlight serve --dir ./public --ttl 30m
03

Share the URL

https://name.portlight.616.pub

Self-hosting

Run your own endpoint when you need control.

Use the hosted server for quick work, or deploy your own endpoint for team and private infrastructure. Expose only services you intend to share.

Before launch

  • Base and wildcard DNS point to the server.
  • HTTPS is enabled for the base and wildcard domains.
  • Control endpoints use a long private token.
  • Docker or systemd restarts the service if it exits.

Current limits

  • HTTP only.
  • URLs live while the CLI is running.
  • Hidden files are skipped by serve.
  • No account dashboard.