Your first production deployment on a VPS
From a fresh Ubuntu server to a Django site on HTTPS, with the settings and checks that keep it safe.
This path takes a Django project to its first production deployment on a single Linux server: production settings, Gunicorn under systemd, Nginx, a domain with HTTPS, static files, and PostgreSQL.
It ends with a deployment checklist and a go-live runbook, so the last two steps are about checking the work rather than adding to it.
The steps
- Django Production Settings Checklist (DEBUG, ALLOWED_HOSTS, CSRF)
A lot of Django production incidents come from settings.py, not application code.
- 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.
- 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...
- 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.
- How to Configure Nginx for Django in Production
A production Django stack should not expose Gunicorn or Uvicorn directly to the internet.
- 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.
- 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...
- 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...
- How to Connect Django to PostgreSQL in Production
Connecting Django to PostgreSQL in production is more than changing the DATABASES setting.
- Django Deployment Checklist for Production
A Django app that works locally is not automatically safe to run in production. Most deployment failures come from a small set of issues: wrong settings, missing secrets, unsafe...
- Django Go-Live Day Runbook
A step-by-step runbook for launching a Django site: pre-launch freeze, DNS and TLS cutover, data migration, smoke tests, monitoring during launch, and rollback.