Intent hub

Deploy Django

Step-by-step guides for shipping Django to a server, a container platform, or a managed host.

Best for developers moving from local setup to a reliable first production release.

from a repository to a live URLCoderepositoryHostVPS, PaaS, cloudApp serverGunicornProxyNginx, TLSLivehttps://Deploy guides cover one hosting route each, end to end, with verification at every step

Deploy guides take one hosting route from start to finish: a VPS with Gunicorn and Nginx, Docker Compose, Kubernetes, or a platform such as Render, Fly.io, or AWS. Each one ends with the site live over HTTPS and a way to verify it.

They assume a working Django project and explain every production-specific setting along the way. If you have not chosen where to host yet, start with the hosting comparison, then pick the guide for that route.

Topics in Deploy

Browse this hub

Grouped by guide type, then difficulty

241 of 241 guides

Narrow the list by experience level or stack, then work through the matching guides in recommended order.

Difficulty
All levels
Beginner
Intermediate
Advanced
Stack
All stacks
django · 240
postgresql · 48
docker · 44
nginx · 38
gunicorn · 33
kubernetes · 19
aws · 18
celery · 17
redis · 13
azure · 7
django-storages · 7
systemd · 7
whitenoise · 7
google-cloud · 6
github-actions · 5
caddy · 4
cloudflare · 4
digitalocean · 4
linux · 4
python · 4
ubuntu · 4
email · 3
paas · 3
sqlite · 3
ssh · 3
uvicorn · 3
apache · 2
bash · 2
boto3 · 2
cdn · 2
cert-manager · 2
certbot · 2
cloud · 2
drf · 2
git · 2
helm · 2
heroku · 2
litestream · 2
memcached · 2
mysql · 2
poetry · 2
s3 · 2
swarm · 2
traefik · 2
uv · 2
uwsgi · 2
waitress · 2
age · 1
allauth · 1
ansible · 1
anymail · 1
argo-cd · 1
atlas · 1
aws-ec2 · 1
aws-lambda · 1
aws-s3 · 1
azure-devops · 1
backblaze-b2 · 1
bitbucket · 1
buildkite · 1
buildpacks · 1
buildx · 1
bunny-cdn · 1
cdk · 1
channels · 1
ci-cd · 1
circleci · 1
cloud-init · 1
cloudinary · 1
cockroachdb · 1
compose · 1
cosign · 1
cpanel · 1
cron · 1
crowdsec · 1
distroless · 1
divio · 1
django-cms · 1
django-environ · 1
django-ninja · 1
django-otp · 1
django-q2 · 1
dns · 1
dokku · 1
dokploy · 1
doppler · 1
dramatiq · 1
easypanel · 1
elasticsearch · 1
external-secrets · 1
fabric · 1
fastly · 1
fly-io · 1
freebsd · 1
gcp-cloud-run · 1
gdal · 1
gettext · 1
ghcr · 1
gitea · 1
gitlab · 1
glitchtip · 1
granian · 1
graphql · 1
haproxy · 1
hetzner · 1
huey · 1
hypercorn · 1
iis · 1
infisical · 1
javascript · 1
jenkins · 1
k3s · 1
kamal · 1
keda · 1
key-vault · 1
koyeb · 1
kustomize · 1
linode · 1
logging · 1
meilisearch · 1
minio · 1
mod_wsgi · 1
mongodb · 1
multi-tenant · 1
neon · 1
new-relic · 1
nextjs · 1
nginx-unit · 1
nixos · 1
node · 1
nomad · 1
northflank · 1
odbc · 1
openshift · 1
openssl · 1
opentelemetry · 1
oracle-cloud · 1
passenger · 1
pgbouncer · 1
pgvector · 1
pip · 1
pip-tools · 1
podman · 1
portainer · 1
postgis · 1
procrastinate · 1
pulumi · 1
pydantic · 1
pymemcache · 1
pythonanywhere · 1
rabbitmq · 1
railway · 1
raspberry-pi · 1
react · 1
render · 1
rhel · 1
rq · 1
saleor · 1
scalingo · 1
secret-manager · 1
security · 1
sentry-sdk · 1
ses · 1
signoz · 1
sops · 1
sql-server · 1
ssm · 1
strawberry · 1
stripe · 1
supabase · 1
supervisor · 1
tailscale · 1
tailwind · 1
typesense · 1
upstash · 1
upsun · 1
uptime-kuma · 1
valkey · 1
varnish · 1
vault · 1
vector · 1
vercel · 1
vite · 1
vultr · 1
waf · 1
wagtail · 1
wasabi · 1
windows · 1
wireguard · 1
woodpecker · 1
zappa · 1
Foundations

Foundations guides

Learn the concepts, tradeoffs, and prerequisites before you change production infrastructure.

19
Beginner
16 guides
Deployment
Foundations
Beginner
django
gunicorn
Django WSGI vs ASGI: Which One Should You Deploy?

When you deploy Django in production, you will see both WSGI and ASGI recommended.

#django
#gunicorn
#uvicorn
Deployment
Foundations
Beginner
django
whitenoise
Django Static vs Media Files in Production

Many Django deployments break because static files and media files are treated as the same thing.

#django
#whitenoise
Deployment
Foundations
Beginner
django
cloud
Best Hosting Options for Django Deployment in 2026

Choosing the best hosting for Django deployment is not about finding the cheapest server or the most popular cloud.

#django
#cloud
Deployment
Foundations
Beginner
django
Configure Django Environment Variables for Production

Read Django settings from environment variables safely: typed parsing, fail-fast secrets, systemd and Docker env files, and verification.

#django
#configuration
#security
Deployment
Foundations
Beginner
django
dns
Point a Domain at Your Django Server (DNS Setup)

Connect a domain to a Django server: A and AAAA records, www and apex, CNAMEs for platforms, TTLs, verifying propagation with dig, and matching ALLOWED_HOSTS and certificates.

#django
#dns
#domains
#https
Deployment
Foundations
Beginner
django
gunicorn
Gunicorn vs uWSGI for Django

Compare Gunicorn and uWSGI for serving Django in production: configuration complexity, performance, worker models, features like the uwsgi protocol and emperor mode, maintenance status, and which to choose for new and existing projects.

#django
#gunicorn
#uwsgi
Deployment
Foundations
Beginner
django
gunicorn
Gunicorn vs Uvicorn for Django

Compare Gunicorn and Uvicorn for Django: WSGI versus ASGI, when async views and WebSockets need Uvicorn, running Uvicorn workers under Gunicorn, performance for typical database-bound apps, and how to choose.

#django
#gunicorn
#uvicorn
Deployment
Foundations
Beginner
django
nginx
Nginx vs Caddy for Django

Compare Nginx and Caddy as the reverse proxy for Django: automatic HTTPS versus Certbot, configuration size, performance, static files, ecosystem and documentation, on-demand TLS for tenants, and which suits your deployment.

#django
#nginx
#caddy
Deployment
Foundations
Beginner
django
docker
Docker vs a Plain VPS for Django

Should you deploy Django with Docker or directly on a VPS with systemd? Compare reproducibility, deploy workflow, performance, debugging, security updates, and team skills, with a recommendation for solo developers, small teams, and growing apps.

#django
#docker
#vps
Deployment
Foundations
Beginner
django
paas
Alternatives to Heroku for Hosting Django

Compare Heroku alternatives for deploying Django: Render, Railway, Fly.io, DigitalOcean App Platform, Google Cloud Run, AWS App Runner, PythonAnywhere, and self-hosted PaaS like Coolify and Dokku, by workflow, workers, databases, and cost model.

#django
#paas
#heroku
Deployment
Foundations
Beginner
django
paas
Render vs Railway vs Fly.io for Django

Compare Render, Railway, and Fly.io for hosting Django: build and deploy workflow, workers and cron, managed PostgreSQL, migrations, regions and latency, persistent storage, billing models, and operational effort, with picks for common scenarios.

#django
#render
#fly-io
Deployment
Foundations
Beginner
django
postgresql
PostgreSQL vs MySQL for Django

Compare PostgreSQL and MySQL (and MariaDB) as the database for a Django project: Django feature support, transactional DDL for migrations, JSON, full-text search, extensions, managed hosting, performance, and team experience.

#django
#postgresql
#mysql
Deployment
Foundations
Beginner
django
redis
Redis vs Memcached for Django Caching

Compare Redis and Memcached as the Django cache backend: data structures, persistence, eviction, multi-purpose use for sessions, Celery, and rate limiting, memory efficiency, scaling, and managed options, with a recommendation.

#django
#redis
#memcached
Deployment
Foundations
Beginner
django
whitenoise
WhiteNoise vs Nginx for Django Static Files

Compare serving Django static files with WhiteNoise inside the app versus Nginx or a CDN: setup, compression and cache headers, performance, containers and PaaS, media files, and the setup that suits each deployment.

#django
#static-files
#whitenoise
Deployment
Foundations
Beginner
django
uv
uv vs Poetry vs pip for Django Deployments

Compare uv, Poetry, and pip with pip-tools for managing Django dependencies in production: lock files, install speed in CI and Docker, reproducibility with hashes, Python version management, and migration paths between them.

#django
#uv
#poetry
Deployment
Foundations
Beginner
django
gunicorn
Why You Should Not Use runserver in Production

Why Django’s manage.py runserver is not for production: single-process design, no security review, static file handling, auto-reload, and DEBUG coupling, plus what to run instead with Gunicorn, Uvicorn, and a reverse proxy.

#django
#runserver
#gunicorn
Intermediate
3 guides
Deployment
Foundations
Intermediate
django
security
Manage Django Secrets in Production

Store, load, and rotate Django secrets: inventories, file-based secrets, systemd credentials, cloud secret managers, and SECRET_KEY_FALLBACKS.

#django
#security
#secrets
Deployment
Foundations
Intermediate
django
kubernetes
Kubernetes vs Docker Compose for Django

Compare Kubernetes and Docker Compose for running Django in production: single-host simplicity versus multi-node scheduling, rolling updates, autoscaling, secrets, operational cost, and when a team should move from Compose to Kubernetes.

#django
#kubernetes
#docker-compose
Deployment
Foundations
Intermediate
django
celery
Celery Alternatives for Django Background Jobs

Compare Celery alternatives for Django background jobs: Django’s built-in tasks framework, django-rq, Dramatiq, Huey, django-q2, and database-backed queues, by setup effort, brokers, scheduling, retries, monitoring, and scale.

#django
#celery
#background-jobs
Tasks

Tasks guides

Follow actionable deployment and operations guides you can work through step by step.

222
Beginner
49 guides
Deployment
Tasks
Beginner
django
docker
How to Dockerize a Django App for Production

A Dockerized Django app that works in development is not automatically safe for production.

#django
#docker
Deployment
Tasks
Beginner
django
render
How to Deploy Django on Render

It is easy to get a Django app running on Render, but it is also easy to ship an unsafe or incomplete production setup.

#django
#render
#postgresql
Deployment
Tasks
Beginner
django
railway
How to Deploy Django on Railway

If you want to deploy Django on Railway, the main challenge is not just getting a container to start.

#django
#railway
#postgresql
Deployment
Tasks
Beginner
django
nginx
Configure HTTPS for Django with Let's Encrypt

A Django app running over plain HTTP is not safe for production. Login sessions, admin access, CSRF tokens, API traffic, and password resets can all be exposed in transit if TLS...

#django
#nginx
#certbot
Deployment
Tasks
Beginner
django
whitenoise
How to Serve Django Static Files with WhiteNoise

Django does not safely serve static files in production by default. With DEBUG=False, you still need a production path for CSS, JavaScript, fonts, and images collected from your...

#django
#whitenoise
Deployment
Tasks
Beginner
django
postgresql
How to Connect Django to PostgreSQL in Production

Connecting Django to PostgreSQL in production is more than changing the DATABASES setting.

#django
#postgresql
Deployment
Tasks
Beginner
django
heroku
Deploy Django on Heroku with Postgres

Deploy a Django app to Heroku with Gunicorn, Heroku Postgres, WhiteNoise, a release-phase migration, and production-safe settings.

#django
#heroku
#postgresql
Deployment
Tasks
Beginner
django
pythonanywhere
Deploy Django on PythonAnywhere

Deploy an existing Django project on PythonAnywhere with a virtualenv, a correct WSGI file, MySQL, static file mappings, environment variables, and forced HTTPS.

#django
#pythonanywhere
Deployment
Tasks
Beginner
django
email
Configure Django Email Sending in Production

Send Django email reliably in production: SMTP TLS settings, sender addresses, SPF, DKIM and DMARC, timeouts, background sending, and tests.

#django
#email
#smtp
Deployment
Tasks
Beginner
django
systemd
Schedule Django Management Commands with Cron or systemd Timers

Run Django management commands on a schedule with systemd timers or cron: environment loading, overlap locks, logging, and failure alerts.

#django
#systemd
#cron
Deployment
Tasks
Beginner
django
uv
Deploy Django with uv for Reproducible Installs

Deploy Django reproducibly with uv: lockfiles, uv sync --locked without dev tools, managed Python, Docker layer caching, and CI checks.

#django
#uv
#python
Deployment
Tasks
Beginner
django
aws
Deploy Django on AWS Lightsail

Deploy Django on an AWS Lightsail instance with a static IP, firewall rules, Gunicorn, Nginx, HTTPS, and an optional Lightsail managed PostgreSQL database.

#django
#aws
#lightsail
#nginx
Deployment
Tasks
Beginner
django
linode
Deploy Django on Akamai Cloud (Linode)

Deploy Django on an Akamai Cloud (Linode) compute instance with a Cloud Firewall, Gunicorn, Nginx, managed PostgreSQL, Object Storage for media, and backups.

#django
#linode
#nginx
#postgresql
Deployment
Tasks
Beginner
django
docker
Deploy Django with Coolify

Deploy Django on your own server with Coolify: Dockerfile builds from Git, managed PostgreSQL and Redis, automatic HTTPS, environment variables, migrations, and backups.

#django
#coolify
#docker
#self-hosted
Deployment
Tasks
Beginner
django
docker
Deploy Django with CapRover

Deploy Django with CapRover: captain-definition, a Gunicorn Dockerfile, one-click PostgreSQL, container port and HTTPS settings, persistent media, and safe migrations.

#django
#caprover
#docker
#self-hosted
Deployment
Tasks
Beginner
django
digitalocean
Deploy Django on DigitalOcean App Platform

Deploy Django on DigitalOcean App Platform with an app spec, Gunicorn, managed PostgreSQL, bindable environment variables, a pre-deploy migration job, and WhiteNoise.

#django
#digitalocean
#paas
#postgresql
Deployment
Tasks
Beginner
django
supervisor
Run Django and Celery with Supervisor

Supervise Gunicorn and Celery for Django with Supervisor: program configs, environment variables, stop signals and timeouts, log rotation, group restarts, and when to prefer systemd.

#django
#supervisor
#gunicorn
#celery
Deployment
Tasks
Beginner
django
tailwind
Build Tailwind CSS for Django in Production

Build a minified Tailwind CSS file for Django releases: scanning templates and Python code, the standalone CLI without Node, Docker build stages, collectstatic hashing, and missing-class bugs.

#django
#tailwind
#css
#static-files
Deployment
Tasks
Beginner
django
git
Deploy Django from a Private Git Repository with Deploy Keys

Let a Django server pull code from a private GitHub, GitLab, or Bitbucket repository with read-only deploy keys: SSH config aliases, known_hosts, private dependencies, and alternatives.

#django
#git
#ssh
#security
Deployment
Tasks
Beginner
django
gettext
Compile Django Translations During Deployment

Ship Django translations reliably: run compilemessages in CI or a Docker build stage with gettext, ignore virtualenvs, validate .po files, restart workers, and verify every language in production.

#django
#i18n
#translations
#deployment
Deployment
Tasks
Beginner
django
poetry
Deploy Django with Poetry

Deploy a Poetry-managed Django project: lock file checks, installing only main dependencies, in-project virtualenvs, multi-stage Docker builds without Poetry at runtime, and exporting requirements.

#django
#poetry
#python
#dependencies
Deployment
Tasks
Beginner
django
pip
Pin Django Dependencies with pip-tools and Hashes

Make Django installs reproducible and tamper-resistant with pip-tools: requirements.in, compiled pins with hashes, separate dev requirements, pip install --require-hashes, and safe upgrades.

#django
#pip
#dependencies
#security
Deployment
Tasks
Beginner
django
vultr
Deploy Django on Vultr

Deploy a Django app on a Vultr cloud compute instance: choose a plan and region, lock down SSH and the Vultr firewall, install Python, PostgreSQL, Gunicorn, and Nginx, add HTTPS, and set up backups and snapshots.

#django
#vultr
#vps
Deployment
Tasks
Beginner
django
raspberry-pi
Run Django in Production on a Raspberry Pi

Run a Django app reliably on a Raspberry Pi 4 or 5: use 64-bit Raspberry Pi OS on an SSD instead of an SD card, run Gunicorn and Nginx under systemd, expose it safely with Cloudflare Tunnel, and back up off the device.

#django
#raspberry-pi
#self-hosting
Deployment
Tasks
Beginner
django
cpanel
Deploy Django on cPanel Shared Hosting

Deploy Django on cPanel shared hosting with Setup Python App and Phusion Passenger: create the app and virtualenv, write passenger_wsgi.py, use MySQL or PostgreSQL, serve static files from public_html, and know the hosting limits.

#django
#cpanel
#shared-hosting
Deployment
Tasks
Beginner
django
git
Deploy Django With git push and a post-receive Hook

Deploy Django to your own server with git push production main: a bare repository with a post-receive hook that checks out the code, installs dependencies, runs migrations and collectstatic, and reloads Gunicorn, with safe failure handling.

#django
#git
#deployment
Deployment
Tasks
Beginner
django
digitalocean
Store Django Media Files on DigitalOcean Spaces

Store Django uploads on DigitalOcean Spaces with django-storages’ S3 backend: set the regional endpoint, create scoped access keys, choose private files with presigned URLs or public files behind the Spaces CDN, and configure CORS.

#django
#digitalocean
#media
Deployment
Tasks
Beginner
django
backblaze-b2
Store Django Media Files on Backblaze B2

Store Django uploads on Backblaze B2 through its S3-compatible API: create a bucket and application key, configure django-storages with the B2 endpoint, serve private files with presigned URLs, and put public files behind Cloudflare.

#django
#backblaze
#media
Deployment
Tasks
Beginner
django
docker
Run Django Management Commands in Docker and Kubernetes

Run Django manage.py commands against containerised deployments: docker compose exec versus run, kubectl exec versus one-off Jobs, loading the right settings and secrets, interactive shells, and keeping one-off commands out of web containers.

#django
#docker
#kubernetes
Deployment
Tasks
Beginner
django
docker
Create a Django Superuser in Production Without a Shell

Create the first Django admin user in production non-interactively: createsuperuser --noinput with DJANGO_SUPERUSER_ environment variables, one-off containers and Jobs, PaaS consoles, an idempotent management command, and securing the account afterwards.

#django
#admin
#deployment
Deployment
Tasks
Beginner
django
python
Split Django Settings for Development and Production

Organise Django settings for development, staging, and production: a settings package with base, dev, and prod modules, environment variables for secrets, DJANGO_SETTINGS_MODULE per environment, and tests that keep production settings safe.

#django
#settings
#configuration
Deployment
Tasks
Beginner
django
django-environ
Configure Django Settings With django-environ

Use django-environ to read Django settings from environment variables and .env files: typed values for DEBUG and ALLOWED_HOSTS, DATABASE_URL and CACHE_URL parsing, required variables, safe .env handling, and when to skip .env in production.

#django
#settings
#environment-variables
Deployment
Tasks
Beginner
django
nginx
Password-Protect a Django Staging Site

Keep a Django staging site private: HTTP basic auth in Nginx or Caddy with health-check and webhook exceptions, Django middleware for PaaS hosts, noindex headers, IP or VPN restrictions, and why basic auth interferes with API tokens.

#django
#staging
#nginx
Deployment
Tasks
Beginner
django
portainer
Deploy Django With Portainer Stacks

Deploy a Django app with Portainer: define a Compose stack with web, worker, Postgres, and Redis, pull images from a private registry, set environment variables and secrets, enable Git-based redeploys or webhooks, and add a reverse proxy for HTTPS.

