{
  "schema_version": 2,
  "id": "commands/hello",
  "title": "HELLO",
  "url": "https://redis.io/docs/latest/commands/hello/",
  "summary": "Handshakes with the Redis server.",
  "since": "6.0.0",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-09-18T09:48:21+01:00",
  "page_type": "content",
  "content_hash": "50395de3b658da0fd5a7412951fd65a33f56da7cfb4ce5e68313c4acf453db11",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Switches to a different protocol version, optionally authenticates the connection and sets the connection name. When you call HELLO with no arguments, or with a protocol version (2 or 3) and optional authentication information, the command also returns server and connection properties.\n\nRedis 6 and later support two protocols: RESP2 and RESP3. RESP3 lets Redis return more semantic replies. For example, [HGETALL](https://redis.io/docs/latest/commands/hgetall) returns a [map](https://redis.io/docs/latest/develop/reference/protocol-spec#maps) instead of an [array](https://redis.io/docs/latest/develop/reference/protocol-spec#arrays), so a client library does not need command-specific logic to convert the reply into a hash before returning it to the caller.\n\nIn Redis 6+, connections start in RESP2 mode, so clients implementing RESP2 do\nnot need to updated or changed."
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>protover</code></summary>\n\nThe RESP protocol version to switch to (`2` or `3`). Required if any other option is given.\n\n</details>\n\n<details open><summary><code>AUTH username password</code></summary>\n\nAuthenticate the connection in addition to switching to the specified protocol version. This makes calling [`AUTH`](https://redis.io/docs/latest/commands/auth) before `HELLO` unnecessary when setting up a new connection. Note that the `username` can be set to \"default\" to authenticate against a server that does not use ACLs, but rather the simpler `requirepass` mechanism of Redis prior to version 6.\n\n</details>\n\n<details open><summary><code>SETNAME clientname</code></summary>\n\nSet the name of the current connection. This is equivalent to calling [`CLIENT SETNAME`](https://redis.io/docs/latest/commands/client-setname).\n\n</details>"
    },
    {
      "id": "details",
      "title": "Details",
      "role": "content",
      "text": "`HELLO` always replies with a list of current server and connection properties,\nsuch as: version, loaded modules, client ID, replication role and so on.\nWhen called without any arguments in Redis 6.2 or greater and its default use of RESP2\nprotocol, the reply looks like this:\n\n    > HELLO\n     1) \"server\"\n     2) \"redis\"\n     3) \"version\"\n     4) \"8.8.0\"\n     5) \"proto\"\n     6) (integer) 2\n     7) \"id\"\n     8) (integer) 5\n     9) \"mode\"\n    10) \"standalone\"\n    11) \"role\"\n    12) \"master\"\n    13) \"modules\"\n    14) ...\n\nClients that want to handshake using the RESP3 mode need to call the `HELLO`\ncommand and specify the value \"3\" as the `protover` argument, like so:\n\n    > HELLO 3\n    1# \"server\" => \"redis\"\n    2# \"version\" => \"8.8.0\"\n    3# \"proto\" => (integer) 3\n    4# \"id\" => (integer) 10\n    5# \"mode\" => \"standalone\"\n    6# \"role\" => \"master\"\n    7# \"modules\" => ...\n\nBecause `HELLO` replies with useful information, and given that `protover` is\noptional or can be set to \"2\", client library authors may consider using this\ncommand instead of the canonical [`PING`](https://redis.io/docs/latest/commands/ping) when setting up the connection."
    },
    {
      "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> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Map reply](../../develop/reference/protocol-spec#maps): a list of server properties.\n[Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the `protover` requested does not exist.\n\n**RESP3:**\n\n[Map reply](../../develop/reference/protocol-spec#maps): a list of server properties.\n[Simple error reply](../../develop/reference/protocol-spec#simple-errors): if the `protover` requested does not exist."
    }
  ],
  "examples": []
}
