DevOps & Deployment November 03, 2025 1 min read

Deploying Django with Nginx and Gunicorn

Complete guide to deploying Django applications in production.

D
James Miller
Database administrator expert in PostgreSQL
14 views

Table of Contents

  • Loading table of contents...

Production Django Deployment

Learn how to properly deploy Django with Nginx as reverse proxy.

Install Requirements

pip install gunicorn
sudo apt install nginx

Gunicorn Service

[Unit]
Description=gunicorn daemon
After=network.target

[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/myproject
ExecStart=/var/www/myproject/venv/bin/gunicorn --bind unix:/run/gunicorn.sock myproject.wsgi

[Install]
WantedBy=multi-user.target

Related Articles

Discussion 0

No comments yet. Be the first to start the discussion!

Leave a Comment