Django SSL Server is an SSL-enabled development server for the Django Framework, providing a `runsslserver` management command to serve projects over HTTPS during local development. It ships with a self-signed certificate for immediate use. The current version, 0.22, was released in December 2019. While primarily maintained by the community, recent pull requests indicate ongoing efforts to ensure compatibility with newer Django and Python versions. It is strictly intended for development and should never be used in production environments.
pip install django-sslserverVerified import paths — ran on the pinned version, not inferred.
To quickly get started, add 'sslserver' to your `INSTALLED_APPS` in `settings.py`. Then, from your project's root directory, run the `runsslserver` management command. Your Django application will then be accessible via HTTPS, typically at `https://127.0.0.1:8000/`.
For production, use a proper web server like Nginx or Apache with a Gunicorn/uWSGI application server, and handle SSL/TLS termination at the web server level with a trusted certificate authority (e.g., Let's Encrypt).
For development, you can either ignore the warning, explicitly trust the provided `development.crt` in your browser's settings, or configure `runsslserver` to use a locally trusted certificate generated by tools like `mkcert`.
Check for community-maintained forks like `django-sslserver-v2` or pull requests (e.g., for Django 5 and Python 3.12 compatibility on GitHub) that address newer version support. Consider contributing to or using these updated branches.
Use the `--nostatic` option when running `runsslserver` if your static files are handled by another component: `python manage.py runsslserver --nostatic`.