Introducing Livops 2.0! Promo codeCEOgives you 8,000 so‘m on your balance.What’s new

Django hosting in 2026: how to deploy a Django app, and where

A Django app in production needs a WSGI or ASGI server instead of runserver, DEBUG off, ALLOWED_HOSTS set, collected static files and migrations on every deploy. On Livops a repository with manage.py and requirements.txt gets all of that from a push, for 39 credits a month (39,000 so'm). Here is how Render, Railway, Fly.io and a VPS compare.

By Livops team, the people who build and run LivopsUpdated

Hosting a Django app is not hard, but it is easy to get half right: the site works on your laptop with runserver and DEBUG = True, and production needs neither. This page lists what Django itself asks for in production, compares Render, Railway, Fly.io and a VPS with each provider’s own numbers, and ends with the exact files Livops reads and the command it starts.

What does a Django app need in production?

A real server, not runserver

manage.py runserver is for development: Django’s own documentation says not to use it in production, because it has not been through security audits or performance tests[2]. In production a WSGI server runs the project’s wsgi.py (Gunicorn is the usual one), or an ASGI server runs asgi.py when you use Channels and websockets. Gunicorn binds 0.0.0.0:$PORT when PORT is set, and starts as many workers as WEB_CONCURRENCY says, one if it is not set[5]. Its own starting point for the count is two per CPU core plus one[6]; on a small container, two or three is plenty, and each worker is another copy of your app in memory.

Production settings

Three settings change between your laptop and the server[1]:

  • DEBUG = False. Django is explicit: never enable debug in production.
  • SECRET_KEY from the environment, never committed to the repository.
  • ALLOWED_HOSTS. With DEBUG off, every request whose host is not on the list gets “Bad Request (400)”[3].

Behind an HTTPS proxy there is a fourth. For a form posted with an Origin header, Django’s CSRF check wants that origin to match the host the request came to[3], and behind a proxy Django may believe the request was plain HTTP. List your HTTPS origins in CSRF_TRUSTED_ORIGINS, or the admin login fails with a CSRF error. Set SESSION_COOKIE_SECURE and CSRF_COOKIE_SECURE to True, and run python manage.py check --deploy against the production settings once[1].

import os

DEBUG = os.environ.get("DEBUG") == "1"
SECRET_KEY = os.environ["SECRET_KEY"]
ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", "").split(",")
CSRF_TRUSTED_ORIGINS = ["https://" + host for host in ALLOWED_HOSTS if host]
SESSION_COOKIE_SECURE = CSRF_COOKIE_SECURE = not DEBUG

Static files

The development server serves static files for you; in production you set STATIC_ROOT and collectstatic copies them there[1]. Something then has to serve that folder. On a platform the simplest answer is WhiteNoise: its middleware goes directly after SecurityMiddleware, and it serves what collectstatic put into STATIC_ROOT[4].

A database, and migrations on every deploy

SQLite in the code folder is lost on the next deploy on most platforms. Use PostgreSQL, read its address from an environment variable, and run migrate before each new version starts, so the tables exist when the first request arrives.

Somewhere for background work

Sending email, resizing images and nightly reports do not belong in a request. Celery, RQ or Django’s own tasks need a second, always-running process (a worker), and a management command on a timer needs cron. Count them when you compare prices: each is a process of its own.

The options at a glance

Option What it is Smallest paid always-on web service PostgreSQL What you still maintain
Livops A platform; servers in Uzbekistan 39 credits (39,000 so’m) a month 500 MB free, one per team; 1 GB for 9 credits a month Your code
A VPS in Uzbekistan A virtual machine with root 82,000 so’m a month: 1 vCPU, 2 GB, 30 GB HDD (SmartCloud)[7] Whatever you install The system, Gunicorn as a service, Nginx, HTTPS, backups, deploys
Railway A platform billed by usage Hobby plan: $5 a month, including the same amount of usage; then about $10 per GB of RAM and $20 per vCPU a month[8] A service billed by the same usage, its volume about $0.15 per GB a month[8] Your code
Render A platform $7 a month: 0.5 CPU, 512 MB[9] From $6 a month: 256 MB, plus $0.30 per GB of storage[9] Your code
Fly.io Virtual machines billed by the second $2.19 a month for shared-cpu-1x with 256 MB; $3.69 with 512 MB[11] Managed Postgres from $38 a month (Basic)[11] Your code

Other providers’ prices are from each provider’s own page, read on 20 November 2026; the dates are in Sources below. Livops prices are the ones the cabinet bills today.

Each option

Livops

A Django repository is recognised and set up without a form to fill in: the server, migrate, collectstatic and ALLOWED_HOSTS are handled (details below). Connect a GitHub repository or upload a folder, and every git push ships a new version. Payment is in so’m through Payme or Click, with no card, and the servers are in Uzbekistan — close to users there, farther from users elsewhere. You do not get root on the machine; a project that needs its own system packages runs from its own Dockerfile, or is better on a VPS.

A VPS

The most control for the money, and the cheapest way to run several Django projects side by side: the cheapest 2 GB machine at SmartCloud is 82,000 so’m a month[7]. Everything else is yours: Python, a systemd unit for Gunicorn, Nginx in front for HTTPS and static files, PostgreSQL and its backups, and a deploy script that runs migrate and collectstatic in the right order.

Railway

The Hobby plan is $5 a month and includes that much usage; past it, memory is about $10 per GB and CPU about $20 per vCPU a month, billed by the second[8]. It is paid by credit card[8]. Its regions are California, Virginia, Amsterdam and Singapore[13].

Render

A web service starts at $7 a month for 0.5 CPU and 512 MB, and PostgreSQL at $6 for 256 MB[9] — the clearest fixed price among the platforms here. Render takes credit and debit cards[9]. Regions are Oregon, Ohio, Virginia, Frankfurt and Singapore[12].

Fly.io

The lowest dollar price for the app itself: $2.19 a month for 256 MB, $3.69 for 512 MB[11]. The managed database is where it gets expensive, at $38 a month for the smallest plan[11]. A credit card is needed once the trial ends[11].

VPS or platform: what do you maintain?

On a VPS you are the operations team: when the disk fills, a certificate expires or a security update lands, it is yours to notice. On a platform you hand over a repository and the platform runs it; you give up root in return. If you like running servers, or you host many small projects, a VPS gives you the whole machine. If you would rather spend the time on the app, use a platform.

Where can you host Django for free?

  • Livops has no free tier for apps. On an account that has not paid yet, the first bot or app runs for 15 minutes on a zero balance, once, so you can watch it answer. One 500 MB database per team is free, and starts once the account has credits.
  • Render gives free instances to web services and PostgreSQL. A free web service spins down after 15 minutes without inbound traffic and takes about a minute to start again; each workspace gets 750 free instance hours a month; a free database expires 30 days after it is created and holds 1 GB[10].
  • Railway has a Free plan with $1 of usage a month and up to 0.5 GB per service, whose services sleep after 5 to 10 minutes without outbound traffic; a trial gives $5 of credit for 30 days, with no card[8].
  • Fly.io has no free tier for new organizations; a trial gives $1 of credit for 7 days[11].

Deploy Django on Livops

  1. Push a repository with manage.py, your project folder and requirements.txt with django and gunicorn in it. In the cabinet, click New project and choose the repository, or upload the folder as a .zip.
  2. Under Variables, add SECRET_KEY and mark it as secret: its value is never shown again.
  3. Under Databases, add PostgreSQL. DATABASE_URL and the PG* variables are written into the service by themselves.
  4. Deploy. The log shows the install, collectstatic, migrate and the start.

Livops makes it a Django project when django is among the dependencies and manage.py sits beside a project folder with wsgi.py and settings.py, the way startproject lays it out. It installs requirements.txt (or the dependencies in pyproject.toml) into a virtualenv, and a .python-version or runtime.txt file picks the Python version. The start command it writes for a project named mysite:

.venv/bin/python manage.py migrate --noinput || echo 'Livops: migrate failed — the app starts anyway; look above'; exec .venv/bin/gunicorn mysite.wsgi:application --bind 0.0.0.0:3000

The server is the one you installed: Gunicorn if it is in the requirements; daphne or uvicorn on mysite.asgi for a project with Channels; uvicorn on asgi.py when that is the only server listed. With none of them, runserver is started — add gunicorn. A Procfile with a web: line that listens on 0.0.0.0 and $PORT is used instead, with migrate still run before it unless the line migrates itself.

What Livops does around it:

  • collectstatic runs during the build when the project has django.contrib.staticfiles and STATIC_ROOT is set. With WhiteNoise in MIDDLEWARE, the files are served from the same process.
  • ALLOWED_HOSTS is set as a variable to the project’s address and the domains you connect, comma-separated, unless you set it yourself. Your settings.py must read it, as in the snippet above.
  • After the deploy, Livops opens the home page; if Django refuses the host, the log says which host to add.
  • If the new version does not start within a minute, the deploy fails and the version that worked keeps serving. If the build fails, the running version is left alone. Recent versions stay in Deploys for a one-click rollback.
  • More Gunicorn workers: add WEB_CONCURRENCY under Variables; the command above names no worker count, so Gunicorn reads it. More workers need more memory: the tier is 256, 512, 1024 or 2048 MiB, set with memory in livops.json when the project is created and in the settings afterwards.
  • Files written to /app/data (the DATA_DIR variable) survive restarts and deploys; the code folder is read-only and /tmp is wiped.

To set the commands yourself, put livops.json in the repository root:

{
  "kind": "web",
  "start": ".venv/bin/gunicorn mysite.wsgi:application --bind 0.0.0.0:$PORT"
}

A start you write replaces the whole line above, migrate included; put the migration in the Pre-deploy command in the settings, which runs once before each new version and keeps the old one serving if it fails.

A Celery worker or a management command on a timer is a service of its own, of type worker or cron, at 19 credits a month each; see Cron and workers.

A Django app is 39 credits a month (39,000 so’m). One credit is 1,000 so’m, and bought credits never expire. See Pricing for plans, which give more credits than they cost, and Frameworks for everything livops.json accepts.

Questions

Which server does Livops start Django with?

Gunicorn, when gunicorn is in your requirements: it runs your project's wsgi module on the port the platform gives. A project with Channels and daphne or uvicorn runs on its ASGI module instead. With no server listed at all, Django's own runserver is started, which Django says is not for production, so add gunicorn to requirements.txt.

Do I have to run migrate myself?

No. For a project laid out the way startproject lays it out, Livops runs manage.py migrate --noinput before every start. If it fails, the app still starts and the log says so, so a broken migration shows up in the deploy log rather than as a site that never comes up.

Why does my Django app answer 400 Bad Request?

Django refuses a host that ALLOWED_HOSTS does not name. Livops sets an ALLOWED_HOSTS variable to the project's addresses, its own and your domains, unless you set it yourself, but settings.py has to read it: ALLOWED_HOSTS = os.environ.get("ALLOWED_HOSTS", "").split(",").

How are static files served?

With DEBUG off Django serves none. Add whitenoise right after SecurityMiddleware and set STATIC_ROOT; Livops then runs collectstatic during the build, and whitenoise serves the collected files from the same process.

Where should uploaded files go?

Not next to the code, which is read-only while the app runs. Use /app/data, whose path is in the DATA_DIR variable and survives deploys, or a storage bucket, whose S3 and AWS variables are written into the service for you.

How much does a Django app cost on Livops?

39 credits a month, which is 39,000 so'm at 1,000 so'm a credit. One 500 MB PostgreSQL database per team is free. There is no free tier for apps; on an account that has not paid yet, the first app runs for 15 minutes on a zero balance, once.

Who wrote this comparison?

The Livops team. Every price and limit of another provider on this page links to that provider's own page, with the day we read it.

Sources

  1. Django — Deployment checklist (docs.djangoproject.com). Checked .
  2. Django — django-admin and manage.py (runserver) (docs.djangoproject.com). Checked .
  3. Django — Settings (docs.djangoproject.com). Checked .
  4. WhiteNoise — Using WhiteNoise with Django (whitenoise.readthedocs.io). Checked .
  5. Gunicorn — Settings (gunicorn.org). Checked .
  6. Gunicorn — Design (gunicorn.org). Checked .
  7. SmartCloud — VDS plans (smartcloud.uz). Checked .
  8. Railway — Pricing (railway.com). Checked .
  9. Render — Pricing (render.com). Checked .
  10. Render — Deploy for free (render.com). Checked .
  11. Fly.io — Pricing (docs.fly.io). Checked .
  12. Render — Regions (render.com). Checked .
  13. Railway — Deployment regions (docs.railway.com). Checked .

Put your project online today

Connect GitHub or drop a folder. No card is asked for.

Deploy your Django app

Got a question? — @livops_uz