## Summary
The VM and Docker examples on the external provisioners page set
`CODER_SESSION_TOKEN`, so a reader who follows the page's recommended
scoped-key path and pastes a key from `coder provisioner keys create`
gets an auth failure.
This switches both examples to `CODER_PROVISIONER_DAEMON_KEY`, which
matches the Scoped Key and Helm sections on the same page.
Fixes#30066
## Changes
- `docs/install/operate/provisioners/index.md`: the VM and Docker
examples now set `CODER_PROVISIONER_DAEMON_KEY=<your-provisioner-key>`,
with one line explaining where the key comes from and that a user token
still works through `CODER_SESSION_TOKEN`.
## Testing
- Ran a throwaway CLI test (not committed) against `enterprise/cli` with
a real provisioner key:
- `CODER_SESSION_TOKEN=<provisioner key> coder provisioner start` fails
with `must provide a pre-shared key or provisioner key when not
authenticated as a user`.
- `CODER_PROVISIONER_DAEMON_KEY=<provisioner key> coder provisioner
start` logs `starting provisioner daemon`.
- `markdownlint-cli2`, Vale, `make lint/emdash`, `make lint/docs-html`,
and `make lint/docs-manifest` pass.
<details>
<summary>Investigation notes</summary>
- Provisioner keys and session tokens travel in different headers:
`Coder-Provisioner-Daemon-Key` (`codersdk/client.go`) versus
`Coder-Session-Token`.
`coder provisioner start` only reads a key from `--key` or
`CODER_PROVISIONER_DAEMON_KEY`
(`enterprise/cli/provisionerdaemonstart.go`).
- Without a key or PSK, the CLI treats the session token as a user API
key and selects an organization, which returns 401 for a provisioner
key.
- The two examples date from March 2023 (#6443), before provisioner keys
existed (`--key` landed in #14002, July 2024), so they were written for
user tokens.
User tokens still work, so the examples were outdated rather than
broken, but they contradicted the page's recommended path.
- No other page under `docs/` pairs `CODER_SESSION_TOKEN` with `coder
provisioner start`.
`docs/admin/users/organizations.md` already uses
`CODER_PROVISIONER_DAEMON_KEY`.
</details>
---
_Generated by Coder Agents on behalf of @nickvigilante._