#django
#portainer
#docker
Deployment
Tasks
Beginner
django
koyeb
Deploy Django on Koyeb

Deploy a Django app on Koyeb from GitHub or a Docker image: configure Gunicorn and the PORT, add a PostgreSQL database, set secrets, health checks, and regions, run migrations safely, serve static files with WhiteNoise, and attach a custom domain.

#django
#koyeb
#paas
Deployment
Tasks
Beginner
django
scalingo
Deploy Django on Scalingo

Deploy Django on Scalingo, the European PaaS: prepare a Procfile with web and postdeploy commands, add the PostgreSQL addon, configure environment variables, static files, and workers, and scale containers while keeping data in EU regions.

#django
#scalingo
#paas
Deployment
Tasks
Beginner
django
divio
Deploy Django on Divio

Deploy Django on Divio, a cloud platform built around Django and Docker: structure the project for Divio’s Dockerfile, read DEFAULT_DATABASE_DSN and storage DSNs, configure release commands for migrations, and promote changes from test to live environments.

#django
#divio
#paas
Deployment
Tasks
Beginner
django
dokploy
Deploy Django With Dokploy on Your Own Server

Deploy Django with Dokploy, an open-source self-hosted PaaS: install it on a VPS, create an application from Git with a Dockerfile or Nixpacks, add PostgreSQL and Redis, configure domains with automatic HTTPS, run migrations, and schedule database backups.

#django
#dokploy
#docker
Deployment
Tasks
Beginner
django
easypanel
Deploy Django With Easypanel

Deploy Django with Easypanel, a Docker-based server control panel: create an app service from GitHub with a Dockerfile or buildpacks, add Postgres and Redis services, set environment variables, mount volumes for media, and enable HTTPS on a custom domain.

#django
#easypanel
#docker
Deployment
Tasks
Beginner
django
nginx
Deploy Django Behind Nginx Proxy Manager

Put a Docker-based Django app behind Nginx Proxy Manager: create a proxy host with Let’s Encrypt, connect containers on a shared network, forward the right headers, serve static files, allow large uploads, and keep the admin UI private.

#django
#nginx
#docker
Deployment
Tasks
Beginner
django
huey
Run Huey as a Lightweight Django Task Queue

Run Huey for Django background tasks and periodic jobs in production: configure the Redis or SQLite storage, start the consumer with workers and the built-in scheduler, avoid duplicate periodic tasks, handle database connections, and supervise it with systemd.

#django
#huey
#background-jobs
Deployment
Tasks
Beginner
django
django-q2
Run Django-Q2 Workers and Schedules in Production

Run Django-Q2 in production: configure the ORM or Redis broker in Q_CLUSTER, start qcluster workers under systemd or containers, manage schedules in the admin, set timeouts and retries correctly, and avoid running duplicate clusters.

#django
#django-q2
#background-jobs
Deployment
Tasks
Beginner
django
redis
Use Upstash Redis With Django

Use Upstash serverless Redis with Django for caching, sessions, rate limiting, and Celery: connect over rediss:// with TLS, understand per-request pricing and connection limits, choose regions, and know when the REST API suits serverless deployments better.

#django
#redis
#serverless
Deployment
Tasks
Beginner
django
cloudinary
Store and Transform Django Media With Cloudinary

Use Cloudinary for Django media uploads: configure django-cloudinary-storage or the Cloudinary SDK, upload user images and video, generate resized and optimized URLs on the fly, sign uploads from the browser, and keep secrets and costs under control.

#django
#cloudinary
#media
Deployment
Tasks
Beginner
django
hetzner
Store Django Media on Hetzner Object Storage

Use Hetzner Object Storage for Django media and static files with django-storages: create a bucket and S3 credentials, set the regional endpoint and addressing style, choose public or private access with presigned URLs, configure CORS, and keep costs low next to Hetzner Cloud servers.

#django
#hetzner
#s3
Deployment
Tasks
Beginner
django
wasabi
Store Django Media on Wasabi Hot Cloud Storage

Use Wasabi S3-compatible storage for Django media and backups with django-storages: set the regional endpoint, create a restricted policy, serve files with presigned URLs or a CDN, and understand minimum storage duration and egress terms.

#django
#wasabi
#s3
Deployment
Tasks
Beginner
django
bunny-cdn
Serve Django Static and Media Files Through Bunny CDN

Put Bunny CDN in front of a Django site: create a pull zone for WhiteNoise static files or an object storage origin, use hashed file names with long cache headers, serve media from Bunny Storage with django-storages, and purge or sign URLs when needed.

#django
#cdn
#static-files
Deployment
Tasks
Beginner
django
doppler
Manage Django Secrets With Doppler

Manage Django environment variables and secrets with Doppler: organize projects and configs per environment, inject secrets with doppler run locally and on servers, sync to Heroku, Render, Vercel, or Kubernetes, use service tokens in CI, and rotate safely.

#django
#secrets
#doppler
Deployment
Tasks
Beginner
django
uptime-kuma
Monitor a Django Site With Uptime Kuma

Self-host Uptime Kuma to monitor Django: add HTTP checks against a health endpoint with keyword matching, monitor TLS expiry, use push monitors for Celery beat and cron jobs, send alerts to email, Slack, or Telegram, and publish a status page.

#django
#monitoring
#uptime
Intermediate
123 guides
Deployment
Tasks
Intermediate
django
gunicorn
Deploy Django with Gunicorn and Nginx on Ubuntu

Moving a Django app from local development to production usually fails on the same points: process management, reverse proxy configuration, static files, secrets, TLS, and safe...

#django
#gunicorn
#nginx
#ubuntu
Deployment
Tasks
Intermediate
django
uvicorn
Deploy Django ASGI with Uvicorn and Nginx

If you want to deploy Django ASGI with Uvicorn and Nginx, python manage.py runserver is not a production option.

#django
#uvicorn
#nginx
Deployment
Tasks
Intermediate
django
caddy
Deploy Django with Caddy and Automatic HTTPS

If you want to deploy Django with Caddy in production, the main challenge is not just putting a reverse proxy in front of the app.

#django
#caddy
#gunicorn
Deployment
Tasks
Intermediate
django
docker
Deploy Django with Docker Compose in Production

Many Docker Compose examples for Django are built for local development, not production.

#django
#docker
#postgresql
#nginx
Deployment
Tasks
Intermediate
django
digitalocean
How to Deploy Django on a DigitalOcean Droplet

If you want to deploy Django on a DigitalOcean Droplet, you need more than python manage.py runserver.

#django
#digitalocean
#gunicorn
#nginx
Deployment
Tasks
Intermediate
django
aws-ec2
Deploy Django on AWS EC2 Step by Step

To deploy Django on AWS EC2 reliably, you need more than python manage.py runserver.

#django
#aws-ec2
#gunicorn
#nginx
Deployment
Tasks
Intermediate
django
fly-io
Deploy Django on Fly.io with Postgres

A production-safe Fly.io Django deployment needs more than fly launch and fly deploy.

#django
#fly-io
#postgresql
Deployment
Tasks
Intermediate
django
gcp-cloud-run
Deploy Django on Google Cloud Run

If you want to deploy Django on Google Cloud Run, the basic path is straightforward: build a container and run it. The production-safe part is where most deployments fail.

#django
#gcp-cloud-run
#docker
Deployment
Tasks
Intermediate
django
gunicorn
How to Configure systemd for Gunicorn and Django

Running Gunicorn manually for a Django app is fragile. If your SSH session closes, the process can stop.

#django
#gunicorn
#systemd
Deployment
Tasks
Intermediate
django
nginx
How to Configure Nginx for Django in Production

A production Django stack should not expose Gunicorn or Uvicorn directly to the internet.

#django
#nginx
Deployment
Tasks
Intermediate
django
aws-s3
How to Store Django Media Files on Amazon S3

Local disk storage for Django media files works in development, but it breaks quickly in production.

#django
#aws-s3
#django-storages
#uploads
Deployment
Tasks
Intermediate
django
postgresql
Connect Django to Managed PostgreSQL Securely

Moving a Django app from a local database or self-managed PostgreSQL server to a managed PostgreSQL service sounds simple: update the host, username, and password, then deploy.

#django
#postgresql
#cloud
Deployment
Tasks
Intermediate
django
celery
Configure Redis and Celery for Django Production

Running background jobs in Django production is not just a matter of installing Celery and pointing it at Redis.

#django
#celery
#redis
Deployment
Tasks
Intermediate
django
celery
Run Celery Workers with systemd for Django

Running Celery workers manually in production is fragile. If you start a worker from a shell and disconnect, the process may stop.

#django
#celery
#systemd
Deployment
Tasks
Intermediate
django
github-actions
Deploy Django with GitHub Actions CI/CD

Manual Django deployments usually fail in predictable ways: someone forgets to run migrations, static files are outdated, the wrong branch gets pushed to production, or a restar...

#django
#github-actions
#ci-cd
Deployment
Tasks
Intermediate
django
azure
Deploy Django on Azure App Service

Deploy Django to Azure App Service on Linux with Oryx builds, Gunicorn startup commands, Azure Database for PostgreSQL, and secure app settings.

#django
#azure
#postgresql
Deployment
Tasks
Intermediate
django
aws
Deploy Django on AWS Elastic Beanstalk

Deploy Django to AWS Elastic Beanstalk with the EB CLI, Gunicorn, RDS PostgreSQL, leader-only migrations, static file mapping, and working health checks.

#django
#aws
#postgresql
Deployment
Tasks
Intermediate
django
gunicorn
Deploy Django on a Hetzner Cloud Server

Provision a Hetzner Cloud server with the hcloud CLI, cloud firewall, and cloud-init, then run Django with Gunicorn, Nginx, PostgreSQL, and backups.

#django
#hetzner
#nginx
Deployment
Tasks
Intermediate
django
dokku
Deploy Django with Dokku on Your Own Server

Run a Heroku-style git push deploy for Django on your own server with Dokku, the Postgres plugin, predeploy migrations, persistent media storage, and Let's Encrypt.

#django
#dokku
#docker
Deployment
Tasks
Intermediate
django
uwsgi
Deploy Django with uWSGI and Nginx

Run Django with uWSGI and Nginx: a strict uWSGI ini, socket permissions, systemd integration, graceful reloads, harakiri timeouts, and checks.

#django
#uwsgi
#nginx
Deployment
Tasks
Intermediate
django
apache
Deploy Django with Apache and mod_wsgi

Deploy Django on Apache with mod_wsgi daemon mode, a matching virtualenv, static file aliases, secret loading, HTTPS, and code reloads without restarting Apache.

#django
#apache
#mod_wsgi
Deployment
Tasks
Intermediate
django
gitlab
Deploy Django with GitLab CI/CD

Build a GitLab CI/CD pipeline for Django: PostgreSQL tests, Docker image builds, SSH deploys with protected variables, and one-click rollbacks.

#django
#gitlab
#ci-cd
Deployment
Tasks
Intermediate
django
drf
Deploy a Django REST Framework API to Production

Prepare a Django REST Framework API for production: safe defaults, throttling, pagination, CORS, proxy headers, Gunicorn sizing, and API checks.

#django
#drf
#api
Deployment
Tasks
Intermediate
django
nginx
Serve Django and a React SPA on the Same Domain

Serve a React SPA and a Django API from one domain with Nginx: routing fallback, API proxying, cache headers, and CSRF-safe session auth.

#django
#react
#nginx
Deployment
Tasks
Intermediate
django
nginx
Host Multiple Django Sites on One Server

Run several Django projects on one server safely: separate users and virtualenvs, systemd templates, per-site databases, and Nginx blocks.

#django
#nginx
#gunicorn
Deployment
Tasks
Intermediate
django
redis
Set Up Redis Caching for Django in Production

Configure Django's Redis cache for production: memory limits, eviction, authentication, key prefixes, timeouts, cached sessions, and checks.

#django
#redis
#caching
Deployment
Tasks
Intermediate
django
cloudflare
Deploy Django Behind Cloudflare

Put Django behind Cloudflare correctly: Full (strict) TLS, origin lockdown, real client IPs, HTTPS detection, cache rules, and request limits.

#django
#cloudflare
#nginx
Deployment
Tasks
Intermediate
django
celery
Run Celery Beat for Scheduled Tasks in Django Production

Run Celery Beat reliably for Django: schedules, file or database schedulers, a single instance under systemd, time zones, and monitoring.

#django
#celery
#scheduling
Deployment
Tasks
Intermediate
django
mysql
Configure Django with MySQL in Production

Run Django on MySQL or MariaDB in production: mysqlclient, utf8mb4, strict SQL mode, time zone tables, connection timeouts, TLS, and backups.

#django
#mysql
#mariadb
Deployment
Tasks
Intermediate
django
cloudflare
Store Django Media Files on Cloudflare R2

Store Django uploads on Cloudflare R2 with django-storages: scoped API tokens, STORAGES settings, custom domains, signed URLs, and migration.

#django
#cloudflare
#storage
Deployment
Tasks
Intermediate
django
aws
Serve Django Static Files Through CloudFront

Serve Django static files from CloudFront: S3 with origin access control or origin pull, hashed filenames, immutable caching, and CORS.

#django
#aws
#cdn
Deployment
Tasks
Intermediate
django
Set Up a Staging Environment for Django

Build a Django staging environment that catches real release problems: production parity, isolated data and secrets, and safe side effects.

#django
#staging
#release
Deployment
Tasks
Intermediate
django
google-cloud
Deploy Django on Google App Engine

Deploy Django to the Google App Engine standard environment with app.yaml, Gunicorn, Cloud SQL for PostgreSQL, Secret Manager, static handlers, and Cloud Storage media.

#django
#google-cloud
#app-engine
#postgresql
Deployment
Tasks
Intermediate
django
azure
Deploy Django on Azure Container Apps

Deploy a containerized Django app to Azure Container Apps with Azure Container Registry, PostgreSQL Flexible Server, secrets, a migration job, custom domains, and revisions.

#django
#azure
#docker
#postgresql
Deployment
Tasks
Intermediate
django
rhel
Deploy Django on Rocky Linux with SELinux

Deploy Django with Gunicorn and Nginx on Rocky Linux, AlmaLinux, or RHEL with SELinux enforcing: firewalld, file contexts, booleans, and reading AVC denials.

#django
#rhel
#selinux
#nginx
Deployment
Tasks
Intermediate
django
traefik
Deploy Django with Traefik and Docker

Put Traefik in front of a Dockerized Django app: automatic Let's Encrypt certificates, HTTP to HTTPS redirects, Docker labels for routing, static files, and upload limits.

#django
#traefik
#docker
#https
Deployment
Tasks
Intermediate
django
granian
Deploy Django with Granian

Run Django in production with Granian, the Rust HTTP server for Python: WSGI and ASGI interfaces, workers and threads, a systemd unit, Nginx in front, and when to choose it.

#django
#granian
#asgi
#wsgi
Deployment
Tasks
Intermediate
django
bitbucket
Deploy Django with Bitbucket Pipelines

Build a Bitbucket Pipelines CI/CD workflow for Django: tests against a PostgreSQL service, cached dependencies, deployment environments, SSH deploys, and a manual production gate.

#django
#ci-cd
#bitbucket
#deployment
Deployment
Tasks
Intermediate
django
fabric
Deploy Django with Fabric

Automate Django deployments over SSH with Fabric: a fabfile with release directories, dependency install, migrations, collectstatic, atomic symlink switch, health checks, and rollback.

#django
#fabric
#python
#deployment
Deployment
Tasks
Intermediate
django
cloud-init
Provision a Django Server with cloud-init

Use cloud-init user data to provision a Django-ready Ubuntu server on first boot: users and SSH keys, packages, firewall, swap, directories, systemd units, and verification.

#django
#cloud-init
#linux
#automation
Deployment
Tasks
Intermediate
django
cloudflare
Expose Django with Cloudflare Tunnel

Serve a Django app through Cloudflare Tunnel with no open inbound ports: cloudflared setup, ingress rules, DNS routing, real client IPs, HTTPS settings, and protecting the admin.

#django
#cloudflare
#networking
#security
Deployment
Tasks
Intermediate
django
wagtail
Deploy Wagtail CMS to Production

Deploy a Wagtail site to production: Sites and WAGTAILADMIN_BASE_URL, image renditions and media storage, scheduled publishing, search indexing, document serving, and caching.

#django
#wagtail
#cms
#media
Deployment
Tasks
Intermediate
django
sqlite
Run Django on SQLite in Production

Run Django on SQLite in production safely: WAL mode, busy timeout and IMMEDIATE transactions, file placement and permissions, online backups, Litestream replication, and when to move on.

#django
#sqlite
#database
#backups
Deployment
Tasks
Intermediate
django
postgresql
Run Django's Built-In Tasks Framework in Production

Deploy background work with Django 6's django.tasks: choosing a production backend, enqueueing after commit, running database workers under systemd, scaling, retries, and monitoring.

#django
#background-tasks
#systemd
#workers
Deployment
Tasks
Intermediate
django
nginx
Serve Private Django Media Files with Nginx X-Accel-Redirect

Serve permission-checked Django downloads efficiently: Django authorises the request and returns X-Accel-Redirect, and an internal Nginx location streams the file without tying up workers.

#django
#nginx
#media
#security
Deployment
Tasks
Intermediate
django
aws
Send Django Email with Amazon SES

Send Django email through Amazon SES: domain verification with DKIM, leaving the sandbox, SMTP or django-ses API backends, IAM permissions, custom MAIL FROM, and bounce handling.

#django
#email
#aws
#ses
Deployment
Tasks
Intermediate
django
vite
Deploy Django with Vite Frontend Assets

Ship Vite-built JavaScript and CSS with Django in production: manifest-based asset tags with django-vite, a Node build stage, collectstatic, cache headers, and avoiding dev-server leaks.

#django
#vite
#javascript
#static-files
Deployment
Tasks
Intermediate
django
nginx
Serve Django API and Admin on Separate Subdomains

Serve one Django project on www, api, and admin subdomains: per-host URLconfs, host-only cookies, CORS and CSRF settings, Nginx server blocks, and restricting admin access by network.

#django
#nginx
#api
#security
Deployment
Tasks
Intermediate
django
docker
Deploy Django Docker Images from GitHub Container Registry

Build Django images in GitHub Actions, push them to GHCR with immutable tags, pull them on servers with read-only credentials, deploy by tag or digest, and clean up old versions.

#django
#docker
#github-actions
#ci-cd
Deployment
Tasks
Intermediate
django
postgresql
Migrate a Django Project From SQLite to PostgreSQL

Move a live Django project from SQLite to PostgreSQL without losing data: create the schema with migrate, transfer data with dumpdata and loaddata or pgloader, fix content types and sequences, and cut over with minimal downtime.

#django
#postgresql
#sqlite
Deployment
Tasks
Intermediate
django
oracle-cloud
Deploy Django on Oracle Cloud Free Tier

Deploy Django on Oracle Cloud Always Free resources: create an Ampere A1 Arm instance, open ports in both the security list and the instance iptables, install the stack on Ubuntu, and know the free tier's limits and reclaim rules.

#django
#oracle-cloud
#arm
Deployment
Tasks
Intermediate
django
iis
Deploy Django on Windows Server With IIS

Deploy Django on Windows Server behind IIS: run Waitress through HttpPlatformHandler instead of the unmaintained wfastcgi, serve static files from IIS, run it under an app pool identity, and add HTTPS with an IIS binding.

#django
#windows
#iis
Deployment
Tasks
Intermediate
django
aws
Deploy Django on AWS App Runner

Deploy a containerised Django app on AWS App Runner: build an image in ECR, configure the port and health check, connect to RDS through a VPC connector, run migrations, serve static files, and know when ECS fits better.

#django
#aws
#app-runner
Deployment
Tasks
Intermediate
django
vercel
Deploy Django on Vercel (and Its Limits)

Deploy a Django app on Vercel’s Python runtime: expose the WSGI app, collect static files at build time, use an external PostgreSQL such as Neon, and understand what serverless Django on Vercel cannot do.

#django
#vercel
#serverless
Deployment
Tasks
Intermediate
django
hypercorn
Run Django With Hypercorn

Run Django in production with Hypercorn, an ASGI and WSGI server with HTTP/2 and HTTP/3 support: configure workers and worker class, bind behind Nginx, set timeouts and graceful shutdown, and compare it with Uvicorn and Gunicorn.

#django
#hypercorn
#asgi
Deployment
Tasks
Intermediate
django
nginx-unit
Deploy Django With NGINX Unit

Run Django on NGINX Unit, the application server configured through a JSON API: configure a Python application with a virtualenv, route static files, set processes, add TLS, and check the project's maintenance status before adopting it.

#django
#nginx-unit
#app-server
Deployment
Tasks
Intermediate
django
aws
Run Django Behind an AWS Application Load Balancer

Configure Django correctly behind an AWS Application Load Balancer: HTTPS listeners with ACM, X-Forwarded-Proto and client IPs, ALLOWED_HOSTS for health checks, idle and keepalive timeouts, stickiness, and deregistration delay for deploys.

#django
#aws
#load-balancer
Deployment
Tasks
Intermediate
django
jenkins
Deploy Django With a Jenkins Pipeline

Build a Jenkins pipeline for Django: a declarative Jenkinsfile that runs tests against PostgreSQL in Docker, builds and pushes an image, deploys over SSH with migrations, uses credentials binding, and gates production behind approval.

#django
#jenkins
#ci-cd
Deployment
Tasks
Intermediate
django
circleci
Deploy Django With CircleCI

Set up CircleCI for a Django project: a config.yml with a PostgreSQL service image, dependency caching, parallel test splitting, Docker image builds, and an SSH or registry-based deploy job gated by branch filters and approval.

#django
#circleci
#ci-cd
Deployment
Tasks
Intermediate
django
azure-devops
Deploy Django With Azure DevOps Pipelines

Build an Azure Pipelines YAML pipeline for Django: test with a PostgreSQL service container, publish an image to Azure Container Registry, deploy to App Service or a VM through environments with approvals, and keep secrets in variable groups or Key Vault.

#django
#azure-devops
#ci-cd
Deployment
Tasks
Intermediate
django
gunicorn
Atomic Django Releases With Symlinked Release Directories

Deploy Django with timestamped release directories and an atomic current symlink: build each release in isolation, share media and env files, switch with ln -sfn, reload Gunicorn gracefully, and roll back instantly to the previous release.

#django
#deployment
#rollback
Deployment
Tasks
Intermediate
django
celery
Run Celery With RabbitMQ for Django in Production

Use RabbitMQ as the Celery broker for Django in production: install and secure RabbitMQ, create a vhost and user, configure the broker URL and quorum queues, set prefetch and acks, and monitor queues with the management plugin.

#django
#celery
#rabbitmq
Deployment
Tasks
Intermediate
django
rq
Run django-rq Workers in Production

Run django-rq (Redis Queue) workers for Django in production: configure queues in settings, supervise rq workers with systemd, schedule jobs with rq-scheduler or cron, handle failed jobs, and monitor queues in the admin.

#django
#django-rq
#redis
Deployment
Tasks
Intermediate
django
memcached
Configure Memcached for Django in Production

Configure Memcached as Django’s cache in production: choose PyMemcacheCache, size memory and item limits, run several nodes with consistent hashing, secure the port, handle failures gracefully, and know what not to store there.

#django
#memcached
#caching
Deployment
Tasks
Intermediate
django
google-cloud
Connect Django to Google Cloud SQL

Connect Django to Cloud SQL for PostgreSQL securely: use the Cloud SQL Auth Proxy or Unix sockets on Cloud Run, private IP inside a VPC, IAM database authentication, connection limits, and running migrations against Cloud SQL.

#django
#google-cloud
#cloud-sql
Deployment
Tasks
Intermediate
django
supabase
Connect Django to Supabase Postgres

Use Supabase as the PostgreSQL database for a Django app: choose the direct connection or the Supavisor pooler, handle transaction-mode pooling with server-side cursors off, require SSL, keep Row Level Security from blocking Django, and run migrations.

#django
#supabase
#postgresql
Deployment
Tasks
Intermediate
django
neon
Connect Django to Neon Serverless Postgres

Use Neon serverless PostgreSQL with Django: pooled versus direct connection strings, cold starts after scale-to-zero, transaction-mode pooling settings, branches for preview environments, and running migrations safely.

#django
#neon
#postgresql
Deployment
Tasks
Intermediate
django
stripe
Handle Stripe Webhooks in Production Django

Handle Stripe webhooks reliably in a production Django app: verify signatures with the raw body, exempt only the webhook view from CSRF, respond fast and process in Celery, make handlers idempotent with event IDs, and monitor failed deliveries.

#django
#stripe
#webhooks
Deployment
Tasks
Intermediate
django
google-cloud
Store Django Media Files on Google Cloud Storage

Store Django user uploads on Google Cloud Storage with django-storages: create a bucket with uniform access, authenticate with Workload Identity or the runtime service account, serve private files with signed URLs, and set CORS and lifecycle rules.

#django
#google-cloud
#media
Deployment
Tasks
Intermediate
django
azure
Store Django Media Files on Azure Blob Storage

Store Django uploads in Azure Blob Storage with django-storages: create a storage account and private container, authenticate with managed identity instead of account keys, serve files with SAS URLs, and add Azure CDN or Front Door for public assets.

#django
#azure
#media
Deployment
Tasks
Intermediate
django
aws
Load Django Secrets From AWS Secrets Manager

Load Django secrets such as SECRET_KEY and database passwords from AWS Secrets Manager: inject them into ECS and EKS as environment variables, fetch them at startup with boto3 and caching, grant least-privilege IAM, and rotate RDS credentials.

#django
#aws
#secrets
Deployment
Tasks
Intermediate
django
sops
Encrypt Django Secrets in Git With SOPS

Keep Django environment secrets encrypted in the repository with Mozilla SOPS and age: encrypt .env and YAML files, decrypt during deploys with Ansible or CI, use cloud KMS keys for teams, and keep keys out of Git.

#django
#sops
#secrets
Deployment
Tasks
Intermediate
django
tailscale
Put the Django Admin on a Private Tailscale Network

Remove the Django admin from the public internet by serving it only over Tailscale: install Tailscale on the server, route /admin through a tailnet-only Nginx server block or a separate admin hostname, and keep staff access simple.

#django
#tailscale
#security
Deployment
Tasks
Intermediate
django
django-otp
Add Two-Factor Authentication to the Django Admin

Require two-factor authentication for the Django admin in production: django-otp with OTPAdminSite and TOTP devices, recovery codes, enrolling existing staff, passkeys with django-allauth MFA, and avoiding lockouts during rollout.

#django
#admin
#2fa
Deployment
Tasks
Intermediate
django
nextjs
Deploy a Django API With a Next.js Frontend

Deploy a Django REST or Ninja API with a separate Next.js frontend: same-domain routing versus subdomains, CORS and CSRF for cookie auth, server-side fetches from Next.js to Django, environment URLs, and where each part should be hosted.

#django
#nextjs
#api
Deployment
Tasks
Intermediate
django
django-ninja
Deploy a Django Ninja API to Production

Take a Django Ninja API to production: choose WSGI or ASGI for sync and async endpoints, lock down the interactive docs, configure authentication, CORS, throttling, and error handling, and validate schemas in CI.

#django
#django-ninja
#api
Deployment
Tasks
Intermediate
django
gunicorn
Write a gunicorn.conf.py for Django

Configure Gunicorn for Django with a gunicorn.conf.py file: bind, workers and threads, timeouts, max_requests with jitter, logging to stdout, forwarded headers, preload trade-offs, and server hooks for database connections.

#django
#gunicorn
#configuration
Deployment
Tasks
Intermediate
django
anymail
Send Django Email Through SendGrid, Postmark, or Mailgun With Anymail

Use django-anymail to send Django email through an email API such as SendGrid, Postmark, Mailgun, Brevo, or Amazon SES: configure the backend, verify the sending domain, handle tracking webhooks and bounces, and test without sending.

#django
#email
#anymail
Deployment
Tasks
Intermediate
django
celery
Send Django Email in the Background

Send Django email outside the request cycle: queue emails with Celery after commit, retry provider failures with backoff, use django-celery-email or a custom backend, keep templates rendered in the task, and avoid duplicate sends.

#django
#email
#celery
Deployment
Tasks
Intermediate
django
postgresql
Move a Django Site to a New Server

Migrate a production Django site to a new server or provider with minimal downtime: rebuild the stack from code, copy media with rsync, move PostgreSQL with dump and restore or replication, lower DNS TTL, cut over, and keep the old server as a fallback.

#django
#migration
#dns
Deployment
Tasks
Intermediate
django
certbot
Get a Wildcard Certificate for Django Subdomains

Issue a Let’s Encrypt wildcard certificate for *.example.com to serve Django on many subdomains: DNS-01 challenges with certbot DNS plugins or acme.sh, automatic renewal with provider API tokens, Nginx configuration, and Django host settings.

#django
#https
#certbot
Deployment
Tasks
Intermediate
django
docker
Write a Docker Entrypoint Script for Django

Write a robust docker-entrypoint.sh for Django: wait for dependencies, optionally run migrations and collectstatic behind flags, support web, worker, and one-off commands, exec the final process for signals, and keep secrets out of logs.

#django
#docker
#entrypoint
Deployment
Tasks
Intermediate
django
docker
Separate Dev and Prod With Docker Compose Override Files

Use one compose.yaml for a Django stack with compose.override.yaml for development and compose.prod.yaml for production: bind mounts and runserver locally, built images, restart policies, and no exposed database ports in production.

#django
#docker-compose
#configuration
Deployment
Tasks
Intermediate
django
docker
Run a Django Docker Container as a Non-Root User

Run Django containers as a non-root user: create a dedicated user in the Dockerfile, fix ownership of app, static, and media paths, handle volume permissions, bind high ports, and add a read-only root filesystem and dropped capabilities.

#django
#docker
#security
Deployment
Tasks
Intermediate
django
docker
Use Docker Secrets With Django

Pass Django secrets to containers as files instead of environment variables: Docker Compose and Swarm secrets mounted at /run/secrets, the _FILE convention, reading them in settings, and keeping secrets out of images and docker inspect.

