routeup expose
routeup expose opens a public tunnel without registering or holding a new
local route.
Run routeup setup before first use so the local agent and machine setup exist.
An explicit route name is literal. When it is omitted, routeup uses
ROUTEUP_NAME, config name, then the working-directory basename.
If no --port, --target, or ROUTEUP_PORT override is supplied, it first
looks for an active local route with the same name and reuses that route’s
targets. If no matching active route exists, it resolves targets from flags,
environment, or project config.
routeup expose example-app --port 8080With an explicit or config-only target, the exposure is public-only: it does not
create or advertise https://example-app.localhost. When it reuses an existing active
route, it also prints that route’s local URL.
Example output for an explicit target:
This example assumes a root-tier token allowing *.routeup.dev.
public: https://example-app.routeup.devtargets: / http://localhost:8080expose: all paths
press Ctrl-C to stoprouteup serve example-app --port 8080 --expose is different: serve first registers
and holds the local route, then exposes those same targets publicly. --expose
can also be written as --public.
--port <n> root target port--target </path=port> path target; repeat for multiple targets--server <url> public-server control URL--token <secret> server token--random generate a random route name--json write one ready event as JSON--qr print a terminal QR code for the public URL--json and --qr are mutually exclusive.
Automation output
Section titled “Automation output”Use --json for a pure machine-readable ready event:
{"event":"ready","route":"example-app","public_url":"https://example-app.routeup.dev","targets":[{"path":"/","port":8080}]}The command continues holding and reconciling the exposure after writing the
single ready event. It restores the tunnel after an agent restart and remains
attached until Ctrl-C or termination. routeup stop does not control standalone
exposures.
Random public names
Section titled “Random public names”Use --random to generate a random route name. The server places its normalized
public label under the granted namespace:
routeup expose --random --port 8080Without a token, this uses the server’s public namespace when one is enabled and the resulting claim is session-only. With a token, the random label is placed under the token’s allowed namespace.
Server and token
Section titled “Server and token”Pass the server and token directly:
routeup expose example-app --port 8080 --server https://edge.routeup.dev --token sk_routeup_xxxOr configure them once:
routeup setup --server https://edge.routeup.dev --token sk_routeup_xxxrouteup expose example-app --port 8080Environment variables work too:
export ROUTEUP_SERVER=https://edge.routeup.devexport ROUTEUP_TOKEN=sk_routeup_xxxrouteup expose example-app --port 8080