Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
5433515
Import documentation from valkey-io/valkey-doc as of 7dbeb33c
madolson Nov 30, 2026
11e3623
Fix some more names in the doc (#4)
PingXie Apr 4, 2024
da44420
Update valkey cli doc (#13)
hwware Apr 9, 2024
cd8c384
Remove Redis from docs that are referenced from conf files (#16)
madolson Apr 9, 2024
b141d74
rebrand [Rr]edis->[Vv]alkey (#24)
daniel-house Apr 9, 2024
1ba11db
Remove all of Redis corporate branded references (#17)
madolson Apr 9, 2024
6ed5c22
rebrand (#21)
daniel-house Apr 10, 2024
e690c57
Rebrand [Rr]edis->[Vv]alkey in TLS and sentinel pages (#23)
daniel-house Apr 11, 2024
599ce12
Remove 'Redis' from the names of datastructures (#29)
zuiderkwast Apr 16, 2024
f45bc0d
rebrand [Rr]edis->[Vv]alkey, docs/management/scaling.md (#27)
hwware Apr 22, 2024
14795e1
Remove redis stack, redis cloud, redis university (#36)
zuiderkwast Apr 22, 2024
1daa96d
Rebrand commands/*.md (#39)
zuiderkwast Apr 22, 2024
e47bf17
Rebranding docs/interact/ (#40)
zuiderkwast Apr 23, 2024
d1a669d
Rebranding in docs/manual/ (#37)
zuiderkwast Apr 23, 2024
5b4542c
Rebranding docs/install/ (#44)
zuiderkwast Apr 23, 2024
44ee6f4
Add lib-name and lib-vesion to client info. (#57)
CharlesChen888 Apr 24, 2024
6c9ff2f
Rebranding docs/data-types/ (#43)
zuiderkwast Apr 24, 2024
cbe4f41
Rebranding docs/reference/ (#41)
zuiderkwast Apr 24, 2024
09dc2aa
Rebranding docs/get-started/ (#42)
zuiderkwast Apr 24, 2024
571c0b8
Rebranding docs/management/ (#38)
zuiderkwast Apr 24, 2024
d306f38
Add new "history" page and delete irrelevant pages (#35)
zuiderkwast Apr 24, 2024
dbdd80a
Delete stup pages (#59)
zuiderkwast Apr 24, 2024
9a8f097
Update to rebranded valkey_init_script (#58)
zuiderkwast Apr 24, 2024
925d685
Rebranding docs/about/releases.md (#60)
zuiderkwast Apr 24, 2024
2065754
Restored topics structure (#61)
zuiderkwast Apr 24, 2024
5422a43
Change a few remaining occurrences of Redis (#64)
zuiderkwast Apr 25, 2024
138d93b
updated module docs to reference Valkey (#67)
dmitrypol Apr 29, 2024
e136d7a
Merge install pages into installation.md (#70)
zuiderkwast May 2, 2024
1050deb
Various corrections and cleanup (#73)
zuiderkwast May 2, 2024
9a6f2b4
Change "database" to "Valkey" in client-side-cacing.md (#72)
Virusuki May 3, 2024
6fc80ef
Add TOC page with links to the documentation pages (#75)
zuiderkwast May 3, 2024
4f81c37
Rename benchmarks.md to benchmark.md + various (#80)
zuiderkwast May 3, 2024
3464075
Replace Hugo non-markdown alert markup with simple markdown (#79)
zuiderkwast May 3, 2024
6d70049
Replace code blocks in Hugo syntax (#78)
zuiderkwast May 3, 2024
a7dbc73
Insert command replies in CLI examples where missing (#77)
zuiderkwast May 3, 2024
5de04bb
Rename topics/config.md to topics/valkey.conf.md (#81)
zuiderkwast May 3, 2024
1068106
Update valkey raw link (#83)
hwware May 3, 2024
ee644eb
Replace deprecated HMSET with HSET in examples (#5)
randommm May 4, 2024
537a25c
Fix internal links (#86)
zuiderkwast May 5, 2024
41640f3
Add client info traffic stat fields. (#45)
CharlesChen888 May 6, 2024
3f8161b
Add zscan noscores. (#88)
CharlesChen888 May 7, 2024
e46b112
Fix reply of HSET in HSCAN NOVALUES example (#89)
CharlesChen888 May 7, 2024
41c49ba
Fix empty links + rename file (#90)
zuiderkwast May 8, 2024
b30e8fc
Generate man pages (#92)
zuiderkwast May 24, 2024
6af76de
Fix spellcheck (#95)
zuiderkwast May 27, 2024
6d2c784
Mention ASK and TRYAGAIN for replicas in READONLY command manual (#142)
zuiderkwast Jun 2, 2024
0b80e46
Mention that eviction policies use approximated randomized algorithms…
enjoy-binbin Jun 17, 2024
303c80e
Cleanup: Delete frontmatter keys 'aliases' and 'weight' (#118)
zuiderkwast Jun 18, 2024
603a1f7
fixes malformed YAML frontmatter in `installation.md` (#145)
Jun 20, 2024
f92cfb4
Resolves ambiguous markdown in `cluster-spec.md` (#149)
Jun 20, 2024
09266bd
Update release guidance for Valkey (#94)
madolson Jun 21, 2024
11833ce
Added new CLIENT CAPA command along with other related modifications …
soloestoy Jun 27, 2024
ca6b577
Doc review fixes (#153)
zuiderkwast Jul 3, 2024
a070a14
Add information about 'server' domain object for LUA (#85)
madolson Jul 3, 2024
2490c92
Doc review fixes part 2 (#155)
zuiderkwast Jul 8, 2024
ef87dea
add script-dump document (#143)
kukey Jul 14, 2024
0731ff4
Update rdb save releated fileds to distinguish diskless RDB (#158)
enjoy-binbin Jul 17, 2024
9c2d61b
Update to mention PING behavior with RESP2 and subscribe (#160)
enjoy-binbin Aug 5, 2024
f1b0093
Explain the special handling of redirection in failover (#162)
soloestoy Aug 14, 2024
435cd2d
Update cluster-slots to explain the deterministic ordering (#159)
roshkhatri Aug 28, 2024
792e7b4
Update threaded IO info (#165)
uriyage Sep 4, 2024
239aa44
Updating default make flags for make-settings in profiling section. (…
roshkhatri Sep 10, 2024
22f66dc
Update cluster-spec with Valkey 8.0 cluster improvements (#167)
PingXie Sep 12, 2024
edf5148
Add guide about how to migrate from Redis (#169)
nastena1606 Sep 22, 2024
8b74b9d
Remove the ```valkey-cli markers for CLI examples (#174)
zuiderkwast Sep 23, 2024
2c1b9ad
No persistence (#179)
melroy89 Oct 10, 2024
113320e
#148 Replaced Master and Slave with Primary and Replica where applica…
nastena1606 Oct 12, 2024
43aab04
Added migration guide to index.md (#175)
nastena1606 Oct 16, 2024
bbefb80
Updated the disclaimer about the usage of the word slave (#180)
nastena1606 Oct 17, 2024
94fb664
fixes annoying http->https forward (#181)
Oct 20, 2024
607e3d6
Introduce Valkey Over RDMA protocol (#123)
pizhenwei Oct 20, 2024
3c15907
Documentation of BGSAVE CANCEL (#182)
ranshid Oct 22, 2024
9755677
Update untar example with latest version (#183)
melroy89 Oct 28, 2024
78f39ad
Corrections to migration guide (#184)
zuiderkwast Oct 31, 2024
a69ed84
Document duplicate options in ZUNIONSTORE (#186)
zuiderkwast Nov 11, 2024
c348444
Add CLUSTER SLOT-STATS document (#150)
kyle-yh-kim Nov 18, 2024
281d2fd
Add performance tuning section for RDMA (#190)
pizhenwei Nov 27, 2024
3943296
No valkey in titles (#193)
zuiderkwast Nov 28, 2024
a37a7fd
Documentation for SET IFEQ (#189)
sarthakaggarwal97 Dec 10, 2024
abb7344
Update PHP Redlock impl. doc (#195)
mvorisek Dec 10, 2024
a6be2b2
Detail the issue of redirection occurring within a transaction. (#168)
soloestoy Dec 11, 2024
9fe2a13
Explanation of issues when using GET and NX/XX/IFEQ together in SET c…
soloestoy Dec 16, 2024
95a816a
Moves links to wayback machine, fixes one bad `s/redis/valkey/` (#201)
Dec 17, 2024
5c6bf52
fix weird phraseology apparently caused by s/redis/valkey/g (#198)
rwv37 Dec 18, 2024
1f00e05
Doc fixes part 3, various topics pages (#197)
zuiderkwast Dec 20, 2024
1617865
Added explanation of maxmemory for replication. (#194)
nastena1606 Jan 2, 2025
c7db71c
Introduce import-mode and client import-source (#205)
lyq2333 Jan 2, 2025
32dc073
SET: Be more explicit about replies when using GET in conjunction wit…
gmbnomis Jan 8, 2025
b1dbb3f
Add availability_zone to the HELLO command documentation (#208)
rueian Jan 8, 2025
6924da5
Add 8.0 to the list of supported releases (#212)
marcwrobel Jan 13, 2025
be396ab
chore: improve the release schedule wording (#214)
chenrui333 Jan 14, 2025
98485f9
Updated Documentation for CLIENT KILL and CLIENT LIST (#218)
sarthakaggarwal97 Jan 17, 2025
71b6c5c
Add sum and cnt stats in LATENCY LATEST (#224)
enjoy-binbin Feb 4, 2025
1558426
info clients_hz field (#225)
JimB123 Feb 4, 2025
595ffee
Added available installation options (#223)
avifenesh Feb 5, 2025
3b446c7
Add paused_actions and paused_timeout_milliseconds fields for info cl…
soloestoy Feb 7, 2025
b88ad31
Improve docs for rolling upgrade of a cluster (#226)
zuiderkwast Feb 7, 2025
ab1e9c9
Add availability_zone filed to INFO command (#228)
enjoy-binbin Feb 10, 2025
5797a34
Add paused_reason field for INFO CLIENTS (#227)
enjoy-binbin Feb 10, 2025
dc2f394
explain capa for client list (#229)
soloestoy Feb 11, 2025
b100398
Update the active expire algorithm on the EXPIRE command page (#230)
nastena1606 Feb 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
78 changes: 78 additions & 0 deletions docs/commands/acl-cat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
The command shows the available ACL categories if called without arguments.
If a category name is given, the command shows all the Valkey commands in
the specified category.

ACL categories are very useful in order to create ACL rules that include or
exclude a large set of commands at once, without specifying every single
command. For instance, the following rule will let the user `karin` perform
everything but the most dangerous operations that may affect the server
stability:

ACL SETUSER karin on +@all -@dangerous

We first add all the commands to the set of commands that `karin` is able
to execute, but then we remove all the dangerous commands.

Checking for all the available categories is as simple as:

```
> ACL CAT
1) "keyspace"
2) "read"
3) "write"
4) "set"
5) "sortedset"
6) "list"
7) "hash"
8) "string"
9) "bitmap"
10) "hyperloglog"
11) "geo"
12) "stream"
13) "pubsub"
14) "admin"
15) "fast"
16) "slow"
17) "blocking"
18) "dangerous"
19) "connection"
20) "transaction"
21) "scripting"
```

Then we may want to know what commands are part of a given category:

```
> ACL CAT dangerous
1) "flushdb"
2) "acl"
3) "slowlog"
4) "debug"
5) "role"
6) "keys"
7) "pfselftest"
8) "client"
9) "bgrewriteaof"
10) "replicaof"
11) "monitor"
12) "restore-asking"
13) "latency"
14) "replconf"
15) "pfdebug"
16) "bgsave"
17) "sync"
18) "config"
19) "flushall"
20) "cluster"
21) "info"
22) "lastsave"
23) "slaveof"
24) "swapdb"
25) "module"
26) "restore"
27) "migrate"
28) "save"
29) "shutdown"
30) "psync"
31) "sort"
```
12 changes: 12 additions & 0 deletions docs/commands/acl-deluser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Delete all the specified ACL users and terminate all the connections that are
authenticated with such users. Note: the special `default` user cannot be
removed from the system, this is the default user that every new connection
is authenticated with. The list of users may include usernames that do not
exist, in such case no operation is performed for the non existing users.

## Examples

```
127.0.0.1:6379> ACL DELUSER antirez
(integer) 1
```
13 changes: 13 additions & 0 deletions docs/commands/acl-dryrun.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Simulate the execution of a given command by a given user.
This command can be used to test the permissions of a given user without having to enable the user or cause the side effects of running the command.

## Examples

```
127.0.0.1:6379> ACL SETUSER VIRGINIA +SET ~*
"OK"
127.0.0.1:6379> ACL DRYRUN VIRGINIA SET foo bar
"OK"
127.0.0.1:6379> ACL DRYRUN VIRGINIA GET foo
"User VIRGINIA has no permissions to run the 'get' command"
```
37 changes: 37 additions & 0 deletions docs/commands/acl-genpass.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
ACL users need a solid password in order to authenticate to the server without
security risks. Such password does not need to be remembered by humans, but
only by computers, so it can be very long and strong (unguessable by an
external attacker). The `ACL GENPASS` command generates a password starting
from /dev/urandom if available, otherwise (in systems without /dev/urandom) it
uses a weaker system that is likely still better than picking a weak password
by hand.

By default (if /dev/urandom is available) the password is strong and
can be used for other uses in the context of an application, for
instance in order to create unique session identifiers or other kind of
unguessable and not colliding IDs. The password generation is also very cheap
because we don't really ask /dev/urandom for bits at every execution. At
startup Valkey creates a seed using /dev/urandom, then it will use SHA256
in counter mode, with HMAC-SHA256(seed,counter) as primitive, in order to
create more random bytes as needed. This means that the application developer
should be feel free to abuse `ACL GENPASS` to create as many secure
pseudorandom strings as needed.

The command output is a hexadecimal representation of a binary string.
By default it emits 256 bits (so 64 hex characters). The user can provide
an argument in form of number of bits to emit from 1 to 1024 to change
the output length. Note that the number of bits provided is always
rounded to the next multiple of 4. So for instance asking for just 1
bit password will result in 4 bits to be emitted, in the form of a single
hex character.

## Examples

```
127.0.0.1:6379> ACL GENPASS
"dd721260bfe1b3d9601e7fbab36de6d04e2e67b0ef1c53de59d45950db0dd3cc"
127.0.0.1:6379> ACL GENPASS 32
"355ef3dd"
127.0.0.1:6379> ACL GENPASS 5
"90"
```
39 changes: 39 additions & 0 deletions docs/commands/acl-getuser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
The command returns all the rules defined for an existing ACL user.

Specifically, it lists the user's ACL flags, password hashes, commands, key patterns, channel patterns (Added in version 6.2) and selectors (Added in version 7.0).
Additional information may be returned in the future if more metadata is added to the user.

Command rules are always returned in the same format as the one used in the `ACL SETUSER` command.
Before version 7.0, keys and channels were returned as an array of patterns, however in version 7.0 later they are now also returned in same format as the one used in the `ACL SETUSER` command.
Note: This description of command rules reflects the user's effective permissions, so while it may not be identical to the set of rules used to configure the user, it is still functionally identical.

Selectors are listed in the order they were applied to the user, and include information about commands, key patterns, and channel patterns.

## Examples

Here's an example configuration for a user

```
127.0.0.1:6379> ACL SETUSER sample on nopass +GET allkeys &* (+SET ~key2)
"OK"
127.0.0.1:6379> ACL GETUSER sample
1) "flags"
2) 1) "on"
2) "allkeys"
3) "nopass"
3) "passwords"
4) (empty array)
5) "commands"
6) "+@all"
7) "keys"
8) "~*"
9) "channels"
10) "&*"
11) "selectors"
12) 1) 1) "commands"
6) "+SET"
7) "keys"
8) "~key2"
9) "channels"
10) "&*"
```
2 changes: 2 additions & 0 deletions docs/commands/acl-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The `ACL HELP` command returns a helpful text describing the different subcommands.

13 changes: 13 additions & 0 deletions docs/commands/acl-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
The command shows the currently active ACL rules in the Valkey server. Each
line in the returned array defines a different user, and the format is the
same used in the valkey.conf file or the external ACL file, so you can
cut and paste what is returned by the ACL LIST command directly inside a
configuration file if you wish (but make sure to check `ACL SAVE`).

## Examples

```
127.0.0.1:6379> ACL LIST
1) "user antirez on #9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 ~objects:* &* +@all -@admin -@dangerous"
2) "user default on nopass ~* &* +@all"
```
19 changes: 19 additions & 0 deletions docs/commands/acl-load.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
When Valkey is configured to use an ACL file (with the `aclfile` configuration
option), this command will reload the ACLs from the file, replacing all
the current ACL rules with the ones defined in the file. The command makes
sure to have an *all or nothing* behavior, that is:

* If every line in the file is valid, all the ACLs are loaded.
* If one or more line in the file is not valid, nothing is loaded, and the old ACL rules defined in the server memory continue to be used.

## Examples

```
127.0.0.1:6379> ACL LOAD
OK
```

```
127.0.0.1:6379> ACL LOAD
(error) ERR /tmp/foo:1: Unknown command or category name in ACL...
```
50 changes: 50 additions & 0 deletions docs/commands/acl-log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
The command shows a list of recent ACL security events:

1. Failures to authenticate their connections with `AUTH` or `HELLO`.
2. Commands denied because against the current ACL rules.
3. Commands denied because accessing keys not allowed in the current ACL rules.

The optional argument specifies how many entries to show. By default
up to ten failures are returned. The special `RESET` argument clears the log.
Entries are displayed starting from the most recent.

## Examples

```
127.0.0.1:6379> AUTH someuser wrongpassword
(error) WRONGPASS invalid username-password pair
> ACL LOG 1
1) 1) "count"
2) (integer) 1
3) "reason"
4) "auth"
5) "context"
6) "toplevel"
7) "object"
8) "AUTH"
9) "username"
10) "someuser"
11) "age-seconds"
12) "8.038"
13) "client-info"
14) "id=3 addr=127.0.0.1:57275 laddr=127.0.0.1:6379 fd=8 name= age=16 idle=0 flags=N db=0 sub=0 psub=0 ssub=0 multi=-1 qbuf=48 qbuf-free=16842 argv-mem=25 multi-mem=0 rbs=1024 rbp=0 obl=0 oll=0 omem=0 tot-mem=18737 events=r cmd=auth user=default redir=-1 resp=2"
15) "entry-id"
16) (integer) 0
17) "timestamp-created"
18) (integer) 1675361492408
19) "timestamp-last-updated"
20) (integer) 1675361492408
```

Each log entry is composed of the following fields:

1. `count`: The number of security events detected within a 60 second period that are represented by this entry.
2. `reason`: The reason that the security events were logged. Either `command`, `key`, `channel`, or `auth`.
3. `context`: The context that the security events were detected in. Either `toplevel`, `multi`, `lua`, or `module`.
4. `object`: The resource that the user had insufficient permissions to access. `auth` when the reason is `auth`.
5. `username`: The username that executed the command that caused the security events or the username that had a failed authentication attempt.
6. `age-seconds`: Age of the log entry in seconds.
7. `client-info`: Displays the client info of a client which caused one of the security events.
8. `entry-id`: The sequence number of the entry (starting at 0) since the server process started. Can also be used to check if items were “lost”, if they fell between periods.
9. `timestamp-created`: A UNIX timestamp in `milliseconds` at the time the entry was first created.
10. `timestamp-last-updated`: A UNIX timestamp in `milliseconds` at the time the entry was last updated.
11 changes: 11 additions & 0 deletions docs/commands/acl-save.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
When Valkey is configured to use an ACL file (with the `aclfile` configuration
option), this command will save the currently defined ACLs from the server memory to the ACL file.

## Examples

```
127.0.0.1:6379> ACL SAVE
OK
127.0.0.1:6379> ACL SAVE
(error) ERR There was an error trying to save the ACLs. Please check the server logs for more information
```
96 changes: 96 additions & 0 deletions docs/commands/acl-setuser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
Create an ACL user with the specified rules or modify the rules of an
existing user.

Manipulate Valkey ACL users interactively.
If the username does not exist, the command creates the username without any privilege.
It then reads from left to right all the [rules](#acl-rules) provided as successive arguments, setting the user ACL rules as specified.
If the user already exists, the provided ACL rules are simply applied
*in addition* to the rules already set. For example:

ACL SETUSER virginia on allkeys +set

The above command creates a user called `virginia` who is active(the _on_ rule), can access any key (_allkeys_ rule), and can call the set command (_+set_ rule).
Then, you can use another `ACL SETUSER` call to modify the user rules:

ACL SETUSER virginia +get

The above rule applies the new rule to the user `virginia`, so other than `SET`, the user `virginia` can now also use the `GET` command.

ACL rules can also be grouped into multiple distinct sets of rules, called _selectors_.
Selectors are added by wrapping the rules in parentheses and providing them just like any other rule.
In order to execute a command, either the root permissions (rules defined outside of parenthesis) or any of the selectors (rules defined inside parenthesis) must match the given command.
For example:

ACL SETUSER virginia on +GET allkeys (+SET ~app1*)

This sets a user with two sets of permissions, one defined on the user and one defined with a selector.
The root user permissions only allow executing the get command, but can be executed on any keys.
The selector then grants a secondary set of permissions: access to the `SET` command to be executed on any key that starts with `app1`.
Using multiple selectors allows you to grant permissions that are different depending on what keys are being accessed.

When we want to be sure to define a user from scratch, without caring if
it had previously defined rules associated, we can use the special rule
`reset` as first rule, in order to flush all the other existing rules:

ACL SETUSER antirez reset [... other rules ...]

After resetting a user, its ACL rules revert to the default: inactive, passwordless, can't execute any command nor access any key or channel:

```
127.0.0.1:6379> ACL SETUSER antirez reset
OK
127.0.0.1:6379> ACL LIST
1) "user antirez off -@all"
```

ACL rules are either words like "on", "off", "reset", "allkeys", or are
special rules that start with a special character, and are followed by
another string (without any space in between), like "+SET".

The following documentation is a reference manual about the capabilities of this command, however our [ACL tutorial](../topics/acl.md) may be a more gentle introduction to how the ACL system works in general.

## ACL rules

Valkey ACL rules are split into two categories: rules that define command permissions or _command rules_, and rules that define the user state or _user management rules_.
This is a list of all the supported Valkey ACL rules:

### Command rules

* `~<pattern>`: Adds the specified key pattern (glob style pattern, like in the `KEYS` command), to the list of key patterns accessible by the user. This grants both read and write permissions to keys that match the pattern. You can add multiple key patterns to the same user. Example: `~objects:*`
* `%R~<pattern>`: Adds the specified read key pattern. This behaves similar to the regular key pattern but only grants permission to read from keys that match the given pattern. See [key permissions](../topics/acl.md#key-permissions) for more information.
* `%W~<pattern>`: Adds the specified write key pattern. This behaves similar to the regular key pattern but only grants permission to write to keys that match the given pattern. See [key permissions](../topics/acl.md#key-permissions) for more information.
* `%RW~<pattern>`: Alias for `~<pattern>`.
* `allkeys`: Alias for `~*`, it allows the user to access all the keys.
* `resetkeys`: Removes all the key patterns from the list of key patterns the user can access.
* `&<pattern>`: Adds the specified glob style pattern to the list of Pub/Sub channel patterns accessible by the user. You can add multiple channel patterns to the same user. Example: `&chatroom:*`
* `allchannels`: Alias for `&*`, it allows the user to access all Pub/Sub channels.
* `resetchannels`: Removes all channel patterns from the list of Pub/Sub channel patterns the user can access.
* `+<command>`: Adds the command to the list of commands the user can call. Can be used with `|` for allowing subcommands (e.g "+config|get").
* `+@<category>`: Adds all the commands in the specified category to the list of commands the user is able to execute. Example: `+@string` (adds all the string commands). For a list of categories, check the `ACL CAT` command.
* `+<command>|first-arg`: Allows a specific first argument of an otherwise disabled command. It is only supported on commands with no sub-commands, and is not allowed as negative form like -SELECT|1, only additive starting with "+". This feature is deprecated and may be removed in the future.
* `allcommands`: Alias of `+@all`. Adds all the commands there are in the server, including *future commands* loaded via module, to be executed by this user.
* `-<command>`: Remove the command to the list of commands the user can call. It can be used with `|` for blocking subcommands (e.g., "-config|set").
* `-@<category>`: Like `+@<category>` but removes all the commands in the category instead of adding them.
* `nocommands`: Alias for `-@all`. Removes all the commands, and the user is no longer able to execute anything.

### User management rules

* `on`: Set the user as active, it will be possible to authenticate as this user using `AUTH <username> <password>`.
* `off`: Set user as not active, it will be impossible to log as this user. Please note that if a user gets disabled (set to off) after there are connections already authenticated with such a user, the connections will continue to work as expected. To also kill the old connections you can use `CLIENT KILL` with the user option. An alternative is to delete the user with `ACL DELUSER`, that will result in all the connections authenticated as the deleted user to be disconnected.
* `nopass`: The user is set as a _no password_ user. It means that it will be possible to authenticate as such user with any password. By default, the `default` special user is set as "nopass". The `nopass` rule will also reset all the configured passwords for the user.
* `>password`: Adds the specified clear text password as a hashed password in the list of the users passwords. Every user can have many active passwords, so that password rotation will be simpler. The specified password is not stored as clear text inside the server. Example: `>mypassword`.
* `#<hashedpassword>`: Adds the specified hashed password to the list of user passwords. A hashed password is hashed with SHA256 and translated into a hexadecimal string. Example: `#c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383d4a3960714caef0c4f2`.
* `<password`: Like `>password` but removes the password instead of adding it.
* `!<hashedpassword>`: Like `#<hashedpassword>` but removes the password instead of adding it.
* `(<rule list>)`: Creates a new selector to match rules against. Selectors are evaluated after the user permissions, and are evaluated according to the order they are defined. If a command matches either the user permissions or any selector, it is allowed. See [selectors](../topics/acl.md#selectors) for more information.
* `clearselectors`: Deletes all of the selectors attached to the user.
* `reset`: Removes any capability from the user. They are set to off, without passwords, unable to execute any command, unable to access any key.

## Examples

```
127.0.0.1:6379> ACL SETUSER alan allkeys +@string +@set -SADD >alanpassword
OK
127.0.0.1:6379> ACL SETUSER antirez heeyyyy
(error) ERR Error in ACL SETUSER modifier 'heeyyyy': Syntax error
```
11 changes: 11 additions & 0 deletions docs/commands/acl-users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The command shows a list of all the usernames of the currently configured
users in the Valkey ACL system.

## Examples

```
127.0.0.1:6379> ACL USERS
1) "anna"
2) "antirez"
3) "default"
```
Loading
Loading