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
description: Run Headroom in containers, CI, serverless, or read-only deployments with explicit capability degradation.
4
+
---
5
+
6
+
Detached mode is Headroom's contract for deployments where local writable state is absent or intentionally disabled.
7
+
8
+
Use it for stateless containers, read-only filesystems, ephemeral CI runners, serverless processes, and load-balanced fleets where local process state should not be treated as durable.
9
+
10
+
## Enable detached mode
11
+
12
+
```bash
13
+
HEADROOM_STATELESS=true headroom proxy
14
+
```
15
+
16
+
or:
17
+
18
+
```bash
19
+
headroom proxy --stateless
20
+
```
21
+
22
+
`--stateless` disables avoidable filesystem writes such as proxy file logging, local TOIN persistence, memory, learning, and telemetry beacon lock files. Request handling and compression continue to run.
23
+
24
+
## Profiles
25
+
26
+
Set `HEADROOM_DETACHED_PROFILE` or pass `--detached-profile`:
27
+
28
+
| Profile | Behavior |
29
+
|---|---|
30
+
|`lenient`| Default. Start the proxy and log the capability matrix when detached. |
31
+
|`strict`| Refuse startup when an explicitly enabled required local-state feature would degrade, such as `--memory` without available local state or a remote backend. |
32
+
|`silent`| Start the proxy without startup degradation logs. `/capabilities`, `/stats`, `/health`, and `/metrics` still expose the matrix. |
33
+
34
+
```bash
35
+
HEADROOM_STATELESS=true \
36
+
HEADROOM_DETACHED_PROFILE=strict \
37
+
headroom proxy
38
+
```
39
+
40
+
## Capability endpoint
41
+
42
+
```bash
43
+
curl http://localhost:8787/capabilities
44
+
```
45
+
46
+
The response includes `detached`, `profile`, local-state availability, every feature's local-state dependency, current state, degradation mode, and strict-mode violations.
47
+
48
+
## Metrics
49
+
50
+
The Prometheus endpoint exposes one gauge per feature:
`headroom_feature_enabled` mirrors the `/capabilities` payload. Use it to alert when an expected feature is degraded or disabled in detached/stateless deployments.
Copy file name to clipboardExpand all lines: docs/content/docs/proxy.mdx
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,12 @@ headroom proxy \
22
22
23
23
Telemetry is enabled by default. Opt out with `HEADROOM_TELEMETRY=off` or `--no-telemetry`.
24
24
25
+
For read-only, container, CI, serverless, or load-balanced deployments, use [Detached Mode](/docs/detached-mode) to make local-state degradation explicit:
0 commit comments