Files
coder/docs/admin/users/quotas.md
T
Nick Vigilante bc77c40296 docs: add front-matter titles to mechanical and no-H1 pages (Phase 3) (#28030)
## Summary

**Batch A of Phase 3** of the H1 → front-matter migration (`DOCS-484`;
parent `DOCS-477`). Adds a front-matter `title` to every navigable docs
page whose title can be migrated **mechanically**, with no editorial
judgment.

This is the content step that Phase 1 (renderers prefer front-matter
title, `DOCS-482`) and Phase 2 (tooling + generators front-matter-aware,
`DOCS-483`) unblocked. Both are merged; coder.com #964/#974 are merged
and live.

**Rendered no-op.** The renderers already resolve the page title from
the manifest and hide the leading body H1 (Phase 1), so no page changes
visually. This just moves the title into front matter where Fumadocs and
the migrated tooling can read it.

## What's in this batch

Dry-run on `main` (464 navigable pages) splits into:

| category | count | this PR |
|----------|-------|---------|
| already has front-matter title (Reference, from Phase 2 generators) |
196 | skipped (idempotent) |
| **mechanical** — leading body H1 equals the manifest label | 138 | ✅
add front-matter `title`, drop the duplicate H1 |
| **no body H1** — renders under the manifest label only | 4 | ✅ add
front-matter `title` only |
| **mismatch** — body H1 differs from the manifest label | 126 | ⏭️
deferred (needs an editorial decision, see below) |

142 files changed, all under `docs/`.

## Deliberately out of scope: the 126 mismatches

Pages where the body H1 is richer than the short sidebar label (e.g.
label **Modules** / H1 *Contributing modules*, label **Install** / H1
*Installing Coder*) need a canonical-title decision, not a script. A few
even look like the body H1 is the redundant one (`install/cli.md` and
`install/index.md` both carry the H1 *Installing Coder*). These will
land in follow-up batches **by nav section** once the policy is set, so
each gets real review.

## Verification

AI was the primary author of this PR (see disclosure below); per the [AI
Contribution
Guidelines](https://coder.com/docs/about/contributing/AI_CONTRIBUTING)
here is the manual verification.

- Every added front-matter block parses as YAML and its `title`
round-trips to the manifest label (checked programmatically across all
142 files).
- Every removed line is a leading `# H1` that equalled the manifest
title; no body prose was reflowed. Front matter is correctly hoisted
above pre-existing `<!-- markdownlint-disable -->` comments on the two
pages that had them.
- `pnpm check-docs` (markdownlint-cli2 + table formatter) passes on the
changed set: `Summary: 0 error(s)`. `MD041` stays off (re-enabled in
Phase 4); `MD025` is not tripped because the duplicate body H1s are
removed.

```
$ pnpm exec markdownlint-cli2 $(git diff --name-only origin/main)
Linting: 142 file(s)
Summary: 0 error(s)
```

Linear: DOCS-484

> This PR was created with AI assistance (Coder Agents).
2026-08-27 12:34:13 -04:00

3.6 KiB

title
title
Quotas

Quotas are a mechanism for controlling spend by associating costs with workspace templates and assigning budgets to users. Users that exceed their budget will be blocked from launching more workspaces until they either delete their other workspaces or get their budget extended.

For example: A template is configured with a cost of 5 credits per day, and the user is granted 15 credits, which can be consumed by both started and stopped workspaces. This budget limits the user to 3 concurrent workspaces.

Quotas are scoped to Groups in Enterprise and organizations in Premium.

Definitions

  • Credits is the fundamental unit representing cost in the quota system. This integer can be arbitrary, or it can map to your preferred currency.
  • Budget is the per-user, enforced, upper limit to credit spend.
  • Allowance is a grant of credits to the budget.

Establishing Costs

Templates describe their cost through the daily_cost attribute in resource_metadata. Since costs are associated with resources, an offline workspace may consume less quota than an online workspace.

A common use case is separating costs for a persistent volume and ephemeral compute:

resource "docker_volume" "home_volume" {
  name = "coder-${data.coder_workspace_owner.me.name}-${data.coder_workspace.me.name}-root"
}

resource "coder_metadata" "home_volume" {
    resource_id = docker_volume.home_volume.id
    daily_cost  = 10
}

resource "docker_container" "workspace" {
  count = data.coder_workspace.me.start_count
  image = "codercom/code-server:latest"
  ...
  volumes {
    container_path = "/home/coder/"
    volume_name    = docker_volume.home_volume.name
    read_only      = false
  }
}

resource "coder_metadata" "workspace" {
    count       = data.coder_workspace.me.start_count
    resource_id = docker_container.workspace.id
    daily_cost  = 20
}

When the workspace above is shut down, the docker_container and coder_metadata both get deleted. This reduces the cost from 30 credits to 10 credits.

Resources without a daily_cost value are considered to cost 0. If the cost was removed on the docker_volume above, the template would consume 0 credits when it's offline. This technique is good for incentivizing users to shut down their unused workspaces and freeing up compute in the cluster.

Establishing Budgets

Each group has a configurable Quota Allowance. A user's budget is calculated as the sum of their allowances.

group-settings

For example:

Group Name Quota Allowance
Frontend 10
Backend 20
Data 30

Username Groups Effective Budget
jill Frontend, Backend 30
jack Backend, Data 50
sam Data 30
alex Frontend 10

By default, groups are assumed to have a default allowance of 0.

Quota Enforcement

Coder enforces Quota on workspace start and stop operations. The workspace build process dynamically calculates costs, so quota violation fails builds as opposed to failing the build-triggering operation. For example, the Workspace Create Form will never get held up by quota enforcement.

build-log

Up next