I've got a redis db. Now I need to make it work locally. I mean I want it to be accessable on my local machine only. No requests over network. How can I do it?

I found redis.conf with the following content:

# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.


Row bind was commented before. I restarted redis using service redis restart, but I still able to read from redis over network.

1 Answer 1


Set the config option "protected-mode" to "yes" and leave uncommented the "bind" option:

rotected-mode yes

Then be sure your running redis-server instance is starting with the config you're modifying. Stop the instance and run it manually with:

redis-server /path/to/your/redis.conf

Redis will run in foreground&verbose mode (showing a pretty ascii art). Then check its binding address as usual:

# netstat -nap|egrep redis
tcp        0      0*               LISTEN      30772/redis-server 

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .