Deploy a FastAPI App – Render Docs

Deploy a FastAPI App

FastAPI is a modern, high-performance web framework for building APIs with Python 3.7+ based on standard Python type hints.

Here's how to deploy a basic FastAPI app on Render.

  1. Create your own repository using the render-examples/fastapi template on GitHub.
  1. Create a new Web Service on Render, and give Render permission to access your new repo.
  2. Provide the following values during service creation:
Setting Value
Language Python 3
Build Command pip install -r requirements.txt
Start Command uvicorn main:app --host 0.0.0.0 --port $PORT

That's it! Your web service will be live at its onrender.com URL as soon as the deploy finishes.

See Specifying a Python Version if you need to customize the version of Python used for your app.