I want to use django with celery (redis). Do I need to install redis on the server of my django application ? or can I have a seperate redis server?

Viewed 186

I installed redis on an ubuntu server following these guidlines. I want to use it with celery for a Django application. My Django application is running on another server. Now I'm confused however on how to set the Django settings, since everywhere I looked I could only find writings about a "localhost". Is it possible to use celery and django with redis on another server ? What Django settings.py do I need to add ?

1 Answers

Just on your settings do:

CELERY_BROKER_URL = 'redis://'+REDIS_HOST+':6379/'+REDIS_DB

Where REDIS_HOST is your redis IP and REDIS_DB your db (this one is optional)

Related