Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have local Redis instance listening on Unix socket. Is it possible to allow remote connections to this Redis instance via TCP? Any solutions? Maybe some kind of proxying TCP <> Unix socket?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

There is no need for a proxy of some kind, you can enable both socket and TCP listening in redis.conf like this:

port 6379
# bind 127.0.0.1

unixsocket /tmp/redis.sock

Having the bind 127.0.0.1 commented out defaults to listen on all interfaces.

share|improve this answer
    
thank you! Very simple :) By the way, will this trick work with memcached? –  Kirzilla Apr 24 at 21:21
    
@Kirzilla no, memcached is either socket or TCP –  faker Apr 24 at 21:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.