{
  "schema_version": 2,
  "id": "commands/config-set",
  "title": "CONFIG SET",
  "url": "https://redis.io/docs/latest/commands/config-set/",
  "summary": "Sets configuration parameters in-flight.",
  "since": "2.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:09+01:00",
  "page_type": "content",
  "content_hash": "ec1a3e56de97c52d180675af891d6c28d8cf59dd695011793f887fa318e9c260",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "CONFIG SET reconfigures Redis at runtime without restarting the server. You can use it to change simple configuration parameters or switch between persistence options.\n\nRun [CONFIG GET *](https://redis.io/docs/latest/commands/config-get) to list the configuration parameters that CONFIG SET supports.\n\nAll the configuration parameters set using `CONFIG SET` are immediately loaded\nby Redis and will take effect starting with the next command executed.\n\nAll the supported parameters have the same meaning of the equivalent\nconfiguration parameter used in the [redis.conf](https://redis.io/docs/latest/operate/oss_and_stack/management/config) file. The provided link has links to the `redis.conf` files for Redis version 6.2 and greater. See the [Redis souce code repo](https://github.com/redis/redis) for earlier versions.\n\nIt is possible to switch persistence from RDB snapshotting to append-only file\n(and the other way around) using the `CONFIG SET` command.\nSee the [persistence page](https://redis.io/docs/latest/operate/oss_and_stack/management/persistence) for more information.\n\n[code example]\n\nSetting the `appendonly` parameter as shown above will start a background process to save the initial append-only file\n(obtained from the in memory data set), and will append all the subsequent\ncommands on the append-only file, thus obtaining exactly the same effect of a\nRedis server that started with AOF turned on since the start.\n\nYou can have both the AOF enabled with RDB snapshotting if you want, the two\noptions are not mutually exclusive."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>parameter value [parameter value ...]</code></summary>\n\nOne or more configuration parameter-value pairs to set.\n\n</details>"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | <span title=\"Supported\">&#x2705; Standard</span><br /><span title=\"Supported\"><nobr>&#x2705; Active-Active</nobr></span> | [Only supports a subset of configuration settings.](https://redis.io/docs/latest/operate/rs/references/compatibility/config-settings) |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was set properly. Otherwise an error is returned.\n\n**RESP3:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK` when the configuration was set properly. Otherwise an error is returned."
    }
  ],
  "examples": [
    {
      "id": "overview-ex0",
      "language": "plaintext",
      "code": "CONFIG SET appendonly yes",
      "section_id": "overview"
    }
  ]
}
