Skip to content
PyRax implementation for Django
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


Build Status

Django-rax is an implementation of pyrax for Django that allows you to synchronize your static files with Rackspace Cloud Files. Also included is an optional storage backend for your media files.

This project is under development and should not be used in a production environment.


Install via pip:

$ pip install django-rax

Add rax to your INSTALLED_APPS. If you want to use the storage backend for your media files, add this to



You will need to provide your Rackspace credentials (username, and API key). These can be obtained from the "mycloud" control panel.

RAX = {
  'USERNAME': 'yourusername',
  'API_KEY': 'yourapikey',
  'REGION': 'ORD',
  'CONTAINER': 'yourcontainer'}

"REGION" can be one of ORD, DFW, or LON. If this is not specified, it will default to Chicago (ORD).

Media files are uploaded to the root of your container, and static files will be prefixed by the base name of your STATIC_ROOT setting; for example, if your STATIC_ROOT is /Users/me/myproject/static/, then your static files will be prefixed with 'static/'. That being said, your STATIC/MEDIA URL settings should look something like:


Django Compressor

If you use django-compressor, you will need to turn on the compress offline option to ensure the compressed files are available for syncing.



Use the command line to synchronize your static files with Rackspace:

$ python raxsync

If you use the RaxStorage backend, your media files will be saved both locally and to Rackspace as they are added. If you have existing media files that need to be uploaded, use the management command with the media flag:

$ python raxsync --media


Email any questions to or report issues on GitHub

Something went wrong with that request. Please try again.