#django
#docker
#secrets
Deployment
Tasks
Intermediate
django
kubernetes
Run Django Scheduled Jobs as Kubernetes CronJobs

Schedule Django management commands on Kubernetes with CronJobs: concurrencyPolicy Forbid, time zones, startingDeadlineSeconds, history limits, resource requests, secrets, and monitoring missed or failed runs, compared with Celery Beat.

#django
#kubernetes
#cron
Deployment
Tasks
Intermediate
django
kubernetes
Deploy Django on DigitalOcean Kubernetes (DOKS)

Deploy a Django app on DigitalOcean Kubernetes: build and push to DigitalOcean Container Registry, connect to Managed PostgreSQL and Valkey, expose it with a load balancer and HTTPS, run migrations as a Job, and store media in Spaces.

#django
#kubernetes
#digitalocean
Deployment
Tasks
Intermediate
django
google-cloud
Deploy Django on Google Compute Engine

Deploy Django on a Google Compute Engine VM: create an e2 instance with a service account, install Gunicorn and Nginx, connect to Cloud SQL through the Auth Proxy, store media in Cloud Storage, open firewall rules, and add HTTPS.

#django
#google-cloud
#compute-engine
Deployment
Tasks
Intermediate
django
northflank
Deploy Django on Northflank

Deploy Django on Northflank: build from Git with a Dockerfile or buildpack, add PostgreSQL and Redis addons, share configuration with secret groups, run migrations as a job in a release flow, add Celery workers, and expose the app with a custom domain.

#django
#northflank
#paas
Deployment
Tasks
Intermediate
django
upsun
Deploy Django on Upsun (Formerly Platform.sh)

Deploy Django on Upsun, formerly Platform.sh: write the application, services, and routes configuration, run collectstatic in the build hook and migrate in the deploy hook, read service credentials from relationships, and use mounts and preview environments.

#django
#upsun
#paas
Deployment
Tasks
Intermediate
django
buildpacks
Build Django Images With Cloud Native Buildpacks

Build production Django container images without a Dockerfile using Cloud Native Buildpacks and the pack CLI: choose a builder, configure Python version and start command with a Procfile, run collectstatic, rebase images for OS patches, and use it in CI.

#django
#buildpacks
#docker
Deployment
Tasks
Intermediate
django
apache
Deploy Django With mod_wsgi-express

Run Django in production with mod_wsgi-express: install mod_wsgi with pip into the virtualenv, generate a self-contained Apache configuration, serve static files, run it under systemd, and put it behind Nginx or use it directly on port 80.

#django
#apache
#mod_wsgi
Deployment
Tasks
Intermediate
django
windows
Run Django in Production on Windows With Waitress

Run Django on a Windows server with Waitress: install it in a virtualenv, serve the WSGI app on a port, run it as a Windows service with NSSM, put IIS or Caddy in front for HTTPS and static files, and tune threads and logging.

#django
#windows
#waitress
Deployment
Tasks
Intermediate
django
django-cms
Deploy django CMS to Production

Deploy a django CMS site to production: configure settings for CMS and filer, PostgreSQL, media on object storage, static files, caching of rendered pages and menus, search engine friendly URLs, and a release process for template and plugin changes.

#django
#django-cms
#cms
Deployment
Tasks
Intermediate
django
saleor
Deploy Saleor to Production

Deploy the Saleor headless e-commerce platform, built on Django and GraphQL, to production: run the API container with PostgreSQL and Redis, configure Celery workers, media storage, secrets, allowed hosts and CORS for the dashboard and storefront, and run migrations on upgrade.

#django
#saleor
#graphql
Deployment
Tasks
Intermediate
django
celery
Run Celery Workers on Heroku for a Django App

Run Celery on Heroku with a Django app: add a worker process type, use Heroku Key-Value Store or another Redis as the broker with TLS, schedule periodic tasks without running beat on several dynos, size concurrency to dyno memory, and handle SIGTERM restarts.

#django
#celery
#heroku
Deployment
Tasks
Intermediate
django
celery
Run Celery Workers on Render, Railway, and Fly.io

Run Celery workers and beat for a Django app on Render background workers, Railway services, and Fly.io process groups: share the image and environment, connect a Redis broker, keep beat to one instance, and handle shutdowns and scaling on each platform.

#django
#celery
#paas
Deployment
Tasks
Intermediate
django
celery
Use Amazon SQS as the Celery Broker for Django

Use Amazon SQS as a Celery broker for Django: install the SQS transport, authenticate with IAM roles, create queues, set visibility timeout and long polling, handle FIFO limitations, and avoid surprises with ETA tasks, results, and costs.

#django
#celery
#aws
Deployment
Tasks
Intermediate
django
dramatiq
Run Dramatiq Workers for Django in Production

Run Dramatiq background workers for Django in production with django-dramatiq: choose Redis or RabbitMQ, configure middleware for retries, time limits, and results, run workers under systemd or containers, schedule periodic jobs, and shut down safely.

#django
#dramatiq
#background-jobs
Deployment
Tasks
Intermediate
django
procrastinate
Run Procrastinate as a PostgreSQL Task Queue for Django

Use Procrastinate, a PostgreSQL-based task queue, with Django in production: install the Django contrib app, define and defer tasks inside transactions, run workers with concurrency, schedule periodic tasks, use locks and queueing locks, and monitor jobs in the admin.

#django
#procrastinate
#postgresql
Deployment
Tasks
Intermediate
django
valkey
Use Valkey With Django for Caching, Sessions, and Celery

Use Valkey, the open-source Redis fork, with Django: connect Django’s Redis cache backend or django-valkey, run Celery and Channels against it, migrate from Redis with replication or snapshots, and use managed Valkey on AWS, Google Cloud, and DigitalOcean.

#django
#valkey
#redis
Deployment
Tasks
Intermediate
django
aws
Use AWS ElastiCache (Redis OSS or Valkey) With Django

Connect Django to Amazon ElastiCache for caching, sessions, and Celery: choose Valkey or Redis OSS, serverless or node-based clusters, enable TLS and AUTH or IAM, use the primary endpoint, configure security groups, and handle failovers and cluster mode.

#django
#aws
#elasticache
Deployment
Tasks
Intermediate
django
azure
Use Azure Database for PostgreSQL Flexible Server With Django

Connect Django to Azure Database for PostgreSQL Flexible Server: choose public or private access, require TLS, use Microsoft Entra authentication with managed identity, enable built-in PgBouncer, allow extensions, and configure high availability and backups.

#django
#azure
#postgresql
Deployment
Tasks
Intermediate
django
sqlite
Back Up and Replicate a Django SQLite Database With Litestream

Use Litestream to continuously replicate a Django SQLite database to S3-compatible storage: enable WAL mode, run Litestream as a sidecar or systemd service, restore on startup in containers, test point-in-time recovery, and know the limits of single-writer SQLite.

#django
#sqlite
#backups
Deployment
Tasks
Intermediate
django
meilisearch
Add Meilisearch Search to a Django App in Production

Run Meilisearch for Django search in production: deploy it with a master key and persistent storage, index models from signals or Celery, use scoped API keys for frontend search, configure filterable and sortable attributes, and rebuild indexes safely.

#django
#meilisearch
#search
Deployment
Tasks
Intermediate
django
typesense
Use Typesense With Django for Fast Search

Use Typesense with Django in production: run a Typesense node or cluster with an API key and persistent data, define collection schemas, sync models from Celery, use scoped search keys in the frontend, and rebuild collections with aliases for zero downtime.

#django
#typesense
#search
Deployment
Tasks
Intermediate
django
infisical
Manage Django Secrets With Infisical

Use Infisical, an open-source secrets manager, for Django: organize projects and environments, inject secrets with infisical run, authenticate servers and CI with machine identities, sync to Kubernetes and platforms, and self-host or use Infisical Cloud.

#django
#secrets
#infisical
Deployment
Tasks
Intermediate
django
google-cloud
Use Google Secret Manager With Django

Load Django secrets from Google Cloud Secret Manager: mount secrets as environment variables or files on Cloud Run, read them with the Python client on Compute Engine and GKE, grant least-privilege access to service accounts, and rotate secrets with versions.

#django
#google-cloud
#secrets
Deployment
Tasks
Intermediate
django
azure
Use Azure Key Vault With Django

Load Django secrets from Azure Key Vault: use Key Vault references in App Service and Container Apps, read secrets with azure-identity and managed identities, mount them on AKS with the Secrets Store CSI driver, and rotate values without redeploying code.

#django
#azure
#secrets
Deployment
Tasks
Intermediate
django
aws
Load Django Settings From AWS SSM Parameter Store

Use AWS Systems Manager Parameter Store for Django configuration and secrets: store SecureString parameters under a path per environment, inject them into ECS task definitions, read them with boto3 on EC2 and Lambda, grant least-privilege IAM, and compare with Secrets Manager.

#django
#aws
#secrets
Deployment
Tasks
Intermediate
django
cloudflare
Protect the Django Admin With Cloudflare Access

Put the Django admin behind Cloudflare Access (Zero Trust): create a self-hosted application for /admin, require SSO or email one-time codes, validate the Cf-Access-Jwt-Assertion header in Django, and block direct origin access so nobody can bypass it.

#django
#cloudflare
#security
Deployment
Tasks
Intermediate
django
crowdsec
Protect a Django Server With CrowdSec

Set up CrowdSec to protect a Django server: install the agent and Nginx or firewall bouncer, parse Nginx and Django login logs, detect brute force on /admin and login views, share blocklists, and avoid banning legitimate users behind proxies.

#django
#crowdsec
#security
Deployment
Tasks
Intermediate
django
aws
Protect Django on AWS With AWS WAF

Put AWS WAF in front of a Django app on an ALB, CloudFront, or API Gateway: start with AWS managed rule groups in count mode, add rate-based rules for login and API endpoints, exclude rules that break uploads or admin forms, and log and tune blocked requests.

#django
#aws
#waf
Deployment
Tasks
Intermediate
django
glitchtip
Self-Host GlitchTip for Django Error Tracking

Run GlitchTip, the open-source Sentry-compatible error tracker, for Django: deploy it with PostgreSQL and Redis, point the standard sentry-sdk at a GlitchTip DSN, set up uptime checks and alerts, manage event retention, and keep it secure.

