Skip to content

Instantly share code, notes, and snippets.

Last active April 26, 2024 21:40
Show Gist options
  • Save subfuzion/9631143 to your computer and use it in GitHub Desktop.
Save subfuzion/9631143 to your computer and use it in GitHub Desktop.
redis auto start OS X

Install with Homebrew

brew install redis

Set up launchctl to auto start redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)

You can use launchctl to start and stop redis

$ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
$ launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

You can also more conveniently use brew to start, stop, and verify service status

$ brew services list | grep redis
$ brew services start redis
$ brew services stop redis


The default plist provided by homebrew stores the redis configuration at /usr/local/etc/redis.conf.

For more about launchctl see:

Copy link

it seems services isn't a valid brew command

Copy link

liuzxc commented Jul 6, 2015

I met the error as below:

/Users/liuxingqi/Library/LaunchAgents/homebrew.mxcl.redis.plist: Invalid property list

Copy link

yazinsai commented Sep 3, 2015

To get the services command, first do brew tap homebrew/services

Copy link

It cool. thank you @yazinsai.

Copy link

thanks @yazinsai.

Copy link

Bartuz commented Oct 23, 2015

These instructions should be added to brew info redis.

Copy link

It looks like brew services list now taps that automatically 😄

Copy link

wenweih commented Mar 29, 2016

Copy link

Not sure why, but I need to start and stop redis with sudo, otherwise, it will not be started.

sudo brew services start redis
sudo brew services stop redis

Copy link

Thanks, it works

Copy link

clint74 commented Jan 24, 2021

Still working, tks!

Copy link


Copy link

For Apple Silicon, brew install libraries under /opt/homebrew
So path changes a little bit:

ln -sfv /opt/homebrew/var/homebrew/linked/redis/*.plist ~/Library/LaunchAgents/


launchctl load ~/Library/LaunchAgents/homebrew.mxcl.redis.plist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment