Python Django Hosting India 2026 — VPS Setup Guide
By HostStack Editorial · · All posts
Django requires a VPS for production deployment. Shared hosting is too restricted for Gunicorn, Celery workers, and background processes. This guide covers the complete Django production setup on a HostStack Ryzen KVM VPS running Ubuntu 22.04.
Why Django needs a VPS (not shared hosting)
- Gunicorn/uWSGI require persistent background processes — not allowed on shared hosting
- Celery workers need Supervisor or systemd service management
- Redis for caching and task queues requires a separate running process
- PostgreSQL is typically better-suited as a dedicated installation rather than shared MySQL
Recommended HostStack VPS for Django
| Use case | Specs | Plan |
|---|---|---|
| Personal project / staging | 1 vCPU, 2 GB, 40 GB NVMe | Ryzen Shared VPS X1 |
| Production app + Celery | 2 vCPU, 4 GB, 80 GB NVMe | Ryzen Shared VPS X2 |
| High-traffic Django SaaS | 4 dedicated cores, 8 GB | Ryzen VDS |
Django production setup on Ubuntu 22.04
1. Install Python and dependencies
apt update && apt install -y python3 python3-pip python3-venv postgresql postgresql-contrib nginx certbot python3-certbot-nginx redis-server supervisor
2. Create PostgreSQL database
su - postgres
psql
CREATE DATABASE myapp;
CREATE USER myappuser WITH PASSWORD 'strongpassword';
GRANT ALL PRIVILEGES ON DATABASE myapp TO myappuser;
\q
3. Deploy Django with virtualenv
mkdir /var/www/myapp && cd /var/www/myapp
python3 -m venv venv
source venv/bin/activate
pip install django gunicorn psycopg2-binary redis celery
git clone your-repo .
pip install -r requirements.txt
python manage.py migrate
python manage.py collectstatic
4. Gunicorn systemd service
# /etc/systemd/system/gunicorn.service
[Unit]
Description=gunicorn daemon for myapp
[Service]
User=www-data
WorkingDirectory=/var/www/myapp
ExecStart=/var/www/myapp/venv/bin/gunicorn --workers 3 --bind unix:/run/gunicorn.sock myapp.wsgi:application
[Install]
WantedBy=multi-user.target
5. Nginx config
server {
server_name yourdomain.in;
location / {
proxy_pass http://unix:/run/gunicorn.sock;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
location /static/ {
alias /var/www/myapp/staticfiles/;
}
}
6. Celery with Supervisor
[program:celery]
command=/var/www/myapp/venv/bin/celery -A myapp worker -l info
directory=/var/www/myapp
user=www-data
autostart=true
autorestart=true
Frequently asked questions
Can I host Django on shared hosting in India?
Not recommended for production. Shared hosting restricts Gunicorn, Celery, and Redis. Use a VPS (from ₹849/mo) for any production Django application.
PostgreSQL or MySQL for Django in India?
PostgreSQL is recommended. Django's ORM has native support for PostgreSQL-specific features. Both are available on HostStack VPS.
What VPS size do I need for Django in India?
Start with 2 vCPU / 4 GB RAM for a production Django app with Celery. Scale to 4 dedicated VDS cores if you have sustained concurrent load.