Skip to content
Runbook

Install Redis on macOS

Ultra-fast in-memory key-value database, used as a cache, message broker, and session store.

Cachecachein-memorykey-valuenosqlpub-subbroker

Installation

Server (Homebrew) · Homebrew
brew install redis

Installs redis-server and redis-cli.

Verify the installation

Verify
redis-cli --version

Service

Start
brew services start redis
Stop
brew services stop redis
Status
brew services info redis
Restart
brew services restart redis

Important files

TypePathDescription
config/opt/homebrew/etc/redis.confMain configuration file (Apple Silicon). On Intel: /usr/local/etc/redis.conf.
data/opt/homebrew/var/db/redisPersistence directory (dump.rdb / appendonly). On Intel: /usr/local/var/db/redis.

Default ports

6379

Command-line tools

  • redis-cliCommand-line client to interact with the server.
  • redis-serverStart the server manually with a configuration file.

Uninstall

Uninstall
brew services stop redis
brew uninstall redis

Good to know

  • The /opt/homebrew paths correspond to Apple Silicon; on an Intel Mac, replace with /usr/local. Check with `brew --prefix`.

Installation with Homebrew

Homebrew is the standard route on macOS. The redis formula provides both the server (redis-server) and the client (redis-cli). The installation prefix depends on the architecture: /opt/homebrew on Apple Silicon (M1/M2/M3…), /usr/local on Intel. Use brew --prefix to remove any ambiguity.

Running as a service

brew services start redis registers Redis as a launchd agent that restarts automatically at login. For one-off use without a service, run redis-server /opt/homebrew/etc/redis.conf directly in the foreground. Then verify connectivity with redis-cli ping, which should respond PONG.

Common pitfalls

By default, Redis is only bound to 127.0.0.1 and does not require a password: never expose it on a public interface without setting requirepass and a firewall. If port 6379 is already taken, adjust port in the configuration file then restart the service.