# CONFIG GET

> Read server settings by exact name or glob-style pattern.

URL: https://docs.hotkv.com/commands/config-get/

```
CONFIG GET parameter [parameter ...]
```

- Group: Server
- Complexity: O(N) where N is the number of settings
- HotKV Cloud: all plans
- On-Premise: no license needed

`CONFIG GET` returns the current value of the settings you ask for. Each
`parameter` is either a setting name or a glob-style pattern (`*`, `?` and
`[...]`), matched case-insensitively. Older names that Redis still accepts
work too, for example `slave-read-only` for `replica-read-only` or
`hash-max-ziplist-entries` for `hash-max-listpack-entries`.

A setting asked for by its exact name is returned under the name as you
typed it. One matched by a pattern is returned under its own name. Each
setting appears at most once, even if several parameters match it.

Secrets are never returned: `requirepass`, `masterauth`, `tls-key-file-pass`
and `tls-client-key-file-pass` read `(hidden)` when set, and an empty string
when not. Memory sizes are returned in bytes.

## Return value

The settings and their values: a map in RESP3, a flat array of name and value
pairs in RESP2. Names that match nothing are left out, so the reply can be
empty.

A call without any parameter gets
`ERR wrong number of arguments for 'config|get' command`.

## Examples

```
127.0.0.1:6379> CONFIG GET maxmemory*
1) "maxmemory"
2) "0"
3) "maxmemory-policy"
4) "noeviction"
5) "maxmemory-samples"
6) "5"
127.0.0.1:6379> CONFIG GET appendonly appendfsync
1) "appendonly"
2) "no"
3) "appendfsync"
4) "everysec"
127.0.0.1:6379> CONFIG GET requirepass
1) "requirepass"
2) "(hidden)"
```

## Compatibility

Same reply shapes and pattern rules as Redis 7 and Valkey 8, with two
differences: passwords read `(hidden)` instead of their value, and only the
settings HotKV implements are listed. Settings that exist only in a HotKV
configuration file section (such as replication settings) are
not returned by `CONFIG GET`.

## See also

[CONFIG SET](https://docs.hotkv.com/commands/config-set/index.md), [CONFIG REWRITE](https://docs.hotkv.com/commands/config-rewrite/index.md),
[configuration reference](https://docs.hotkv.com/reference/configuration/index.md)