Checklist
#django
#production
#checklist

Django Production Checklist (Everything You Must Do Before Going Live)

A comprehensive checklist for deploying a Django application to production. Ensure your app is secure, performant, and reliable with these essential pre-launch steps.

Before you deploy your Django app to production, there are several critical steps you must complete.

If you skip these, you risk:

  • Broken static files
  • Security vulnerabilities
  • Performance issues
  • Downtime

This checklist ensures your app is secure, stable, and production-ready.

⚑ Quick Checklist (Overview)

🧠 1. Django Settings (Critical)

Disable DEBUG

DEBUG = False

πŸ‘‰ Leaving this enabled is a major security risk

Set ALLOWED_HOSTS

ALLOWED_HOSTS = ['your-domain.com', 'your-server-ip']

Use environment variables

Never hardcode:

  • Secret keys
  • Database credentials

🧱 2. Static Files Setup

  • Set STATIC_ROOT
  • Run collectstatic
  • Configure Nginx
python manage.py collectstatic

πŸ‘‰ Full guide: Django static files not loading

🧩 3. Media Files Setup

  • Set MEDIA_ROOT
  • Configure Nginx

πŸ‘‰ Full guide: Django media files not serving

βš™οΈ 4. Application Server (Gunicorn)

  • Install Gunicorn
  • Configure systemd
  • Ensure it runs on boot
sudo systemctl enable gunicorn

πŸ‘‰ Full guide: Deploy Django with Nginx + Gunicorn

🌐 5. Web Server (Nginx)

  • Reverse proxy to Gunicorn
  • Serve static and media files
  • Validate config
sudo nginx -t

πŸ—„οΈ 6. Database (Production Setup)

Do NOT use SQLite in production.

Use:

  • PostgreSQL (recommended)

Check:

  • Migrations applied
  • Database accessible
python manage.py migrate

πŸ” 7. HTTPS (Required)

Use Let's Encrypt for free SSL certificates.

sudo certbot --nginx

Also enable:

  • Secure cookies
  • HSTS headers

πŸ”’ 8. Security Settings

In settings.py:

SECURE_BROWSER_XSS_FILTER = True
SECURE_CONTENT_TYPE_NOSNIFF = True
CSRF_COOKIE_SECURE = True
SESSION_COOKIE_SECURE = True

πŸ‘‰ Prevents common vulnerabilities

πŸ“ 9. File Permissions

sudo chown -R www-data:www-data /var/www/myproject
sudo chmod -R 755 /var/www/myproject

πŸ‘‰ Prevents access and runtime errors

πŸ”„ 10. Process Management

Ensure services restart automatically:

sudo systemctl enable gunicorn
sudo systemctl enable nginx

πŸ§ͺ 11. Logging & Debugging

Check logs:

journalctl -u gunicorn
sudo tail -f /var/log/nginx/error.log

πŸ‘‰ Essential for troubleshooting

⚑ 12. Performance Basics

Set Gunicorn workers:

workers = (2 Γ— CPU cores) + 1
  • Enable gzip in Nginx
  • Use caching headers

🧠 13. Environment Separation

Use:

.env files

Different settings for dev/prod

πŸ‘‰ Avoids configuration mistakes

πŸ” 14. Deployment Workflow

Before every deployment:

git pull
pip install -r requirements.txt
python manage.py migrate
python manage.py collectstatic
sudo systemctl restart gunicorn

πŸ”₯ Common Mistakes

πŸ”΄ DEBUG left on

πŸ‘‰ Security risk

πŸ”΄ Static files not configured

πŸ‘‰ Broken UI

πŸ”΄ No HTTPS

πŸ‘‰ Insecure site

πŸ”΄ Wrong permissions

πŸ‘‰ Runtime errors

πŸ”΄ No process restart

πŸ‘‰ Downtime after reboot

❓ FAQ

Can I use SQLite in production?

Not recommended.

Use PostgreSQL for:

Performance Reliability

Do I need Docker?

Optionalβ€”but useful for:

  • Consistency
  • Easier deployments

How do I know everything works?

Use this checklist + test:

  • Homepage
  • Admin panel
  • Static files
  • Uploads

🎯 Final takeaway

A production-ready Django app requires:

  • Correct configuration
  • Proper security
  • Reliable deployment setup

If you deploy often…

Using a repeatable, pre-tested system saves time and prevents errors.

2026 Β· DJANGO DEPLOYMENT
Deploy Django with Confidence