{
  "schema_version": 2,
  "id": "operate/oss_and_stack/install/install-stack/homebrew",
  "title": "Install Redis Open Source on macOS",
  "url": "https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/homebrew/",
  "summary": "How to install Redis Open Source on macOS using Homebrew",
  "aliases": [
    "/install/install-redis/install-redis-on-mac-os/"
  ],
  "tags": [
    "docs",
    "operate",
    "stack",
    "oss"
  ],
  "last_updated": "2026-10-05T10:55:35+01:00",
  "page_type": "content",
  "content_hash": "31ebaf30c42175fb27a8b0c524c92627426662da29cac605d992507251d16b95",
  "sections": [
    {
      "id": "install-redis-open-source-on-macos-using-homebrew",
      "title": "Install Redis Open Source on macOS using Homebrew",
      "role": "setup",
      "text": "> [!NOTE]\n> Installation using Homebrew is only supported on macOS.\n\n> [!NOTE]\n> If you only need the Redis CLI (`redis-cli`) and not the full Redis Open Source distribution, see [Install redis-cli](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack/install-redis-cli).\n\nTo install Redis Open Source on macOS, use the [Homebrew](https://brew.sh/) formula called `redis`.\nMake sure that you have [Homebrew installed](https://docs.brew.sh/Installation) before you start.\n\nThe formula is the preferred way to install Redis Open Source on macOS. A [Homebrew cask](#alternative-install-using-the-redis-cask) is also available, but it is not integrated with `brew services` and requires a separate tap."
    },
    {
      "id": "install-using-homebrew",
      "title": "Install using Homebrew",
      "role": "setup",
      "text": "Run `brew install`:\n\n\nbrew install redis\n\n\nThis installs the latest Redis Open Source release, including Redis Search and the JSON, time series, probabilistic, and vector set data structures.\n\n> [!NOTE]\n> The formula always installs the latest Redis Open Source release. Support for Redis Search and the additional data structures was added to the formula in Redis Open Source 8.10.1, so earlier versions installed through the formula do not include them. To install an earlier version, use one of the other [installation methods](https://redis.io/docs/latest/operate/oss_and_stack/install/install-stack).\n\nIf you already have Redis installed through Homebrew, see [Upgrade an existing installation](#upgrade-an-existing-installation) instead."
    },
    {
      "id": "upgrade-an-existing-installation",
      "title": "Upgrade an existing installation",
      "role": "content",
      "text": ""
    },
    {
      "id": "upgrade-from-an-earlier-version-of-the-formula",
      "title": "Upgrade from an earlier version of the formula",
      "role": "content",
      "text": "If you previously installed Redis using the `redis` formula, upgrade it with the following command:\n\n\nbrew upgrade redis\n\n\nHomebrew does not overwrite a configuration file that you might have changed. It leaves your existing `redis.conf` in place and writes the new default configuration to `redis.conf.default`. Because the older configuration file does not contain the `loadmodule` directives, Redis Search and the additional data structures stay disabled until you use the new default.\n\n1. Compare your configuration file with the new default:\n    [code example]\n1. Back up your configuration file:\n    [code example]\n1. Replace your configuration file with the new default:\n    [code example]\n\n    If you had customized any settings, reapply them to the new file.\n\n1. Restart Redis, then check the results as described in [Verify that all modules are loaded correctly](#verify-that-all-modules-are-loaded-correctly)."
    },
    {
      "id": "migrate-from-the-redis-cask",
      "title": "Migrate from the Redis cask",
      "role": "content",
      "text": "If you previously installed Redis Open Source using the Redis Homebrew cask, remove it before you install the formula. Both provide the `redis-server` and `redis-cli` binaries in the same location.\n\n1. Uninstall the cask:\n    [code example]\n1. Remove the tap:\n    [code example]\n1. Check if the `redis.conf` file is still installed:\n    [code example]\n\n    If you get output similar to the following, then it's still there:\n\n    [code example]\n\n    Run this command to remove the file:\n\n    [code example]\n\n    The configuration file installed by the cask loads the modules from a directory that the cask removes when you uninstall it. If you leave the file in place, `redis-server` fails to start, and Homebrew does not replace it.\n\nNext, follow the instructions in [Install using Homebrew](#install-using-homebrew)."
    },
    {
      "id": "run-redis",
      "title": "Run Redis",
      "role": "content",
      "text": "If this is the first time you've installed Redis on your system, you need to be sure that your `PATH` variable includes the Redis installation location. This location is either `/opt/homebrew/bin` for Apple silicon Macs or `/usr/local/bin` for Intel-based Macs.\n\nTo check this, run:\n\n\necho $PATH\n\n\nNext, confirm that the output contains `/opt/homebrew/bin` (Apple silicon Macs) or `/usr/local/bin` (Intel Mac). If neither `/opt/homebrew/bin` nor `/usr/local/bin` are in the output, add them.\n\nOpen the file `~/.bashrc` or `~/.zshrc` (depending on your shell), and add the following line.\n\n\nexport PATH=$(brew --prefix)/bin:$PATH\n\n\nYou can now start Redis in one of two ways.\n\nTo start Redis now and restart it at login, run it as a Homebrew service:\n\n\nbrew services start redis\n\n\nThe service runs `redis-server` with the configuration file at `$(brew --prefix)/etc/redis.conf`.\n\nIf you don't need a background service, start the server directly:\n\n\nredis-server $(brew --prefix)/etc/redis.conf\n\n\nThe server will run in the background."
    },
    {
      "id": "connect-to-redis",
      "title": "Connect to Redis",
      "role": "content",
      "text": "Once Redis is running, you can test it by running `redis-cli`:\n\n\nredis-cli\n\n\nTest the connection with the `ping` command:\n\n\n127.0.0.1:6379> PING\nPONG"
    },
    {
      "id": "verify-that-all-modules-are-loaded-correctly",
      "title": "Verify that all modules are loaded correctly",
      "role": "content",
      "text": "If you upgraded from an earlier Redis installation, for example 7.2.x or 7.4.x, test to see if all the modules are loaded correctly by running the following command. Your output should look similar to the following:\n\n\n\n\n$ redis-cli MODULE LIST\n1) 1) \"name\"\n   2) \"timeseries\"\n   3) \"ver\"\n   4) (integer) 80991\n   5) \"path\"\n   6) \"/usr/local/lib/redis/modules//redistimeseries.so\"\n   7) \"args\"\n   8) (empty array)\n2) 1) \"name\"\n   2) \"search\"\n   3) \"ver\"\n   4) (integer) 80990\n   5) \"path\"\n   6) \"/usr/local/lib/redis/modules//redisearch.so\"\n   7) \"args\"\n   8) (empty array)\n3) 1) \"name\"\n   2) \"bf\"\n   3) \"ver\"\n   4) (integer) 80990\n   5) \"path\"\n   6) \"/usr/local/lib/redis/modules//redisbloom.so\"\n   7) \"args\"\n   8) (empty array)\n4) 1) \"name\"\n   2) \"vectorset\"\n   3) \"ver\"\n   4) (integer) 1\n   5) \"path\"\n   6) \"\"\n   7) \"args\"\n   8) (empty array)\n5) 1) \"name\"\n   2) \"ReJSON\"\n   3) \"ver\"\n   4) (integer) 80990\n   5) \"path\"\n   6) \"/usr/local/lib/redis/modules//rejson.so\"\n   7) \"args\"\n   8) (empty array)\n\n\nIf the list is empty, your configuration file does not load the modules. See [Upgrade from an earlier version of the formula](#upgrade-from-an-earlier-version-of-the-formula)."
    },
    {
      "id": "stop-redis",
      "title": "Stop Redis",
      "role": "content",
      "text": "If you started Redis as a Homebrew service, run:\n\n\nbrew services stop redis\n\n\nOtherwise, run:\n\n\nredis-cli SHUTDOWN"
    },
    {
      "id": "uninstall-redis-open-source",
      "title": "Uninstall Redis Open Source",
      "role": "content",
      "text": "If you started Redis as a Homebrew service, stop the service first:\n\n\nbrew services stop redis\n\n\nTo uninstall Redis, run:\n\n\nbrew uninstall redis"
    },
    {
      "id": "alternative-install-using-the-redis-cask",
      "title": "Alternative: install using the Redis cask",
      "role": "content",
      "text": "> [!NOTE]\n> The Homebrew formula described in [Install using Homebrew](#install-using-homebrew) is the preferred way to install Redis Open Source on macOS.\n\nRedis also provides a Homebrew cask. First, tap the Redis Homebrew cask:\n\n\nbrew tap redis/redis\n\n\nOn Homebrew 6.0 and later, you also need to trust the tap. This step is not required on earlier versions of Homebrew.\n\n\nbrew trust redis/redis\n\n\nNext, run `brew install`:\n\n\nbrew install --cask redis\n\n\nStart the server with the configuration file that the cask installs:\n\n\nredis-server $(brew --prefix)/etc/redis.conf\n\n\n> [!NOTE]\n> Because Redis is installed using a Homebrew cask with the `brew tap` command, it is not integrated with the `brew services` command.\n\nTo uninstall the cask, run:\n\n\nbrew uninstall --cask redis\nbrew untap redis/redis"
    },
    {
      "id": "next-steps",
      "title": "Next steps",
      "role": "content",
      "text": "Once you have a running Redis instance, you may want to:\n\n* Try the [Redis CLI tutorial](https://redis.io/docs/latest/develop/tools/cli)\n* Connect using one of the [Redis clients](https://redis.io/docs/latest/develop/clients)\n* Connect using [Redis Insight](https://redis.io/docs/latest/develop/tools/insight)"
    }
  ],
  "examples": [
    {
      "id": "upgrade-from-an-earlier-version-of-the-formula-ex0",
      "language": "bash",
      "code": "diff $(brew --prefix)/etc/redis.conf $(brew --prefix)/etc/redis.conf.default",
      "section_id": "upgrade-from-an-earlier-version-of-the-formula"
    },
    {
      "id": "upgrade-from-an-earlier-version-of-the-formula-ex1",
      "language": "bash",
      "code": "cp $(brew --prefix)/etc/redis.conf $(brew --prefix)/etc/redis.conf.backup",
      "section_id": "upgrade-from-an-earlier-version-of-the-formula"
    },
    {
      "id": "upgrade-from-an-earlier-version-of-the-formula-ex2",
      "language": "bash",
      "code": "cp $(brew --prefix)/etc/redis.conf.default $(brew --prefix)/etc/redis.conf",
      "section_id": "upgrade-from-an-earlier-version-of-the-formula"
    },
    {
      "id": "migrate-from-the-redis-cask-ex0",
      "language": "bash",
      "code": "brew uninstall --cask redis",
      "section_id": "migrate-from-the-redis-cask"
    },
    {
      "id": "migrate-from-the-redis-cask-ex1",
      "language": "bash",
      "code": "brew untap redis/redis",
      "section_id": "migrate-from-the-redis-cask"
    },
    {
      "id": "migrate-from-the-redis-cask-ex2",
      "language": "bash",
      "code": "ls -l $(brew --prefix)/etc/redis.conf",
      "section_id": "migrate-from-the-redis-cask"
    },
    {
      "id": "migrate-from-the-redis-cask-ex3",
      "language": "bash",
      "code": "-rw-r--r--@ 1 user  admin  122821  2 Oct 16:07 /opt/homebrew/etc/redis.conf",
      "section_id": "migrate-from-the-redis-cask"
    },
    {
      "id": "migrate-from-the-redis-cask-ex4",
      "language": "bash",
      "code": "rm -iv $(brew --prefix)/etc/redis.conf",
      "section_id": "migrate-from-the-redis-cask"
    }
  ]
}
