Fix: Could not connect to Redis at Connection refused

macOS % redis-cli

Could not connect to Redis at Connection refused
not connected>

If you are trying to connect to the redis-cli and you get an error connecting to redis at localhost port 6379 then the fix is simple, first make sure that the Redis server is running, if not, then run the below command in the terminal to turn it on



If Redis is not installed on your Mac, then you can install it using the brew package manager,

brew install redis

Next, you can start the server as follows,

brew services start redis


If you are on a Linux system, then you can install Redis as follows.

sudo apt-get install redis

And we can start the Redis server as follows,

sudo service redis start
Start Redis Server

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap