1-Click apps Deploy your code Pricing Guides Docs Support Log in Deploy an app

Cheapest Python Hosting for Flask and FastAPI: 7 Hosts Compared

Where to host a Flask or FastAPI app that never sleeps: InstaPods at $3/mo flat, plus Fly.io, Render, PythonAnywhere, Railway, Heroku and Vercel. Checked 25 Nov 2026.

Nov 25, 2026 8 min readComparison

On this page
  1. Python hosting compared: always-on price for a small Flask or FastAPI app
  2. InstaPods: $3/mo flat, a real server that never sleeps
  3. Fly.io: the lowest number, once you stop it stopping
  4. DigitalOcean: $4 Droplet or $5 App Platform
  5. Render: $7/mo for 512 MB, free tier sleeps
  6. PythonAnywhere: easiest for beginners, $10/mo paid
  7. Railway, Heroku and Vercel: what each costs for Python
  8. How to pick

You wrote a Flask or FastAPI app, it works on localhost:8000, and now it needs a URL that answers on the first request, every time. Most “free Python hosting” answers fail that test, because the free tiers sleep.

Short answer: for most small Flask or FastAPI apps, the best always-on pick is InstaPods at $3/mo flat: 1 vCPU, 512 MB RAM and 10 GB disk on a real server with SSH, it never sleeps by default, and there is no usage meter. If you only want the lowest number, Fly.io is $2.19/mo for 256 MB in iad/ewr, after you turn off its default auto-stop, billed by usage (its Free plan’s $5 of usage a month with a card covers that machine, but past $5 the whole month bills from the first cent). A $4/mo DigitalOcean Droplet works if you are happy to configure nginx, systemd and TLS yourself. Render ($7 for 512 MB), Heroku Basic ($7 for 0.5 GB) and PythonAnywhere Developer ($10) cost more. Vercel is cheap but runs Python as functions, not as an always-on server.

Disclosure: we build InstaPods. Every competitor price here was checked on the vendor’s own page on 25 November 2026, with sources linked in each section.

Python hosting compared: always-on price for a small Flask or FastAPI app

Ranked by what matters for an app that has to answer on the first request: is it always-on out of the box, and do you know the bill in advance?

HostCheapest always-on optionPrice ($/mo)Always-on by default / flat bill?Free tierFastAPI (ASGI)
InstaPodsLaunch: 1 vCPU, 512 MB, 10 GB disk$3 flatYes / YesNone ($10 credit when you add a card)Yes
Fly.ioshared-cpu-1x, 256 MB, auto-stop off$2.19 (iad/ewr)No, auto-stop is on by default / No, billed by usage$1 credit for 7 days; $5/mo usage with a cardYes
DigitalOcean Droplet1 vCPU, 512 MiB, 10 GiB SSD (unmanaged)$4Yes / Yes, but you run the server yourselfNone for serversYes, you install it
Render0.5 CPU, 512 MB$7Yes on paid instances / YesSleeps after 15 minYes
PythonAnywhereDeveloper plan$10Yes / YesExpires after 1 month unusedBeta only

Not in the table because they are not a fixed always-on price: Railway (always-on on Hobby, usage-billed, about $15/mo for 0.5 vCPU and 512 MB held all month) and Vercel (functions, not a server). Heroku Basic is $7/mo, the same as Render.

InstaPods: $3/mo flat, a real server that never sleeps

InstaPods runs your Python app on a real Linux server (a pod) that stays up 24/7 on every plan. Launch is $3/mo for 1 vCPU, 512 MB RAM and 10 GB disk. Build is $7/mo for 2 vCPU, 2 GB RAM and 25 GB disk, and adds PostgreSQL, MySQL or Redis on the same pod.

The Python preset ships Python 3.12 (3.11 optional), a virtualenv and a systemd service that restarts your app if it crashes. Your app listens on port 8000, bound to 0.0.0.0:

# app.py - FastAPI
from fastapi import FastAPI
import uvicorn

app = FastAPI()

@app.get("/")
def hello():
    return {"message": "Hello from InstaPods!"}

if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=8000)
instapods deploy my-api --preset python

requirements.txt is installed for you. For Flask, add gunicorn to it and the start command switches to gunicorn -b 0.0.0.0:8000 app:app automatically. For FastAPI, leave gunicorn out and start uvicorn from app.py as above. SSH works on every plan, so Celery workers, cron jobs and a Telegram bot can run on the same $3 pod. The full walkthrough is in deploy a Flask app and on the FastAPI deploy page.

The trade-offs: two regions (Europe and US East), no autoscaling, and no free tier.

Fly.io: the lowest number, once you stop it stopping

Fly.io has the lowest sticker price on this list. Its pricing docs list a shared-cpu-1x machine at $2.19/mo with 256 MB, $3.69/mo with 512 MB and $6.70/mo with 1 GB in its lowest-priced regions (iad, ewr), billed per second while running. New accounts get $1 of credit without a card (it expires after 7 days) and $5 of usage a month once a card is added, which is enough to run the 256 MB machine for $0. Read the Free plan rule before you count on it: once usage passes $5, the whole month bills from the first cent, so the allowance only helps a stack that stays under $5.

The default is the trap. fly launch writes auto_stop_machines = "stop" and min_machines_running = 0 into fly.toml (autostop docs), so an idle app stops and the next request cold-starts. Set min_machines_running = 1 or auto_stop_machines = "off" to keep it up.

