Best for · Web hosting

Python Cloud Hosting: The Best Places to Run Flask, Django and FastAPI Apps

We read every plan page. Paid links are labelled. Money never changes a ranking. How we pick.

Verdict Our pick

The bar guide has a call.

The vectaai bar guide pointing at the verdict
  • Railway if you want usage-based billing: Hobby is $5 a month including $5 of usage, then about $10 per GB of RAM and $20 per vCPU a month, metered by the second.
  • Heroku if your team already knows it: no free plan, Eco dynos at $5 a month that sleep after 30 minutes, Basic at $7 always on.

Compared here

  • 01PythonAnywhere
  • 02Render
  • 03Railway
  • 04Heroku

Short answer

For a first Python web app (Flask, Django, a small FastAPI service) the easiest cloud host is PythonAnywhere: a free Beginner plan with one web app at yourname.pythonanywhere.com, then $10 a month for the Developer plan with a custom domain and 5,000 CPU seconds a day. For a modern deploy-from-GitHub setup, Render has a free web service tier (it sleeps after 15 minutes without traffic) and always-on instances from $7 a month for 512 MB.

Pick Railway if you want usage-based billing: Hobby is $5 a month including $5 of usage, then about $10 per GB of RAM and $20 per vCPU a month, metered by the second. Pick Heroku if your team already knows it: no free plan, Eco dynos at $5 a month that sleep after 30 minutes, Basic at $7 always on. All prices read on each official page on 4 December 2026, in US dollars.

Try RenderTry RailwayTry PythonAnywhere

Sponsored links. We may earn a commission; it never changes the pick.

At a glance

From pythonanywhere.com/pricing, render.com/pricing and render.com/docs/free, railway.com/pricing and heroku.com/pricing, read 4 December 2026. USD as shown.
HostBest forFree optionCheapest always-onSleeps when idle?Custom domain
PythonAnywhereBeginners, Flask and Django without DevOpsBeginner: 1 web app, 100 CPU s/day, 512MB disk, whitelisted outbound sitesDeveloper $10/moNot statedPaid plans only
RenderGit-push deploys, small production appsFree web service, 750 instance hours a month per workspace$7/mo for 512 MBFree tier: after 15 min with no trafficYes
RailwayUsage-based billing, apps plus databasesFree: $5 credit a month; 30-day trial with $5Hobby $5/mo includes $5 usageNot statedYes
HerokuTeams that already use HerokuNoneBasic $7/mo, 0.5 GBEco ($5) sleeps after 30 minYes

The short answer

Python apps do not need classic web hosting with cPanel and PHP. They need a place that runs Python processes: a platform where you push code and it runs. Four of the best-known ones are below.

We read each host's pricing page (and Render's free tier docs) on 4 December 2026. We did not deploy the same app to all four and time it, so there are no speed charts here. What you get is the real price, the free tier's catches, and who each one is for.

Pick by where you are

  • Pick PythonAnywhere if you are learning, or you want Flask or Django online today without touching Docker, build settings or servers.
  • Pick Render if your code is on GitHub and you want push-to-deploy with predictable flat prices.
  • Pick Railway if you want to pay for exactly what you use, with a database next to your app.
  • Pick Heroku if your team already knows it and the habits are worth more than the savings.

PythonAnywhere: easiest for beginners

PythonAnywhere is built only for Python, and it shows. You get a browser-based console, a file editor and a web app setup that knows what Flask and Django are.

PlanPriceWeb appsCPU seconds a dayDiskCustom domain
BeginnerFree1, at your-username.pythonanywhere.com100512MBNo
Developer$10/mo15,0005GBYes
Custom$10 to $500/moUp to 20Up to 100,000Your choiceYes

Paying yearly gives "2 months free per year, so you only pay for 10 months."

The free plan's catches: one web worker, up to two consoles, no scheduled or always-on tasks, and outbound internet access only to "Specific sites via HTTP(S) only" on a whitelist. That last one bites if your app calls an API that is not on the list. Fine for learning, not for a scraper or an app that talks to lots of services.

Render: best for push-to-deploy

Render connects to your Git repo and redeploys when you push. Web services are priced by size:

ComputePriceRAM
Free$0512 MB
Less than 1 CPU$7/mo512 MB
1 CPU$25/mo2 GB
2 CPU$85/mo4 GB
4 CPU$175/mo8 GB

Paid compute is prorated by the second. On top of compute, workspaces are Hobby ($0, up to 25 services, 5 GB bandwidth, 1 seat) or Pro ($25 a month, unlimited services and seats, 25 GB bandwidth, autoscaling).

The free tier, from Render's docs:

  • Spins down after it "goes 15 minutes without receiving any inbound traffic," and local file changes are lost.
  • 750 free instance hours per workspace per month; run out and free services are suspended until next month.
  • No persistent disks, no shell access, no outbound traffic on email ports 25, 465 or 587.
  • "Do not use them for production applications."

Bar summary: free Render is a demo stand. $7 a month is a real shop.

Railway: best for pay-as-you-go

Railway bills by actual resource use, metered by the second:

PlanMonthly feeIncluded usage
Free Trial$0$5 one-time, valid 30 days
Free$0$5 a month
Hobby$5$5 a month
Pro$20 per workspace$20 a month, unlimited seats

