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

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

A Flask app in production runs on a WSGI server such as Gunicorn, never on flask run, and is told it sits behind a proxy. On Livops a repository with app.py and requirements.txt that lists gunicorn starts on Gunicorn 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

Flask is the smallest of the Python web frameworks, and the gap between flask run on a laptop and a site in production is mostly the server around it. This page lists what Flask’s own documentation 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 Flask app need in production?

A WSGI server instead of flask run

Flask’s development server is intended for local development only and is not designed to be particularly secure, stable or efficient; in production a dedicated WSGI server runs the app[1]. Flask’s documentation covers Gunicorn, Waitress, mod_wsgi, uWSGI and gevent[1]. Gunicorn’s only required argument is where the app is: module:variable, or a factory call such as 'hello:create_app()'[2].

Bound to the right address, with enough workers

Gunicorn listens on 127.0.0.1:8000 unless told otherwise, and on 0.0.0.0:$PORT when PORT is set[4], which is how a platform gets requests to it. It starts one worker by default, which Flask’s guide calls probably not what you want; a starting value is twice the number of CPUs[2]. The count can also come from WEB_CONCURRENCY[4].

gunicorn -w 2 'app:create_app()'

Told that it is behind a proxy

On most hosting platforms a proxy receives the request and forwards it, so Flask sees the proxy’s address and plain HTTP[1]. Werkzeug’s ProxyFix makes the app trust the X-Forwarded- headers, and has to be told how many proxies set each one, because the headers can be faked[3]. Without it, the app takes every request for plain HTTP from the proxy’s own address[3].

from werkzeug.middleware.proxy_fix import ProxyFix

app.wsgi_app = ProxyFix(app.wsgi_app, x_proto=1, x_host=1)

Configuration from the environment

Read SECRET_KEY, the database address and every other key from environment variables, not from the repository. The debugger and the reloader are development tools, and Flask says not to use them in production[1].

A database and its migrations

With Flask-SQLAlchemy and Flask-Migrate, flask db upgrade applies the migrations, to the latest one when no revision is given[5]. Run it before each new version starts.

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)[6] 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[7] A service billed by the same usage, its volume about $0.15 per GB a month[7] Your code
Render A platform $7 a month: 0.5 CPU, 512 MB[8] From $6 a month: 256 MB, plus $0.30 per GB of storage[8] 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[10] Managed Postgres from $38 a month (Basic)[10] 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 Flask repository is read rather than configured: Livops finds the app object or the factory and writes the Gunicorn command (details below). 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; an app that needs system packages of its own runs from its own Dockerfile, or is better on a VPS.

A VPS

The cheapest 2 GB machine at SmartCloud is 82,000 so’m a month[6], and a small Flask app leaves most of it free for others. What it costs instead is time: Python and a virtualenv, a systemd unit for Gunicorn, Nginx in front with a certificate, and the deploy steps in the right order every time.

Railway

The Hobby plan is $5 a month including that much usage; then memory is about $10 per GB and CPU about $20 per vCPU a month[7]. It is paid by credit card[7].

Render

$7 a month for 0.5 CPU and 512 MB, PostgreSQL from $6[8]: a fixed price, and a free web tier for trying things (below). Render takes credit and debit cards[8].

Fly.io

The lowest dollar price for the app: $2.19 a month for 256 MB, $3.69 for 512 MB, billed by the second while it runs[10]. Managed Postgres starts at $38 a month[10]. A card is needed once the trial ends[10].

VPS or platform: what do you maintain?

On a VPS you are the operations team: the proxy, the certificate, the process manager and the security updates are yours. On a platform you hand over a repository and the platform runs it; you give up root in return. For one small Flask app the platform is usually less work than the server it would replace; for ten of them, a VPS may be cheaper.

Where can you host Flask 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. 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[9].
  • 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[7].
  • Fly.io has no free tier for new organizations; a trial gives $1 of credit for 7 days[10].

Deploy Flask on Livops

  1. Push a repository with app.py and requirements.txt listing flask and gunicorn. 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 if you need one. DATABASE_URL and the PG* variables are written into the service by themselves.
  4. Deploy. The log shows the install and the start.

Livops makes it a Python web app when Flask is among the dependencies, or among the imports when there is no requirements file. It looks for the app in app.py, main.py, wsgi.py, server.py and run.py, then in src/main.py, src/app.py, app/main.py and app/app.py, and reads the line that builds it — app = Flask(__name__), application = Flask(...), or def create_app(). For app = Flask(__name__) in app.py, with Gunicorn in the requirements, it starts:

.venv/bin/gunicorn app:app --bind 0.0.0.0:3000

A factory becomes 'app:create_app()'. Without Gunicorn in the requirements, Livops starts Flask’s runner instead — .venv/bin/python -m flask --app app run --host 0.0.0.0 --port 3000 — which is the development server Flask warns against above. One line in requirements.txt fixes it.

Around that command:

  • A Procfile with a web: line wins over the guess when it listens on 0.0.0.0 and the platform’s port; a gunicorn with no --bind already does. If the line names gunicorn and the requirements do not, Gunicorn is installed for you.
  • Migrations are yours to name: put .venv/bin/flask --app app db upgrade in the Pre-deploy command in the settings. It runs once before each new version starts; if it fails, the new version does not go out and the old one keeps serving.
  • Proxy headers: the platform’s proxy sends X-Forwarded-Proto: https and X-Forwarded-Host with the address the visitor typed — the two the ProxyFix line above trusts.
  • More workers: add WEB_CONCURRENCY under Variables; the command names no count, so Gunicorn reads it. Memory is a tier of 256, 512, 1024 or 2048 MiB, set with memory in livops.json when the project is created and in the settings afterwards.
  • If the new version does not answer 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.
  • Files written to /app/data (the DATA_DIR variable) survive restarts and deploys; the code folder is read-only and /tmp is wiped. A SQLite file named in the code, such as sqlite:///app.db, is linked onto that disk for you.

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

{
  "kind": "web",
  "start": ".venv/bin/gunicorn -w 2 'app:create_app()' --bind 0.0.0.0:$PORT"
}

A queue consumer or a scheduled script is a service of its own, of type worker or cron, at 19 credits a month each; see Cron and workers.

A Flask 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 command does Livops start a Flask app with?

Gunicorn when gunicorn is in your requirements: .venv/bin/gunicorn app:app --bind 0.0.0.0:3000 for app = Flask(__name__) in app.py, or 'app:create_app()' for a factory. Without gunicorn, it starts Flask's own runner, flask run, which Flask says is for local development only, so add gunicorn.

Which file does Livops look in?

app.py, main.py, wsgi.py, server.py and run.py, then src/main.py, src/app.py, app/main.py and app/app.py, and a package whose __init__.py holds create_app. It reads the line that builds the app, whatever the variable is called.

Can I use my Procfile?

Yes. A web: line wins over the guess when it listens on 0.0.0.0 and the platform's port; gunicorn with no --bind listens there by itself. If the line names gunicorn and the requirements do not, Gunicorn is installed for you.

How do I run Flask-Migrate on Livops?

Put flask db upgrade in the Pre-deploy command in the service's settings, with the venv path: .venv/bin/flask --app app db upgrade. It runs once before each new version starts; if it fails, the new version does not go out and the old one keeps serving.

How do I get more Gunicorn workers?

Add WEB_CONCURRENCY under Variables. Livops' start command names no worker count, and Gunicorn takes it from that variable, one if it is not set. Each worker is another copy of the app in memory, so pick a memory tier to match.

How much does a Flask app cost on Livops?

39 credits a month, which is 39,000 so'm at 1,000 so'm a credit. 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. One 500 MB PostgreSQL database per team is free.

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. Flask — Deploying to Production (flask.palletsprojects.com). Checked .
  2. Flask — Gunicorn (flask.palletsprojects.com). Checked .
  3. Flask — Tell Flask it is Behind a Proxy (flask.palletsprojects.com). Checked .
  4. Gunicorn — Settings (gunicorn.org). Checked .
  5. Flask-Migrate — documentation (flask-migrate.readthedocs.io). Checked .
  6. SmartCloud — VDS plans (smartcloud.uz). Checked .
  7. Railway — Pricing (railway.com). Checked .
  8. Render — Pricing (render.com). Checked .
  9. Render — Deploy for free (render.com). Checked .
  10. Fly.io — Pricing (docs.fly.io). Checked .

Put your project online today

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

Deploy your Flask app

Got a question? — @livops_uz