Search code examples
redisconnectionhomestead

Connect to Homestead Redis instance from local machine


I'm trying to use redisinsight to connect to the Homestead redis instance, but when I insert the default connection parameters, I get the following error:

Could not connect: Error 61 connecting to 127.0.0.1:6379. Connection refused.

Same error with localhost as host.

enter image description here

I made sure redis is running: enter image description here

Any idea why and how to connect?

I run Homestead v7.2.1.


Solution

    • Connect to your vagrant box
    • Navigate to /etc/redis/ directory and open redis.conf
    • find bind 127.0.0.1 line and replace with bind 0.0.0.0
    • restart the server by service redis-server restart command
    • Navigate to redisinsight
    • Type 192.168.10.10(the ip address written in your homestead.yaml) in Host & 6379 in Port