{
  "schema_version": 2,
  "id": "commands/cluster-set-config-epoch",
  "title": "CLUSTER SET-CONFIG-EPOCH",
  "url": "https://redis.io/docs/latest/commands/cluster-set-config-epoch/",
  "summary": "Sets the configuration epoch for a new node.",
  "since": "3.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-06-15T06:26:34-07:00",
  "page_type": "content",
  "content_hash": "b398161e23591bba275233b4a1b5be56a5e1b88494842341b79394e9645c1223",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "This command sets a specific *config epoch* in a fresh node. It only works when:\n\n1. The nodes table of the node is empty.\n2. The node current *config epoch* is zero.\n\nThese prerequisites are needed since usually, manually altering the\nconfiguration epoch of a node is unsafe, we want to be sure that the node with\nthe higher configuration epoch value (that is the last that failed over) wins\nover other nodes in claiming the hash slots ownership.\n\nHowever there is an exception to this rule, and it is when a new\ncluster is created from scratch. Redis Cluster *config epoch collision\nresolution* algorithm can deal with new nodes all configured with the\nsame configuration at startup, but this process is slow and should be\nthe exception, only to make sure that whatever happens, two more\nnodes eventually always move away from the state of having the same\nconfiguration epoch.\n\nSo, using `CLUSTER SET-CONFIG-EPOCH`, when a new cluster is created, we can\nassign a different progressive configuration epoch to each node before\njoining the cluster together."
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>config-epoch</code></summary>\n\nThe configuration epoch to set for the current node.\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=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> | <span title=\"Not supported\">&#x274c; Standard</span><br /><span title=\"Not supported\"><nobr>&#x274c; Active-Active</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`.\n\n**RESP3:**\n\n[Simple string reply](../../develop/reference/protocol-spec#simple-strings): `OK`."
    }
  ],
  "examples": []
}
