xport <port>
xport 3000Registers a tunnel session on the configured relay and prints the public URL. The session stays alive until you stop the command (Ctrl-C) or it expires.
Example output:
Forwarding: https://k7fz2.xport.sh → http://localhost:3000Expires: 2026-10-19 13:05:14 CETPress Ctrl-C to stop.How it works
Section titled “How it works”- The CLI opens a WebSocket to the relay’s control endpoint
(
relay.url, default: local development relay athttp://localhost:8080). - It sends a
registermessage; the relay assigns a random name and replies with the public URL. - A heartbeat keeps the session alive until you stop the command.
Options
Section titled “Options”All persistent options apply: --name, --domain, --policy-file, --expires,
--password, --qr, --copy, --rewrite, --detach, --json.
Absolute URLs (WordPress and friends)
Section titled “Absolute URLs (WordPress and friends)”Apps that generate absolute URLs from their configured base URL — most notably WordPress — serve CSS, JS and links pointing at the local address, so a tunnel shows an unstyled page. Two ways out:
-
xport 3000 --rewriterewrites responses on the fly:Locationheaders always, and bodies of HTML, CSS, JS, JSON, SVG and other text types, replacing the local target’s origin (e.g.http://localhost:8080) with the public URL — including protocol-relative//localhost:8080references. Binary and pre-compressed responses pass through unchanged. Also settable per endpoint (rewrite: true) or as a default in the config (tunnel.rewrite: true). -
Teach the app the public host. The tunnel preserves the public
Hostheader, so for WordPress thiswp-config.phpsnippet (above the “That’s all” line) makes every generated URL absolute-correct:define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST']);define('WP_SITEURL', WP_HOME);
Both approaches leave absolute URLs saved inside post content untouched — regenerate or rewrite those in the database if you need them.

