You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add unauthenticated and proxied port options to preview environments (#541)
* docs: add proxied: false documentation for preview environments
* docs: strengthen proxied: false as last-resort, recommend unauthenticated: true first
* docs: add unauthenticated: true documentation for public ports
* docs: fix proxied: false use cases to reflect HTTPS-only sandbox
* docs: add API endpoints as primary unauthenticated use case
* docs: add API port to unauthenticated example
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Copy file name to clipboardExpand all lines: docs/roo-code-cloud/environments.mdx
+66-1Lines changed: 66 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ keywords:
14
14
- mise
15
15
- Initial Path
16
16
- Subdomain Routing
17
+
- Proxied Ports
18
+
- Direct Port Access
17
19
---
18
20
19
21
# Preview Environments
@@ -91,6 +93,8 @@ ports:
91
93
|-------|-------------|----------|
92
94
| `name` | Identifier for the port (used to generate environment variables) | Yes |
93
95
| `port` | The port number to expose | Yes |
96
+
| `unauthenticated` | Skip authentication for this port's preview URL (`false` by default). See [Public Ports](#public-ports-unauthenticated) | No |
97
+
| `proxied` | Whether traffic goes through the auth proxy (`true` by default). Set to `false` for direct port access (see [Direct Port Access](#direct-port-access-non-proxied)) | No |
94
98
| `initial_path` | Default path to append to the preview URL | No |
95
99
| `subdomain` | Subdomain to set on the `Host` header when forwarding requests to the app | No |
96
100
@@ -113,7 +117,10 @@ The name is converted to uppercase for the environment variable (e.g., `web` bec
113
117
114
118
### Limits
115
119
116
-
You can configure up to **4 named ports** per environment.
120
+
Port limits depend on whether ports are proxied (default) or non-proxied:
121
+
122
+
- **Proxied ports** (default): up to **10** per environment. These share a single internal port slot via multiplexing.
123
+
- **Non-proxied ports** (`proxied: false`): up to **1** per environment. Each non-proxied port consumes a dedicated port slot.
117
124
118
125
### Initial Path
119
126
@@ -189,6 +196,64 @@ Invalid examples:
189
196
- **Admin panels**: Serve an admin interface on `admin.localhost:3000` while the main app runs on the root domain
190
197
- **Subdomain APIs**: Frameworks like Rails can use `api.localhost:3000` to route API requests to a separate controller namespace
191
198
199
+
### Public Ports (Unauthenticated)
200
+
201
+
By default, all preview URLs require authentication -- visitors must be signed in to your Roo Code Cloud organization to access them. Setting `unauthenticated: true` on a port disables this auth check while keeping the proxy layer intact.
202
+
203
+
```yaml
204
+
ports:
205
+
- name: WEB
206
+
port: 3000
207
+
- name: API
208
+
port: 3001
209
+
unauthenticated: true
210
+
- name: WEBHOOK
211
+
port: 3002
212
+
unauthenticated: true
213
+
```
214
+
215
+
Use `unauthenticated: true` when you need:
216
+
217
+
- **API endpoints** that your frontend or external clients call directly (the auth proxy would otherwise block non-browser requests)
218
+
- **Webhook receivers** that need to accept requests from external services (e.g., Stripe, GitHub)
219
+
- **Public-facing endpoints** like documentation sites or landing pages
220
+
- **Health checks** or status pages accessed by monitoring tools
221
+
222
+
The port still goes through the proxy, so it benefits from HTTPS termination and domain routing. Only the authentication requirement is removed.
223
+
224
+
### Direct Port Access (Non-Proxied)
225
+
226
+
By default, all ports are proxied through an authentication layer that validates requests before forwarding them to your application. Setting `proxied: false` bypasses this proxy entirely and exposes the port directly on the sandbox domain.
227
+
228
+
:::tip[Try `unauthenticated: true` first]
229
+
If you just need to skip authentication (e.g., for a public-facing endpoint or webhook), use `unauthenticated: true` instead. It keeps the proxy in place while disabling the auth check, and doesn't count against the stricter non-proxied port limit. Only reach for `proxied: false` when the proxy itself is the problem.
230
+
:::
231
+
232
+
```yaml
233
+
ports:
234
+
- name: WEB
235
+
port: 3000
236
+
- name: METRICS
237
+
port: 9090
238
+
proxied: false
239
+
```
240
+
241
+
Use `proxied: false` only when the proxy layer itself is incompatible with your use case:
242
+
243
+
- **WebSocket or streaming connections** that are disrupted by the proxy intermediary
244
+
- **Services with custom connection handling** that conflict with the proxy's request processing
245
+
246
+
:::warning[Warning]
247
+
When `proxied` is `false`, the port is **completely exposed without authentication**, regardless of the `unauthenticated` setting. Non-proxied ports also count against a stricter limit (1 per environment vs. 10 for proxied ports). Only use this as a last resort when other options don't work.
248
+
:::
249
+
250
+
The `ROO_<NAME>_HOST` environment variable for a non-proxied port points to the direct sandbox domain instead of the preview proxy URL. Your application code doesn't need to change -- just use the injected variable as usual:
251
+
252
+
```typescript
253
+
// Works the same whether the port is proxied or not
0 commit comments