Askeladd's avatar

Laravel & redis : connect redis to remote server

Hello,

I'm working on two differents machines, and i have redis-server running on only of them. I want to broadcast events that are on my computer without redis-server using redis-server of the second machine.

To connect redis to a remote server i've already tried redis-server -h myadressIP but i keep getting this error :

Could not connect to Redis at myadressIP: Connection refused.

So i tried to comment the line with "bind 127.0.0.1" that is the default adress IP in /etc/redis/redis.conf

but I still have the error.

Do I have to install redis-server on both of my computers ? (I prefer not to because i'm not suppose to)

0 likes
2 replies
bobbybouwmann's avatar
Level 88

You can only connect to that other Redis server if it's already running and being exposed by your other computer. If there is no (local network) IP address or domain name you can connect to it won't work at all.

1 like
Askeladd's avatar

Thank you for your response :)

It was really hard for me to understand how it works.

Have a good day sir :)

1 like

Please or to participate in this conversation.