Installation

Quickstart

# Install with your chosen backend
pip install django-prodserver[gunicorn]

Add to your settings.py:

INSTALLED_APPS = [
    # ...
    "django_prodserver",
]

PRODUCTION_PROCESSES = {
    "web": {
        "BACKEND": "django_prodserver.backends.servers.gunicorn.GunicornServer",
        "ARGS": {"bind": "0.0.0.0:8000", "workers": "2"},
    }
}

Run your server:

python manage.py server web

Deprecated since version 3.0.0: The prodserver command has been renamed to server. The old name continues to work as an alias but will be removed in django-prodserver 4.0.0.


Choosing a Backend

Web Servers

Backend

Best For

Gunicorn

Traditional sync Django apps, Linux production

Uvicorn

Async Django, WebSockets

Waitress

Windows, pure Python environments

Granian

Maximum performance (Rust-based), WSGI/ASGI

Background Workers

Backend

Best For

Celery

Distributed tasks, complex workflows, Redis/RabbitMQ

Celery Flower

Monitoring/admin web UI for Celery clusters

Django Tasks

Simple tasks, no external dependencies

Django-Q2

ORM-backed queues, scheduled tasks


Installing Backends

Backends can be installed via pip extras or separately.

Separately

pip install gunicorn
pip install uvicorn
pip install waitress
pip install granian
pip install celery[redis]  # or celery[rabbitmq]
pip install django-q2

See individual backend documentation for detailed requirements.


Configuration

A more complete example with web and worker processes:

PRODUCTION_PROCESSES = {
    "web": {
        "BACKEND": "django_prodserver.backends.servers.gunicorn.GunicornServer",
        "ARGS": {"bind": "0.0.0.0:8000", "workers": "4"},
    },
    "worker": {
        "BACKEND": "django_prodserver.backends.workers.celery.CeleryWorker",
        "APP": "myproject.celery.app",
        "ARGS": {"concurrency": "4"},
    },
}

See Configuration for all options.


Troubleshooting

ImportError: No module named ‘gunicorn’ : Install the backend: pip install django-prodserver[gunicorn]

Django app not found : Add "django_prodserver" to INSTALLED_APPS

PRODUCTION_PROCESSES not found : Add the PRODUCTION_PROCESSES dict to your settings

For more help, see Troubleshooting.


Next Steps