pw endpoints https
Serve a local HTTPS app as an endpoint
Synopsis
Serve a local app through the platform: the CLI dials out and registers a reverse tunnel, then forwards the session URL to your app until you exit.
Local dev servers (Next.js, Vite, etc.) see requests arriving from the public endpoint host rather than localhost, so their Hot Module Reload socket and dev-only routes are treated as cross-origin and may be blocked — the page loads but never finishes updating and the browser console shows repeated HMR WebSocket failures. Allow the endpoint host in your dev server's config to fix it (Next.js allowedDevOrigins, Vite server.allowedHosts).
Add --openai to expose a local OpenAI-compatible server (a /v1 endpoint such as vLLM or Ollama) as a model in the platform chat and AI providers. Use --auth-file if that server requires an API key.
pw endpoints https (PORT | SOCKET_PATH) [flags]Examples
pw endpoints https 5173
# Serve a local app listening on a Unix socket
pw endpoints https /tmp/app.sock
# Give it a name and open it in the browser
pw endpoints https --name my_app --open 3000
# Serve it publicly so anyone with the link can reach it without logging in
pw endpoints https --public 3000
# Expose a local OpenAI-compatible server (e.g. Ollama) as a chat model
pw endpoints https --openai --name my_llm 11434Options
--auth-file string File containing an Authorization header value or token to forward to the local app
--auth-scheme string Authorization scheme used when --auth-file contains only a raw token (default "Bearer")
--description string Session description (defaults to "Endpoint on <hostname>")
-h, --help help for https
--keep Keep the endpoint session on exit instead of deleting it
--link Stop the local server process listening on the target port when this command exits
-n, --name string Name for the endpoint session (defaults to a server-generated name)
--no-subdomain Skip subdomain assignment and use the path-based session URL
--open Open the endpoint URL in the browser
--openai Expose this endpoint as an OpenAI-compatible model in the platform chat and AI providers. Point it at a local /v1 server (vLLM, Ollama, etc.); pass --auth-file if that server needs an API key.
-o, --output string Output format (interactive, text); interactive shows a live dashboard and downgrades to text when stdout is not a terminal (default "interactive")
--public Make the endpoint publicly accessible: anyone with the link can reach it without logging in. Requires your organization to allow public sessions.
--rewrite-host string[="localhost"] Rewrite the Host header sent to your local app to this value (defaults to "localhost" when the flag is given without one). Use for an app that rejects the public endpoint host, such as a DNS-rebinding guard or an allowed-hosts check.
--slug string Session base-path slug (default "/")
--strip-path Strip the session URL prefix before forwarding to your app (use only if your app serves at the root path and can't be configured with a base path; by default the full path is forwarded so set your app's base path to the endpoint URL)
-s, --subdomain string Serve at this subdomain: a label (my-app), which lands on the platform's default sessions domain, or the full host under any registered sessions domain (my-app.<sessions domain>); a random subdomain is used by default when the platform supports themOptions inherited from parent commands
--context string The context to use. Overrides PW_CONTEXT environment variable and current context from config.
--platform-host string The Parallel Works ACTIVATE platform host to use. Will override any other platform host settings.
-v, --verbose Enable verbose loggingSEE ALSO
- pw endpoints - Create and serve self-registering endpoint sessions