How to host Django in production has two parts: the setup and the bill. The setup is a real web server plus a few settings that change before launch. First-term prices here run from $0 to $12 a month. Hostinger's KVM 1 plan, for example, costs $6.49 a month for 24 months and $11.99 after that.
Our cheap VPS hosting guide covers server basics. Below are the deployment steps, a price table and a host for each project type.
Disclosure: the Hostinger links and the coupon code below are part of Hostinger's affiliate programme. Tutorsbot may earn a commission if you buy, at no extra cost to you.
How to host Django in production?
Run Django behind a real web server, never with runserver. Django's docs call runserver a lightweight development server that is not suitable for production. Use Gunicorn for normal code (WSGI) or Uvicorn for async code (ASGI). Start with a deployment check against your production settings file.
WSGI, short for Web Server Gateway Interface, is how a web server talks to Python code. It supports only synchronous code, which does one task at a time. ASGI, short for Asynchronous Server Gateway Interface, also supports async code. The Django deployment guide covers both.
Run the deployment check first, against your production settings file. It tests some of the checklist items for you.
python manage.py check --deploy
Next, install Gunicorn with the command from Django's Gunicorn guide.
python -m pip install gunicorn
Then start the app. Django says this runs one process with one thread on 127.0.0.1:8000. Only the server itself can reach that address, so a web server sits in front.
gunicorn myproject.wsgi
Which Django hosting type fits your project - free tier, platform or VPS?
Match the type to who runs the server. A free plan suits a demo. A platform as a service (PaaS) runs the server for you, and on Heroku the database costs extra. A virtual private server (VPS) is a server you rent and control yourself. You can install your own database on it.
What free-tier limits quietly break a Django app in production?
PythonAnywhere's free Beginner plan shows the limits well. Your site lives at your-username.pythonanywhere.com, not on your own domain. You get one web worker and 512 MB of disk. There is no SSH, a way to log in to the server from your own computer. Accounts made after 15 January 2026 get no MySQL database. The $10 Developer plan adds a custom domain, SSH and MySQL. Heroku's $5 Cedar Eco plan sleeps after 30 minutes of no use and is only for personal accounts. See the PythonAnywhere pricing page and its free account page.
Which Django hosting is the best fit for each type of project?
| Project type | Pick | Deciding factor | Monthly cost |
|---|---|---|---|
| Portfolio or first project | PythonAnywhere Beginner | Free, but no own domain and no SSH | $0 |
| Small public site | Hostinger KVM 1 or a DigitalOcean Droplet | A server you control, to run Gunicorn, Nginx and Postgres yourself | $6.49 for 24 months, then $11.99, or $6 for a Droplet |
| Team app with a managed database | Heroku Cedar Basic plus Heroku Postgres Essential-0 | Heroku runs the platform and the database | $12 |
| Async code | Any VPS running ASGI with Uvicorn | Django says WSGI supports only synchronous code | From $6 |
Checked November 2026 on the PythonAnywhere, Heroku, Hostinger and DigitalOcean pricing pages.
What does Django hosting cost per month, including the database?
First-term prices in this guide run from $0 to $12 a month. The billing term changes the real cost. Most plans bill month by month. Hostinger bills 24 months upfront at a low rate, then renews higher. The table shows the term, upfront amount and renewal price for each plan.
| Provider and plan | Price per month | Term and upfront amount | Renewal price | Size |
|---|---|---|---|---|
| PythonAnywhere Developer | $10 | Billed monthly, or 12 months for the price of 10 | None, billed monthly | 5 GB disk |
| Heroku Cedar Basic | $7 | Listed per month | None listed | 0.5 GB RAM |
| Heroku Postgres Essential-0 | $5 | Listed per month | None listed | 1 GB disk |
| AWS Lightsail 1 GB with IPv4 | $7 | Listed per month | None listed | 1 GB RAM |
| DigitalOcean Basic 1 GiB | $6 | Billed by the second, capped at the monthly price | None listed | 1 GiB RAM |
| Hostinger VPS KVM 1 | $6.49 | 24 months, $155.76 upfront | $11.99 | 4 GB RAM |
| Hostinger VPS KVM 2 | $8.79 | 24 months, $210.96 upfront | $14.99 | 8 GB RAM |
Checked November 2026 on the Hostinger, Heroku, PythonAnywhere, AWS Lightsail and DigitalOcean pricing pages.
RAM is the memory your app uses while it runs. The $6 Droplet has 1 GiB. Hostinger's KVM 1 has 4 GB. The plans differ in size as well as price.
Two rows carry the database. On Heroku the app costs $7 a month and Heroku Postgres Essential-0 adds $5. Postgres is a database, the place your app keeps its data. On a VPS you can install Postgres on the same server, so it adds no line to the bill. You run it and back it up yourself. Compare Postgres and MySQL and Neon Postgres pricing first.
What does Django hosting cost after the first term?
Hostinger KVM 1 costs $6.49 a month on a 24-month term, and you pay $155.76 upfront. Renewing for another 24 months at $11.99 a month costs $287.76. That is $132.00 more, an 85 percent rise.
Heroku Cedar Basic plus Heroku Postgres Essential-0 costs $12 a month, or $288 over 24 months. After renewal, the VPS costs almost the same as the Heroku pair: $287.76 against $288. The two are not like for like: you run the VPS yourself, while Heroku runs the platform. See Heroku's pricing page.
How do you deploy Django with Gunicorn, Uvicorn, Nginx and collectstatic?
Use Gunicorn for a normal synchronous app and Uvicorn for async code. Put a web server such as Nginx in front. Nginx passes visitors' requests to your app. It redirects HTTP to HTTPS, and it serves the static files that Django does not serve in production.
Collect the static files before the first visit. Django's checklist asks you to set STATIC_ROOT, the folder where this command copies them.
django-admin collectstatic
Uploaded media is untrusted. The web server must never run an uploaded file, so an uploaded .php file stays a plain file. Set MEDIA_ROOT and MEDIA_URL for uploads, and back them up.
Which production settings must change before a Django site goes live?
These settings matter most before launch: SECRET_KEY, DEBUG, ALLOWED_HOSTS, two cookie settings and the static file paths. Django's deployment checklist gives the reason behind each one.
- SECRET_KEY - a long random secret in an environment variable (a setting kept outside your code), never in git
- DEBUG - False, because error pages with DEBUG on show your source code and settings
- ALLOWED_HOSTS - your domain names, required once DEBUG is off
- CSRF_COOKIE_SECURE and SESSION_COOKIE_SECURE - True, so cookies travel only over HTTPS
- STATIC_ROOT and STATIC_URL - where collected files live, and their URL
- SECRET_KEY_FALLBACKS - old keys, kept briefly while you switch to a new SECRET_KEY
Where does Hostinger fit, and what does it cost?
Hostinger fits a Django site that you want to run yourself at a low monthly price. KVM 1 costs $6.49 a month on a 24-month term and renews at $11.99. Its Django page offers a prebuilt Ubuntu 24.04 server with Django and OpenLiteSpeed. Check the renewal price and the support policy before you buy.
KVM 1 has 1 vCPU (a virtual processor core), 4 GB of RAM and 50 GB of disk. You pay $155.76 upfront. Plan details are on the Hostinger VPS hosting page.
Disclosure: this link is an affiliate link. Tutorsbot may earn a commission if you buy, at no extra cost to you.
The prebuilt image runs OpenLiteSpeed, a web server that is not Nginx. Nginx guides will not match it step by step. Hostinger says one VPS can host several Django sites. Plans include free weekly backups.
When is Hostinger the wrong choice for a Django app?
Hostinger's Django page says it gives no technical support for Django hosting. Its AI assistant and 24/7 team can help with general questions. If you want the host to run the server for you, pick a platform. Heroku patches the operating system automatically, and Cedar Basic with Heroku Postgres Essential-0 costs $12 a month. PythonAnywhere Developer costs $10 a month for one web app.
What to do next
- Run the deployment check and fix what it flags
- Pick a host type from the project table, then check the renewal price
- Deploy behind a web server, collect the static files and turn on HTTPS
Photo: Tirza van Dijk tirzavandijk, CC0, via Wikimedia Commons (https://commons.wikimedia.org/wiki/File:Laptop_coding_programs_(Unsplash).jpg)
Fazlur Rahman






