docs: document the Redis ACL rules the server needs (#4968)

* docs: document the Redis ACL rules the server needs

There was no reference for which Redis ACL rules LiveKit requires
(#2486), so operators with restricted users had to derive them from
behavior, and the failure modes are non-obvious: a missing
+@connection fails the first PING with a startup error, a missing
+cluster fails CLUSTER SLOTS in cluster mode, and a missing
+@scripting breaks the room lock release script silently.

Lists the keys and prefixes LiveKit stores, the command families it
uses, and working rule sets for single-node and cluster mode. All of
it verified end to end by running the server against a Redis 8
instance with restricted users: startup, room create, list, delete,
and the cluster slot-map path each exercised against the documented
grants with no denials.

Refs #2486

* docs: keep only the two working Redis ACL rule sets

The key and command enumerations can drift from the code; the rule sets
verified against Redis 8 are the durable part.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Nehal KandDevin AI authored and GitHub committed 2026-11-24 15:51:35 +08:00
1 parent c5cfc84bbb
commit c8a3c95fd3
1 file changed
+26
+26
View File
@@ -6,3 +6,29 @@ Deployment Guides:
- [Deploy to Kubernetes](https://docs.livekit.io/deploy/kubernetes)
Also included are Grafana charts for metrics gathered in Prometheus.
## Redis ACL rules
When LiveKit is configured with Redis (see the `redis:` block in
[config-sample.yaml](../config-sample.yaml)), it uses the connection for room
and participant state, routing, and the inter-node message bus. Managed Redis
deployments and hardened self-hosted setups often restrict what a user may do
through [ACLs](https://redis.io/docs/latest/operate/oss_and_stack/management/security/acl/).
These are the two working rule sets, verified end to end against Redis 8.
Single-node Redis (address or sentinel):
```
ACL SETUSER livekit on >mypassword ~* &* +@read +@write +@pubsub +@transaction +@scripting +@connection
```
Cluster mode (`cluster_addresses`), the same grants plus the slot map:
```
ACL SETUSER livekit on >mypassword ~* &* +@read +@write +@pubsub +@transaction +@scripting +@connection +cluster
```
`+@connection` covers the `PING` and `CLIENT SETINFO` go-redis issues on
connect; without it startup fails with `NOPERM ... 'ping'`. `+cluster`
covers `CLUSTER SLOTS`, which the client runs in cluster mode to discover
the slot map; without it startup fails with `NOPERM ... 'cluster|slots'`.