Django Autocert is a Django app to automatically obtain and renew X.509 (i.e. TLS or SSL) certificates from Let's Encrypt or other certificate authorities that support the ACME protocol.
- Django >=1.8
django.contrib.sites
in your INSTALLED_APPS
pip install django-autocert
- Add
autocert
toINSTALLED_APPS
- Add
autocert.middleware.AcmeChallengeMiddleware
toMIDDLEWARE_CLASSES
, ahead ofdjango.middleware.security.SecurityMiddleware
if it's present. ./manage.py migrate
django-autocert requires cryptography which has platform-specific installation requirements for Linux and macOS:
Debian and Ubuntu
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
RHEL/Fedora
sudo yum install gcc libffi-devel python-devel openssl-devel
macOS
brew install openssl env LDFLAGS="-L$(brew --prefix openssl)/lib" CFLAGS="-I$(brew --prefix openssl)/include" pip install cryptography
django-autocert is MIT licensed
Patrick Farrell @farrepa on Github and Twitter