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
Copy file name to clipboardExpand all lines: docs/roo-code-cloud/environments.mdx
+36-1Lines changed: 36 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,7 @@ 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
+
| `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
97
| `initial_path` | Default path to append to the preview URL | No |
95
98
| `subdomain` | Subdomain to set on the `Host` header when forwarding requests to the app | No |
96
99
@@ -113,7 +116,10 @@ The name is converted to uppercase for the environment variable (e.g., `web` bec
113
116
114
117
### Limits
115
118
116
-
You can configure up to **4 named ports** per environment.
119
+
Port limits depend on whether ports are proxied (default) or non-proxied:
120
+
121
+
- **Proxied ports** (default): up to **10** per environment. These share a single internal port slot via multiplexing.
122
+
- **Non-proxied ports** (`proxied: false`): up to **1** per environment. Each non-proxied port consumes a dedicated port slot.
117
123
118
124
### Initial Path
119
125
@@ -189,6 +195,35 @@ Invalid examples:
189
195
- **Admin panels**: Serve an admin interface on `admin.localhost:3000` while the main app runs on the root domain
190
196
- **Subdomain APIs**: Frameworks like Rails can use `api.localhost:3000` to route API requests to a separate controller namespace
191
197
198
+
### Direct Port Access (Non-Proxied)
199
+
200
+
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 and exposes the port directly on the sandbox domain.
201
+
202
+
```yaml
203
+
ports:
204
+
- name: WEB
205
+
port: 3000
206
+
- name: METRICS
207
+
port: 9090
208
+
proxied: false
209
+
```
210
+
211
+
Use `proxied: false` when you need:
212
+
213
+
- **Direct socket access** for protocols that don't work well through the HTTP proxy
214
+
- **Internal services** that handle their own authentication or don't need external access control
215
+
216
+
:::warning[Warning]
217
+
When `proxied` is `false`, the port is **completely exposed without authentication**, regardless of the `unauthenticated` setting. Only use this for ports that either handle their own security or don't serve sensitive content.
218
+
:::
219
+
220
+
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:
221
+
222
+
```typescript
223
+
// Works the same whether the port is proxied or not
0 commit comments