Skip to main content
troqcloud A route in troqcloud is the configuration record that connects a public hostname to a deployed application. When you create a route, the platform’s proxy picks it up and starts forwarding traffic from that hostname to the app’s upstream URL. Routes also carry optional policy configuration for security headers, CORS, middleware, and routing rules. TLS certificate management is handled separately and is not yet available through the CLI. The commands documented here cover everything up to that boundary: route lifecycle, proxy policy, and operational inspection.

Creating and Updating a Route

troq routes upsert creates a new route or updates an existing one. The command is idempotent by route ID: running it again with the same --route-id updates the existing record rather than creating a duplicate. The minimum required fields are a route ID, an app ID, an upstream URL, and at least one hostname.
Multiple hostnames can be attached to a single route by repeating --hostname:
--strip-prefix removes a path prefix before forwarding the request to the upstream. This is useful when the app is mounted at a subpath but expects requests at the root:
--expected-version can be passed for optimistic concurrency control. If the current route version does not match, the upsert is rejected. This prevents overwriting a route that was modified between when you read it and when you write it.

Listing Routes

troq routes list returns all routes in the active workspace. You can filter by app with --app-id.

Route Status

troq routes status shows the current apply state of a single route, including whether it has been picked up by the proxy and any pending changes.

Effective Configuration

troq routes effective-config returns a summary of the merged route configuration currently active on the proxy, including the total route count, the configuration fingerprint, and apply statistics. This is useful for verifying that a recent upsert has been applied and how long it took.

Apply Errors

troq routes apply-errors lists the most recent route configuration errors that the proxy encountered during apply. If a route upsert appears to have no effect, this command shows whether an error was recorded during processing.

Route History

troq routes history-query returns the change history for routes in the workspace. You can narrow by app or by a specific route ID.

Deleting a Route

troq routes delete removes a single route by ID. This is a confirmed operation.
After deletion, the proxy stops forwarding traffic for the hostnames that were attached to that route. If the app is still running but all its routes are deleted, it becomes unreachable from the public internet until a new route is created.

Decommissioning Routes for an App

troq routes decommission removes all routes associated with a given app in the workspace. This is the right command when you are retiring an application entirely and want to clean up its proxy configuration in one step rather than deleting routes one by one.
You can also pass --route-id to decommission a single route through this path, which behaves like delete but goes through the decommission flow.

Security Headers

Security headers are set per route through flags on upsert. They are applied by the proxy to every response on that route.
The --security-allowed-method flag restricts which HTTP methods the proxy accepts on this route. Requests with other methods are rejected before reaching the upstream.

CORS

CORS policy is configured through the --cors-* flags on upsert. The proxy handles CORS preflight responses and injects the appropriate headers on all responses matching the route.

Middleware

Middleware flags control request and response header manipulation, rate limiting, IP filtering, and auth forwarding. They are all applied at the proxy layer before the request reaches the upstream.
--middleware-auth-forward-url enables auth forwarding: the proxy sends each incoming request to the specified URL for authorization before forwarding to the upstream. If the auth endpoint returns a non-2xx response, the request is rejected.

Routing Policy

Routing policy controls how the proxy selects upstreams, handles retries, and matches requests to routes. --routing-upstream-target allows weighted load balancing across multiple upstream URLs. Each target is specified as URL@WEIGHT, where weight defaults to 1 if omitted.
This sends 70% of traffic to v1 and 30% to v2, which is the standard pattern for gradual rollouts. --routing-path-prefix restricts the route to requests matching specific path prefixes. --routing-header-equals and --routing-query-equals further narrow matching by request header or query parameter values. Retry configuration:
Active health checking:
Sticky sessions route repeat visitors to the same upstream based on a cookie value:

TLS Configuration

TLS certificate provisioning and mode configuration exist in the route policy model (--tls-mode, --tls-cert-mode) but are not yet enforced through the CLI. This section will be completed when TLS management is available end-to-end through troq routes. For now, TLS configuration should be managed through the platform web interface.

Output Formats

All routes commands support --output table, --output json, and --output jsonl.

Permission Requirements

Read operations (list, status, effective-config, apply-errors, history-query) require routes.read. Write operations (upsert, delete, decommission) require routes.write. You can verify your access with:
Last Updated: 2026-05-11