Connectivity Troubleshooting

I'm trying to connect to my Redis instance, but I keep getting: "Could not connect to Redis at 127.0.0.1:6379: Connection refused"

This error tells us that you're trying to connect to a local (127.0.0.1) Redis instance on port 6379, but there isn't a server listening there.

Many Redis clients (notably `redis-cli`) assume that you want to connect to a local Redis server — that is, one that is running on the same machine that your client is running on. If that's the case for you, the problem is probably just that you haven't started the server yet. Running `redis-server` in a dedicated terminal window will start a local test server.

If you're trying to connect to a remote server like RedisGreen, you'll need to specify the complete address of your server. If you're using `redis-cli`, this will look something like this:

redis-cli -h spiderman.redisgreen.net -p 5033 -a ABCDEFG

For clients other than `redis-cli` you may need to update the connection information for Redis in the form of a URL, like this:

redis://x:ABCDEFG@spiderman.redisgreen.net:5033/

Both of these examples say: "connect to host 'spiderman.redisgreen.net', on port '5033', with password 'ABCDEFG'." If you're using RedisGreen, you can copy and paste the full connection details by clicking the *Connect* button on your dashboard.

If you're still having troubles connecting, contact our support team — we're always ready to help.


Explore Your Redis Memory Usage with an Interactive Map

RedisMonitor shows you large keys, memory leaks, old keys, and other potential problems quickly. Try it today without a credit card.

← Back to docs