# Free FastAPI hosting in 2026: where to host a FastAPI app for $0

Gregale · Updated 2026-12-04

Free FastAPI hosting on Render, Vercel, Koyeb, Railway, Cloud Run, Fly.io, Oracle, Gregale and PythonAnywhere’s beta: what each gives and how fast it wakes.

**You can host a FastAPI app for free on Render, Vercel, Koyeb, Railway,
Google Cloud Run, Fly.io, Oracle Cloud or Gregale. PythonAnywhere runs FastAPI
only on ASGI hosting that is still in beta. What separates the rest is what
happens while nobody is visiting. Render puts the app to sleep after 15
minutes and takes about a minute to wake it. Koyeb’s Free Instance sleeps
after an hour and wakes in 1 to 5 seconds. Gregale parks it after a minute,
and in our test a parked FastAPI app sent its first byte about 0.2 seconds
after a request reached it. Heroku has no free plan.**

_Gregale publishes this page. PythonAnywhere’s, Railway’s and Koyeb’s limits
were checked on their own pages on December 4, 2026:
[PythonAnywhere free accounts](https://help.pythonanywhere.com/pages/FreeAccountsFeatures/),
[PythonAnywhere ASGI sites](https://help.pythonanywhere.com/pages/ASGICommandLine/),
[Railway’s Free plan](https://docs.railway.com/pricing/free-plan),
[Koyeb Instances](https://www.koyeb.com/docs/reference/instances) and
[Koyeb Scale-to-Zero](https://www.koyeb.com/docs/run-and-scale/scale-to-zero).
The others come from their own docs as checked for our pages on
[free backend tiers](https://gregale.dev/articles/free-backend-hosting-tiers-compared) (November
28), [Render’s free tier](https://gregale.dev/articles/does-render-free-tier-sleep) and
[Heroku](https://gregale.dev/articles/is-heroku-free) (December 2), and
[Vercel](https://gregale.dev/articles/can-vercel-run-python-go-docker) (December 3). Gregale’s
come from its [plans page](https://gregale.dev/docs/plans.md), and its numbers from a test we ran
on December 4._

## Free FastAPI hosts compared

| Free plan                | What you get                                                                  | While nobody visits                                                                         | The catch                                                                                 |
| ------------------------ | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| **Gregale Free**         | 1 app with 256 MB and 20 GB-RAM-hours a month, requests up to 30 seconds      | Parks after 1 minute; our parked FastAPI app sent its first byte in 184 to 210 ms           | HTTP only, so no WebSockets, and no managed Postgres on Free                              |
| PythonAnywhere Beginner  | FastAPI only on ASGI hosting, in beta, set up with the `pa` command-line tool | Regular web apps stay loaded                                                                | ASGI hosting has no settled price; free accounts reach only allowlisted sites             |
| Render Free              | 750 instance hours a month per workspace                                      | Spins down after 15 minutes without inbound traffic; about a minute to wake                 | Local files are lost at every spin-down; free Postgres expires after 30 days              |
| Vercel Hobby             | FastAPI as a Python function: 4 hours of Active CPU and 1 million invocations | A request with no warm instance starts one; a function unused for 2 weeks adds at least 1 s | 300 seconds per request, and a read-only file system apart from `/tmp`                    |
| Koyeb Free Instance      | 1 web service with 512 MB and 0.1 vCPU, in Frankfurt or Washington, D.C.      | Scales to zero after 1 hour without traffic; Koyeb’s default wake takes 1 to 5 seconds      | One per organization, meant for testing; no volumes                                       |
| Railway Free             | $5 of usage a month, up to 3 services with 0.5 GB and 1 vCPU each             | Sleeps 5 to 10 minutes after its last outbound traffic; Railway gives no wake time          | Services stop until the next billing cycle when the $5 runs out                           |
| Google Cloud Run         | 180,000 vCPU-seconds, 360,000 GiB-seconds and 2 million requests a month      | Scales to zero; the next request starts an instance                                         | Sign-up needs a card, and usage past the free tier is billed                              |
| Fly.io Free plan         | $5 of usage a month with a card ($1 once, for 7 days, without one)            | Runs all the time ($2.19 a month for 256 MB), or stops when idle                            | Past $5 the whole month is billed                                                         |
| Oracle Cloud Always Free | VMs of your own: 2 AMD micro VMs with 1 GB each, and Arm VMs with up to 12 GB | Always on                                                                                   | You run uvicorn, a reverse proxy, TLS and updates yourself; Oracle may reclaim an idle VM |

Heroku isn’t on the list: it has had no free plan since November 2022, and its
cheapest dyno, Eco, costs $5 a month and sleeps after 30 minutes.

## Which one fits your app

- **An API that other code calls.** Code calling an API often gives up well
  before a minute, so pick a host that wakes in seconds: Gregale, Cloud Run,
  Vercel or Koyeb. Render’s minute-long wake is the one callers notice.
- **A FastAPI app with WebSocket routes.** Gregale Free is HTTP only, so its
  WebSockets start on Hobby, and a Vercel function keeps a WebSocket open
  only up to its maximum duration. Our
  [WebSocket hosting comparison](https://gregale.dev/articles/websockets-scale-to-zero-platforms-compared)
  covers which hosts keep a connection open.
- **A FastAPI app with a database.** Render’s free Postgres expires after 30
  days. Neon’s free plan works with any of these hosts. Gregale’s managed
  Postgres starts on Hobby.
- **Background jobs or a scheduler.** None of the sleeping free plans run a
  job while the app is asleep. Railway Free runs a worker as long as it keeps
  sending traffic, and Fly.io and Oracle run one all the time.

If your app is Flask rather than FastAPI, our
[free Flask hosting](https://gregale.dev/articles/free-flask-hosting) page compares the same
hosts, and our [PythonAnywhere free tier](https://gregale.dev/articles/pythonanywhere-free-tier-fastapi-always-on)
page covers its beta ASGI hosting in detail.

## Where Gregale fits

The Free plan gives you 1 app with 256 MB and 20 GB-RAM-hours a month, and
requests can take up to 30 seconds. An app parks after 1 minute idle and
holds no memory while parked, so the 20 GB-RAM-hours go to the time it
actually runs. Free is HTTP only and has no managed database, so pair it with
an outside Postgres such as Neon if the app needs one.

On December 4, 2026 we deployed a two-route FastAPI app, a `main.py` and a
`requirements.txt` with `fastapi` and `uvicorn[standard]`, with
`gregale deploy`. Gregale detected FastAPI and started it with
`uvicorn main:app --host 0.0.0.0 --port $PORT`, with no start command from us.
It ran on a 512 MB instance, and we parked it before each of 6 requests:

- **Inside Gregale:** the snapshot restored in 62 to 86 ms, and the first
  byte of the response left 184 to 210 ms after the request reached Gregale,
  by the app’s wake timeline.
- **From a laptop in Istanbul:** a parked app answered in 0.65 to 0.70
  seconds end to end, against 0.47 to 0.53 seconds once it was running. About
  a third of a second of each was opening the connection and TLS to the app
  in Quebec.

A parked app wakes from a snapshot, so uvicorn and your imports don’t start
again. Our [cold start times by language](https://gregale.dev/articles/cold-start-times-by-language)
page measured a FastAPI cold boot, which skips the snapshot, at about 1.1
seconds.

To deploy your own, our [FastAPI guide](https://gregale.dev/docs/deploy-fastapi.md) covers the
start command, deploys from GitHub and adding PostgreSQL.

Hobby, at $10 a month, adds 5 apps with 512 MB each, crons, WebSockets, a
managed Postgres database and requests up to 1 minute.

## What we verified

The hosts’ limits on the dates above. We didn’t deploy FastAPI to the other
hosts for this page. Gregale’s plans are from its plans page on December 4,
2026, and the FastAPI numbers from our own test that day, after which we
deleted the test app.

## Questions

### Where can I host a FastAPI app for free?

Render, Vercel, Koyeb, Railway, Google Cloud Run, Fly.io, Oracle Cloud and Gregale all have a free option that runs FastAPI, and PythonAnywhere runs it on beta ASGI hosting. They differ in what happens while nobody visits: Render takes about a minute to wake after 15 idle minutes, Koyeb wakes in 1 to 5 seconds after an idle hour, and Gregale parks the app after a minute and wakes it in about 0.2 seconds.

### Does PythonAnywhere host FastAPI for free?

Only on its ASGI hosting, which is in beta and set up with the pa command-line tool. PythonAnywhere hasn’t settled its price, and a free account reaches only allowlisted sites.

### Does Render’s free tier work for FastAPI?

Yes, with a wait: Render spins a free web service down after 15 minutes without inbound traffic, and the next request takes about a minute to wake it. A workspace gets 750 free instance hours a month, and local files are lost at every spin-down.

### Can I host FastAPI on Vercel for free?

Yes, as a Python function on the Hobby plan, which includes 4 hours of Active CPU and 1 million invocations a month. A request can run for up to 300 seconds, and the file system is read-only apart from /tmp.

### Is there free FastAPI hosting that never sleeps?

Oracle Cloud’s Always Free VMs run all the time if you set up uvicorn, a reverse proxy and TLS yourself, and Fly.io’s $5 monthly credit, with a card, covers a 256 MB Machine running all month.

Canonical URL: https://gregale.dev/articles/free-fastapi-hosting

