Skip to content

Exposing publicly

Public exposure sends requests through a routeup server and back to your local agent over an outbound tunnel. Your app still listens only on a local port.

You need a public-server control URL. For the hosted service, use https://edge.routeup.dev. The server grants public URLs under routeup.dev, such as https://example-app.routeup.dev. A reusable named URL also requires a token; without one, exposure works only when the server enables a token-less public namespace.

The named examples below assume a root-tier token that allows *.routeup.dev. A personal namespace token such as *.mukul.routeup.dev would grant https://example-app.mukul.routeup.dev instead. A public address is reachable only while its tunnel is connected.

You can save both during setup:

Terminal window
routeup setup --server https://edge.routeup.dev --token sk_routeup_xxx

Or pass them per command:

Terminal window
routeup serve example-app --port 8080 --server https://edge.routeup.dev --token sk_routeup_xxx --expose
Terminal window
routeup serve example-app --port 8080 --expose

The command prints the local route, the public URL, the exposed path scope, and the resolved targets. It holds both the local route and public tunnel until you press Ctrl-C.

route: example-app
local: https://example-app.localhost
public: https://example-app.routeup.dev
expose: all paths
targets:
/ http://localhost:8080
press Ctrl-C to stop

Local route names may be dotted, such as api.example-app. Public hosts must be one label under their namespace, so routeup normalizes dots to hyphens when exposing: local route api.example-app becomes public label api-example-app.

Do not include https:// or the public suffix in the route name. Pass example-app, not https://example-app.routeup.dev.

--random generates a random route name. Without a token, a server’s public namespace makes that claim session-only:

Terminal window
routeup serve --random --port 8080 --server https://edge.routeup.dev --expose

On the hosted server, random token-less names are under try.routeup.dev:

route: lively-otter-4f2
local: https://lively-otter-4f2.localhost
public: https://lively-otter-4f2.try.routeup.dev
expose: all paths
targets:
/ http://localhost:8080
press Ctrl-C to stop

By default, public exposure forwards every path on the route. To expose only a webhook prefix, set expose.paths in project config:

{
"name": "example-app",
"port": 8080,
"expose": {
"paths": ["/api/webhooks/*"]
}
}

Then run:

Terminal window
routeup serve --expose

Requests to https://example-app.routeup.dev/api/webhooks/... are public; other paths stay local-only.