Resources: about $10 per GB of RAM a month and $20 per vCPU a month. On Hobby, "If your total usage exceeds $5 in any given billing period, you will be charged total usage."

Quick maths: a small Flask app idling at a fraction of a CPU and a few hundred MB of RAM can sit inside the $5. Give it a full vCPU and 1 GB running all month and you are looking at around $30 at those rates. Great for small and spiky apps; harder to predict than Render's flat price for busy ones.

Heroku: the original, no longer free

Heroku made git-push hosting famous. It has no free plan on its pricing page now.

DynoPriceRAMSleeps?
Eco$5/mo0.5 GBAfter 30 minutes of inactivity
Basic$7/mo0.5 GBNo
Standard-1X$25/mo0.5 GBNo
Standard-2X$50/mo1 GBNo

If your team already has Heroku pipelines, add-ons and habits, the switching cost can outweigh savings elsewhere. Starting fresh, Render's $7 instance is comparable to Heroku Basic. Our Heroku vs Vercel comparison covers where each shines.

What the cheapest always-on Python app costs

HostPlanMonthlyRAMNotes
RailwayHobby$5 plus usage over $5Pay per GBCheapest if usage stays small
HerokuBasic$70.5 GBAlways on
Render0.5 CPU$7512 MBAlways on, plus free Hobby workspace
PythonAnywhereDeveloper$10 ($100 a year if paid yearly)Not statedCustom domain, 5,000 CPU s a day

Things nobody tells you until your app breaks

  1. Free tiers sleep. Render after 15 minutes, Heroku Eco after 30. The next visitor waits for a cold start.
  2. Local files vanish. Render's free tier loses local filesystem changes on spin-down. Store uploads in object storage or a database.
  3. Databases cost extra. Every host here charges separately or by usage for managed Postgres. Budget for it.
  4. Background jobs need a plan. PythonAnywhere's free tier has no scheduled tasks. Celery workers and cron jobs are separate services on most platforms.
  5. Email ports may be blocked. Render's free tier blocks outbound ports 25, 465 and 587; use an email API instead of SMTP.

When to skip platforms and get a VPS

If you need lots of CPU or RAM for little money, a VPS or cloud server beats every platform here on raw price. The trade: you patch the OS, configure the web server, set up HTTPS and wake up when it breaks. See DigitalOcean vs Vercel for how the server route compares, or our best web hosting roundup for classic hosting.

Money talk

We may earn a commission from Render, Railway and PythonAnywhere links if those programs exist; the links are set up for that. Heroku is a plain link. PythonAnywhere is first because it is the easiest start for most Python beginners, not because of a payout.

What we could not verify

  • PythonAnywhere: whether free accounts expire, and RAM per plan: not stated on the pricing page as of 4 December 2026.
  • Railway idle behaviour and free plan limits beyond the $5 credit: not stated on the pricing page as of 4 December 2026.
  • Google Cloud Run free tier: its pricing page did not load for our reader on 4 December 2026, so we left it out rather than quote from memory.

More hosting guides live in our web hosting hub.

Questions people ask

What is the best cloud hosting for Python?

For beginners, PythonAnywhere: free to start, built for Python, $10 a month for a custom domain. For git-based deploys and small production apps, Render, with always-on instances from $7 a month. For usage-based billing, Railway at $5 a month including $5 of usage. Heroku still works well for teams already on it, from $5 a month.

Where can I host a Python app for free?

PythonAnywhere's Beginner plan hosts one web app free at your-username.pythonanywhere.com with limits on CPU time and outbound sites. Render's free web services get 750 instance hours a month per workspace but sleep after 15 minutes without traffic. Railway's Free plan includes $5 of usage a month. Heroku has no free plan.

Can I host Django on PythonAnywhere?

Yes, PythonAnywhere is built for Python web frameworks including Django and Flask. The free Beginner plan gives one web app with 100 CPU seconds a day and 512MB of disk. For a real project with your own domain, the Developer plan is $10 a month with 5,000 CPU seconds a day and 5GB of disk.

Why does my free Python app take so long to load?

It was asleep. Render spins down a free web service after 15 minutes without inbound traffic, and Heroku's Eco dynos sleep after 30 minutes of inactivity. The first visitor after that waits while the app starts again. Paying for an always-on instance, $7 a month on Render or Heroku Basic, removes the delay.

Is Railway cheaper than Render for Python?

It depends on usage. Railway Hobby is $5 a month including $5 of usage, then roughly $10 per GB of RAM and $20 per vCPU a month, billed per second. Render charges a flat $7 a month for a 512 MB instance. A tiny, quiet app may fit inside Railway's $5; a busy one is easier to predict on Render.

Do I need a VPS to host a Python app?

No. Platforms like Render, Railway, Heroku and PythonAnywhere run your code without you managing a server, patching an operating system or configuring a web server. A VPS is cheaper per unit of power and gives full control, but you become the system administrator. For most small apps, a platform saves more time than it costs.

Sources

Every fact above comes from these pages. Prices change, so each one carries the date we read it.

  1. PythonAnywhere pricing, checked 4 Dec 2026
  2. Render pricing, checked 4 Dec 2026
  3. Render docs: Deploy for free, checked 4 Dec 2026
  4. Railway pricing, checked 4 Dec 2026
  5. Heroku pricing, checked 4 Dec 2026