Upstash Documentation

CONFIG SET

Change runtime configuration.
2 min read

Use CONFIG SET to change runtime configuration parameters without restarting.

This deployment permits changes only to notify-keyspace-events, which selects the keyspace and keyevent notifications the server publishes: the value is a set of flag characters, such as KEA for everything, or Kg$ for generic and string keyspace events. Any other parameter returns an error.

Several parameter and value pairs can be given in one call, and they are processed from left to right, so if a later pair is rejected an earlier change may already have taken effect.

Syntax#

Arguments#

ArgumentRequiredRepeatableDescription
parameterYesYes, in pairsRuntime configuration parameter to update.
valueYesYes, in pairsNew value for the preceding parameter.

Important points#

  • This command can expose administrative information or make a broad destructive change. Restrict it to trusted code paths.
  • This deployment permits changes only to notify-keyspace-events; any other parameter returns an error.
  • Parameter/value pairs are processed from left to right. If a later pair is invalid, an earlier valid change may already have taken effect.

Response#

The reply reports the result of the operation. Error replies have the same shape in RESP2 and RESP3 and are surfaced as exceptions by the SDKs below.

ProtocolReply
RESP2Simple string OK
RESP3Simple string OK
Note

Client libraries often decode bulk strings, maps, sets, and numeric strings into language-native values. The table describes the Redis wire reply.

Examples#

TCP examples use the TLS REDIS_URL from the Upstash console. REST examples use UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.

Redis CLI
@upstash/redis
Note

This command is not supported yet in @upstash/redis.

upstash_redis
Note

This command is not supported yet in upstash_redis.

ioredis
node-redis
redis-py
go-redis
jedis
redis-rs