Skip to content

routeup serve

routeup serve registers a route with the local agent and reverse-proxies it to one or more targets you are already running. The route is local by default; add --expose to expose the same targets through a routeup server.

Terminal window
routeup serve example-app --port 8080

Opens https://example-app.localhost. The command holds the route until you press Ctrl-C.

Terminal window
routeup serve # use the name + port from config
routeup serve example-app --port 8080 # bare name, scoped by the project name
routeup serve api.example-app --port 8080 # literal dotted route
routeup serve example-app --port 8080 --expose # also expose publicly

The route name comes from the first source that is set:

  1. The positional argument (routeup serve example-app).
  2. ROUTEUP_NAME.
  3. The name field in routeup.json or the package.json routeup block.

For a positional argument, a name containing a dot is taken literally (api.example-app → route api.example-app). A positional bare name is prefixed with the project name from config (project example-app + apiapi.example-app). With no project in scope, a bare positional name is used as-is. Environment and config names are literal. See Name resolution.

--port <n> root target port (required when no target is configured)
--target </path=port> path target; repeat for multiple targets
--expose also expose the route through the server
--public alias for --expose
--server <url> public-server control URL
--token <secret> server token
--random generate a random route name

Without --expose, the route is served only by the local agent over *.localhost: no server, token, or network is involved. With --expose, serve keeps that local registration and also opens an outbound tunnel for the same targets.

Standalone routeup expose reuses a matching active route when available. If there is no active route, it resolves targets from flags, environment, or config and attempts to register a local route for the exposure session as well.

Dotted local names are normalized to one public label: api.example-app remains https://api.example-app.localhost locally and is requested as public label api-example-app. See Exposing publicly.

If the route is already claimed on this machine, serve fails closed and prints the owning process and its working directory. Stop the holding process and retry, or use a different route name.