Free FastAPI hosting
Reverhost runs FastAPI, a modern Python API framework, in an always-on container built from your Dockerfile, for $0. No credit card is needed, and your agent can deploy it with one instruction.
Last updated November 25, 2026
What you get
- An always-on container with 256 MB of RAM with no swap, 0.5 CPU and images up to 1 GB
- A URL at
<app-slug>.easyhost.fun, plus custom domains with HTTPS - One Postgres 16 database and one S3 bucket per project
- 2 apps per project, with a 128 MB database and 256 MB of storage
How FastAPI builds and runs
| Step | What your Dockerfile runs |
|---|---|
| Build | pip install -r requirements.txt |
| Start | uvicorn main:app --host 0.0.0.0 --port $PORT |
| Runtime env | PORT=3000 and HOSTNAME=0.0.0.0 from Reverhost, plus your own variables |
Add fastapi and uvicorn to requirements.txt. The Python template already starts FastAPI, so it works as is when your app object is app in main.py.
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def home():
return {"hello": "Reverhost"}The Dockerfile
FROM python:3.12-slim WORKDIR /app ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PORT=3000 COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 3000 CMD ["sh", "-c", "exec uvicorn main:app --host 0.0.0.0 --port $PORT"]
Save it as Dockerfile in your project folder. It is based on the Python template.
Deploy it
npx ezhst projects create my-project --link npx ezhst apps create my-app npx ezhst build dockerfile set -f Dockerfile npx ezhst env import .env npx ezhst deploy
Connect Postgres
npx ezhst db create main npx ezhst db info --json npx ezhst env set DATABASE_URL="postgresql://..." npx ezhst redeploy
Use psycopg, asyncpg or SQLAlchemy with os.environ["DATABASE_URL"]. Add the driver to requirements.txt.
Limits and caveats
One uvicorn process fits comfortably in 256 MB of RAM. Add workers only if memory allows, and keep background work small.
Apps run in one region, with no edge network, preview deployments or Git integration. See all frameworks and Python hosting.
Frequently asked questions
Is FastAPI hosting on Reverhost really free?
Yes. It costs $0 per month with no credit card and no trial period, within the published limits.
Does my FastAPI app sleep when idle?
No. Reverhost apps run in an always-on container and do not sleep when idle.
Start for free
Install the skill, choose Global or Local, then tell your agent to deploy. No credit card, no config files.
$npx ezhst skill install