Learning path · 11 steps

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.

from settings to go-live on one serverSettingsGunicornNginxDNS + HTTPSDatabaseGo liveEleven guides, in the order you would do the work

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

  1. Django Production Settings Checklist (DEBUG, ALLOWED_HOSTS, CSRF)

    A lot of Django production incidents come from settings.py, not application code.

  2. 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.

  3. 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...

  4. 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.

  5. How to Configure Nginx for Django in Production

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

  6. 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.

  7. 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...

  8. 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...

  9. How to Connect Django to PostgreSQL in Production

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

  10. 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...

  11. 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.

Start with step 1

All learning paths · Browse by topic