#django
#monitoring
#glitchtip
Deployment
Tasks
Intermediate
django
new-relic
Monitor Django With New Relic APM

Instrument a Django app with New Relic: install the Python agent, run Gunicorn and Celery under newrelic-admin, configure app names and environments, track transactions, database queries, and errors, add deploy markers, and control data ingest costs.

#django
#monitoring
#new-relic
Deployment
Tasks
Intermediate
django
vector
Ship Django Logs With Vector

Use Vector to collect Django, Gunicorn, Nginx, and Celery logs from files, journald, or Docker, parse JSON logs, drop noise and redact secrets, enrich with host and environment, and send them to Loki, Elasticsearch, S3, or a hosted log service.

#django
#logging
#vector
Deployment
Tasks
Intermediate
django
kubernetes
Automate HTTPS for Django on Kubernetes With cert-manager

Use cert-manager to issue and renew Let’s Encrypt certificates for a Django app on Kubernetes: install it with Helm, create a ClusterIssuer with HTTP-01 or DNS-01, request certificates through Ingress or Gateway annotations, and troubleshoot stuck challenges.

#django
#kubernetes
#tls
Deployment
Tasks
Intermediate
django
kubernetes
Manage Django Kubernetes Manifests With Kustomize Overlays

Structure Django Kubernetes manifests with Kustomize: a base with Deployment, Service, and migration Job, overlays for staging and production with replicas, resources, and hosts, image tags set from CI, ConfigMap generators with hash suffixes, and use with Argo CD.

#django
#kubernetes
#kustomize
Deployment
Tasks
Intermediate
django
kubernetes
Serve Django Static Files on Kubernetes

Choose how to serve Django static files on Kubernetes: WhiteNoise inside the app image, an Nginx sidecar sharing an emptyDir, a separate static image, or object storage with a CDN, and avoid shared volumes, stale files, and collectstatic at pod start.

#django
#kubernetes
#static-files
Deployment
Tasks
Intermediate
django
buildkite
Test and Deploy Django With Buildkite

Build a Buildkite pipeline for Django: run tests with PostgreSQL on self-hosted agents using the Docker Compose plugin, build and push images, gate production deploys with block steps, run migrations, and keep secrets out of pipeline YAML.

#django
#buildkite
#ci-cd
Deployment
Tasks
Intermediate
django
woodpecker
Test and Deploy Django With Woodpecker CI

Set up Woodpecker CI, a lightweight self-hosted CI engine, for Django: write .woodpecker.yaml pipelines with a PostgreSQL service, run tests and linting, build and push images with the buildx plugin, deploy over SSH on main, and manage secrets.

#django
#woodpecker
#ci-cd
Deployment
Tasks
Intermediate
django
github-actions
Deploy Django to AWS From GitHub Actions With OIDC (No Access Keys)

Replace long-lived AWS access keys in GitHub Actions with OpenID Connect: create the GitHub OIDC provider and an IAM role with a trust policy scoped to your repo and branch, assume it with aws-actions/configure-aws-credentials, and push to ECR and deploy ECS.

#django
#github-actions
#aws
Deployment
Tasks
Intermediate
django
gitea
Test and Deploy Django With Gitea or Forgejo Actions

Use Gitea Actions or Forgejo Actions, GitHub Actions-compatible CI built into self-hosted forges, for Django: register act_runner, write workflows with a PostgreSQL service, push images to the built-in container registry, and deploy over SSH with secrets.

#django
#gitea
#ci-cd
Advanced
50 guides
Deployment
Tasks
Advanced
django
ansible
Deploy Django with Ansible: Step-by-Step

Manual Django deployment usually starts simple and becomes unreliable fast. You SSH into a server, pull code, install packages, update environment variables, run migrations, res...

#django
#ansible
#nginx
#gunicorn
Deployment
Tasks
Advanced
django
aws
Deploy Django on AWS ECS Fargate

Run Django on AWS ECS Fargate with an ECR image, Secrets Manager credentials, an Application Load Balancer, one-off migration tasks, and safe rolling deploys.

#django
#aws
#docker
Deployment
Tasks
Advanced
django
kubernetes
Deploy Django on Kubernetes

Deploy Django on Kubernetes with a Deployment, Service, Ingress, Secrets, readiness and liveness probes, and a migration Job that runs before each rollout.

#django
#kubernetes
#docker
Deployment
Tasks
Advanced
django
kamal
Deploy Django with Kamal

Deploy a Dockerized Django app with Kamal 2: deploy.yml, secrets, kamal-proxy HTTPS, a Postgres accessory, safe migrations, health checks, and rollbacks.

#django
#kamal
#docker
Deployment
Tasks
Advanced
django
channels
Deploy Django Channels and WebSockets with Daphne

Deploy Django Channels in production with Daphne, a Redis channel layer, systemd, and Nginx WebSocket proxying, while Gunicorn keeps serving regular HTTP traffic.

#django
#channels
#websockets
Deployment
Tasks
Advanced
django
postgresql
Set Up PgBouncer for Django

Put PgBouncer between Django and PostgreSQL: transaction pooling, SCRAM auth, pool sizing, compatible Django settings, and monitoring.

#django
#postgresql
#pgbouncer
Deployment
Tasks
Advanced
django
docker
Deploy Django with Docker Swarm

Deploy Django with Docker Swarm: a stack file with replicas, Docker secrets, rolling start-first updates with automatic rollback, one-off migrations, and Nginx in front.

#django
#docker
#swarm
#containers
Deployment
Tasks
Advanced
django
podman
Deploy Django with Podman and Quadlet

Run Django in rootless Podman containers managed by systemd with Quadlet: container, network, and volume units, Podman secrets, health checks, and auto-updates.

#django
#podman
#systemd
#containers
Deployment
Tasks
Advanced
django
kubernetes
Deploy Django to Kubernetes with a Helm Chart

Package Django for Kubernetes with a Helm chart: values per environment, Deployment and Ingress templates, a pre-upgrade migration hook, config checksums, and helm rollback.

#django
#kubernetes
#helm
#containers
Deployment
Tasks
Advanced
django
kubernetes
Deploy Django with Argo CD (GitOps)

Deploy Django to Kubernetes with Argo CD: a config repository, an Application with automated sync, PreSync migration hooks, CI-driven image tag updates, and rollback by git revert.

#django
#kubernetes
#gitops
#argo-cd
Deployment
Tasks
Advanced
django
graphql
Deploy a Django GraphQL API to Production

Prepare a Django GraphQL API (Strawberry or Graphene) for production: disable the IDE and introspection, limit depth and aliases, mask errors, batch queries, and log operations.

#django
#graphql
#api
#security
Deployment
Tasks
Advanced
django
postgresql
Deploy Multi-Tenant Django with django-tenants

Deploy a schema-per-tenant Django SaaS with django-tenants: wildcard DNS and TLS, Nginx for subdomains, migrate_schemas in releases, tenant-aware caching, media, Celery, and pooling.

#django
#saas
#postgresql
#multi-tenant
Deployment
Tasks
Advanced
django
s3
Upload Files Directly to S3 from Django with Presigned URLs

Let browsers upload large files straight to S3 with presigned POST policies: size and type limits, bucket CORS, server-side confirmation, FileField wiring, and cleanup of abandoned uploads.

#django
#s3
#uploads
#aws
Deployment
Tasks
Advanced
django
docker
Preview Environments for Django Pull Requests

Spin up a temporary Django environment for every pull request: GitHub Actions, Docker Compose on a preview host, wildcard subdomains, per-PR databases with seed data, and automatic teardown.

#django
#ci-cd
#docker
#github-actions
Deployment
Tasks
Advanced
django
docker
Build Multi-Architecture Django Docker Images

Build Django images for both amd64 and arm64 (Graviton, Ampere, Apple Silicon) with docker buildx: QEMU versus native runners, wheels, caching in GitHub Actions, and verifying manifests.

#django
#docker
#arm64
#ci-cd
Deployment
Tasks
Advanced
django
kubernetes
Run Django Migrations as a Kubernetes Job

Run Django migrations exactly once per release on Kubernetes: a Job per image tag, waiting for completion in CI, lock timeouts, why init containers are risky, and handling failures.

#django
#kubernetes
#migrations
#postgresql
Deployment
Tasks
Advanced
django
postgis
Deploy GeoDjango with PostGIS in Production

Deploy a GeoDjango app: GDAL, GEOS, and PROJ libraries on servers and in Docker, enabling PostGIS on self-hosted and managed PostgreSQL, spatial indexes, backups, and upgrades.

#django
#geodjango
#postgis
#postgresql
Deployment
Tasks
Advanced
django
nginx
Serve Django Under a URL Prefix (/app) Behind Nginx

Run Django under a subpath such as example.com/app behind Nginx: forward SCRIPT_NAME correctly, set FORCE_SCRIPT_NAME, STATIC_URL, and cookie paths, and avoid broken admin links, redirects, and CSRF errors.

#django
#nginx
#routing
Deployment
Tasks
Advanced
django
aws-lambda
Deploy Django to AWS Lambda

Deploy Django to AWS Lambda with Zappa or a container image and the Lambda Web Adapter: package size limits, static files on S3, database connections with RDS Proxy, cold starts, and when serverless Django is a poor fit.

#django
#aws
#serverless
Deployment
Tasks
Advanced
django
kubernetes
Deploy Django on Google Kubernetes Engine (GKE)

Deploy Django on GKE Autopilot: push images to Artifact Registry, connect to Cloud SQL with the Auth Proxy sidecar and Workload Identity, expose HTTPS with a Gateway or Ingress and managed certificates, and run migrations as a Job.

#django
#gke
#google-cloud
Deployment
Tasks
Advanced
django
kubernetes
Deploy Django on Amazon EKS

Deploy Django on Amazon EKS: build images in ECR, expose the app through an ALB with the AWS Load Balancer Controller and ACM certificates, connect to RDS, grant AWS access with Pod Identity, sync secrets, and run migrations as Jobs.

#django
#eks
#aws
Deployment
Tasks
Advanced
django
k3s
Deploy Django on a Single-Node k3s Cluster

