FastAPI 0.115 · Running the app

Change the host and port

Listen on all interfaces on port 8080, for example inside a container or on a LAN.

fastapi dev main.py --host 0.0.0.0 --port 8080

Caution: Binding to 0.0.0.0 exposes the development server to your network.

Official FastAPI 0.115 documentation

More running the app commands

All running the app commands · FastAPI 0.115 cheatsheet

Was this page helpful?