Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an application server that is connecting to an external redis server for pub/sub, I am currently using a redis python library, when I connect using the library it assumes the redis server is started locally at Is there an environment variable that sets the default redis connection to I can specify the server end point in my application code but I would prefer to use an environment variable if one is available.

share|improve this question
What is the library you are using ? – Spredzy May 27 '13 at 17:57
brukva library for tornado – S-K' May 27 '13 at 18:17
up vote 4 down vote accepted

It is not an environmental setting, but a default setting. Check the source code:

def __init__(self, host='localhost', port=6379, password=None,

Change it in the configuration file:

# Accept connections on the specified port, default is 6379.
# If port 0 is specified Redis will not listen on a TCP socket.
#port 6379

# If you want you can bind a single interface, if the bind option is not
# specified all the interfaces will listen for incoming connections.
# bind
share|improve this answer
Redis is on a separate server, what configuration file are you referring to? – S-K' May 28 '13 at 19:37
@S-K' the one I linked – dawud May 28 '13 at 19:39

Your Answer


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.