{"id":7179,"library":"django-sslserver","title":"Django SSL Server","description":"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.","status":"maintenance","version":"0.22","language":"en","source_language":"en","source_url":"https://github.com/teddziuba/django-sslserver","tags":["Django","SSL","HTTPS","development server","local development"],"install":[{"cmd":"pip install django-sslserver","lang":"bash","label":"Install latest version"}],"dependencies":[{"reason":"Core framework dependency, as it provides a management command for Django projects.","package":"Django"}],"imports":[{"note":"Django SSL Server is used by adding 'sslserver' to your project's INSTALLED_APPS setting in `settings.py`. There are no direct Python imports of classes or functions for typical use.","symbol":"sslserver","correct":"INSTALLED_APPS = [... 'sslserver', ...]"}],"quickstart":{"code":"# settings.py\nINSTALLED_APPS = [\n    # ... other apps\n    'sslserver',\n]\n\n# Terminal\n# navigate to your Django project root (where manage.py is located)\n# Then run the development server with SSL:\n# python manage.py runsslserver\n# Access your app at https://127.0.0.1:8000/","lang":"python","description":"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/`."},"warnings":[{"fix":"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).","message":"Django SSL Server is strictly for development purposes and MUST NOT be used in production environments. It lacks the security, performance, and robustness required for live applications.","severity":"breaking","affected_versions":"All versions"},{"fix":"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`.","message":"When using the default self-signed certificate, browsers will display security warnings (e.g., 'Your connection is not private'). This is expected behavior because the certificate is not issued by a trusted Certificate Authority.","severity":"gotcha","affected_versions":"All versions"},{"fix":"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.","message":"Version 0.22 officially supports Django up to 2.2 and Python up to 3.7. Using it with newer Django or Python versions might lead to compatibility issues or errors.","severity":"gotcha","affected_versions":"<0.22 for modern Django/Python"},{"fix":"Use the `--nostatic` option when running `runsslserver` if your static files are handled by another component: `python manage.py runsslserver --nostatic`.","message":"When using third-party static file handlers (like WhiteNoise or `dj_static`), `django-sslserver` might not serve static files correctly, resulting in 404 errors.","severity":"gotcha","affected_versions":"All versions, especially with third-party static handlers"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Ensure `pip install django-sslserver` has been run and add `'sslserver'` to your `INSTALLED_APPS` list in `settings.py`.","cause":"The 'sslserver' application has not been added to your Django project's INSTALLED_APPS, or the package was not installed.","error":"ModuleNotFoundError: No module named 'sslserver'"},{"fix":"For browser warnings, accept the self-signed certificate in your browser or install `sslserver/certs/development.crt` as a trusted certificate. If providing custom certificates, verify that the `--certificate` and `--key` paths are correct and the files are valid.","cause":"This usually indicates an issue with the SSL certificate and key, or the browser not trusting the self-signed certificate. It can also occur if the certificate/key files are not found or are corrupted.","error":"ERR_SSL_PROTOCOL_ERROR (browser error) or [SSL: CERTIFICATE_VERIFY_FAILED] (server error)"},{"fix":"If using an external static file handler, try running `python manage.py runsslserver --nostatic`. Ensure `DEBUG = True` and `STATIC_URL`, `STATICFILES_DIRS`, and `STATIC_ROOT` are correctly configured in `settings.py` for development.","cause":"The development server might not be configured to serve static files, especially if a third-party static file handler is active, or if using an older version of `django-sslserver` that had issues with static files.","error":"Static files (CSS, JS, images) are not loading (404 errors) when using runsslserver."}]}