21+ years in hosting · Jaipur, India · INR billing with 18% GST · 24/7 email support
Blog · WebJi® India

How to Deploy and Host Django in India: Gunicorn, Nginx & VPS Sizing

Quick answer

Django hosting needs a supported Python version, a WSGI server such as Gunicorn, a database and Nginx for static files. Django 5.2 LTS runs on Python 3.10 to 3.14; Django 6.1 needs 3.12 or newer. At WebJi®, Django runs on a self-managed VPS from ₹499 a month before 18% GST.

For developers putting a Django project into production in India who need the version, server and deployment choices in one place.

✓ In business since 2005
✓ INR + GST billing
✓ 24/7 Email Support — avg reply < 60 min
GuideWebJi®
knowledge
Read time
4 min
Sections
7
Updated
14 Nov 2026
Written by
WebJi® team

What Django hosting needs from a server

Django hosting needs a supported Python version, a virtual environment, a WSGI or ASGI server that stays running, a database and a way to serve static files. Disk size and panel branding do not decide whether the app runs; these six rows do.

Django hosting requirements and what to check before buying
RequirementWhy it mattersCheck before buying
Python versionEach Django release supports a fixed rangeA version you can install or select, not just "Python supported"
pip and venvDependencies install per projectSSH access, or a panel that builds the environment
WSGI or ASGI serverConnects the web server to DjangoGunicorn or Uvicorn under systemd, or a panel app manager
DatabaseMigrations need a user that can create tablesPostgreSQL (Django's recommendation) or MySQL/MariaDB
Static and media filescollectstatic writes files the web server must serveA writable path and a web server alias
Background processesCelery workers and Redis must keep runningRoot or a persistent process manager

Which Python version each Django release needs

Django 5.2 LTS supports Python 3.10 to 3.14, while Django 6.0 and 6.1 need Python 3.12 or newer. Check the server's Python before choosing the Django release, because the operating system usually decides it.

Supported Django releases, from djangoproject.com on 14 November 2026
DjangoPythonLatest patchSecurity support until
5.2 LTS3.10, 3.11, 3.12, 3.13, 3.145.2.19April 2028
6.03.12, 3.13, 3.146.0.10April 2027
6.13.12, 3.13, 3.14, 3.156.1.3December 2027

Django 4.2 LTS lost security support on 7 April 2026, so a project still on it should move to 5.2 LTS. The next LTS, 6.2, is due in April 2027; after it Django switches to year-numbered releases starting with Django 2028.

Default Python on common VPS operating systems
Operating systemDefault python3Newest Django it runs without extra Python
Ubuntu 22.04 LTS3.105.2 LTS
Ubuntu 24.04 LTS3.126.1
Debian 123.115.2 LTS
AlmaLinux / Rocky 93.9 (3.11 and 3.12 packages available)5.2 LTS or 6.1 with python3.12

Django on shared hosting or a VPS: which to choose?

Shared hosting can run one small Django project only if the plan provides a Python application manager; anything with Celery, Redis, WebSockets or several projects needs a VPS. Ask before buying, because "Linux hosting" alone says nothing about Python apps.

Shared Python hosting and a VPS for Django
ItemShared with a Python app managerVPS with root
ControlPanel only, no rootFull root over SSH
Process managerPanel-managed (often Passenger)systemd with Gunicorn or Uvicorn
Celery, Redis, ChannelsUsually not possibleYes
Python versionWhat the host installedAny you install
MaintenanceHost patches the stackYou patch the OS and services

If your host's panel does offer a Python app tool, the Django on cPanel guide covers the passenger_wsgi.py setup. For anything larger, a VPS is the simpler path.

How to deploy Django on an Ubuntu VPS

Create a virtual environment, install requirements, migrate, collect static files, run Gunicorn under systemd and put Nginx in front. Each step has an output you can check, so a failure shows up where it happens.

  1. Connect over SSH (see generating an SSH key on Ubuntu) and run python3 --version.
  2. Clone the project into /var/www/myproject, then run python3 -m venv venv and source venv/bin/activate.
  3. Run pip install -r requirements.txt gunicorn, then python manage.py migrate.
  4. Put SECRET_KEY, DEBUG=False, ALLOWED_HOSTS and database credentials in an environment file outside the repository, such as /etc/myproject.env.
  5. Run python manage.py collectstatic.
  6. Create the systemd unit and Nginx site below, then issue SSL with Certbot for Nginx.
  7. Run python manage.py check --deploy and fix each warning it prints.
# /etc/systemd/system/gunicorn-myproject.service
[Unit]
Description=Gunicorn for myproject
After=network.target

[Service]
User=deploy
Group=www-data
WorkingDirectory=/var/www/myproject
EnvironmentFile=/etc/myproject.env
RuntimeDirectory=gunicorn
ExecStart=/var/www/myproject/venv/bin/gunicorn --workers 3 --bind unix:/run/gunicorn/myproject.sock myproject.wsgi:application

[Install]
WantedBy=multi-user.target
# /etc/nginx/sites-available/myproject
server {
    listen 80;
    server_name example.in www.example.in;

    location /static/ {
        alias /var/www/myproject/staticfiles/;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/run/gunicorn/myproject.sock;
    }
}

Enable both with sudo systemctl enable --now gunicorn-myproject, link the site into sites-enabled, then sudo nginx -t && sudo systemctl reload nginx. RuntimeDirectory lets the non-root user create its socket under /run. The alias path must match STATIC_ROOT.

Fixing 502, DisallowedHost and CSRF errors after a Django deploy

A 502 means Nginx cannot reach Gunicorn, a 400 means the domain is missing from ALLOWED_HOSTS, and a 403 CSRF failure after adding HTTPS usually means Django does not know the request was secure. The table maps each symptom to its check.

Common Django deployment errors
SymptomCheckFix
502 Bad Gatewayjournalctl -u gunicorn-myprojectStart the unit, or match the socket path in Nginx to Gunicorn's --bind
400 Bad Request (DisallowedHost)ALLOWED_HOSTSAdd the domain and www, then restart Gunicorn
403 CSRF verification failedCSRF_TRUSTED_ORIGINS and proxy headersAdd https://example.in to CSRF_TRUSTED_ORIGINS and set SECURE_PROXY_SSL_HEADER = ("HTTP_X_FORWARDED_PROTO", "https")
Static files 404Nginx alias and STATIC_ROOTRe-run collectstatic and correct the alias
Works locally, fails on serverpip freeze on bothPin versions and rebuild the virtual environment

SECURE_PROXY_SSL_HEADER is safe only behind a proxy that sets that header itself, as Ubuntu's proxy_params does. If ports still do not answer, check the server firewall with the Linux firewall guide.

Django hosting at WebJi®: what is offered and what is not

WebJi® runs Django on a self-managed KVM VPS from ₹499 a month before 18% GST; there is no published Django or Python shared plan. The VPS-Start sample is 2 vCPU, 4 GB RAM, 60 GB NVMe and 2 TB transfer with root access and a static IPv4, quoted to your operating system and workload.

You own OS updates, backups and the application; support covers the network, hardware and panel, not your code. For a recommendation, send the Python version, the database and whether you use Celery through the Python hosting page or email support@webji.services (24/7, Hindi and English, average first reply under 60 minutes).

FAQ

Frequently asked questions

Which Django version should a new project use in late 2026?

Django 5.2 LTS if the server has Python 3.10 or 3.11, or you want support until April 2028. Django 6.1 if you have Python 3.12 or newer and will upgrade to 6.2 LTS after its April 2027 release. Avoid starting on 6.0, whose support ends sooner.

How much RAM does a Django app need?

There is no fixed figure. Measure one Gunicorn worker's resident memory with ps after a few requests, multiply by the worker count, then add the database, Redis and Celery. A small app with three workers and PostgreSQL usually fits comfortably within a 4 GB VPS.

Should I use Gunicorn or Uvicorn for Django?

Gunicorn with the WSGI entry point suits standard request-response apps. Use an ASGI server such as Uvicorn when you need async views, WebSockets or Django Channels. Many deployments run Gunicorn with Uvicorn workers to get both under one process manager.

Is PostgreSQL or MySQL better for Django hosting?

Django's documentation recommends PostgreSQL for production, and features such as JSONField queries and full-text search work best there. MySQL and MariaDB are officially supported too. Choose one, keep it on the same server or network as the app, and pin the driver version.

Last editorial update: 14 November 2026. Prices follow the dated sources on this page; checkout confirms current charges.

WebJi® since 2005

Ready to get started with WebJi®?

Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.