Fly’s FastAPI guide uses fastapi run. Note that 256 MB is tight for a FastAPI app with pandas or an ML library loaded; budget the 512 MB size ($3.69) for anything beyond a small API.

DigitalOcean: $4 Droplet or $5 App Platform

DigitalOcean has two different answers. The $4/mo Droplet (1 vCPU, 512 MiB, 10 GiB SSD, 500 GiB transfer) is the cheapest real server here, but it is a bare VPS: you install Python, write the systemd unit, configure nginx as a reverse proxy, run certbot for HTTPS and point DNS at it yourself. Plan on an hour or two the first time, plus OS updates after that.

App Platform is the managed version at $5/mo for 1 shared vCPU and 512 MiB, deployed from GitHub. Its Python buildpack page documents Gunicorn (WSGI), which covers Flask and Django directly; for FastAPI you would run uvicorn workers under Gunicorn or use a Dockerfile. App Platform’s free tier is static sites only.

Render: $7/mo for 512 MB, free tier sleeps

Render is a common default for Python apps, and its paid tier is straightforward: $7/mo for 512 MB and 0.5 CPU (0.5c-512mb on render.com/pricing) on top of a $0 Hobby workspace. Render’s FastAPI guide starts the app with uvicorn main:app --host 0.0.0.0 --port $PORT.

The free tier is the part to read closely. Render spins down a free web service after 15 minutes without inbound traffic, and spinning up takes about one minute. Each workspace gets 750 free instance hours a month, after which free services are suspended until the next month, and free Postgres databases expire after 30 days.

Render is the better pick over InstaPods if you want managed Postgres with automated backups and point-in-time recovery, or autoscaling across instances. We compare the two in detail on InstaPods vs Render, and list other options in Render alternatives without cold starts.

PythonAnywhere: easiest for beginners, $10/mo paid

PythonAnywhere is still the gentlest start for a first Flask or Django app, because you write code in the browser and click to deploy. The free Beginner account gives one web app at username.pythonanywhere.com with 100 CPU-seconds a day, 512 MB of disk, no custom domain and restricted outbound internet (free account features).

Two changes from the January 2026 update matter (PythonAnywhere blog): an unused free web app now expires after 1 month instead of 3, and scheduled tasks and MySQL moved to the paid Developer plan for new users. Developer is $10/mo (pricing) for one web app, 5,000 CPU-seconds a day, 5 GB of disk and one always-on task.

FastAPI is the weak spot. PythonAnywhere’s ASGI help page labels ASGI hosting a beta, “an experimental feature”, configured from the command line with no static file mappings, and says pricing for ASGI sites has not been worked out. Use it for Flask; think twice for FastAPI. We go deeper in InstaPods vs PythonAnywhere.

Railway, Heroku and Vercel: what each costs for Python

Railway, Heroku and Vercel each host Python, but none of them beats $3-4/mo for a small always-on app.

  • Railway runs services always-on from the Hobby plan ($5/mo including $5 of usage); Free-plan services sleep after 5-10 minutes without outbound traffic (railway.com/pricing). At about $20 per vCPU-month and $10 per GB-month, a service holding 0.5 vCPU and 512 MB all month is about $15. Railway’s FastAPI guide uses Hypercorn.
  • Heroku Basic is $7/mo for 0.5 GB and is listed as always on. Eco is $5/mo for a 1,000-hour pool and sleeps after 30 minutes of inactivity (heroku.com/pricing).
  • Vercel detects Flask, FastAPI and Django and runs them as Vercel Functions. The Hobby plan is $0 with a 300-second maximum duration and 4.5 MB request bodies (limits). Great for a stateless API that keeps its data elsewhere; wrong for a Celery worker, a Discord bot, websockets or an in-memory cache.

How to pick

Pick a Python host by what the app has to do when nobody is watching:

  • A small API or Flask site that must answer instantly: InstaPods ($3 flat, always-on by default). Fly.io is $2.19-3.69 if you turn auto-stop off and are fine with a usage bill.
  • An app plus a worker, a cron job and Postgres on one bill: InstaPods Build at $7/mo runs all four on one pod. On Render or Railway each is a separate service.
  • You want to learn server admin: a $4 DigitalOcean Droplet.
  • Your first Flask app, for a class: PythonAnywhere free, accepting the 1-month expiry.
  • A stateless FastAPI endpoint with bursty traffic: Vercel Functions.

If you build with Claude, Cursor or another AI agent, InstaPods can also be driven through its MCP server, so the agent deploys the Python app and hands you the URL.

Keep reading

  1. Cheapest Node.js Hosting With a Database: 5 Hosts ComparedWhat a Node.js app plus Postgres costs per month on InstaPods, Fly.io, Heroku, DigitalOcean and Render, always on, prices checked 25 Nov 2026.8 min
  2. Cheap VPS Alternatives With SSH Access for Side Projects: 5 Options From $2.19/moWant SSH on a side project without running a VPS? 5 options from $2.19/mo, ranked by what your shell can actually keep. Prices checked 25 November 2026.9 min
  3. Render Alternatives Without Cold Starts: 5 Always-On Hosts From $2.19/moRender's free tier sleeps after 15 minutes and takes about a minute to wake. 5 always-on alternatives from $2.19/mo, prices checked 25 November 2026.8 min