Run Django on a single-node k3s Kubernetes cluster: install k3s, use the bundled Traefik ingress with cert-manager for Let's Encrypt, keep PostgreSQL outside the cluster or back it up properly, and deploy with manifests or Helm.

#django
#k3s
#kubernetes
Deployment
Tasks
Advanced
django
haproxy
Load Balance Django With HAProxy

Put HAProxy in front of several Django app servers: active health checks on a /health/ endpoint, TLS termination, X-Forwarded-Proto, connection limits per server, rolling deploys with drain, and stick tables for basic rate limiting.

#django
#haproxy
#load-balancing
Deployment
Tasks
Advanced
django
pulumi
Provision Django Infrastructure With Pulumi

Provision Django infrastructure with Pulumi in Python: define a VPC, database, container service, and secrets as code, manage stacks for staging and production, keep secrets encrypted in config, and preview changes before applying.

#django
#pulumi
#infrastructure-as-code
Deployment
Tasks
Advanced
django
aws
Deploy Django on AWS With the CDK

Deploy Django on AWS with the Cloud Development Kit in Python: an ApplicationLoadBalancedFargateService, RDS PostgreSQL, Secrets Manager, S3 media, and a migration task, with cdk diff and cdk deploy in CI.

#django
#aws-cdk
#fargate
Deployment
Tasks
Advanced
celery
kubernetes
Autoscale Celery Workers on Kubernetes With KEDA

Scale Celery workers on Kubernetes by queue length with KEDA: install KEDA, define a ScaledObject with the Redis or RabbitMQ scaler, scale to zero for batch queues, and shut workers down gracefully so tasks are not lost.

#django
#celery
#kubernetes
Deployment
Tasks
Advanced
django
elasticsearch
Run Elasticsearch or OpenSearch for Django in Production

Run Elasticsearch or OpenSearch as the search backend for a Django app: choose managed or self-hosted, connect with django-opensearch-dsl or django-elasticsearch-dsl, index asynchronously with Celery, secure the cluster, and plan reindexing.

#django
#elasticsearch
#opensearch
Deployment
Tasks
Advanced
django
mongodb
Deploy Django With the Official MongoDB Backend

Use the official django-mongodb-backend in production: connect to MongoDB Atlas or a replica set, set ObjectId primary keys, handle migrations and contrib apps, configure indexes, transactions, and connection pooling, and know its current limitations.

#django
#mongodb
#database
Deployment
Tasks
Advanced
django
aws
Connect Django to Amazon RDS With IAM Authentication

Connect Django to Amazon RDS PostgreSQL or Aurora with IAM database authentication instead of a static password: grant rds_iam, create an rds-db:connect policy, generate auth tokens in a custom database backend, and require TLS.

#django
#aws
#rds
Deployment
Tasks
Advanced
django
minio
Self-Host Django Media Storage With MinIO

Run MinIO as self-hosted S3-compatible storage for Django uploads: deploy it with Docker Compose or systemd, create a bucket and scoped user, configure django-storages, put MinIO behind Nginx with TLS, and back it up.

#django
#minio
#media
Deployment
Tasks
Advanced
django
vault
Load Django Secrets From HashiCorp Vault

Use HashiCorp Vault for Django secrets: read KV secrets with hvac using AppRole or Kubernetes auth, render them with Vault Agent or the Vault Secrets Operator, issue dynamic PostgreSQL credentials, and handle lease renewal and restarts.

#django
#vault
#secrets
Deployment
Tasks
Advanced
django
postgresql
Run pgvector With Django in Production

Store and search embeddings with pgvector in a production Django app: enable the extension with a migration, use VectorField, build HNSW indexes without blocking writes, tune memory, batch embedding generation in Celery, and plan for index size.

#django
#pgvector
#postgresql
Deployment
Tasks
Advanced
django
caddy
Custom Domains With Automatic HTTPS for Django Tenants

Let SaaS customers point their own domains at a multi-tenant Django app with automatic HTTPS: Caddy on-demand TLS with an ask endpoint in Django, domain verification, tenant lookup by Host, and protecting against abuse and rate limits.

#django
#caddy
#multi-tenant
Deployment
Tasks
Advanced
django
kubernetes
Expose Django on Kubernetes With Gateway API or Ingress

Route HTTPS traffic to Django on Kubernetes with the Gateway API or a maintained Ingress controller: HTTPRoutes or Ingress rules, TLS with cert-manager, forwarded headers, body size and timeouts, and moving off the retired ingress-nginx.

#django
#kubernetes
#ingress
Deployment
Tasks
Advanced
django
kubernetes
Deploy Django on Azure Kubernetes Service (AKS)

Deploy Django on Azure Kubernetes Service: push images to Azure Container Registry, connect to Azure Database for PostgreSQL with workload identity and Key Vault secrets, expose it through Application Gateway or an ingress, and run migrations as Jobs.

#django
#kubernetes
#azure
Deployment
Tasks
Advanced
django
nixos
Deploy Django on NixOS With a Declarative Configuration

Deploy Django on NixOS: define Gunicorn, PostgreSQL, Redis, Nginx, and ACME certificates in configuration.nix, package the app with a Python environment, manage secrets with agenix or sops-nix, and roll back safely with generations.

#django
#nixos
#linux
Deployment
Tasks
Advanced
django
freebsd
Deploy Django on FreeBSD With Gunicorn, Nginx, and rc.d

Deploy Django on FreeBSD 14: install Python, PostgreSQL, and Nginx from packages, run Gunicorn as an rc.d service with daemon(8), configure pf firewall rules, get certificates with acme.sh or certbot, and optionally isolate the app in a jail.

#django
#freebsd
#nginx
Deployment
Tasks
Advanced
django
nomad
Deploy Django on HashiCorp Nomad

Deploy Django on HashiCorp Nomad: write a job with web, worker, and migration tasks, pull Docker images, inject secrets from Vault or Nomad Variables with templates, register services, route traffic through Traefik or Consul, and roll out safely.

#django
#nomad
#docker
Deployment
Tasks
Advanced
django
openshift
Deploy Django on Red Hat OpenShift

Deploy Django on OpenShift: build with Source-to-Image or a Dockerfile, run as an arbitrary non-root UID, connect to PostgreSQL, expose the app with a Route and TLS edge termination, run migrations as a Job, and fix permission errors under restricted SCCs.

#django
#openshift
#kubernetes
Deployment
Tasks
Advanced
django
aws
Run Django on Amazon Aurora PostgreSQL and Aurora Serverless v2

Run Django on Amazon Aurora PostgreSQL: choose provisioned or Serverless v2 capacity, use writer and reader endpoints with a database router, add RDS Proxy for connection pooling and faster failover, set minimum ACUs, and plan upgrades and backups.

#django
#aws
#aurora
Deployment
Tasks
Advanced
django
cockroachdb
Run Django on CockroachDB

Run Django on CockroachDB with the django-cockroachdb backend: match backend and Django versions, configure TLS connections, handle transaction retries, adjust migrations and primary keys, and understand what works differently from PostgreSQL.

#django
#cockroachdb
#database
Deployment
Tasks
Advanced
django
sql-server
Use Microsoft SQL Server With Django in Production

Run Django on Microsoft SQL Server or Azure SQL with mssql-django: install the ODBC driver in Docker or Linux, configure the connection and encryption, handle collation and Unicode, migrations, and connection pooling, and know the backend’s limitations.

#django
#sql-server
#azure
Deployment
Tasks
Advanced
django
nginx
Protect Django Endpoints With mTLS Client Certificates in Nginx

Require mutual TLS client certificates for Django admin, internal APIs, or partner integrations with Nginx: create a private CA, issue client certificates, configure ssl_verify_client, pass verified identity to Django, and handle revocation and renewal.

#django
#nginx
#security
Deployment
Tasks
Advanced
django
wireguard
Connect Django Servers Over a WireGuard Private Network

Use WireGuard to connect Django app servers to PostgreSQL, Redis, and workers across hosts or providers: generate keys, configure wg0 interfaces, bind databases to the tunnel address, restrict firewalls, and keep Django connection settings on private IPs.

#django
#wireguard
#security
Deployment
Tasks
Advanced
django
varnish
Put Varnish Cache in Front of Django

Use Varnish as an HTTP cache in front of Django: send correct Cache-Control headers from views, write VCL that bypasses logged-in users and POST requests, strip tracking cookies, purge or ban pages on content changes, and run Varnish with Nginx for TLS.

#django
#varnish
#caching
Deployment
Tasks
Advanced
django
fastly
Serve a Django Site Through Fastly

Put Fastly in front of Django: configure the origin and host header, cache anonymous pages with Surrogate-Control and surrogate keys, bypass logged-in users, purge by key from Django signals, and set shielding, TLS, and compression for static files.

#django
#fastly
#cdn
Deployment
Tasks
Advanced
django
opentelemetry
Send Django Traces, Metrics, and Logs to SigNoz

Use SigNoz, an open-source OpenTelemetry-native observability platform, with Django: install OpenTelemetry instrumentation, export traces and metrics over OTLP, ship logs with trace IDs, self-host SigNoz or use SigNoz Cloud, and build dashboards and alerts.

#django
#opentelemetry
#monitoring
Deployment
Tasks
Advanced
django
kubernetes
Sync Django Secrets Into Kubernetes With External Secrets Operator

Use External Secrets Operator to load Django secrets from AWS Secrets Manager, Google Secret Manager, Azure Key Vault, Vault, or Infisical into Kubernetes Secrets: configure a SecretStore with workload identity, map keys, set refresh intervals, and roll pods on change.

#django
#kubernetes
#secrets
Deployment
Tasks
Advanced
django
docker
Build a Distroless Docker Image for Django

Build a minimal, shell-less production image for Django using a multi-stage build with a Debian builder and a distroless or Chainguard Python runtime: copy the virtualenv, run as non-root, handle collectstatic and migrations without a shell, and debug safely.

#django
#docker
#security
Deployment
Tasks
Advanced
django
docker
Sign and Verify Django Docker Images With Cosign

Sign Django container images with Sigstore Cosign in CI using keyless signing through GitHub Actions OIDC, attach SBOM and provenance attestations, and verify signatures before deploy or with a Kubernetes admission policy.

#django
#docker
#supply-chain
Adjacent intent