Phemeral Logo
  • ASGI
  • uvicorn
  • Supported

Deploy FastHTML serverlessly.

Scales to zero. Scales up (cold start) in less than 50ms. No config files needed, no infra to manage.

Why FastHTML fits Phemeral

No adapters, no wrappers, no config.

  • One line of config, and only once

    Phemeral figures out what dependencies you're using and what version of Python you're using. Set a start command once and never think about it again.

  • Runs serverlessly without compromises

    Websockets and SSE are supported. And even though your app is running on serverless infra, it runs with uvicorn just like normal. So, no more adapters to get your app running for serverless (Mangum).

  • Free concurrency even if you didn't write async

    Since each request is handled in an ephemeral serverless environment, concurrent requests won't block each other. Even if your app isn't using asyncio.

  • Lightning fast cold starts.

    When scaling up, your app goes from dead to alive in less than 50 ms. Pretty darn fast.

Deployment model

Github integration gives you CI/CD. New deployments are triggered on pushes to your repo.

  1. 01

    Push

    A push triggers a deployment.

  2. 02

    Detect

    Python version, framework, package manager, project root and entry point are detected from source.

  3. 03

    Build

    Dependencies are installed, the project is built.

  4. 04

    Live

    The deployment is assigned a URL and any custom domains you've set up will route to the latest deployment.

Platform features you need for a FastHTML app

  • Environments

    Production, Staging, and Development are created with every project. Make as many other environments as you need too.

  • Environment variables

    Manage your environment variables for your app. Set env vars for each of your environments.

  • Custom domains

    Use your custom domains for your hosted apps.

  • Build and runtime logs

    Observability you need. Monitor build logs as your deployment is built, and runtime logs as it runs. Catch bugs before they're bugs.

  • Custom start command

    Set a custom start command if you're doing something fancy.

  • CRON jobs

    Set up CRON jobs to make requests to your deployment on whatever schedule you want.

Everything around the app

Databases, static files, background work and scaling.

Databases

Provision managed serverless Postgres clusters inside the project.

Our managed serverless Postgres scales up and down to match your traffic

Static files

FastHTML serves files that sit beside your application, and you can mount StaticFiles for anything more specific.

app.mount("/static", StaticFiles(directory="static"))

Background work

Scheduled webhooks cover recurring jobs: cache warming, maintenance endpoints, and application-level tasks triggered on a schedule.

0 0 3 * * * → every day at 03:00 UTC

Scaling and connections

Deployments scale to zero when idle and up on demand.

A minimal FastHTML project

That's all you need. No config files to be found.

Repository

my-project/
├── .python-version
├── pyproject.toml
├── uv.lock
└── app/
    └── main.py

app/main.py

from fasthtml.common import FastHTML, P, Titled

app = FastHTML()

@app.get("/")
def read_root():
    return Titled("Hello", P("Hello, World!"))

Set uvicorn app.main:app --host 0.0.0.0 --port 8000 as the start command.

Read the full tutorial

All docs

FastHTML on Phemeral, answered

Your app is started with uvicorn on port 8000, over ASGI. For the example project on this page that means uvicorn app.main:app --host 0.0.0.0 --port 8000. It runs the same way it does on your machine, on serverless infrastructure that scales to zero.

Host your FastHTML app on Phemeral.

Connect a repository, make a push. Free to start.

Other frameworks