How Do I Deploy a FastAPI App to Azure App Service? Step by Step, From Zero
Versions used in this post — read this first: Python 3.12.3 · Azure CLI 2.91.0 · fastapi 0.162.0 · uvicorn 0.54.0 · gunicorn 26.2.0 · uvicorn-worker 0.4.0 · App Service runtime PYTHON:3.12 . Everything runs from one file, main.py , printed in full below — the exact file in the companion repo. Recorded October 2026; the free-tier limits and prices below are Microsoft's published figures as of that date. The direct answer Deploy a FastAPI app to Azure App Service, step by step, on the free tier: put the app in a folder with requirements.txt at the root, create a resource group, a free (F1) App Service plan, and a Python 3.12 web app, set two app settings, deploy a zip of the code, and — the step most tutorials skip — set the startup command . On Python 3.13 and earlier, App Service auto-detects Django and Flask only; a FastAPI app with no startup command doesn't error, it silently serves a built-in default page. The startup command is one line, and this post explains every piec...